/* =================================================================
   Prairie City — Site Styles
   Cascade order: colors → typography → layout → components → a11y
   ================================================================= */

/* =================================================================
   1. BASE COLORS — Pico variable overrides & palette
   ================================================================= */

[data-theme=light],
:root:not([data-theme=dark]) {
    --pico-font-family: Rubik, sans-serif;
    --pico-primary: #2d4a22;
    --pico-primary-background: #2d4a22;
    --pico-primary-hover: #1e3316;
    --pico-color: #2c2c2c;
    --pico-muted-color: #545454;
    --pico-background-color: #ffffff;
    --radius: 8px;
}

/* =================================================================
   2. TYPOGRAPHY
   ================================================================= */

.page-intro {
    background: #2d4a22;
    text-align: center;
    padding: 0.5em 2em;
    margin: 0.75rem auto 1rem auto;
    width: fit-content;
    border-radius: var(--radius);
}
.page-intro-main {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}
.page-intro-sub {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.7rem;
    font-weight: 400;
    margin: 0;
}

@media (max-width: 640px) {
    .page-intro { display: none; }
}

/* =================================================================
   3. ACCESSIBILITY
   ================================================================= */

.skip-nav {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--pico-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 200;
    font-weight: 500;
}
.skip-nav:focus { top: 0; }

/* =================================================================
   4. LAYOUT — page structure, top to bottom
   ================================================================= */

/* 4a. Banner */
.banner-hero {
    width: 100%;
    height: clamp(160px, 22vw, 350px);
    background-color: #1e3316;
    background-image: url('/assets/images/sbm-banner.jpg');
    background-size: auto 100%;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}
.banner-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 2rem;
}
.banner-hero-overlay h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.3);
}
.banner-hero-tagline {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 255, 255, 0.2);
}

@media (max-width: 767px) {
    .banner-hero-overlay h1 { font-size: 1.6rem; }
    .banner-hero-tagline { font-size: 0.9rem; }
}

/* 4b. Navbar */
.site-nav {
    --pico-nav-element-spacing-vertical: 0.35rem;
    --pico-nav-link-spacing-horizontal: 1rem;
    background: var(--pico-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    padding: 0 1rem;
    flex-wrap: wrap;
}
.site-nav a, .site-nav strong { color: #fff !important; }

.nav-toggle { display: none !important; }
.nav-toggle-label {
    display: none !important;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0;
    user-select: none;
}
.nav-links { display: flex; }

@media (max-width: 768px) {
    .nav-toggle-label { display: block !important; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* 4c. Page main */
body { background: #1e3316; }
.page-main { background: #ffffff; padding: 1.5rem; }

/* =================================================================
   5. CONTENT SECTIONS
   ================================================================= */

.content-section {
    background: #f8faf6;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    margin: 0 0 0.5rem 0;
    scroll-margin-top: 4rem;
}
.content-section h2,
.content-section h3 {
    font-weight: 700;
}
.content-section h2 {
    background: #c8d8c0;
    display: block;
    margin: -3rem -2rem 1.5rem -2rem;
    padding: 0.6rem 2rem;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 1.35rem;
}
.content-section h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
    color: var(--pico-primary);
}
.content-section__table {
    background: #edf2e8;
    border-radius: var(--radius);
    overflow-x: auto;
}
.content-section__table td {
    word-break: break-word;
}
.content-section__table th,
.content-section__table td {
    background: #edf2e8;
}

@media (max-width: 480px) {
    .content-section { padding: 1.5rem 0.75rem; }
}

/* BEM: subsection header */
.content-section__sub {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #c8d4c0;
}
.content-section__sub h3 {
    background: none;
    display: block;
    padding: 0;
    border-radius: 0;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--pico-primary);
}

/* BEM: styled button */
.content-section__button {
    display: inline-block;
    background: var(--pico-primary);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}
.content-section__button:hover {
    background: var(--pico-primary-hover);
    color: #fff;
    text-decoration: none;
}

/* =================================================================
   6. NEWS SECTION (no bg, admonitions only)
   ================================================================= */

.news-section {
    padding: 0;
    border-radius: var(--radius);
    margin: 0.5rem 0 1rem 0;
    scroll-margin-top: 4rem;
}
.news-section h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}
.news-section .admonition {
    font-size: 0.9rem;
    margin: 0.75rem 0;
}
.news-section__more {
    display: inline-block;
    background: var(--pico-primary);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}
.news-section__more:hover {
    background: var(--pico-primary-hover);
    color: #fff;
    text-decoration: none;
}

/* =================================================================
   7. ADMONITIONS — BEM: .admonition (base) + .admonition--* (flavor)
   ================================================================= */

/* Base — shared by all flavors */
.admonition {
    margin: 1rem 0 1.5rem 0;
    padding: 1rem 1.25rem;
    border: none;
    border-left: 4px solid;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.admonition p { margin: 0; padding: 0; background: none; border: none; }
.admonition p + p { margin-top: 0.5rem; }
.admonition p:first-child strong:first-child { color: inherit; }
.admonition strong { color: inherit; }

/* Info (green) */
.admonition--info {
    background: #edf2e8;
    border-left-color: var(--pico-primary);
}
.admonition--info p:first-child strong:first-child { color: var(--pico-primary); }

/* Notice (gold ochre) */
.admonition--notice {
    background: #fdf6e3;
    border-left-color: #a67509;
}
.admonition--notice p:first-child strong:first-child { color: #7a5505; }

/* Danger (red) */
.admonition--danger {
    background: #fdf0ed;
    border-left-color: #b8442a;
}
.admonition--danger strong { color: #b8442a; }

/* Accordion (details/summary) */
details.minutes-year {
    background: #f8faf6;
    padding: 0;
    border-radius: var(--radius);
    margin: 0 0 0.5rem 0;
    scroll-margin-top: 4rem;
    overflow: hidden;
}
details.minutes-year > summary:not([role]) {
    background: #2d4a22;
    color: #c8d8c0;
    padding: 0.3rem 1.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 400;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
details.minutes-year[open] > summary:not([role]):not(:focus) {
    color: #ffffff;
}
details.minutes-year > summary:not([role]):focus,
details.minutes-year > summary:not([role]):focus-visible {
    color: #c8d8c0;
    outline: 2px solid rgba(255,255,255,0.3);
    outline-offset: -2px;
}
details.minutes-year[open] > summary:not([role]):focus,
details.minutes-year[open] > summary:not([role]):focus-visible {
    color: #ffffff;
}
details.minutes-year > summary::-webkit-details-marker {
    display: none;
}
details.minutes-year > summary::before {
    content: '\25B6';
    display: inline-block;
    font-size: 0.65rem;
    transition: transform 0.15s;
}
details.minutes-year[open] > summary::before {
    content: '\25BC';
}
details.minutes-year > div {
    padding: 1.2rem 1.5rem;
}

/* =================================================================
    8. FOOTER
   ================================================================= */

/* .com-site box — sky blue palette, points to prairiecityoregon.com */
.com-site {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #e0f0f5;
    border: 1px solid #1a6b8a;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 0 0 1rem 0;
}
.com-site__image {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #b0d8e8;
}
.com-site__text {
    font-size: 0.85rem;
    line-height: 1.4;
}
.com-site__text strong {
    color: #1a6b8a;
}
.com-site__main {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.com-site__sub {
    font-size: 0.75rem;
    opacity: 0.75;
    line-height: 1.3;
}
@media (max-width: 480px) {
    .com-site { flex-direction: column; text-align: center; }
    .com-site__image { width: 100%; height: 120px; }
}

.site-footer {
    text-align: center;
    color: #ffffff;
    opacity: 0.8;
    padding: 2rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
}
.site-footer a { color: #ffffff; }
.site-footer hr { border-color: rgba(255,255,255,0.2); }

/* =================================================================
   9. ACCESSIBILITY OVERRIDES
   ================================================================= */

/* Underline links in body text — helps color-blind users distinguish links */
.page-main p a,
.page-main li a,
.page-main td a {
    text-decoration: underline;
}

/* Windows High Contrast Mode / prefers-contrast: more */
@media (prefers-contrast: more) {
    :root {
        --pico-primary: #1a3a10;
        --pico-primary-hover: #0d1f08;
        --pico-muted-color: #2c2c2c;
    }
    .banner-hero-overlay {
        background: rgba(0, 0, 0, 0.55);
    }
    .site-nav {
        background: #1a3a10;
    }
    a {
        text-decoration: underline;
    }
}
