/* ======================================================
   BRAND VARIABLES (CongressMoney)
   ====================================================== */

:root {
    --brand-green: #2F4F3E;
    --brand-green-dark: #1F3A2E;
    --brand-gold: #C2A24D;
    --brand-gold-dark: #B0893F;

    --bg-paper: #F8F9F6;
    --border-soft: #E2E4DF;

    --text-primary: #1E1E1E;
    --text-muted: #6B7280;
}

/* ======================================================
   BRAND MASTHEAD (LOGO ABOVE NAVBAR)
   ====================================================== */

.brand-masthead {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-soft);
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px; /* Ensure consistent height for centering */
    text-align: center; /* Fallback for inline elements */
}

.brand-link {
    display: inline-block;
}

.brand-logo-large {
    height: 150px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Tablet */
@media (max-width: 991px) {
    .brand-logo-large {
        height: 140px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .brand-logo-large {
        height: 110px;
    }
}

/* Tighten navbar so it doesn't feel oversized */
.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Align navbar links to the left only on larger screens */
@media (min-width: 992px) {
    .navbar-nav {
        margin-left: 0;
        margin-right: auto;
    }
}

/* ======================================================
   HEADER / NAVBAR
   ====================================================== */

.bg-brand {
    background-color: var(--brand-green) !important;
}

.navbar-brand,
.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-nav .nav-link.active {
    color: var(--brand-gold) !important;
    font-weight: 600;
}

/* ======================================================
   MAIN CONTAINER
   ====================================================== */

body {
    background-color: var(--bg-paper);
    color: var(--text-primary);
}

.main-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}



/* Featured Representative Card */
.featured-rep-card {
    transition: transform 0.2s ease;
}

.rep-headshot {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid var(--brand-green);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rep-headshot:hover {
    transform: scale(1.05);
    border-color: var(--brand-gold);
}

.rep-name {
    color: var(--brand-green);
    font-weight: 600;
    font-size: 1.1rem;
}

.rep-tagline {
    font-size: 0.9rem;
    font-style: italic;
}

/* Hover effect for clickable images */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(47, 79, 62, 0.2);
}

/* Ensure all top row cards have equal height */
.row .col-md-4 .card {
    height: 100%;
    min-height: 280px;
}

.row .col-md-4 .card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ======================================================
   DOCUMENT CARDS
   ====================================================== */

.document-card {
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.document-card .card {
    border: 1px solid var(--border-soft);
}

.document-card:hover {
    transform: translateY(-2px);
}

.document-card:hover .card {
    border-color: var(--brand-green);
    box-shadow: 0 6px 16px rgba(47, 79, 62, 0.15);
}

.document-card:hover .card-title {
    color: var(--brand-green);
}

.external-icon {
    color: var(--text-muted);
    transition: color 0.2s;
}

.document-card:hover .external-icon {
    color: var(--brand-green);
}

/* ======================================================
   BADGES
   ====================================================== */

.badge.bg-primary {
    background-color: var(--brand-green) !important;
}

.badge.bg-secondary {
    background-color: var(--text-muted) !important;
}

.badge.bg-warning {
    background-color: var(--brand-gold) !important;
    color: var(--text-primary) !important;
}

/* ======================================================
   NO RESULTS STATE
   ====================================================== */

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ======================================================
   AD REGIONS (SUBTLE / NON-JARRING)
   ====================================================== */

.ad-banner-top {
    margin: 0 auto;
    max-width: 100%;
    min-height: 100px;
}

.ad-placeholder {
    background: var(--bg-paper);
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.ad-banner-top .ad-placeholder {
    padding: 40px 20px;
}

.ad-sidebar-left .ad-placeholder,
.ad-sidebar-right .ad-placeholder {
    padding: 15px;
    min-height: 600px;
}

.ad-sidebar-left,
.ad-sidebar-right {
    position: sticky;
    top: 20px;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */

@media (max-width: 991px) {
    .ad-sidebar-left,
    .ad-sidebar-right {
        display: none;
    }
}

/* ======================================================
   BUTTONS
   ====================================================== */

.btn-primary {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
}


/* ======================================================
   TIMELINE CAROUSEL STYLES
   ====================================================== */

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--brand-green);
    border-radius: 50%;
    padding: 20px;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: var(--brand-green-dark);
}

.year-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--brand-green);
    text-align: center;
    margin: 2rem 0 1rem 0;
}

.asset-amount {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0 2rem 0;
}

.asset-amount.negative {
    color: #dc2626;
}

.asset-amount.modest {
    color: #ca8a04;
}

.asset-amount.high {
    color: #059669;
}

.info-card {
    background: var(--bg-paper);
    border-radius: 8px;
    padding: 2rem;
    min-height: 250px;
}

.business-card {
    background-color: #f0f4f1;
    border-left: 3px solid var(--brand-green);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.context-box {
    background-color: #fffbeb;
    border-left: 4px solid var(--brand-gold);
    padding: 1rem;
    border-radius: 4px;
}

/* Responsive adjustments for timeline */
@media (max-width: 576px) {
    .year-display {
        font-size: 2rem;
    }
    .asset-amount {
        font-size: 1.75rem;
    }
    .info-card {
        padding: 1.5rem;
    }
}

/*Charts*/
    .chart-container {
        background: #1e293b;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        margin-bottom: 30px;
    }
    .pie-section {
        background: #1e293b;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    #assetPieChart, #liabilityPieChart {
        min-height: 400px;
    }
    .year-nav {
        text-align: center;
        margin-bottom: 20px;
    }
    .year-btn {
        padding: 10px 20px;
        font-size: 16px;
        background: #475569;
        color: #e2e8f0;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    .year-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    .total-box {
        text-align: center;
        margin-top: 15px;
        padding: 10px;
        background: #0f172a;
        border-radius: 8px;
    }
    .total-box.assets {
        border: 2px solid #10b981;
    }
    .total-box.liabilities {
        border: 2px solid #ef4444;
    }
    .total-box.networth {
        border: 3px solid #38bdf8;
        margin-top: 20px;
        font-size: 22px;
        padding: 20px;
    }