/* ─────────────────────────────────────────────
   Article & Tag Template Styles
   Consolidated from article.html and tag_detail.html
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   Article Outer Container
───────────────────────────────────────────── */
.article-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ─────────────────────────────────────────────
   Article Header
───────────────────────────────────────────── */
.article-header {
    max-width: var(--article-col);
    margin: 48px auto 32px;
}

/* ── Featured Multimedia Box ── */
.featured-media-box {
    max-width: var(--article-col);
    margin: 3rem auto;
    padding: 1rem;
    background: #fdfdfd;
    border-radius: 24px;
    border: 1px solid #eef0f2;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

.media-box-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2.5rem;
}

.media-box-label {
    font-family: var(--label);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--navy);
    background: #fff;
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid #eef0f2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.media-box-line {
    flex: 1;
    height: 1px;
    background: #eef0f2;
}

.main-featured-player {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.featured-audio-section {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #f0f2f5;
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}

.featured-video-section {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.article-header h1 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--black);
}

.topic-tag {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--topic-color, var(--red));
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.topic-tag:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.subtitle {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    color: var(--gray-dark);
    margin-bottom: 24px;
    border-left: 3px solid var(--red);
    padding-left: 16px;
}

.meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--gray-mid);
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-right {
    flex-shrink: 0;
    white-space: nowrap;
}

.author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.meta .author-link {
    color: var(--red);
    font-weight: 600;
    transition: color 0.2s;
    font-size: 1.5rem;
}

.meta .author-link:hover {
    color: var(--red-dark);
}

.meta-divider {
    color: var(--gray-light);
}

/* ── 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: 20px;
    height: 20px;
}

.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);
}

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

.article-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;
}

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

.article-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;
}

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

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

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


/* ─────────────────────────────────────────────
   Hero Image
───────────────────────────────────────────── */
.hero-image {
    max-width: var(--article-col);
    margin: 24px auto 32px;
    line-height: 0;
}

.hero-image img {
    width: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.hero-image figcaption {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--gray-mid);
    padding: 10px 0 0;
    line-height: 1.4;
    border-top: 1px solid var(--gray-light);
    margin-top: 8px;
}

/* ─────────────────────────────────────────────
   Article Body & Content
───────────────────────────────────────────── */
.article-body {
    max-width: var(--article-col);
    margin: 0 auto;
    padding-bottom: 64px;
}

.article-content p {
    margin-bottom: 1.5em;
    color: var(--gray-dark);
    font-size: 19px;
    line-height: 1.7;
}

.article-content > p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 4.5em;
    font-weight: 700;
    float: left;
    line-height: 0.78;
    margin: 6px 12px 0 0;
    color: var(--black);
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--black);
    margin: 1.5em 0 0.5em;
}

.article-content h3 {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gray-dark);
    margin: 1.5em 0 0.5em;
}

.article-content a {
    color: var(--red);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: var(--red);
}

.article-content figure {
    margin: 2em auto;
    clear: both;
    max-width: 100%;
}

.article-content figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.article-content figcaption {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--gray-mid);
    padding: 8px 0 0;
    line-height: 1.5;
    border-top: 1px solid var(--gray-light);
    font-style: italic;
}

/* StreamField block styles moved to global Icarus.css */




/* ── IMAGE SIZES ── */
.article-content .article-image.size-small { width: 340px; }
.article-content .article-image.size-medium { width: 680px; }
.article-content .article-image.size-large { width: 1000px; }

.article-content figure.img-left {
    float: left;
    margin: 0.5em 1.75em 1em 0;
    clear: left;
}

.article-content figure.img-right {
    float: right;
    margin: 0.5em 0 1em 1.75em;
    clear: right;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 0 0 0 24px;
    border-left: 4px solid var(--red);
    font-size: 24px;
    font-style: italic;
    font-weight: 300;
    color: var(--black);
    line-height: 1.5;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--gray-light);
    margin: 2.5em 0;
}

/* ── TAGS SECTION ── */
.tags-container {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-light);
}

.tags-title {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-mid);
    margin-bottom: 16px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── AUTHOR CARDS ── */
.author-section {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
}

.author-section-title {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--caption);
    margin-bottom: 24px;
}

.author-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.author-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: #fdfdfc;
    padding: 24px;
    border: 1px solid var(--rule);
    border-radius: 12px;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.author-details {
    flex: 1;
}

.author-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.author-role {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 12px;
}

.author-bio-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-dark);
}

/* ── RELATED ARTICLES ── */
.related-articles {
    border-top: 1px solid var(--gray-light);
    padding: 56px 0 72px;
}

.related-heading {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-mid);
    margin-bottom: 28px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.related-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-card__img {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 6px;
}

.related-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.related-card:hover .related-card__img img {
    transform: scale(1.03);
}

.related-card__tag {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--category-color, var(--red));
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 4px;
}

.related-card__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--black);
    margin: 0;
}

/* ─────────────────────────────────────────────
   Paywall Overlay
───────────────────────────────────────────── */
.paywall-wrapper {
    position: relative;
    max-width: var(--article-col);
    margin: 0 auto;
}

.article-body--truncated {
    overflow: hidden;
    max-height: 500px;
    position: relative;
}

.paywall-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.8) 70%,
        rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    z-index: 1;
}

.paywall-cta {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 0 24px 64px;
    margin-top: -40px;
}

.paywall-cta__card {
    background: var(--gray-bg);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 40px 48px;
    text-align: center;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.paywall-cta__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 12px;
}

.paywall-cta__text {
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--gray-mid);
    line-height: 1.6;
    margin-bottom: 24px;
}

.paywall-cta__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.paywall-btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.paywall-btn--primary {
    background: var(--red);
    color: #fff;
}

.paywall-btn--primary:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.paywall-btn--secondary {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--gray-light);
}

.paywall-btn--secondary:hover {
    border-color: var(--black);
    transform: translateY(-1px);
}

/* ─────────────────────────────────────────────
   Language Switcher
───────────────────────────────────────────── */
.lang-switcher-container {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.lang-slider {
    position: relative;
    display: inline-flex;
    background: var(--gray-bg);
    padding: 4px;
    border-radius: 40px;
    border: 1px solid var(--gray-light);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    user-select: none;
}

.lang-slider__item {
    position: relative;
    z-index: 2;
    padding: 8px 20px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-mid);
    cursor: pointer;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 36px;
    white-space: nowrap;
}

.lang-slider__item.active {
    color: var(--white);
}

.lang-slider__indicator {
    position: absolute;
    z-index: 1;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: var(--red);
    border-radius: 36px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

/* Language-specific typography */
[data-lang="hi"] { font-family: 'Noto Sans Devanagari', sans-serif; }
[data-lang="ta"] { font-family: 'Noto Sans Tamil', sans-serif; }

.lang-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.lang-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────
   TAG DETAIL PAGE
───────────────────────────────────────────── */
.topic-header {
    background-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-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(--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 (max-width: 780px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 680px) {
    .meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}