/* ─────────────────────────────────────────────
   Issue & Topic Templates Styles
   Consolidated from issue.html and topic_detail.html
───────────────────────────────────────────── */

/* ── PAGE CONTAINER ── */
.issue-page {
    max-width: 1421px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* ── ISSUE HEADER ── */
.issue-page-header {
    position: relative; /* Required to limit absolute positioning of the backdrop within this container */
    overflow: hidden; /* Prevents the scaled/blurred backdrop from spilling outside boundaries */
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 3rem 0 2.5rem;
    padding: 3rem 2.5rem; /* Expanded padding so the backdrop frames the inner elements nicely */
    border-bottom: 3px double var(--rule);
    border-radius: 12px; /* Smooth container curves to blend with modern card aesthetics */
    background-color: var(--bg, #fdfdfc); /* Reliable fallback base color */
}

.issue-page-header__backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(40px) scale(1.1); /* Generates a soft glow effect without harsh edges showing */
    opacity: 0.25; /* Adjusted slightly from 0.15 for richer baseline text contrast and visibility */
    z-index: 0; /* Locks the element below text and the foreground cover card */
    pointer-events: none; /* Stops the backdrop from blocking interaction links or buttons */
    transition: opacity 0.3s ease, background-color 0.3s ease; /* Added transition for smooth adaptive contrast shifts */
}

/* Left: Cover image at the side */
.issue-page-header__cover {
    position: relative; /* Forces container above background layer */
    z-index: 1; /* Lifts foreground container cleanly over z-index 0 */
    flex: 0 0 auto;
    width: clamp(200px, 22vw, 320px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(11, 31, 58, 0.18);
    position: relative;
}

.issue-page-header__cover img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.issue-page-header__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
    border-radius: 4px;
    pointer-events: none;
}

/* Right: Info column at the side */
.issue-page-header__info {
    position: relative; /* Forces content container above backdrop layer */
    z-index: 1; /* Lifts typography and action options over z-index 0 */
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0;
}

/* ── Placeholder logic ──────────────────────────────────────
   The placeholder body is always in the DOM.
   It hides itself when a real image is present and loads OK.
   It shows itself when:
     a) no cover_image field is set  (no <img> sibling)
     b) the image 404s / fails       (JS adds .cover--broken)
─────────────────────────────────────────────────────────── */

/* Base: show placeholder style on the container */
.issue-page-header__cover:not(:has(img)),
.issue-page-header__cover.cover--broken {
    background: linear-gradient(
        155deg,
        var(--cover-accent, var(--navy)) 0%,
        color-mix(in srgb, var(--cover-accent, var(--navy)) 55%, #000) 100%
    );
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Hide broken image element */
.issue-page-header__cover.cover--broken img {
    display: none;
}

/* Placeholder body: hidden by default when image is present and healthy */
.cover-placeholder__body {
    display: none;
}

/* Show placeholder body when no img, or img broken */
.issue-page-header__cover:not(:has(img)) .cover-placeholder__body,
.issue-page-header__cover.cover--broken .cover-placeholder__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.92);
}

.cover-placeholder__pub {
    font-family: var(--label);
    font-size: .7rem;
    font-weight: 800;
    
        opacity: .7;
    border-bottom: 1px solid rgba(255,255,255,.3);
    padding-bottom: .5rem;
    width: 100%;
}

.cover-placeholder__num {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1;
}

.cover-placeholder__label {
    font-family: var(--label);
    font-size: .65rem;
    font-weight: 700;
    
        opacity: .65;
    margin-top: -.4rem;
}

.cover-placeholder__topic {
    margin-top: .75rem;
    font-family: var(--label);
    font-size: .75rem;
    font-weight: 700;
    
        background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    padding: .3rem .9rem;
}

/* Right: Info column */
.issue-page-header__info {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0;
}

.issue-page-header__kicker {
    font-family: var(--serif);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 900;
    line-height: 1.1;
    
    color: var(--red);
    margin-bottom: 1rem;
    display: block;
}

.issue-page-header__date {
    font-family: var(--label);
    font-size: .78rem;
    font-weight: 600;
    
    color: var(--caption);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: .85rem;
}

.issue-page-header__topic {
    display: inline-block;
    margin-top: .25rem;
    font-family: var(--label);
    font-size: .9rem;
    font-weight: 700;
    
        color: #fff;
    background-color: var(--topic-color, var(--navy));
    padding: .4rem 1.2rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.issue-page-header__topic:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ── PDF DOWNLOAD BUTTON ── */
.issue-pdf-download-wrapper {
    text-align: center;
    margin: 2.5rem 0;
}

.issue-pdf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    padding: .6rem 1.6rem;
    font-family: var(--label);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: var(--navy, #0b1f3a);
    border-radius: 24px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(11, 31, 58, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.issue-pdf-download-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.issue-pdf-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(11, 31, 58, 0.35);
    background: var(--navy-mid, #163a5f);
    color: #fff;
}

.issue-pdf-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(11, 31, 58, 0.2);
}

/* ── FAVORITE BUTTON ── */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--muted);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn svg {
    width: 18px;
    height: 18px;
}

.favorite-btn[data-favorited="true"] {
    color: var(--red);
}

.favorite-btn[data-favorited="true"] svg {
    fill: var(--red);
}

.favorite-btn:hover {
    transform: scale(1.1);
    color: var(--red);
}

/* ── AUDIO & VIDEO PLAYERS ── */
.main-audio-container,
.main-video-container {
    max-width: 1421px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
}

.audio-card {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--rule);
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.audio-card h4 {
    font-family: var(--label);
    font-size: 14px;
    font-weight: 700;
        color: var(--muted);
    margin-bottom: 16px;
    
    text-align: center;
}

.player-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--navy);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.05);
    background: var(--navy-mid);
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-wrapper {
    position: relative;
    height: 6px;
    background: #eef0f2;
    border-radius: 3px;
    cursor: pointer;
}

.progress-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--navy);
    border-radius: 3px;
    width: 0%;
    z-index: 1;
}

.time-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #95a5a6;
    font-weight: 600;
    font-family: sans-serif;
}

/* Video Player */
.video-card {
    max-width: 800px;
    margin: 0 auto;
}

.video-embed {
    border-radius: 16px;
    overflow: hidden;
}

.youtube-fallback {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
}

.embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.modern-video-player {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: #000;
}

.video-wrapper {
    position: relative;
    width: 100%;
    line-height: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    pointer-events: none;
}

.big-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(11, 31, 58, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: transform 0.2s;
}

.big-play-btn:hover {
    transform: scale(1.1);
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    gap: 15px;
    line-height: 1;
}

.v-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.v-progress-wrapper {
    flex: 1;
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.v-progress-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.v-progress-fill {
    height: 100%;
    background: var(--red);
    width: 0%;
    border-radius: 2px;
}

/* ── TAGS ── */
.issue-tags {
    max-width: 1421px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ── EDITORIAL BOARD | EDITORIAL ── */
.editorial-board-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2.5rem 0 1.5rem;
    width: 100%;
}

.editorial-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0 3rem;
    align-items: start;
    border-top: 3px double var(--rule);
    border-bottom: 3px double var(--rule);
    margin-bottom: 2.5rem;
    padding: 2.5rem 0;
}

/* ── TABLE OF CONTENTS ── */
.editorial-toc-col {
    position: sticky;
    top: 1.5rem;
    padding-right: 2.5rem;
    border-right: 1px solid var(--rule);
}

.editorial-toc-col__heading {
    font-family: var(--label);
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
    padding-bottom: .65rem;
    border-bottom: 2px solid var(--navy);
    margin-bottom: 1.5rem;
}

.toc-group {
    margin-bottom: 1.5rem;
}

.toc-group:last-child {
    margin-bottom: 0;
}

.toc-group__topic {
    font-family: var(--label);
    font-size: 1.3rem;
    font-weight: 800;
    
        color: var(--tg-color, var(--navy));
    padding: .3rem .7rem;
    background: color-mix(in srgb, var(--tg-color, var(--navy)) 10%, transparent);
    border-left: 3px solid var(--tg-color, var(--navy));
    border-radius: 0 4px 4px 0;
    margin-bottom: .65rem;
}

.toc-group__topic a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.15s;
}

.toc-group__topic a:hover {
    opacity: .75;
}

.toc-group__topic--general {
    color: var(--muted);
    background: color-mix(in srgb, var(--muted) 10%, transparent);
    border-left-color: var(--muted);
}

.toc-group__list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.toc-item {
    counter-increment: toc-counter;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .55rem 1rem .55rem 2rem;
    border-bottom: 1px solid var(--rule);
    position: relative;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 6px;
    margin-bottom: 2px;
}

.toc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background-color: var(--bg, #fff);
    border-bottom-color: transparent;
    z-index: 1;
}

.toc-item::before {
    content: counter(toc-counter, decimal-leading-zero);
    position: absolute;
    left: 0.5rem;
    top: .6rem;
    font-family: var(--label);
    font-size: .65rem;
    font-weight: 700;
    color: var(--caption);
    
}

.toc-item:last-child {
    border-bottom: none;
}

.toc-item__link {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s;
}

.toc-item__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 6px;
}

.toc-item__link:hover {
    color: var(--red);
}

.toc-item__author {
    font-family: var(--label);
    font-size: .8rem;
    font-weight: 600;
    color: var(--caption);
}

.editorial-content-col__heading {
    font-family: var(--label);
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
    padding-bottom: .65rem;
    border-bottom: 2px solid var(--navy);
    margin-bottom: 1.5rem;
}

/* ── EDITORIAL BOARD ACCORDION TOGGLE ── */
.editorial-board-btn {
    font-family: var(--label, 'Source Sans 3', 'Source Sans Pro', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    position: relative;
}

.editorial-board-btn:hover,
.editorial-board-btn[aria-expanded="true"] {
    color: var(--navy);
    border-color: var(--red);
}

.editorial-board-btn[aria-expanded="true"]::after  { content: ' ↑'; }
.editorial-board-btn[aria-expanded="false"]::after { content: ' ↓'; }

.issue-editorial-board-content {
    padding: 2.5rem 3rem 1.5rem;
    background-color: var(--bg, #fdfdfc);
    border: 1px solid var(--rule);
    border-radius: 12px;
    color: var(--ink);
    
    max-width: 900px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    
    margin: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.issue-editorial-board-content::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.issue-editorial-board-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
}

.issue-editorial-board-close-btn:hover {
    color: var(--navy);
}

.editorial-board-inner {
    min-height: 0;
}

.editorial-board-section {
    width: 100%;
    margin-bottom: 2rem;
}

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

.editorial-board-role-heading {
    font-family: var(--label);
    font-size: 1rem;
    font-weight: 800;
    
        color: var(--navy);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 0.5rem;
    margin: 1.5rem auto 0.5rem;
    max-width: 1421px;
    width: 100%;
    text-align: center;
}

.editorial-board-members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    padding: 1rem 0;
    max-width: 1421px;
    width: 100%;
}

.board-member {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 0.75rem 1rem;
    width: 280px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg, #fdfdfc);
}

.board-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #fff;
}

.board-member__photo img,
.board-member__photo-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rule);
}

.board-member__photo-placeholder {
    background: linear-gradient(135deg, var(--rule), #c8c4bb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--muted);
}

.board-member__role {
    font-family: var(--label);
    font-size: .62rem;
    font-weight: 700;
    
        color: var(--red);
    display: block;
    margin-bottom: .15rem;
}

.board-member__name {
    font-family: var(--serif);
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.issue-editorial-board-content .board-member__name a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s;
}

.issue-editorial-board-content .board-member__name a:hover {
    color: var(--red);
}

.editorial-content-col {
    padding: 0;
}

.editorial-body {
    font-family: var(--body-serif);
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--ink);
}

.editorial-body h2 {
    font-family: var(--serif);
    font-size: 1.4rem;
}

.editorial-empty {
    font-family: var(--body-serif);
    color: var(--caption);
    font-style: italic;
    padding: 1rem 0;
}

/* ── EXPANDABLE SECTIONS (Editorial & Board) ── */
.expandable-wrapper {
    position: relative;
    overflow: hidden;
}

.expandable-content {
    max-height: 400px; /* Default */
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-wrapper.expanded .expandable-content {
    max-height: 5000px; /* Large enough to show full content */
}

.show-more-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    z-index: 5;
    pointer-events: none;
}

.show-more-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    cursor: pointer;
    pointer-events: auto;
}

.show-more-btn {
    position: relative;
    z-index: 6;
    pointer-events: auto;
    background: var(--navy, #0b1f3a);
    color: #fff;
    border: none;
    padding: 0.65rem 1.8rem;
    /* border-radius: 30px; */
    font-family: var(--label);
    font-size: 1rem;
    font-weight: 800;
        
    box-shadow: 0 4px 15px rgba(11, 31, 58, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background: var(--red, #c8102e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.3);
}

.expandable-wrapper.expanded .show-more-banner {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


/* ── ARTICLES IN THIS ISSUE ── */
.issue-section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0 1.25rem;
}

.issue-section-head__title {
    font-family: var(--label);
    font-size: 1rem;
    font-weight: 800;
    
        color: var(--navy);
    white-space: nowrap;
    margin: 0;
}

.issue-section-head__rule {
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* ── ARTICLE GRID ── */
.sg-article-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.sg-article-card {
  flex: 1 1 340px;
  max-width: 380px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.sg-article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.sg-article-card__image-wrap {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--rule);
  margin-bottom: 0;
}

.sg-article-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.sg-article-card__content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sg-article-card__category {
  display: inline-block;
  font-family: var(--label);
  font-size: .8rem;
  font-weight: 800;
  
    color: #fff;
  background-color: var(--category-color, var(--red));
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: .6rem;
  align-self: flex-start;
}

.sg-article-card__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .5rem;
}

.sg-card-author {
    font-family: var(--label);
    font-size: 1em;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: .2rem;
    display: block;
        
}

.sg-article-card__date {
  font-family: var(--label);
  font-size: .63rem;
  color: var(--caption);
  margin-top: auto;
}

/* ─────────────────────────────────────────────
   TOPIC DETAIL PAGE
───────────────────────────────────────────── */
.topic-header {
    background-color: var(--topic-color, var(--navy));
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.topic-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.topic-header__inner {
    max-width: 1421px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.topic-header__kicker {
    font-family: var(--label);
    font-size: 0.9rem;
    font-weight: 800;
    
        margin-bottom: 1rem;
    opacity: 0.9;
    display: block;
}

.topic-header h1 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin: 0;
    
    line-height: 1.1;
}

.topic-content {
    max-width: 1421px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

.topic-section {
    margin-bottom: 4rem;
}

.topic-section__title {
    font-family: var(--label);
    font-size: 1.25rem;
    font-weight: 800;
    
        color: var(--navy);
    border-bottom: 2px solid var(--navy);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topic-section__title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
}

.topic-card__image-wrap {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--rule);
    margin-bottom: 1.25rem;
}

.topic-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.topic-card:hover .topic-card__image-wrap img {
    transform: scale(1.05);
}

.topic-card__meta {
    font-family: var(--label);
    font-size: 0.75rem;
    font-weight: 700;
    
        color: var(--caption);
    margin-bottom: 0.5rem;
}

.topic-card__title {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem;
}

.topic-card__title a {
    color: var(--ink);
    transition: color 0.2s;
}

.topic-card__title a:hover {
    color: var(--topic-color, var(--red));
}

.topic-card__excerpt {
    font-family: var(--body-serif);
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    font-style: italic;
    color: var(--caption);
}

/* ── RESPONSIVE ── */
@media (min-width: 1024px) {
    .issue-page-header__kicker { font-size: clamp(2.4rem, 3.5vw, 3rem); }
    .editorial-body { font-size: 1.2rem; }
    .board-member__photo img, .board-member__photo-placeholder { width: 64px; height: 64px; }
}

/* Tablet: stack TOC above editorial, shrink cover */
@media (max-width: 900px) {
    /* Header: stack cover above info */
    .issue-page-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.75rem;
    }

    .issue-page-header__cover {
        width: clamp(160px, 45vw, 240px);
    }

    .issue-page-header__info {
        align-items: center;
    }

    /* TOC + editorial: single column, TOC on top */
    .editorial-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem 0;
    }

    .editorial-toc-col {
        position: static;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding-bottom: 2rem;
    }

    .editorial-board-members-grid {
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .board-member {
        padding: 0.5rem 0.75rem;
        width: 100%;
        max-width: 340px;
    }

    .board-member__photo img, 
    .board-member__photo-placeholder {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 600px) {
    .issue-page { padding: 0 1rem 3rem; }
    .topic-content { padding: 0 1rem 3rem; }
    .topic-header { padding: 3rem 1rem; }

    .issue-page-header {
        margin: 1.5rem 0 2rem;
    }

    .issue-page-header__cover {
        width: clamp(140px, 50vw, 200px);
    }
}

/* ── DYNAMIC CONTRAST OVERRIDES ── */

/* Triggered automatically when the underlying cover image is dark */
.issue-page-header.header-contrast--dark-bg {
    /* Kept intentionally empty of background overrides to preserve the pristine original image backdrop */
    border-bottom: 3px double rgba(255, 255, 255, 0.2);
}

/* Use a glowing white drop shadow to cleanly separate the kicker text from complex/dark backgrounds */
.issue-page-header.header-contrast--dark-bg .issue-page-header__kicker {
    color: #ff4d73; /* Maintained vibrant bright red variant */
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.9), 0 0 6px rgba(255, 255, 255, 0.75); /* Added layered white shadow glow */
}

/* Shifted the date to a deep solid color, framed perfectly by a powerful white shadow */
.issue-page-header.header-contrast--dark-bg .issue-page-header__date {
    color: #0b1f3a; /* Dark navy color to contrast effectively against the white shadow */
    font-weight: 800; /* Increased weight slightly to anchor the text against the shadow spread */
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95), 0 0 5px rgba(255, 255, 255, 0.85); /* Added clean white backdrop shadow */
}

/* Sync action items to match date text styling and SVG shadow filters */
.issue-page-header.header-contrast--dark-bg .favorite-btn {
    color: #0b1f3a; /* Matching deep navy */
    filter: drop-shadow(0 1px 4px rgba(255, 255, 255, 0.95)); /* SVGs require drop-shadow instead of text-shadow */
}

.issue-page-header.header-contrast--dark-bg .favorite-btn:hover {
    color: #ff4d73; /* Vibrates back to red on hover */
}