/* ============================================================
   FSSL NEWS — Article Detail Page Styles
   Inherits design tokens from home-redesign.css
   ============================================================ */

/* ---- Page-level overrides ----------------------------------- */
.detail-body {
    background: var(--background);
}

/* Offset fixed header (ticker gone on detail, so only header) */
.detail-header {
    /* top: 0 !important; -- Handled by global layout now */
}

/* ============================================================
   ARTICLE HERO — Full-bleed cover image + headline overlay
   ============================================================ */
.article-hero {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 480px;
    max-height: 800px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-top: 0; /* Handled by 'main' margin-top in global layout */
}

.article-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    transition: transform 8s ease;
}

.article-hero:hover .article-hero__bg { transform: scale(1.025); }

.article-hero__bg--fallback {
    background: linear-gradient(135deg, #0F2027 0%, #203A43 40%, #2C5364 100%);
}

.article-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15,32,39,0.05) 0%,
        rgba(15,32,39,0.25) 35%,
        rgba(15,32,39,0.85) 75%,
        rgba(15,32,39,0.97) 100%
    );
    z-index: 1;
}

.article-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 64px 52px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
}

.article-breadcrumb a {
    color: rgba(255,255,255,0.65);
    transition: color 0.2s;
}

.article-breadcrumb a:hover { color: #fff; }

.article-breadcrumb span[aria-current="page"] {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

/* Tags */
.article-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.article-tag--date {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
}

.article-tag--category {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230,57,70,0.3);
    text-decoration: none;
    transition: var(--transition);
}

.article-tag--category:hover {
    background: var(--accent-red-hover);
    transform: translateY(-1px);
}

.article-tag--secondary {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
}

.article-tag--secondary:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* Headline */
.article-hero__headline {
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.18;
    letter-spacing: -0.03em;
    max-width: 900px;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Meta line */
.article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    font-weight: 500;
}

.article-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-hero__meta-sep {
    color: rgba(255,255,255,0.3);
    font-size: 1rem;
}

/* ============================================================
   ARTICLE LAYOUT — Two-column grid
   ============================================================ */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    max-width: 1480px;
    margin: 0 auto;
    padding: 52px 64px 80px;
    align-items: start;
}

/* ============================================================
   MAIN ARTICLE CONTENT
   ============================================================ */
.article-main {
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-width: 0; /* prevent grid overflow */
}

/* Event Banner */
.event-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-mid) 100%);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    color: #fff;
    box-shadow: 0 8px 30px rgba(15,32,39,0.12);
}

.event-banner__icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-teal);
}

.event-banner__body, .event-banner__org {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.event-banner__org {
    padding-left: 20px;
    border-left: 1px solid rgba(255,255,255,0.15);
}

.event-banner__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

.event-banner__date {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

/* Article Body */
.article-body {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 48px 56px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    font-size: 1.05rem;
    line-height: 1.85;
    color: #2d2f3f;
}

/* Typography inside body */
.article-body p {
    margin: 0 0 1.4em;
    color: #2d2f3f;
}

.article-body p:last-child { margin-bottom: 0; }

.article-body h2, .article-body h3, .article-body h4 {
    font-weight: 800;
    color: var(--brand-blue);
    letter-spacing: -0.02em;
    margin: 1.8em 0 0.6em;
    line-height: 1.3;
}

.article-body h2 { font-size: 1.5rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body h4 { font-size: 1.05rem; }

.article-body ul, .article-body ol {
    padding-left: 1.6em;
    margin: 0 0 1.4em;
}

.article-body li { margin-bottom: 0.5em; }

.article-body a {
    color: var(--accent-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body a:hover { color: var(--accent-red-hover); }

.article-body img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5em 0;
    box-shadow: var(--shadow-soft);
}

.article-body blockquote {
    border-left: 4px solid var(--accent-red);
    padding: 12px 24px;
    margin: 1.5em 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--background);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body__empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

/* ---- Share Row -------------------------------------------- */
.article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.article-share__label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
    white-space: nowrap;
}

.article-share__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.share-btn--fb {
    background: #1877F2;
    color: #fff;
}

.share-btn--fb:hover {
    background: #0f5bb5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24,119,242,0.35);
}

.share-btn--tw {
    background: #000;
    color: #fff;
}

.share-btn--tw:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.share-btn--copy {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.share-btn--copy:hover {
    background: var(--brand-blue);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ============================================================
   GALLERY — Custom slider with thumbnails
   ============================================================ */
.article-gallery {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.article-gallery__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
}

.article-gallery__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-gallery__count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--background);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

.article-gallery__single {
    display: flex;
    justify-content: center;
}

.article-gallery__single .article-gallery__img {
    width: 100%;
    height: auto;
    object-fit: unset;
    display: block;
    cursor: zoom-in;
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-overlay.open {
    display: flex;
}
.lightbox-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }

/* Slider */
.gallery-slider {
    position: relative;
}

.gallery-slider__track {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.gallery-slider__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.gallery-slider__slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.gallery-slider__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Gallery Arrows */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: var(--brand-blue);
    transition: var(--transition);
}

.gallery-arrow--prev { left: 16px; }
.gallery-arrow--next { right: 16px; }

.gallery-arrow:hover {
    background: var(--accent-red);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: var(--shadow-red);
}

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 14px;
    right: 18px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.9);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

/* Gallery Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
}

.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.gallery-thumb {
    width: 72px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    background: none;
    padding: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.65;
    transition: opacity 0.2s;
}

.gallery-thumb.active {
    border-color: var(--accent-red);
    transform: translateY(-2px);
}

.gallery-thumb.active img { opacity: 1; }
.gallery-thumb:hover img { opacity: 0.9; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.article-sidebar {
    min-width: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 150px; /* Buffer below global 130px header padding */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sidebar Card */
.sidebar-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.sidebar-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--brand-blue);
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-card__header svg { color: var(--accent-teal); flex-shrink: 0; }

.sidebar-card__body {
    padding: 4px 0;
}

/* Detail Rows */
.detail-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child { border-bottom: none; }

.detail-row__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.detail-row__value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
}

.detail-row__link {
    color: var(--accent-red);
    transition: color 0.2s;
}

.detail-row__link:hover { color: var(--accent-red-hover); text-decoration: underline; }

/* Related Articles */
.related-list {
    display: flex;
    flex-direction: column;
}

.related-item {
    display: flex;
    gap: 0;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

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

.related-item:hover { background: var(--background); }

.related-item__thumb {
    width: 88px;
    min-height: 72px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.related-item:hover .related-item__thumb img { transform: scale(1.06); }

.related-item__placeholder {
    width: 100%;
    height: 100%;
    min-height: 72px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
}

.related-item__body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.related-item__date {
    font-size: 0.72rem;
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-item__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Back Button */
.sidebar-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    font-size: 0.88rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.sidebar-back-btn:hover {
    background: var(--brand-blue);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15,32,39,0.15);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .article-layout {
        grid-template-columns: 1fr;
        padding: 40px 40px 60px;
        gap: 32px;
    }

    .article-sidebar { order: -1; }

    .sidebar-sticky { position: static; }

    .sidebar-card--related { display: none; } /* hide on mobile, shown inline */
}

@media (max-width: 860px) {
    .article-hero { height: 60vh; min-height: 360px; }
    .article-hero__content { padding: 0 32px 40px; }
    .article-hero__headline { font-size: clamp(1.4rem, 4vw, 2.2rem); }
    .article-body { padding: 32px 28px; }
    .article-layout { padding: 32px 24px 48px; }
    .event-banner { flex-wrap: wrap; gap: 12px; }
    .event-banner__org { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 12px; width: 100%; }
}

@media (max-width: 600px) {
    .article-hero { height: 55vh; min-height: 320px; margin-top: 60px; }
    .article-hero__content { padding: 0 20px 28px; }
    .article-body { padding: 24px 20px; font-size: 0.97rem; }
    .article-layout { padding: 24px 16px 40px; }
    .article-share { padding: 16px 20px; gap: 12px; }
    .gallery-arrow { width: 40px; height: 40px; }
    .gallery-arrow--prev { left: 8px; }
    .gallery-arrow--next { right: 8px; }
    .article-hero__meta { display: none; }
}
