/* ==========================================
   MODERN ARTICLE DESIGN - 2025
   ========================================== */

   :root {
    --primary: #1a3f67;
    --primary-light: #4a90e2;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-subtle: #f8f9fa;
    --border: rgba(26, 63, 103, 0.1);
    --shadow-sm: 0 2px 8px rgba(26, 63, 103, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 63, 103, 0.1);
    --shadow-lg: 0 8px 30px rgba(26, 63, 103, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ==========================================
   SKIP LINK (Accessibility)
   ========================================== */

.SkipLink {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s;
}

.SkipLink:focus {
    top: 20px;
    outline: 3px solid var(--primary-light);
    outline-offset: 4px;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.NewsArticle {
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
}

/* ==========================================
   LOADING & ERROR STATES
   ========================================== */

.LoadingState {
    text-align: center;
    padding: 4rem 2rem;
}

.Spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.LoadingState p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.ErrorState {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.ErrorIcon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.ErrorState h2 {
    color: var(--text);
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
}

.ErrorState p {
    color: var(--text-light);
    margin: 0 0 2rem;
}

.ErrorBtn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: var(--transition);
}

.ErrorBtn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   BACK BUTTON
   ========================================== */

.ArticleBack {
    margin: 0 0 1.5rem;
}

.ArticleBack a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: white;
    border: 2px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.ArticleBack a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.ArticleBack svg {
    flex-shrink: 0;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.ArticleHero {
    position: relative;
    margin: 0 0 0.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-subtle);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

.ArticleHero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ArticleHero--overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0) 70%
    );
    pointer-events: none;
}

.ArticleHero__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    z-index: 1;
}

.ArticleMeta--hero {
    margin-bottom: 1rem;
}

.ArticleHero__overlay .ArticleTitle {
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    margin: 0;
}

/* ==========================================
   ARTICLE HEADER (No Hero Variant)
   ========================================== */

.ArticleHead {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.NewsArticle--no-hero .ArticleHead {
    display: block;
}

.NewsArticle--no-hero .ArticleHero {
    display: none;
}

.ArticleTitle {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin: 1rem 0 0;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ArticleMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.Meta__author {
    font-weight: 600;
}

/* ==========================================
   BADGE (Category)
   ========================================== */

.Badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(26, 63, 103, 0.1);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1.5px solid rgba(26, 63, 103, 0.2);
}

.ArticleMeta--hero .Badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

/* ==========================================
   ARTICLE CONTENT
   ========================================== */

.ArticleContent {
    background: white;
    padding: 3rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
}

.ArticleContent > *:first-child {
    margin-top: 0;
}

.ArticleContent > *:last-child {
    margin-bottom: 0;
}

.ArticleContent p {
    margin: 0 0 1.5rem;
}

.ArticleContent img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.ArticleContent img:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   TAGS SECTION
   ========================================== */

/* ==========================================
   TAGS & SHARE SECTION
   ========================================== */

.ArticleTagsShare {
    margin-bottom: 3rem;
}

.TagRow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.TagRow .Tag {
    display: inline-block;
    background: rgba(26, 63, 103, 0.06);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1.5px solid rgba(26, 63, 103, 0.12);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.TagRow .Tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ARTICLE FOOTER & SHARE BUTTONS */
.ArticleFoot {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: 0;
}

.ArticleShare {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ShareLabel {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
    margin-right: 1rem;
}

.ShareBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.ShareBtn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.ShareBtn--tg { color: #229ED9; }
.ShareBtn--tg:hover {
    background: #229ED9;
    color: white;
    border-color: #229ED9;
}

.ShareBtn--fb { color: #1877F2; }
.ShareBtn--fb:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.ShareBtn--x { color: #000; }
.ShareBtn--x:hover {
    background: #000;
    color: white;
    border-color: #000;
}

.ShareBtn--copy { color: var(--text-light); }
.ShareBtn--copy:hover {
    background: var(--text-light);
    color: white;
    border-color: var(--text-light);
}

/* ==========================================
   RELATED & LATEST NEWS SECTIONS
   ========================================== */

.ArticleRelated,
.ArticleLatest {
    margin-bottom: 3rem;
}

.ArticleRelated > h3,
.ArticleLatest > h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin: 0 0 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.ArticleRelated > h3::after,
.ArticleLatest > h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 999px;
}

/* ==========================================
   CARD GRID
   ========================================== */

.CardGrid {
    display: grid;
    gap: 1.5rem;
}

.CardGrid--3col {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ==========================================
   NEWS CARD (Modern Design)
   ========================================== */

.NewsCard {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.NewsCard:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.NewsCard__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.NewsCard__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-subtle);
}

.NewsCard__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.NewsCard:hover .NewsCard__image img {
    transform: scale(1.08);
}

.NewsCard__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.NewsCard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.NewsCard__meta .Badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
}

.NewsCard__meta time {
    color: var(--text-light);
    font-weight: 500;
}

.NewsCard__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary);
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.NewsCard:hover .NewsCard__title {
    color: var(--primary-light);
}

.NewsCard__excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ==========================================
   ALTERNATIVE: COMPACT CARD VARIANT
   ========================================== */

.NewsCard--compact {
    display: flex;
    flex-direction: row;
}

.NewsCard--compact .NewsCard__image {
    width: 140px;
    aspect-ratio: 1;
    flex-shrink: 0;
}

.NewsCard--compact .NewsCard__content {
    padding: 1.25rem;
}

.NewsCard--compact .NewsCard__title {
    font-size: 1rem;
    -webkit-line-clamp: 2;
}

.NewsCard--compact .NewsCard__excerpt {
    font-size: 0.875rem;
    -webkit-line-clamp: 2;
}

/* ==========================================
   LIGHTBOX
   ========================================== */

.Lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(8px);
}

.Lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.Lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.Lightbox.is-open .Lightbox__img {
    transform: scale(1);
}

.Lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.Lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.Lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.Lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.Lightbox__nav--prev {
    left: 20px;
}

.Lightbox__nav--next {
    right: 20px;
}

/* ==========================================
   BREADCRUMBS
   ========================================== */

.Breadcrumbs {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.Breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.Breadcrumbs li {
    display: flex;
    align-items: center;
}

.Breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.Breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.Breadcrumbs a:hover {
    color: var(--primary);
}

.Breadcrumbs [aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .NewsArticle {
        padding: 1rem;
    }

    .ArticleContent {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }

    .ArticleTitle {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    .ArticleHero {
        border-radius: var(--radius-md);
        aspect-ratio: 4 / 3;
    }

    .ArticleHero__overlay {
        padding: 1.5rem;
    }

    .CardGrid--3col {
        grid-template-columns: 1fr;
    }

    .ShareBtn {
        width: 44px;
        height: 44px;
    }

    .NewsCard--compact {
        flex-direction: column;
    }

    .NewsCard--compact .NewsCard__image {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    .ArticleRelated > h3,
    .ArticleLatest > h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .NewsCard__title {
        font-size: 1rem;
    }

    .NewsCard__excerpt {
        font-size: 0.875rem;
    }

    .TagRow {
        padding: 1rem;
        gap: 0.5rem;
    }
}

@media (min-width: 1920px) {
    .NewsArticle {
        max-width: 1200px;
    }

    .ArticleContent {
        padding: 4rem 3rem;
        font-size: 1.25rem;
    }

    .CardGrid--3col {
        grid-template-columns: repeat(3, 1fr);
    }
}
