/* =============================================================================
   ProudMac — front-end stylesheet
   ============================================================================= */

/* ── Custom properties ───────────────────────────────────────────────────────── */

:root {
    /* Typography */
    --font-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                  "Helvetica Neue", Arial, sans-serif;
    --font-serif: -apple-system-ui-serif, ui-serif, "Georgia", serif;

    /* Apple rainbow palette */
    --green:         #61BB46;
    --green-dark:    #519C3A;
    --green-light:   #96D284;

    --yellow:        #FDB827;
    --yellow-dark:   #F2A602;
    --yellow-light:  #FED170;

    --orange:        #F5821F;
    --orange-dark:   #DD6D0A;
    --orange-light:  #F8AD6B;

    --red:           #CC2023;
    --red-dark:      #8F1618;
    --red-light:     #EB7C7E;

    --purple:        #963D97;
    --purple-dark:   #7E3480;
    --purple-light:  #C574C6;

    --blue:          #009DDC;
    --blue-dark:     #0084B8;
    --blue-light:    #3FC9FF;

    /* Semantic colours — light mode defaults */
    --page-bg:   #F2EEE5;
    --card-bg:   #ffffff;
    --text:      #1a1a1a;
    --muted:     #6b7280;
    --border:    #e5e7eb;
    --shadow:    rgba(0, 0, 0, 0.08);

    /* Category label colours — light mode */
    --cat-news:          var(--purple);
    --cat-history:       var(--green-dark);
    --cat-opinion:       var(--red);
    --cat-entertainment: var(--blue);
    --cat-feature:       var(--orange-dark);
    --cat-story:         var(--blue);

    /* Layout */
    --radius:          16px;
    --radius-sm:        8px;
    --container-wide:  1320px;   /* inner content = 1280px after 2×20px padding */
    --container:        720px;   /* inner content = 680px after 2×20px padding  */
}

/* ── Dark mode overrides ─────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    :root {
        --page-bg:  #141414;
        --card-bg:  #000000;
        --text:     #ffffff;
        --muted:    #9ca3af;
        --border:   #2a2a2a;
        --shadow:   rgba(0, 0, 0, 0.4);

        /* Category label colours — dark mode */
        --cat-news:          var(--purple-light);
        --cat-history:       var(--green);
        --cat-opinion:       var(--red-light);
        --cat-entertainment: var(--blue-light);
        --cat-feature:       var(--orange);
        --cat-story:         var(--blue-light);
    }
}


/* ── Reset ───────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    /* Prevent flash of unstyled background between nav and body */
    background: var(--page-bg);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
}


/* ── Layout containers ───────────────────────────────────────────────────────── */

.container {
    max-width: var(--container-wide);
    margin-left:  auto;
    margin-right: auto;
    padding-left:  20px;
    padding-right: 20px;
}

.container-narrow {
    max-width: var(--container);
    margin-left:  auto;
    margin-right: auto;
    padding-left:  20px;
    padding-right: 20px;
}


/* ── Rainbow bar ─────────────────────────────────────────────────────────────── */

.rainbow-bar {
    display: flex;
    height: 16px;
    width: 100%;
    flex-shrink: 0;
}

.rainbow-bar span { flex: 1; }

.rb-green  { background: var(--green);  }
.rb-yellow { background: var(--yellow); }
.rb-orange { background: var(--orange); }
.rb-red    { background: var(--red);    }
.rb-purple { background: var(--purple); }
.rb-blue   { background: var(--blue);   }


/* ── Site header (sticky wrapper) ───────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--page-bg);
    border-bottom: 1px solid var(--border);
}


/* ── Nav bar ─────────────────────────────────────────────────────────────────── */

.nav-bar {
    height: 64px;
}

.nav-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}


/* ── Logo ────────────────────────────────────────────────────────────────────── */

.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: auto;
}

.site-logo-img {
    height: 20px;
    width: auto;
}

/* Invert logo for dark mode (SVG paths are black) */
@media (prefers-color-scheme: dark) {
    .site-logo-img { filter: invert(1); }
}


/* ── Nav icon button (shared) ────────────────────────────────────────────────── */

.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.15s;
}

.nav-icon-btn:hover { background: var(--border); }

.nav-icon {
    display: block;
    flex-shrink: 0;
}

/* Invert icons for dark mode */
@media (prefers-color-scheme: dark) {
    .nav-icon { filter: invert(1); }
}


/* ── Desktop nav right (hidden on mobile by default) ────────────────────────── */

.nav-desktop-right {
    display: none;
}


/* ── Desktop: site-nav links ─────────────────────────────────────────────────── */

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav-link {
    font-size: 1.25rem;   /* 15px */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}

.site-nav-link:hover { background: var(--border); }

.site-nav-link.is-active { text-decoration: underline; text-decoration-thickness: 2px; }


/* ── Desktop search wrap ─────────────────────────────────────────────────────── */

.nav-search-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

/* Search form — hidden until .search-open */
.nav-search-form {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 16px 0 8px;
    min-width: 280px;
}

.nav-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.nav-search-input {
    flex: 1;
    height: 44px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    outline: none;
}

.nav-search-input::placeholder { color: var(--muted); }

/* Close button — hidden until .search-open */
#nav-search-close { display: none; }


/* ── Mobile nav right (shown on mobile by default) ───────────────────────────── */

.nav-mobile-right {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Close button hidden by default */
#nav-mob-close { display: none; }


/* ── Mobile dropdown menu ────────────────────────────────────────────────────── */

.nav-mobile-menu {
    display: none;
    border-top: 1px solid var(--border);
    background: var(--page-bg);
}

.nav-mobile-menu-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 16px 20px 24px;
}

/* Mobile search form */
.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0 16px 0 8px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}

.mobile-search-form:focus-within {
    border-color: var(--blue);
    border-width: 2px;
}

.mobile-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.mobile-search-input {
    flex: 1;
    height: 48px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    outline: none;
}

.mobile-search-input::placeholder { color: var(--muted); }

/* Mobile nav links */
.mobile-nav {
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 4px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-link:last-child { border-bottom: none; }

.mobile-nav-link.is-active { text-decoration: underline; text-decoration-thickness: 2px; }


/* ── Nav state: mobile menu open ─────────────────────────────────────────────── */

@media (max-width: 899px) {
    .mobile-menu-open .nav-mobile-menu     { display: block; }
    .mobile-menu-open #nav-mob-search,
    .mobile-menu-open #nav-mob-menu        { display: none;  }
    .mobile-menu-open #nav-mob-close       { display: flex;  }
}


/* ── Nav state: desktop search open ─────────────────────────────────────────── */

.search-open .site-nav          { display: none; }
.search-open .nav-search-form   { display: flex; }
.search-open #nav-search-open   { display: none; }
.search-open #nav-search-close  { display: flex; }


/* ── Nav: desktop breakpoint ─────────────────────────────────────────────────── */

@media (min-width: 900px) {
    .nav-bar { height: 84px; }

    .nav-desktop-right {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .nav-mobile-right { display: none; }

    /* Mobile menu never shows on desktop */
    .mobile-menu-open .nav-mobile-menu { display: none; }
}


/* ── Category label colours ──────────────────────────────────────────────────── */

.cat--news          { color: var(--cat-news);          }
.cat--history       { color: var(--cat-history);       }
.cat--opinion       { color: var(--cat-opinion);       }
.cat--entertainment { color: var(--cat-entertainment); }
.cat--feature       { color: var(--cat-feature);       }
.cat--story         { color: var(--cat-story);         }

/* For portrait cards — always white regardless of theme */
.cat--white { color: #ffffff; }


/* ── Card base ───────────────────────────────────────────────────────────────── */

.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    height: 100%;
    transition: opacity 0.15s;
}

.card:hover { opacity: 0.88; }

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

.card-body {
    padding: 20px 20px 50px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category label */
.card-cat {
    font-size: 0.9rem;   /* 11px */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

/* Card title */
.card-title {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 8px;
}

/* Card summary */
.card-summary {
    font-size: 1rem;
    font-family: var(--font-serif);
    line-height: 1.2;
    color: var(--text);
    margin: 0;
}


/* ── Homepage main ───────────────────────────────────────────────────────────── */

.hp-main {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Each section has 100px bottom margin */
.hp-section {
    margin-top:40px;
    margin-bottom: 100px;
}

.hp-section:last-child {
    margin-bottom: 0;
}


/* ── Carousel track (shared by hero + portrait) ──────────────────────────────── */

.carousel-track {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    /* 20px left indent mirrors container padding; right padding shows next card edge */
    padding: 4px 20px 12px;
    margin-left: 20px;
}

.carousel-track::-webkit-scrollbar { display: none; }


/* ── Carousel dots ───────────────────────────────────────────────────────────── */

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 0 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text);
    background: transparent;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.dot--active {
    background: var(--text);
}


/* ── 1. Hero section ─────────────────────────────────────────────────────────── */

.hero-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.hero-card .card-title {
    font-size: 1.25rem;
    line-height: 1.1;
}


/* ── 2. List grid section ────────────────────────────────────────────────────── */

.list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.list-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.15s;
}

.list-item:hover { opacity: 0.75; }

.list-item-thumb {
    flex: 0 0 88px;
}

.list-item-thumb img {
    width: 88px;
    height: 124px;         /* roughly 3:4 */
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

.list-item-body {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: 1rem;
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 4px;
}

.list-item-summary {
    font-size: 0.8125rem;
    line-height: 1.2;
    color: var(--text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ── 3. Portrait section ─────────────────────────────────────────────────────── */

.portrait-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.portrait-card:hover { opacity: 0.88; }

.portrait-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.portrait-card-overlay {
    position: absolute;
    inset: 0;
    /* Heavy black gradient: solid at bottom, transparent by 50% */
    background: linear-gradient(to top,
        rgba(0,0,0,0.92) 0%,
        rgba(0,0,0,0.5)  40%,
        rgba(0,0,0,0)    65%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.portrait-card-overlay .card-cat { color: #ffffff; }

.portrait-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 4px;
}

.portrait-card-summary {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ── 4. Feature box ──────────────────────────────────────────────────────────── */

.feature-box {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.15s;
}

.feature-box:hover { opacity: 0.88; }

.feature-box-img {
    flex-shrink: 0;
}

.feature-box-img img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.feature-box-body {
    padding: 24px 24px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-box-title {
    font-size: clamp(1.375rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

.feature-box-summary {
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}


/* ── 5. Feature 3-card grid ──────────────────────────────────────────────────── */

.feature-3-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Feature card used in both grids */
.feature-card .card-title {
    font-size: 1.0625rem;
    line-height: 1.25;
}


/* ── 6. Feature 2-card grid ──────────────────────────────────────────────────── */

.feature-2-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-2-grid .card-title {
    font-size: 1.125rem;
}

.feature-2-grid .card-summary {
    font-size: 0.9375rem;
}


/* ── Single article ──────────────────────────────────────────────────────────── */

.main {
    padding-top: 0;
    padding-bottom: 60px;
}

.single-article-image {
    max-width: var(--container-wide);
    margin: 0 auto 40px;
    padding: 0 20px;
}

.single-article-image img {
    width: 100%;
    max-height: 400px;   /* mobile: square-ish crop */
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

.single-article-header {
    padding-top: 32px;
    padding-bottom: 0;
}

/* Article category label */
.article-category {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 16px;
    display: block;
}

.article-category a { color: inherit; }
.article-category a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

.single-article-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}

.single-article-summary {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.35;
    color: var(--muted);
    margin: 0 0 16px;
}

.article-date {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 40px;
}

/* Single article body */
.single-article-body {
    padding-top: 0;
}

.article-content {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text);
    padding-bottom: 40px;
}

.article-content p  { margin: 0 0 1.4em; }

.article-content h2 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 2em 0 0.6em;
}

.article-content h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 1.75em 0 0.5em;
}

.article-content ul,
.article-content ol  { padding-left: 1.5em; margin: 0 0 1.4em; }
.article-content li  { margin-bottom: 0.4em; }

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2em 0;
}

.article-content a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.article-content a:hover { opacity: 0.7; }

.article-content blockquote {
    border-left: 3px solid var(--border);
    margin: 1.5em 0;
    padding: 0.5em 1.25em;
    color: var(--muted);
    font-style: italic;
}


/* ── Article-list partial (category + search pages) ─────────────────────────── */

.article-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    display: block;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
    text-decoration: none;
    color: var(--text);
}

.article-card:last-child { border-bottom: none; }

.article-card-image {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.article-card-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.4rem;
}

.article-card:hover .article-card-title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.article-card-summary {
    font-size: 1rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
    line-height: 1.45;
}


/* ── Pagination ──────────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
}

.pagination-btn {
    font-weight: 600;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    transition: background 0.15s;
}

.pagination-btn:hover { background: var(--card-bg); }

.pagination-info { color: var(--muted); font-size: 0.875rem; }


/* ── Section title (category/search pages) ───────────────────────────────────── */

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 2rem;
    padding-top: 40px;
}


/* ── Site footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.875rem;
    color: var(--muted);
}


/* ── Utilities ───────────────────────────────────────────────────────────────── */

.mb2 { margin-bottom: 0.5rem; }
.mb3 { margin-bottom: 1rem;   }
.mt2 { margin-top:    0.5rem; }
.muted { color: var(--muted); }


/* =============================================================================
   Responsive
   ============================================================================= */

/* ── Tablet: ≥ 640px ─────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
    /* List grid: 2 columns */
    .list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    /* Feature 2-grid: 2 columns */
    .feature-2-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Article card list */
    .article-card {
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 1.25rem;
        align-items: start;
    }

    .article-card-image {
        margin-bottom: 0;
    }

    .article-card-image img {
        aspect-ratio: 4/3;
    }
}


/* ── Large tablet / small desktop: ≥ 769px ───────────────────────────────────── */

@media (min-width: 769px) {
    /* Feature box: image left, text right */
    .feature-box {
        flex-direction: row;
    }

    .feature-box-img {
        flex: 0 0 56%;
    }

    .feature-box-img img {
        aspect-ratio: auto;
        height: 100%;
    }

    .feature-box-body {
        flex: 1;
        padding: 40px;
    }

    /* Article feature image: taller on large screens */
    .single-article-image img {
        max-height: 600px;
    }
}


/* ── Desktop: ≥ 900px ────────────────────────────────────────────────────────── */

@media (min-width: 900px) {
    /* List grid: 3 columns */
    .list-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    /* Feature 3-grid: 3 columns */
    .feature-3-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Article content: slightly larger */
    .article-content {
        font-size: 1.175rem;
    }
}


/* ── Full desktop: ≥ 1320px (inner = 1280px) ─────────────────────────────────── */

@media (min-width: 1320px) {
    .carousel-track { margin-left: 0; }
    
    /* Hero: switch from carousel to 4-col grid */
    .hero-track {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        overflow: visible;
        max-width: var(--container-wide);
        margin: 0 auto;
        padding: 0 20px;
    }

    /* Hero cards no longer need flex sizing */
    .hero-card {
        flex: none;
        scroll-snap-align: unset;
    }

    /* Hide dots on desktop (all cards visible) */
    .hp-hero .carousel-dots,
    .hp-portrait .carousel-dots {
        display: none;
    }

    /* Portrait: switch from carousel to 4-col grid */
    .portrait-track {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        overflow: visible;
        max-width: var(--container-wide);
        margin: 0 auto;
        padding: 0 20px;
    }

    .portrait-card {
        flex: none;
        scroll-snap-align: unset;
    }

    /* Larger card titles at desktop */
    .hero-card .card-title,
    .portrait-card-title {
        font-size: 1.5rem;
    }
}
