*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --navy: #083761;
    --teal: #0d74bd;
    --accent: #4ab6ff;
    --gold: #e8b84b;
    --white: #ffffff;
    --gray: #6b7280;
    --light: #dde8ee;
    --font-display: "Poppins", sans-serif;
    --font-body: "Poppins", sans-serif;
    --radius: 14px;
    --shadow: 0 6px 28px rgba(8, 55, 97, .10);
    --card-sm-h: 150px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--navy);
    overflow-x: hidden;
}

.article-page {
    background: var(--white);
    color: var(--navy);
}

.article-hero {
    position: relative;
    padding-top: calc(5rem + 5.8125rem);
    padding-bottom: 5rem;
}

.article-hero .container {
    position: relative;
    z-index: 1;
}

.article-hero .bg-overlay {
    position: absolute;
    inset: 0;
}

.article-hero .bg-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 88, 146, 1) 40%, rgba(8, 88, 146, 0) 100%);
    opacity: .85;
}

.article-hero .hero__bg {
    position: absolute;
    inset: 0;
    background-image: url("../media/proto/article-hero-bg.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 1.5s ease-in-out;
}

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

.article-hero span {
    border-left: 8px solid var(--accent);
    display: inline-flex;
    font-size: 1.3rem;
    min-height: 1.5rem;
    line-height: 1.4;
}

.article-hero h1 {
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1.1;
    margin-top: 1rem;
}

.article-hero p {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.7;
    margin-top: 1rem;
    max-width: 40rem;
}

.article-page .section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 40px 80px;
}

.section__header {
    text-align: center;
    margin-bottom: 36px;
}

.section__header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--teal);
}

.section__header p {
    margin-top: 10px;
    color: var(--gray);
    font-size: .92rem;
    font-weight: 300;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 10px 26px;
    border-radius: 999px;
    border: 1.5px solid var(--light);
    background: transparent;
    color: var(--navy);
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .22s ease;
    outline: none;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--teal);
}

.filter-btn.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 116, 189, .28);
}

.content-area {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s ease, transform .45s ease;
}

.content-area.visible {
    opacity: 1;
    transform: none;
}

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

.grid-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .28s ease, box-shadow .28s ease;
}

.grid-card.is-entering {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s ease, transform .4s ease;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(8, 55, 97, .16);
}

.grid-card:focus-visible,
.card-small:focus-visible,
.card-featured:focus-visible {
    outline: 3px solid rgba(13, 116, 189, .35);
    outline-offset: 4px;
}

.grid-card__img-wrap {
    overflow: hidden;
    height: 180px;
}

.grid-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.grid-card:hover .grid-card__img {
    transform: scale(1.06);
}

.grid-card__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.grid-card__meta {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    flex-direction: column;
}

.grid-card__date {
    font-size: .72rem;
    color: var(--gray);
}

.grid-card__title {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.45;
    color: var(--navy);
    flex: 1;
}

.article-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.article-pagination__pages {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-pagination__btn,
.article-pagination__page {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--light);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all .2s ease;
}

.article-pagination__btn:hover:not(:disabled),
.article-pagination__page:hover,
.article-pagination__page.is-active {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(13, 116, 189, .2);
}

.article-pagination__btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.read-more-sm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--teal);
    text-decoration: none;
    transition: gap .18s;
    margin-top: auto;
}

.read-more-sm::after {
    content: "";
    position: absolute;
    inset: 0;
}

.read-more-sm:hover {
    gap: 9px;
}

.read-more-sm svg {
    width: 14px;
    height: 14px;
}

.split-view {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 28px;
    align-items: stretch;
}

.card-featured {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--navy);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 500px;
    transition: box-shadow .3s ease;
}

.card-featured:hover {
    box-shadow: 0 24px 56px rgba(8, 55, 97, .24);
}

.card-featured img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .72;
    transition: transform .6s ease;
}

.card-featured:hover img {
    transform: scale(1.04);
}

.card-featured__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 55, 97, .93) 0%, transparent 52%);
}

.card-featured__body {
    position: relative;
    z-index: 1;
    padding: 36px 32px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.badge--release {
    background: var(--teal);
    color: #fff;
}

.badge--blog {
    background: var(--gold);
    color: var(--navy);
}

.badge--video {
    background: #e84b4b;
    color: #fff;
}

.card-featured__date {
    font-size: .78rem;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 8px;
}

.card-featured__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    color: #fff;
    line-height: 1.3;
    margin-bottom: 24px;
}

.read-more-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.read-more-lg::after {
    content: "";
    position: absolute;
    inset: 0;
}

.read-more-lg:hover {
    background: var(--teal);
    border-color: var(--teal);
}

.read-more-lg svg {
    width: 16px;
    height: 16px;
}

.right-col {
    display: flex;
    flex-direction: column;
    position: relative;
}

.cards-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(var(--card-sm-h) * 4 + 12px * 3);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 2px;
    scroll-behavior: smooth;
}

.cards-scroll::-webkit-scrollbar {
    width: 4px;
}

.cards-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.cards-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.scroll-fade {
    height: 52px;
    background: linear-gradient(transparent, rgba(255, 255, 255, .98));
    pointer-events: none;
    margin-top: -52px;
    position: relative;
    z-index: 1;
    border-radius: 0 0 var(--radius) var(--radius);
    transition: opacity .2s;
}

.scroll-fade.is-hidden {
    opacity: 0;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--teal);
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
    transition: gap .2s;
    align-self: flex-start;
}

.view-all-link:hover {
    gap: 13px;
}

.view-all-link svg {
    width: 16px;
    height: 16px;
}

.card-small {
    position: relative;
    height: var(--card-sm-h);
    min-height: var(--card-sm-h);
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

.card-small:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(8, 55, 97, .16);
}

.card-small.is-entering {
    opacity: 0;
    transform: translateX(12px);
    transition: opacity .3s ease, transform .3s ease, box-shadow .25s ease;
}

.card-small__img {
    width: 115px;
    min-width: 115px;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.card-small:hover .card-small__img {
    transform: scale(1.06);
}

.card-small__body {
    padding: 10px 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    flex: 1;
}

.card-small__meta {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    flex-direction: column;
}

.card-small__date {
    font-size: .7rem;
    color: var(--gray);
}

.card-small__title {
    font-weight: 600;
    font-size: .82rem;
    line-height: 1.42;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    color: var(--gray);
    padding: 60px 0;
    text-align: center;
}

.article-detail-page {
    padding: 130px 0 80px;
    background: var(--white);
    color: var(--navy);
}

.article-detail-container {
    max-width: 1200px;
}

.article-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 42px;
    align-items: start;
}

.article-detail-main {
    min-width: 0;
}

.article-detail-header {
    margin-bottom: 28px;
}

.article-detail-title {
    margin: 12px 0 18px;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--gray);
    font-size: .9rem;
}

.article-detail-share {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
}

.article-detail-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--light);
    border-radius: 50%;
    color: var(--teal);
    text-decoration: none;
    transition: all .2s ease;
}

.article-detail-share a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: #ffffff;
}

.article-detail-image {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-detail-content {
    margin-top: 32px;
    color: #263645;
    font-size: 1rem;
    line-height: 1.85;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.article-detail-content a {
    color: var(--teal);
}

.article-detail-sidebar {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.article-sidebar-section {
    padding: 18px;
    border: 1px solid rgba(13, 116, 189, .08);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.article-sidebar-section h2 {
    margin: 0 0 16px;
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 700;
}

.article-sidebar-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    color: var(--navy);
    text-decoration: none;
    border-top: 1px solid rgba(8, 55, 97, .08);
}

.article-sidebar-card:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.article-sidebar-card:hover {
    color: var(--teal);
    text-decoration: none;
}

.article-sidebar-card img {
    width: 92px;
    height: 78px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--light);
}

.article-sidebar-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.article-sidebar-card__date {
    margin-bottom: 6px;
    color: var(--gray);
    font-size: .72rem;
}

.article-sidebar-card .badge {
    margin-bottom: 7px;
    font-size: .58rem;
}

.article-sidebar-card strong {
    display: -webkit-box;
    color: inherit;
    font-size: .84rem;
    line-height: 1.42;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-sidebar-empty {
    margin: 0;
    color: var(--gray);
    font-size: .88rem;
}

@media (min-width: 768px) {
    .article-hero {
        padding-top: calc(7.5rem + 5.8125rem);
        padding-bottom: 7.5rem;
    }

    .article-hero .container > .row {
        min-height: calc(100vh - 7.5rem * 2 - 5.8125rem);
    }

    .article-hero .container > .row::before {
        content: "";
        min-height: inherit;
    }

    .article-hero h1 {
        font-size: 4.8rem;
    }

    .article-hero p {
        font-size: 1.4rem;
    }
}

@media (min-width: 1200px) {
    .article-hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 900px) {
    .article-page .section {
        padding: 48px 20px 60px;
    }

    .article-detail-page {
        padding: 110px 0 56px;
    }

    .article-detail-layout {
        grid-template-columns: 1fr;
    }

    .article-detail-sidebar {
        position: static;
    }

    .split-view {
        grid-template-columns: 1fr;
    }

    .card-featured {
        min-height: 320px;
    }

    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .article-hero {
        min-height: 520px;
    }

    .article-hero .container > .row {
        min-height: 360px;
    }

    .article-hero span {
        font-size: 1rem;
    }

    .article-hero h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 560px) {
    .grid-view {
        grid-template-columns: 1fr;
    }

    .article-detail-page {
        padding-top: 96px;
    }

    .article-sidebar-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .article-sidebar-card img {
        width: 82px;
        height: 74px;
    }

    .article-pagination {
        gap: 8px;
    }

    .article-pagination__btn,
    .article-pagination__page {
        min-width: 38px;
        height: 38px;
        padding: 0 11px;
        font-size: .78rem;
    }
}
