/* ================================================
   ARTICLES PAGE (/Articles)
   All selectors are scoped under .articles-page so
   nothing here can affect cards/headings/images
   elsewhere on the site.
   ================================================ */

.articles-page {
    --article-navy: var(--navy, #132849);
    --article-teal: #2e9e8f;
    --article-teal-soft: #9fd6ce;
    --article-cream: #fef9f6;
    --article-rose: #c17878;
    --article-gold: #c4973a;
    --article-text: #5f6875;
    --article-border: rgba(19, 40, 73, 0.1);

    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

/* ------------------------------------------------
   Hero
   ------------------------------------------------ */

.articles-page .articles-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--article-cream) 0%, #ffffff 65%);
    padding: 3rem 2.5rem;
    margin: 2rem 0 3rem;
}

.articles-page .articles-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.articles-page .articles-hero__content {
    flex: 1 1 auto;
    max-width: 640px;
}

.articles-page .articles-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--article-teal);
    margin-bottom: 1rem;
}

.articles-page .articles-hero__eyebrow i {
    font-size: 0.75rem;
    color: var(--article-rose);
}

.articles-page .articles-hero__title {
    font-family: 'Fontjek', sans-serif;
    color: var(--article-navy);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
}

.articles-page .articles-hero__intro {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--article-text);
    max-width: 46ch;
    margin-bottom: 0;
}

.articles-page .articles-hero__decor {
    flex: 0 0 auto;
    position: relative;
    width: 220px;
    height: 220px;
}

.articles-page .articles-hero__shape {
    position: absolute;
    border-radius: 50%;
}

.articles-page .articles-hero__shape--1 {
    width: 180px;
    height: 180px;
    top: -20px;
    right: 20px;
    background: var(--article-teal-soft);
    opacity: 0.55;
}

.articles-page .articles-hero__shape--2 {
    width: 130px;
    height: 130px;
    bottom: -20px;
    right: 100px;
    background: var(--article-navy);
    opacity: 0.08;
}

.articles-page .articles-hero__shape--3 {
    width: 56px;
    height: 56px;
    bottom: 40px;
    right: 0;
    background: var(--article-gold);
    opacity: 0.25;
}

@media (max-width: 991.98px) {
    .articles-page .articles-hero__decor {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .articles-page .articles-hero {
        padding: 2rem 1.25rem;
        margin: 1.25rem 0 2rem;
        border-radius: 18px;
    }
}

/* ------------------------------------------------
   Shared image / fallback treatment
   ------------------------------------------------ */

.articles-page .article-image-fallback,
.articles-page .featured-article__image,
.articles-page .article-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.articles-page .article-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--article-cream);
    background-image:
        radial-gradient(circle at 18% 22%, var(--article-teal-soft) 0%, transparent 45%),
        radial-gradient(circle at 85% 78%, var(--article-navy) 0%, transparent 42%);
}

.articles-page .article-image-fallback i {
    font-size: 1.75rem;
    color: var(--article-navy);
    opacity: 0.3;
}

/* ------------------------------------------------
   Featured article
   ------------------------------------------------ */

.articles-page .featured-article {
    margin-bottom: 3rem;
}

.articles-page .featured-article__link {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid var(--article-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(19, 40, 73, 0.08);
}

.articles-page .featured-article__media {
    overflow: hidden;
}

.articles-page .featured-article__image,
.articles-page .featured-article__media .article-image-fallback {
    height: 100%;
    min-height: 260px;
    transition: transform 0.35s ease;
}

.articles-page .featured-article__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.25rem;
}

.articles-page .featured-article__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--article-teal);
    margin-bottom: 0.75rem;
}

.articles-page .featured-article__title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--article-navy);
    margin-bottom: 0.75rem;
}

.articles-page .featured-article__description {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--article-text);
    margin-bottom: 1.25rem;
}

.articles-page .featured-article__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.articles-page .featured-article__readtime {
    font-size: 0.875rem;
    color: var(--article-text);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.articles-page .featured-article__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--article-navy);
}

.articles-page .featured-article__cta i {
    transition: transform 0.2s ease;
}

.articles-page .featured-article__link:focus-visible {
    outline: 3px solid var(--article-teal);
    outline-offset: 3px;
}

@media (hover: hover) {
    .articles-page .featured-article__link:hover .featured-article__cta i {
        transform: translateX(4px);
    }

    .articles-page .featured-article__link:hover .featured-article__image {
        transform: scale(1.03);
    }
}

@media (max-width: 767.98px) {
    .articles-page .featured-article__link {
        grid-template-columns: 1fr;
    }

    .articles-page .featured-article__image,
    .articles-page .featured-article__media .article-image-fallback {
        min-height: 0;
        height: auto;
    }

    .articles-page .featured-article__body {
        padding: 1.5rem;
    }
}

/* ------------------------------------------------
   "Latest articles" heading
   ------------------------------------------------ */

.articles-page .articles-grid-section {
    margin-top: 0;
}

.articles-page .articles-grid-section__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--article-navy);
    margin-bottom: 1.5rem;
}

/* ------------------------------------------------
   Card grid
   ------------------------------------------------ */

.articles-page .article-card {
    height: 100%;
}

.articles-page .article-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid var(--article-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(19, 40, 73, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.articles-page .article-card__media {
    overflow: hidden;
}

.articles-page .article-card__image {
    transition: transform 0.35s ease;
}

.articles-page .article-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    padding: 1.5rem;
    text-align: left;
}

.articles-page .article-card__title {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--article-navy);
    margin-bottom: 0.6rem;
}

.articles-page .article-card__description {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--article-text);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles-page .article-card__meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.articles-page .article-card__readtime {
    font-size: 0.85rem;
    color: var(--article-text);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.articles-page .article-card__arrow {
    color: var(--article-navy);
    transition: transform 0.2s ease;
}

.articles-page .article-card__link:focus-visible {
    outline: 3px solid var(--article-teal);
    outline-offset: 3px;
}

@media (hover: hover) {
    .articles-page .article-card__link:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 24px rgba(19, 40, 73, 0.1);
        border-color: var(--article-teal-soft);
    }

    .articles-page .article-card__link:hover .article-card__image {
        transform: scale(1.04);
    }

    .articles-page .article-card__link:hover .article-card__arrow {
        transform: translateX(4px);
    }
}

/* ------------------------------------------------
   Empty state
   ------------------------------------------------ */

.articles-page .articles-empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--article-text);
    background: var(--article-cream);
    border-radius: 20px;
}

.articles-page .articles-empty-state i {
    font-size: 1.5rem;
    color: var(--article-rose);
    margin-bottom: 0.75rem;
    display: block;
}

/* ------------------------------------------------
   Reduced motion
   ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .articles-page .article-card__link,
    .articles-page .article-card__image,
    .articles-page .article-card__arrow,
    .articles-page .featured-article__image,
    .articles-page .featured-article__cta i {
        transition: none !important;
    }

    .articles-page .article-card__link:hover {
        transform: none;
    }
}

/* ------------------------------------------------
   Mobile spacing (320px - 480px focus)
   ------------------------------------------------ */

@media (max-width: 480px) {
    .articles-page {
        padding: 0 0.9rem 3rem;
    }

    .articles-page .article-card__body {
        padding: 1.25rem;
    }

    .articles-page .featured-article__body {
        padding: 1.25rem;
    }
}
