/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #000;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    list-style: none;
}

address {
    font-style: normal;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #000;
    color: #ffcd00;
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-weight: 700;
    text-decoration: underline;
}

.skip-link:focus {
    top: 0.5rem;
}

/* ===== FOCUS STYLES ===== */
*:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

.site-footer *:focus-visible,
.in-the-loop *:focus-visible,
.community-voices *:focus-visible,
.social-center-cell *:focus-visible {
    outline-color: #ffcd00;
}

/* ===== EMAIL TEST PAGE (temporary diagnostic — delete with the .razor) ===== */
.email-test-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.email-test-row label {
    font-weight: 600;
}

.email-test-row input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 1rem;
}

.email-test-status {
    margin-top: 1rem;
}

.email-test-success {
    padding: 0.75rem 1rem;
    background: #e6f4e6;
    border-left: 4px solid #2e7d32;
    color: #1b5e20;
}

.email-test-error {
    padding: 0.75rem 1rem;
    background: #fbe9e7;
    border-left: 4px solid #c62828;
    color: #b71c1c;
}

/* ===== UTILITY ===== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== HEADER ===== */
.site-header {
    background-color: #ffcd00;
    padding: 5px 0;
    position: relative;
    z-index: 101;
    overflow: visible;
    margin-bottom: 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: flex-start;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #000;
}

.iowa-block-logo {
    height: 97px;
    width: auto;
    display: inline-block;
    vertical-align: top;
    position: relative;
    top: -10px;
    margin-bottom: -20px;
}

.header-divider {
    width: 1px;
    height: 1.5rem;
    background-color: #000;
}

.header-unit-name {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 2rem;
    font-weight: 300;
}

/* Donate CTA in the yellow header — solid black on yellow for strong but
   non-garish contrast (21:1). margin-left:auto pushes it to the right edge
   of the flex header-inner; align-self:center keeps it vertically centered
   against the tall logo block. */
.btn-donate {
    display: inline-block;
    margin-left: auto;
    align-self: center;
    background-color: #ffcd00;
    color: #000;
    padding: 0.65rem 1.6rem;
    border: 1px solid #000;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.btn-donate:hover {
    background-color: #000;
    color: #fff;
}

.btn-donate:focus-visible {
    outline: 2px solid #000;
    outline-offset: 3px;
}

/* Mobile header sizing — shrink the IOWA block, unit name, and Donate button
   so all three fit on a single row at 375px wide. The desktop logo's
   97px height (188px wide) already crowded out the unit name on phones; the
   Donate button surfaced it. */
@media (max-width: 768px) {
    .iowa-block-logo {
        height: 50px;
        top: 0;
        margin-bottom: 0;
    }

    .header-unit-name {
        font-size: 0.85rem;
    }

    .btn-donate {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
        letter-spacing: 0.04em;
    }
}

/* ===== NAVIGATION ===== */
.site-nav {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.site-nav.scrolled {
    background-color: #000;
    border-bottom-color: #000;
}

.site-nav.scrolled .nav-links > li > a {
    color: #fff;
}

.site-nav.scrolled .mobile-nav-toggle {
    color: #fff;
}

/* Mobile branding cue — when the sticky nav has scrolled past the header,
   the site name in .site-header is off-screen, so we mirror it next to the
   hamburger. Only shown at hamburger-visible widths (<=768px) AND when the
   nav is in its scrolled state. */
.site-nav-brand {
    display: none;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-left: 0.25rem;
    white-space: nowrap;
}

.site-nav-brand:focus-visible {
    outline: 2px solid #ffcd00;
    outline-offset: 2px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .site-nav.scrolled .site-nav-brand {
        display: inline-block;
    }
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    height: 100%;
}

.nav-links > li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
    color: #000;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    border-bottom: 7px solid transparent;
    transition: border-color 0.2s;
}

.nav-links > li:hover > a {
    border-bottom-color: #ffcd00;
}

/* ===== DROPDOWN MENUS ===== */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    /* Square the top corners so the menu's top edge sits flush under the straight
       yellow hover bar (Bootstrap rounds all four by default). Bottom stays rounded. */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #000;
    font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    transition: background-color 0.2s;
}

.dropdown-menu li a:hover {
    background-color: #f0f0f0;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    overflow: hidden;
    background: #000;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    aspect-ratio: 12 / 5;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 205, 0, 0.85);
    color: #000;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    transition: background-color 0.2s;
}

.carousel-btn:hover {
    background: #ffcd00;
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* ===== IN THE LOOP ===== */
.in-the-loop {
    background-color: #000;
    padding: 3.6rem 0 4.32rem;
}

.loop-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.loop-header h2 {
    font-size: 4.0625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: #fff;
}

.newsletter-link {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #fff;
    padding-bottom: 2px;
    color: #fff;
}

.newsletter-link:hover {
    opacity: 0.7;
}

.loop-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.loop-card {
    background: #ffcd00;
    overflow: hidden;
    transition: transform 0.2s;
    display: block;
    color: inherit;
    text-decoration: none;
}

.loop-card:hover {
    transform: translateY(-3px);
}

.loop-empty {
    color: #fff;
    grid-column: 1 / -1;
}

.loop-card-skeleton {
    background: #ffcd00;
    overflow: hidden;
}

.loop-card-skeleton .skeleton-img {
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.1);
    animation: loop-skeleton-pulse 1.4s ease-in-out infinite;
}

.loop-card-skeleton .skeleton-body {
    padding: 1rem;
}

.loop-card-skeleton .skeleton-line {
    height: 1.2rem;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 0.4rem;
    animation: loop-skeleton-pulse 1.4s ease-in-out infinite;
}

.loop-card-skeleton .skeleton-line:last-child {
    margin-bottom: 0;
    width: 70%;
}

@keyframes loop-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .loop-card-skeleton .skeleton-img,
    .loop-card-skeleton .skeleton-line {
        animation: none;
    }
}

.loop-card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.loop-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loop-card-body {
    padding: 1rem;
    background-color: #ffcd00;
}

.loop-card-body p {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.4;
}

/* ===== PASSION SECTION ===== */
.passion-section {
    padding: 14.4rem 1.5rem;
    text-align: center;
    background: #fff;
}

.passion-content h2 {
    font-size: 4.0625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.passion-content h2 em {
    font-style: italic;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.btn-outline-dark {
    display: inline-block;
    padding: 0.7rem 2rem;
    border: 2px solid #000;
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 0.2s;
}

.btn-outline-dark:hover {
    background-color: #000;
    color: #fff;
}

/* ===== COMMUNITY VOICES ===== */
.community-voices {
    background-color: #1a1a1a;
    color: #fff;
    padding: 0;
}

.voices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
}

.voices-text {
    /* Constrain the text content width to roughly what it had inside the
       1200px .section-container, then right-align it within the left cell so
       the text continues to meet the image at the page center while the image
       extends to the right viewport edge. The flex column + justify-content
       vertically centers the text inside the cell, which (with grid
       align-items: stretch) matches the image's full section height. */
    max-width: 600px;
    margin-left: auto;
    padding: 4.32rem 2rem 4.32rem 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.voices-text h2 {
    font-size: 4.0625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.voices-text blockquote {
    position: relative;
    padding: 2.5rem 0 2rem 0;
}

.voices-text blockquote::before,
.voices-text blockquote::after {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 5rem;
    line-height: 1;
    color: #fff;
    position: absolute;
}

.voices-text blockquote::before {
    content: "\201C";
    top: -0.5rem;
    left: -0.5rem;
}

.voices-text blockquote::after {
    content: "\201D";
    bottom: -1rem;
    right: 0;
}

.voices-text blockquote p {
    font-size: 1.35rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.voices-attribution {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.voices-image {
    overflow: hidden;
}

.voices-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== PHOTO GRID ===== */
.photo-grid {
    overflow: hidden;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.grid-row img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.grid-3x3 img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.social-center-cell {
    background-color: #333;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    aspect-ratio: 4 / 3;
}

.social-center-cell h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.social-center-cell p {
    margin: 0 0 1rem;
    font-size: 0.85rem;
}

.social-center-cell .social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-center-cell .social-icons a {
    color: #fff;
}

/* PHOTO GRID — social card explicitly placed in 3x3 center cell so it can
   appear first in markup (for the mobile layout where CTA leads). On mobile
   the grid container becomes a flex column with a scroll-snap photo strip. */
.social-center-cell {
    grid-row: 2;
    grid-column: 2;
}

.photo-strip {
    display: contents;
}

.photo-strip-dots {
    display: none;
}

@media (max-width: 768px) {
    .grid-3x3 {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .social-center-cell {
        grid-row: auto;
        grid-column: auto;
        aspect-ratio: auto;
        padding: 2rem 1rem;
    }

    .photo-strip {
        display: flex;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        scrollbar-width: none;
    }

    .photo-strip::-webkit-scrollbar {
        display: none;
    }

    .photo-strip > img {
        flex: 0 0 76.9%;
        /* width override needed because the cascaded .grid-3x3 img { width: 100% }
           combined with the image's intrinsic min-content keeps the photo at its
           natural width instead of the flex-basis we want. */
        width: 76.9%;
        min-width: 0;
        max-width: none;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        scroll-snap-align: start;
    }

    .photo-strip-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }

    .photo-strip-dot {
        width: 1.75rem;
        height: 1.75rem;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .photo-strip-dot::before {
        content: "";
        width: 0.625rem;
        height: 0.625rem;
        border-radius: 50%;
        border: 1px solid #595959;
        background: transparent;
        transition: background-color 0.15s ease;
    }

    .photo-strip-dot:hover::before,
    .photo-strip-dot.active::before {
        background-color: #595959;
    }

    .photo-strip-dot:focus-visible {
        outline: 2px solid #ffcd00;
        outline-offset: 0;
        border-radius: 50%;
    }
}

/* ===== EVENTS SECTION ===== */
.events-section {
    padding: 5.18rem 0;
    background-color: #f5f5f5;
}

.events-heading {
    text-align: left;
    font-size: 4.0625rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
}

.events-loading {
    text-align: center;
    color: #666;
}

.events-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.event-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

.event-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.event-card:focus-visible {
    outline: 2px solid #ffd200;
    outline-offset: 2px;
}

.event-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-card-body {
    padding: 1.25rem;
}

.event-card-body h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.event-date {
    font-size: 0.85rem;
    color: #545454;
    margin: 0 0 0.25rem;
}

.event-location {
    font-size: 0.8rem;
    color: #595959;
    margin: 0;
}

/* ===== SOCIAL SECTION ===== */
.social-section {
    background-color: #1a1a1a;
    color: #fff;
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    max-width: 100%;
    padding: 0;
}

.social-photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.social-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.social-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.social-info p {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    max-width: 200px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.social-icons a:hover {
    opacity: 0.7;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #151515;
    color: #fff;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    padding: 2.5rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.footer-logo .iowa-block-logo {
    height: 50px;
    position: static;
    top: auto;
    margin-bottom: 0.5rem;
    fill: #ffcd00;
}

.footer-unit {
    margin: 0.5rem 0;
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.footer-left address,
.footer-left p {
    font-size: 0.95rem;
    font-weight: 100;
    line-height: 1.5;
    color: #ccc;
    margin-top: 0.3rem;
}

.footer-left a {
    color: #ffcd00;
}

.footer-left a:hover {
    text-decoration: underline;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

.footer-right ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-right a {
    font-size: 0.95rem;
    font-weight: 100;
    color: #ccc;
    letter-spacing: 0.01em;
}

.footer-right a:hover {
    color: #ffcd00;
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 1rem;
    font-size: 0.85rem;
    font-weight: 100;
    color: #999;
}

.footer-bottom a {
    color: #999;
    font-size: 0.85rem;
}

.footer-bottom a:hover {
    color: #ffcd00;
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .site-nav {
        height: auto;
    }

    .nav-inner {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .mobile-nav-toggle {
        display: block;
        padding: 1rem 0.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links > li {
        flex: none;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links > li > a {
        justify-content: flex-start;
        text-align: left;
        padding: 0.75rem 1rem;
        height: auto;
        border-bottom: none;
    }

    .nav-links > li:hover > a {
        border-bottom: none;
        background-color: #f0f0f0;
    }

    .dropdown .dropdown-menu {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        width: auto;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.dropdown-open .dropdown-menu {
        display: block;
    }

    .loop-cards {
        grid-template-columns: 1fr;
    }

    .voices-grid {
        grid-template-columns: 1fr;
    }

    .voices-text {
        max-width: 100%;
        margin-left: 0;
        padding: 4.32rem 1.5rem;
    }

    .voices-image img {
        height: auto;
    }

    .grid-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-right {
        justify-content: flex-start;
    }

    .passion-content h2 {
        font-size: 3.25rem;
    }

    .voices-text h2 {
        font-size: 3.25rem;
    }
}

/* ===== SECTION HERO ===== */
.section-hero {
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 6rem 0 4rem;
    text-align: center;
}

.section-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.hero-content nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero-content nav a {
    color: #ffcd00;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.hero-content nav a:hover {
    border-bottom-color: #ffcd00;
}

/* ===== CONTENT PAGE LAYOUT ===== */
.content-page {
    padding: 3rem 0;
}

.content-page section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.content-page .page-title {
    font-family: 'Zilla Slab', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: left;
    margin: 0;
    color: #1a1a1a;
    white-space: nowrap;
}

.content-page .breadcrumbs {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #595959;
    margin: 0 0 0.75rem 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.content-page .breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1;
    margin: 0;
}

.content-page .breadcrumbs li + li::before {
    content: "/";
    color: #bbb;
    font-weight: 400;
}

.content-page .breadcrumbs a {
    color: #595959;
    text-decoration: none;
}

.content-page .breadcrumbs a:hover {
    color: #c8102e;
    text-decoration: underline;
}

.content-page .breadcrumbs [aria-current="page"] {
    color: #1a1a1a;
}

.content-page h2 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ffcd00;
}

.content-page h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.content-page p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-page ul,
.content-page ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-page ol {
    list-style: decimal;
}

.content-page li {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.3rem;
}

.content-page a {
    color: #000;
    text-decoration: underline;
    text-decoration-color: #ffcd00;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.content-page a:hover {
    color: #333;
}

/* ===== FEATURE QUOTE (full-bleed image + constrained text) ===== */
.feature-quote {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin: 3rem 0;
    background: #f5f3ee;
    align-items: stretch;
}

.feature-quote-image {
    background-color: #2b2b2b;
    background-image:
        linear-gradient(135deg, rgba(255,255,255,0.04) 0 50%, rgba(0,0,0,0.15) 50% 100%),
        radial-gradient(circle at 30% 30%, #4a4a4a 0%, #1f1f1f 70%);
    background-size: cover;
    background-position: center;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.feature-quote-text {
    display: flex;
    align-items: center;
    padding: 4rem 1.5rem 4rem 3rem;
    padding-right: max(1.5rem, calc((100vw - 1200px) / 2));
}

.feature-quote .feature-quote-text blockquote {
    margin: 0;
    position: relative;
    max-width: 560px;
}

.feature-quote .feature-quote-mark {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 9rem;
    line-height: 0.7;
    color: #c8102e;
    margin: 0 0 -0.5rem -0.5rem;
    user-select: none;
}

.feature-quote .feature-quote-body {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.85rem;
    line-height: 1.4;
    color: #1a1a1a;
    letter-spacing: 0.005em;
    margin: 0 0 1.75rem 0;
}

.feature-quote .feature-quote-body em {
    font-weight: 700;
    font-style: italic;
}

.feature-quote .feature-quote-attribution {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #555;
    border-top: 2px solid #c8102e;
    padding-top: 0.75rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .feature-quote {
        grid-template-columns: 1fr;
    }

    .feature-quote-image {
        min-height: 240px;
        aspect-ratio: 16 / 9;
    }

    .feature-quote-text {
        padding: 2.5rem 1.5rem;
    }

    .feature-quote .feature-quote-mark {
        font-size: 6rem;
    }

    .feature-quote .feature-quote-body {
        font-size: 1.4rem;
    }
}

/* ===== STAFF CARD GRID ===== */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.staff-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s;
}

.staff-card:hover {
    transform: translateY(-3px);
}

.staff-card-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}

.staff-card-info {
    padding: 1rem 1.5rem 1.5rem;
}

.staff-card .staff-card-name {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.staff-card .staff-card-title {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.3rem;
}

.staff-card .staff-card-bio {
    font-size: 0.8rem;
    color: #595959;
    line-height: 1.4;
}

/* ===== PROGRAM CARDS ===== */
.program-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.program-card {
    display: block;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: #000;
    border-left: 4px solid #ffcd00;
}

.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.program-card-content {
    padding: 1.5rem;
}

.program-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.program-badge {
    display: inline-block;
    background: #ffcd00;
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.program-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
}

/* ===== SESSION CARDS ===== */
.session-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.session-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.session-card-header {
    background: #000;
    color: #fff;
    padding: 1rem 1.25rem;
}

.session-card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.session-card-body {
    padding: 1.25rem;
}

.session-detail {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.session-card-footer {
    padding: 0 1.25rem 1.25rem;
}

/* ===== SESSION LIST ===== */
.session-list {
    margin: 1.5rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.session-list-banner {
    margin: 0;
    background: #000;
    color: #ffcd00;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.session-list-banner-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.session-list-banner-meta {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 400;
}

/* AM/PM time-block subheading (Weekend Enrichment). Lighter than the date banner. */
.session-list-subgroup {
    margin: 0;
    padding: 0.5rem 1rem;
    background: #f4f4ef;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.75rem;
}

.session-list-subgroup-title {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #333;
}

.session-list-subgroup-meta {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
}

.session-list-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.session-list-row:hover {
    background: #fafafa;
}

.session-list-row:focus-visible {
    outline: 2px solid #ffcd00;
    outline-offset: -2px;
}

.session-list-row.is-expanded {
    background: #fafaf3;
    border-bottom-color: #ffcd00;
}

.session-list-chevron {
    color: #888;
    font-size: 0.75rem;
    width: 14px;
    flex-shrink: 0;
    text-align: center;
}

.session-list-row.is-expanded .session-list-chevron {
    color: #000;
}

.session-list-name {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
}

.session-list-grade {
    background: #eef;
    color: #225;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.session-list-cost {
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
    min-width: 3rem;
    text-align: right;
    flex-shrink: 0;
}

.session-list-status {
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 6.5rem;
    text-align: right;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.session-list-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-open { color: #0a7d2f; }
.status-open .session-list-status-dot { background: #0a7d2f; }
.status-waitlist { color: #8a5a00; }
.status-waitlist .session-list-status-dot { background: #e3a712; }
.status-prereg { color: #2d4f80; }
.status-prereg .session-list-status-dot { background: #3a5e9a; }
.status-full,
.status-closed { color: #666; }
.status-full .session-list-status-dot,
.status-closed .session-list-status-dot { background: #bbb; }

.session-list-panel {
    background: #fafaf3;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem 1.25rem 2.5rem;
}

.session-list-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 0.85rem 0;
}

.session-list-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    font-size: 0.85rem;
    color: #555;
}

.session-list-facts li { margin: 0; }

.session-list-action p { margin: 0; }

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    background: #ffcd00;
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #e6b800;
}

.btn-secondary {
    display: inline-block;
    border: 2px solid #000;
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
}

/* ===== TAB PANEL ===== */
.tab-panel {
    margin: 1.5rem 0;
}

.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: #555;
    transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
    color: #000;
}

.tab-btn.tab-active {
    color: #000;
    border-bottom-color: #ffcd00;
}

.tab-content {
    padding: 1.5rem 0;
}

/* ===== ACCORDION ===== */
.accordion-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f5f5f5;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background: #eee;
}

.accordion-open .accordion-header {
    background: #000;
    color: #fff;
}

.accordion-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

.accordion-body {
    padding: 1.25rem;
}

.accordion-body p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* ===== QUOTE BLOCK ===== */
.quote-block {
    background: #f5f5f5;
    border-left: 4px solid #ffcd00;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
}

.quote-text {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.quote-attribution {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}

/* ===== ISSUU EMBED ===== */
.issuu-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.issuu-embed {
    flex: 1;
    min-width: 250px;
}

.issuu-embed iframe {
    border: none;
    width: 100%;
    height: 300px;
}

.issuu-caption {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.5rem;
    text-align: center;
}

/* ===== VISION/MISSION ===== */
.vision-mission {
    display: flex;
    gap: 3rem;
    margin: 3rem 0;
    text-align: center;
}

.vision-mission > div {
    flex: 1;
}

.vision-mission h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.vision-mission p {
    font-size: 1.2rem;
}

/* ===== STRATEGIC PRIORITY CARDS ===== */
.priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.priority-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    color: #000;
}

.priority-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.priority-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.priority-card-body {
    padding: 1.5rem;
}

.priority-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.priority-card-body p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
}

/* ===== CONTACT INFO ===== */
.contact-info {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE: CONTENT PAGES ===== */
@media (max-width: 768px) {
    .section-hero {
        padding: 4rem 0 3rem;
    }

    .section-hero h1 {
        font-size: 2rem;
    }

    .hero-content nav {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .content-page h2 {
        font-size: 1.6rem;
    }

    .content-page .page-title {
        font-size: 2.25rem;
        white-space: normal;
    }

    .staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .vision-mission {
        flex-direction: column;
        gap: 2rem;
    }

    .priority-grid {
        grid-template-columns: 1fr;
    }

    .program-card-grid {
        grid-template-columns: 1fr;
    }

    .session-card-grid {
        grid-template-columns: 1fr;
    }

    .session-list-row {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 0.4rem;
    }

    .session-list-name {
        flex-basis: calc(100% - 1.75rem);
    }

    .session-list-grade,
    .session-list-cost,
    .session-list-status {
        margin-left: 1.75rem;
    }

    .session-list-status {
        min-width: 0;
        text-align: left;
        justify-content: flex-start;
    }

    .session-list-panel {
        padding: 1rem;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }

    .tab-btn.tab-active {
        border-bottom: none;
        border-left-color: #ffcd00;
    }

    .issuu-grid {
        flex-direction: column;
    }

    .events-cards {
        grid-template-columns: 1fr;
    }
}

/* ===== ERROR UI ===== */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ===== BSI "Instagram on IG" slider ===== */
.ig-gallery {
    margin: 2rem 0;
}

.ig-heading {
    margin-bottom: 1rem;
}

.ig-frame {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Native horizontal scroller — gives free touch-swipe + snap; card width sets how many show. */
.ig-track {
    display: flex;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;              /* Firefox */
}
.ig-track::-webkit-scrollbar {         /* Chrome/Safari */
    display: none;
}
.ig-track:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
    .ig-track {
        scroll-behavior: smooth;
    }
}

/* 3 across on desktop/tablet (two 1rem gaps). Mobile drops to 1 (below). */
.ig-card {
    flex: 0 0 calc((100% - 2rem) / 3);
    scroll-snap-align: start;
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
}
.ig-card:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

.ig-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Caption overlaid on the photo's lower edge; gradient scrim keeps white text >=4.5:1 (WCAG 1.4.3). */
.ig-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.25rem 0.75rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.65) 55%, transparent 100%);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Promo slide — connector to the Instagram profile (IG-gradient card). */
.ig-promo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    aspect-ratio: 1 / 1;
    padding: 1rem;
    color: #fff;
    text-align: center;
    /* Dark scrim over the Instagram brand gradient: white text on the gradient's light
       (#f09433) end is only ~2.3:1; the 40% black layer lifts it to >=4.5:1 (WCAG 1.4.3 AA)
       across every stop while the gradient stays recognizable underneath. */
    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
}
.ig-promo-text {
    font-weight: 700;
}
.ig-promo-cta {
    font-size: 0.9rem;
}

/* Prev/next arrows. */
.ig-nav {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.ig-nav:disabled {
    opacity: 0.35;
    cursor: default;
}
.ig-nav:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Paging dots (built by ig-slider.js). 24px hit area satisfies WCAG 2.5.8. */
.ig-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.ig-dot {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ig-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bbb;
}
.ig-dot.is-active::before {
    background: #000;
}
.ig-dot:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Subtle zoom on hover/keyboard focus; skipped for reduced-motion users (WCAG 2.3.3). */
@media (prefers-reduced-motion: no-preference) {
    .ig-photo {
        transition: transform 0.25s ease;
    }
    .ig-card:hover .ig-photo,
    .ig-card:focus-visible .ig-photo {
        transform: scale(1.04);
    }
}

/* Phones: one photo per view; swipe is primary, so hide the arrows. */
@media (max-width: 640px) {
    .ig-card {
        flex-basis: 100%;
    }
    .ig-nav {
        display: none;
    }
    .ig-caption {
        padding: 1.75rem 0.6rem 0.6rem;
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Screen-reader-only utility (for the slider's live region). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
