/* ── Variables ───────────────────────────────────────────── */
:root {
    --navy: #1b2d6b;
    --navy-dark: #111d47;
    --red: #c41230;
    --red-dark: #9e0e26;
    --white: #ffffff;
    --silver: #d4d4d4;
    --text: #1a1a1a;
    --nav-height: 60px;
    --sidebar-w: 52px;
}

/* ── Reset ───────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16pt;
    color: var(--text);
}

body {
    background: #f5f5f5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ══ DESKTOP NAV (fixed top, tabs centered) ═════════════════ */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--navy);
    height: var(--nav-height);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.nav-tabs {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nav-tab {
    color: var(--silver);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition:
        color 0.2s,
        border-color 0.2s;
}

.nav-tab:hover,
.nav-tab.active {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* ── Main content offset for fixed top nav ───────────────── */
#main-content {
    padding-top: var(--nav-height);
}

/* ══ SECTIONS ════════════════════════════════════════════════ */
.page-section {
    min-height: 100vh;
    border-bottom: 3px solid var(--navy);
    scroll-margin-top: var(--nav-height);
}

.section-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ══ HOME ════════════════════════════════════════════════════ */
#home {
    display: flex;
    align-items: center;
}

#home .section-content {
    max-width: 100%;
    padding: 3rem 4rem;
    width: 100%;
}

.home-split {
    display: flex;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.home-map,
.home-intro {
    flex: 1;
}

.home-map {
    display: flex;
    flex-direction: column;
}

.map-placeholder {
    background: var(--navy-dark);
    border: 2px solid var(--red);
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--silver);
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.map-placeholder small {
    font-size: 0.85rem;
    opacity: 0.7;
}

.map-legend {
    background: #2844a4;
    border: 2px solid var(--red);
    border-radius: 0 0 8px 8px;
    border-top: none;
    padding: 0.4rem 0.8rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.map-legend-item {
    color: var(--silver);
    font-size: 0.85rem;
    padding: 0.15rem 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s;
}

.map-legend-item:hover,
.map-legend-item.active {
    color: var(--white);
    border-bottom-color: var(--white);
}

.map-legend-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.home-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.25rem;
}

.candidate-photo {
    width: 440px;
    height: 440px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--red);
}

.home-intro h1 {
    font-size: 2.4rem;
    letter-spacing: 0.04em;
    color: var(--white);
}

.home-tagline {
    font-size: 1.1rem;
    color: var(--silver);
    line-height: 1.6;
}

/* ══ ABOUT ═══════════════════════════════════════════════════ */
#about .section-content {
    max-width: 760px;
}

#about p {
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

/* ══ ISSUES ══════════════════════════════════════════════════ */
#issues .section-content h3 {
    font-size: 1.25rem;
    color: var(--navy);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

#issues .section-content h3:first-child {
    margin-top: 0;
}

#issues .section-content p {
    line-height: 1.75;
    color: #333;
    margin-bottom: 0.5rem;
}

/* ══ CONTACT ═════════════════════════════════════════════════ */
#contact .section-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info {
    text-align: center;
}

.contact-info p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.contact-info a {
    color: var(--silver);
    border-bottom: 1px solid var(--red);
    padding-bottom: 2px;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: var(--white);
}

/* ══ DONATE ══════════════════════════════════════════════════ */
#donate .section-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-content {
    text-align: center;
}

.donate-content p {
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 560px;
}

.donate-btn {
    display: inline-block;
    background: var(--white);
    color: var(--red);
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.9rem 2.5rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
    transition:
        background 0.2s,
        color 0.2s;
}

.donate-btn:hover {
    background: var(--navy);
    color: var(--white);
}

/* ══ FOOTER ══════════════════════════════════════════════════ */
#site-footer {
    background: var(--navy-dark);
    color: var(--silver);
    text-align: center;
    padding: 1.25rem 1rem;
    font-size: 10pt;
    letter-spacing: 0.02em;
}

/* ══ MOBILE ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Fixed vertical sidebar on the left */
    #main-nav {
        top: 0;
        left: 0;
        right: auto;
        bottom: 0;
        height: 100svh;
        width: var(--sidebar-w);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    }

    .nav-tabs {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        gap: 0;
    }

    .nav-tab {
        writing-mode: vertical-lr;
        transform: rotate(180deg);
        padding: 1rem 0.6rem;
        font-size: 0.8rem;
        border-bottom: none;
        border-left: 3px solid transparent;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .nav-tab:hover,
    .nav-tab.active {
        border-bottom-color: transparent;
        border-left-color: var(--white);
        color: var(--white);
    }

    /* Push content right to clear sidebar */
    #main-content {
        padding-top: 0;
        margin-left: var(--sidebar-w);
    }

    /* Home: stack vertically on small screens */
    .home-split {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 1.5rem;
    }

    .home-map,
    .home-intro {
        flex: none;
    }

    #home .section-content {
        padding: 2rem 1.25rem;
    }

    .home-intro h1 {
        font-size: 1.8rem;
    }

    .candidate-photo {
        width: 160px;
        height: 160px;
    }

    .map-placeholder {
        aspect-ratio: 4 / 3;
        min-height: 260px;
    }

    .section-content {
        padding: 2rem 1.25rem;
    }
}
