/* ─────────────────────────────────────────────
   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 {
    margin: 3rem 0 2rem;
    text-align: center;
}

.issue-page-header__kicker {
    font-family: var(--label);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.issue-page-header__kicker::before,
.issue-page-header__kicker::after {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--red);
}

.issue-page-header h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--ink);
    margin: 0 0 .5rem;
}

.issue-page-header__date {
    font-family: var(--label);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--caption);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.issue-page-header__topic {
    display: inline-block;
    margin-top: .75rem;
    font-family: var(--label);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    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);
}

/* ── 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: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    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;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    letter-spacing: 0.1em;
    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: block;
    border-top: 3px double var(--rule);
    border-bottom: 3px double var(--rule);
    margin-bottom: 2.5rem;
    padding: 2.5rem 0;
}

.editorial-content-col__heading {
    font-family: var(--label);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--navy);
    padding-bottom: .65rem;
    border-bottom: 2px solid var(--navy);
    margin-bottom: 1.5rem;
}

/* ── EDITORIAL BOARD ACCORDION TOGGLE ── */
.editorial-board-btn {
    position: relative;
}

.editorial-board-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 100%;
}

.editorial-board-content.is-expanded {
    grid-template-rows: 1fr;
}

.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;
    letter-spacing: .22em;
    text-transform: uppercase;
    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;
    letter-spacing: .15em;
    text-transform: uppercase;
    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;
}

.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;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    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;
    letter-spacing: .2em;
    text-transform: uppercase;
    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: .63rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  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;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sg-article-card__date {
  font-family: var(--label);
  font-size: .63rem;
  letter-spacing: .08em;
  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;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    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;
    letter-spacing: -0.02em;
    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;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    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;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    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 h1 { font-size: clamp(2.8rem, 4.5vw, 3.8rem); }
    .editorial-body { font-size: 1.2rem; }
    .board-member__photo img, .board-member__photo-placeholder { width: 64px; height: 64px; }
}

@media (max-width: 900px) {
    .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; }
}