/* Home page modern layout */
:root {
    --home-ink: #0f2233;
    --home-muted: #5f7386;
    --home-gold: #ffc000;
    --home-cyan: #0ea5b7;
    --home-gradient: linear-gradient(130deg, #0f2233 0%, #163550 42%, #1a4a6c 100%);
}

.main-nav {
    backdrop-filter: blur(6px);
    background: rgba(224, 229, 236, 0.82);
    border-bottom: 1px solid rgba(15, 34, 51, 0.08);
}

.hero-carousel-section.modern-hero {
    margin: 0 0 36px;
    padding: 20px 0 0;
}

.hero-carousel-section.modern-hero .hero-carousel-container {
    width: min(1240px, 94vw);
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 48px rgba(16, 35, 53, 0.26);
    height: clamp(380px, 56vh, 540px);
}

.hero-carousel-section.modern-hero .hero-slider,
.hero-carousel-section.modern-hero .hero-slide {
    height: clamp(380px, 56vh, 540px);
}

.hero-carousel-section.modern-hero .hero-slide::before {
    background:
        radial-gradient(circle at 18% 25%, rgba(255, 192, 0, 0.24), transparent 40%),
        linear-gradient(110deg, rgba(10, 23, 35, 0.88) 8%, rgba(15, 37, 53, 0.6) 55%, rgba(6, 14, 24, 0.78) 100%);
}

.hero-carousel-section.modern-hero .hero-slide-content {
    max-width: 760px;
    padding: 0 clamp(20px, 3.7vw, 56px);
}

.hero-carousel-section.modern-hero .hero-category {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(6px);
}

.hero-carousel-section.modern-hero .hero-title {
    font-size: clamp(1.75rem, 4vw, 3.25rem);
    line-height: 1.08;
}

.hero-carousel-section.modern-hero .hero-description {
    max-width: 640px;
    font-size: clamp(0.95rem, 1.3vw, 1.12rem);
    color: rgba(246, 250, 255, 0.92);
}

.home-kpi-band {
    margin: 0 auto 28px;
}

.home-kpi-wrap {
    width: min(1240px, 94vw);
    margin: 0 auto;
    border-radius: 20px;
    padding: 18px;
    background: var(--home-gradient);
    box-shadow: 0 14px 28px rgba(12, 30, 48, 0.28);
}

.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.home-kpi-item {
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.home-kpi-item span {
    display: block;
    color: rgba(237, 247, 255, 0.72);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 3px;
}

.home-kpi-item strong {
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.35rem);
    letter-spacing: -0.02em;
}

.home-main {
    margin: 0 auto;
    padding-bottom: 42px;
}

.home-main > .container {
    width: min(1240px, 94vw);
}

.home-main .row {
    --bs-gutter-x: 1.4rem;
}

.sponsored-block {
    margin-bottom: 28px;
}

.home-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-section-title h2,
.home-section-title h3 {
    margin: 0;
    color: var(--home-ink);
    font-size: clamp(1.16rem, 2vw, 1.5rem);
    letter-spacing: -0.02em;
}

.home-section-title p {
    margin: 0;
    color: var(--home-muted);
    font-size: 0.9rem;
}

.sponsored-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.sponsored-card.article-card {
    border-radius: 18px;
    overflow: hidden;
    background: #e6ebf2;
    box-shadow: 8px 8px 18px #b6c0cf, -8px -8px 18px #ffffff;
}

.sponsored-card .article-image {
    height: 175px;
}

.sponsored-card .article-content {
    padding: 16px;
}

.home-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.home-chip {
    padding: 9px 15px;
    border-radius: 999px;
    color: var(--home-ink);
    font-weight: 600;
    font-size: 0.83rem;
    box-shadow: 5px 5px 11px #bfc9d8, -5px -5px 11px #ffffff;
    background: #e6ebf2;
}

.home-chip.active,
.home-chip:hover {
    color: #fff;
    background: linear-gradient(120deg, #173854, #1f5b84);
}

#articles-grid {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#articles-grid > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}

#articles-grid .article-card {
    --article-image-height: 220px;
    --article-title-height: 3.3rem;
    --article-excerpt-height: 3.8rem;
    --article-meta-height: 4.5rem;
    --article-cta-height: 2.48rem;
    --article-content-padding: 18px;
    --article-content-gap: 0.6rem;
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #e6ebf2;
    box-shadow: 8px 8px 18px #b9c3d2, -8px -8px 18px #ffffff;
}

#articles-grid .article-image {
    height: var(--article-image-height);
}

#articles-grid .article-content {
    padding: var(--article-content-padding) var(--article-content-padding) 0;
    display: grid;
    grid-template-rows: var(--article-title-height) var(--article-excerpt-height) var(--article-meta-height) var(--article-cta-height);
    row-gap: var(--article-content-gap);
    align-content: start;
}

body.home-page.cards-premium #articles-grid .article-card {
    --article-image-height: 196px;
    --article-title-height: 3.05rem;
    --article-excerpt-height: 2.95rem;
    --article-meta-height: 3.85rem;
    --article-cta-height: 2.24rem;
    --article-content-padding: 16px;
    --article-content-gap: 0.5rem;
    background: linear-gradient(165deg, #f7faff 0%, #ebf1f9 100%);
    border: 1px solid rgba(19, 45, 67, 0.08);
    box-shadow: 10px 10px 20px #c3cfde, -8px -8px 18px #ffffff;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

body.home-page.cards-premium #articles-grid .article-card:hover {
    transform: translateY(-2px);
    box-shadow: 14px 14px 24px #bcc9da, -10px -10px 20px #ffffff;
}

body.home-page.cards-premium #articles-grid .article-image {
    height: var(--article-image-height);
    filter: saturate(1.04) contrast(1.03);
}

body.home-page.cards-premium #articles-grid .article-title {
    font-size: 1rem;
}

body.home-page.cards-premium #articles-grid .article-snippet {
    -webkit-line-clamp: 2;
    font-size: 0.79rem;
    line-height: 1.28;
}

body.home-page.cards-premium #articles-grid .article-meta {
    gap: 0.26rem;
}

body.home-page.cards-premium #articles-grid .article-meta span {
    min-height: 1.12rem;
    font-size: 0.72rem;
}

body.home-page.cards-premium #articles-grid .btn-read-more {
    min-height: 2.2rem;
    padding: 7px 16px;
    font-size: 0.8rem;
}

body.home-page.cards-compact #articles-grid .article-card {
    --article-image-height: 200px;
    --article-title-height: 3.1rem;
    --article-excerpt-height: 3.4rem;
    --article-meta-height: 4.1rem;
    --article-cta-height: 2.28rem;
    --article-content-padding: 16px;
    --article-content-gap: 0.5rem;
}

#articles-grid .article-title {
    margin: 0;
    line-height: 1.25;
    font-size: 1.03rem;
}

#articles-grid .article-title a {
    color: var(--home-ink);
    transition: color 0.22s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#articles-grid .article-title a:hover {
    color: #1a5b87;
}

#articles-grid .article-snippet {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--home-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#articles-grid .article-meta {
    display: grid;
    align-content: start;
    gap: 0.36rem;
    font-size: 0.74rem;
    color: var(--home-muted);
    margin: 0;
}

#articles-grid .article-meta-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    min-width: 0;
}

#articles-grid .article-meta-main .article-author {
    flex: 1 1 auto;
    min-width: 0;
}

#articles-grid .article-meta-main .article-publish-date {
    flex: 0 0 auto;
}

#articles-grid .article-views {
    width: 100%;
}

#articles-grid .article-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.25rem;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#articles-grid .article-author-thumb,
#articles-grid .article-author-fallback {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

#articles-grid .article-author-thumb {
    object-fit: cover;
    border: 1px solid rgba(15, 34, 51, 0.12);
}

#articles-grid .article-author-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, #173854, #1f5b84);
}

#articles-grid .article-cta {
    display: flex;
    align-items: flex-end;
}

#articles-grid .btn-read-more {
    margin-top: 0;
    min-height: 2.35rem;
}

.home-sidebar .widget {
    margin-bottom: 16px;
    border-radius: 16px;
}

.home-sidebar .widget-title {
    color: var(--home-ink);
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.home-sidebar .newsletter-box {
    border-radius: 16px;
}

.pagination-custom {
    margin-top: 22px;
}

@media (max-width: 1200px) {
    .sponsored-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .home-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-main .row {
        --bs-gutter-y: 1.2rem;
    }

    .home-sidebar {
        margin-top: 10px;
    }

    #articles-grid .article-card {
        --article-image-height: 205px;
        --article-title-height: 3.2rem;
        --article-excerpt-height: 3.6rem;
        --article-meta-height: 4.3rem;
        --article-cta-height: 2.38rem;
    }

    body.home-page.cards-premium #articles-grid .article-card {
        --article-image-height: 184px;
        --article-title-height: 3rem;
        --article-excerpt-height: 2.9rem;
        --article-meta-height: 3.65rem;
        --article-cta-height: 2.18rem;
        --article-content-padding: 15px;
        --article-content-gap: 0.46rem;
    }

    body.home-page.cards-compact #articles-grid .article-card {
        --article-image-height: 190px;
        --article-title-height: 3rem;
        --article-excerpt-height: 3.2rem;
        --article-meta-height: 3.9rem;
        --article-cta-height: 2.24rem;
        --article-content-padding: 15px;
        --article-content-gap: 0.45rem;
    }
}

@media (max-width: 767px) {
    .hero-carousel-section.modern-hero .hero-carousel-container {
        width: 96vw;
        border-radius: 20px;
        height: clamp(300px, 46vh, 390px);
    }

    .hero-carousel-section.modern-hero .hero-slider,
    .hero-carousel-section.modern-hero .hero-slide {
        height: clamp(300px, 46vh, 390px);
    }

    .sponsored-grid {
        grid-template-columns: 1fr;
    }

    .home-kpi-grid {
        grid-template-columns: 1fr;
    }

    #articles-grid .article-content {
        grid-template-rows: auto auto auto auto;
        row-gap: 0.7rem;
    }

    #articles-grid .article-meta span {
        white-space: nowrap;
    }

    #articles-grid .article-meta-main {
        gap: 0.45rem;
    }
}
