/* ============================================================
   news.css
   Scoped to the Новини (News) page.
   Prefix: .news-  .news-hero  .news-featured  .news-card
   No global rules — nothing leaks to other pages.
   ============================================================ */


/* ── Page hero ───────────────────────────────────────────────────────────── */
.news-hero {
    padding-top: 124px;
    padding-bottom: 40px;
    background: #fff;
}

.news-hero__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    padding-top: 60px;
}

.news-hero__bar {
    width: 88px;
    height: 52px;
    background: var(--g-primary);
    border-radius: 4px;
    flex-shrink: 0;
}

.news-hero__title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    color: var(--c-text-dark);
    margin: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


/* ── Section wrapper ─────────────────────────────────────────────────────── */
.news-section {
    background: #fff;
    padding-bottom: 80px;
}


/* ══════════════════════════════════════════════════════════════════════════
   FEATURED ARTICLE
   ══════════════════════════════════════════════════════════════════════════ */
.news-featured {
    padding-top: 48px;
    padding-bottom: 56px;
}

/* Top row: heading left / meta stats right */
.news-featured__top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: start;
    margin-bottom: 28px;
}

/* LEFT — accent bar + title + excerpt */
.news-featured__heading {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-featured__accent {
    width: 48px;
    height: 5px;
    background: var(--g-primary);
    border-radius: 3px;
}

.news-featured__title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--c-text-dark);
    margin: 0;
    line-height: 1.2;
    max-width: 480px;
}

.news-featured__excerpt {
    font-family: var(--font-ui);
    font-size: 14px;
    color: #666;
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

/* RIGHT — 3 meta stats */
.news-featured__meta {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    padding-top: 8px;
}

.news-featured__meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.news-featured__meta-value {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    color: var(--c-text-dark);
    line-height: 1;
}

.news-featured__meta-label {
    font-family: var(--font-ui);
    font-size: 12px;
    color: #888;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

/* Full-width image with overlaid CTA */
.news-featured__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border-radius: 4px;
}

.news-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.news-featured__img-wrap:hover .news-featured__img {
    transform: scale(1.02);
}

/* "Прочети цялата статия →" — red pill, bottom-right corner */
.news-featured__cta {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--g-primary);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.news-featured__cta:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.news-featured__cta-arrow {
    font-size: 18px;
    line-height: 1;
}


/* ══════════════════════════════════════════════════════════════════════════
   NEWS CARD GRID  — 2 columns, image top + white body bottom
   ══════════════════════════════════════════════════════════════════════════ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 56px;
}

/* Card */
.news-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 16px rgba(36, 37, 39, 0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.news-card:hover {
    box-shadow: 0 8px 32px rgba(196, 22, 28, 0.12);
    transform: translateY(-3px);
}

/* Image — takes roughly 65% of card height */
.news-card__img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

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

.news-card:hover .news-card__img {
    transform: scale(1.04);
}

/* White body: title left, arrow button right */
.news-card__body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 20px;
    background: #fff;
}

.news-card__title {
    font-family: var(--font-display);
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 700;
    color: var(--c-text-dark);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* Red square arrow button */
.news-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--g-primary);
    color: #fff;
    font-size: 18px;
    border-radius: 4px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.news-card__arrow:hover {
    opacity: 0.85;
}


/* ══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════════════ */
.news-pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-bottom: 16px;
}

.news-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.news-pagination__item:hover {
    background: rgba(196, 22, 28, 0.08);
    color: #C4161C;
}

/* Active page number — red gradient text */
.news-pagination__item--active {
    background: var(--g-primary);
    color: #fff;
    font-weight: 700;
}

.news-pagination__item--active:hover {
    background: var(--g-primary);
    color: #fff;
}

/* › next arrow */
.news-pagination__item--next {
    font-size: 18px;
    font-weight: 400;
}

.news-pagination__ellipsis {
    font-family: var(--font-ui);
    font-size: 15px;
    color: #888;
    padding: 0 4px;
    user-select: none;
}


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .news-featured__top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news-featured__meta {
        gap: 28px;
    }

    .news-featured__img-wrap {
        aspect-ratio: 16 / 8;
    }
}

@media (max-width: 768px) {
    .news-hero {
        padding-bottom: 28px;
    }

    .news-hero__bar {
        width: 60px;
        height: 40px;
    }

    .news-featured {
        padding-top: 32px;
        padding-bottom: 40px;
    }

    .news-featured__img-wrap {
        aspect-ratio: 4 / 3;
    }

    .news-featured__cta {
        bottom: 16px;
        right: 16px;
        font-size: 13px;
        padding: 11px 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-pagination {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-featured__meta {
        gap: 20px;
    }

    .news-card__body {
        padding: 14px 16px 16px;
    }

    .news-card__title {
        font-size: 15px;
    }
}


/* ══════════════════════════════════════════════════════════════════════════
   NEWS DETAIL PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.news-detail {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 56px;
    padding-top: 48px;
    padding-bottom: 80px;
    align-items: start;
}

/* ── Article ──────────────────────────────────────────────────────────── */
.news-detail__accent {
    width: 48px;
    height: 5px;
    background: var(--g-primary);
    border-radius: 3px;
    margin-bottom: 16px;
}

.news-detail__title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 700;
    color: var(--c-text-dark);
    margin: 0 0 12px;
    line-height: 1.2;
}

.news-detail__excerpt {
    font-family: var(--font-ui);
    font-size: 16px;
    color: #555;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Meta strip */
.news-detail__meta {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(36, 37, 39, 0.1);
}

.news-detail__meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.news-detail__meta-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text-dark);
    line-height: 1;
}

.news-detail__meta-label {
    font-family: var(--font-ui);
    font-size: 12px;
    color: #888;
}

/* Featured image */
.news-detail__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 36px;
}

.news-detail__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body text — targets HTML tags output from the body field */
.news-detail__body {
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.8;
    color: var(--c-text-body);
}

.news-detail__body p {
    margin: 0 0 20px;
}

.news-detail__body h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text-dark);
    margin: 36px 0 12px;
}

.news-detail__body ul,
.news-detail__body ol {
    padding-left: 24px;
    margin: 0 0 20px;
}

.news-detail__body li {
    margin-bottom: 8px;
}

.news-detail__body strong {
    color: var(--c-text-dark);
}

.news-detail__body a {
    color: #C4161C;
    text-decoration: underline;
}

/* Back link */
.news-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    color: #C4161C;
    text-decoration: none;
    transition: opacity 0.2s;
}

.news-detail__back:hover {
    opacity: 0.75;
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.news-detail__sidebar {
    position: sticky;
    top: 110px;
}

.news-detail__sidebar-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text-dark);
    margin: 0 0 20px;
}

.news-detail__related {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Related card */
.news-related-card {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(36, 37, 39, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.news-related-card:hover {
    box-shadow: 0 6px 24px rgba(196, 22, 28, 0.12);
    transform: translateY(-2px);
}

.news-related-card__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5e5e5;
}

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

.news-related-card:hover .news-related-card__img {
    transform: scale(1.04);
}

.news-related-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.news-related-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
}

.news-related-card__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text-dark);
    line-height: 1.3;
    flex: 1;
}

.news-related-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--g-primary);
    color: #fff;
    font-size: 15px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Placeholder for cards with no image */
.news-card__img-placeholder,
.news-featured__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

/* Empty state */
.news-empty {
    font-family: var(--font-ui);
    font-size: 18px;
    color: #888;
    text-align: center;
    padding: 80px 0;
}


/* ── Detail page responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .news-detail {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .news-detail__sidebar {
        position: static;
    }

    .news-detail__related {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .news-related-card {
        flex: 1 1 calc(50% - 8px);
    }
}

@media (max-width: 600px) {
    .news-detail__meta {
        gap: 24px;
    }

    .news-related-card {
        flex: 1 1 100%;
    }
}