/**
 * Blog Page Styles
 */

/* Page background - shorter purple gradient than default */
.blog-page {
    background: linear-gradient(180deg, #E4E1F2 0%, rgba(228, 225, 242, 0.00) 8%), linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, #F4F3F7 100%), #FFF;
}

/* ============================================
   BLOG HERO
   ============================================ */
.blog-hero {
    padding: 120px 0 42px;
}

/* Title - Desktop/H1 (Heading) */
.blog-hero__title {
    color: var(--Primary-colors-Purple-Dark, #1D004B);
    font-family: "Funnel Sans", sans-serif;
    font-size: 60px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.3px;
    text-align: center;
    margin: 0 0 42px;
}

/* Featured post row */
.blog-hero__featured {
    display: flex;
    align-items: center;
    gap: 80px;
}

/* Image */
.blog-hero__image {
    width: 720px;
    height: 490px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 72 / 49;
}

/* Content column */
.blog-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    justify-content: center;
    flex: 1;
}

/* Tag pill */
.blog-hero__tag {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 60px;
    background: var(--Purple-Tints-1, #F0EDFF);
    color: var(--primary-colors-7336-e-3, #7336E3);
    font-family: "Funnel Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 120%;
}

/* Post title - Desktop/H2 */
.blog-hero__post-title {
    width: 550px;
    max-width: 100%;
    margin: 0;
}

.blog-hero__post-title a {
    color: var(--Primary-colors-Purple-Dark, #1D004B);
    font-family: "Funnel Sans", sans-serif;
    font-size: 38px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.19px;
    text-decoration: none;
}

.blog-hero__post-title a:hover {
    color: var(--color-primary, #7336E3);
}

/* Excerpt - Desktop/Body L */
.blog-hero__excerpt {
    overflow: hidden;
    color: var(--Primary-colors-Text, #000);
    text-overflow: ellipsis;
    font-family: "Funnel Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 150%;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.blog-hero__excerpt p {
    margin: 0;
}

/* Meta - By Author • Date */
.blog-hero__meta {
    color: var(--Colour-Pallette-New-Black-03, #1E1E1E);
    font-family: "Funnel Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 140%;
}

/* Read More link - uses btn-text from style.css */
.blog-hero__link {
    font-size: 20px;
}

/* ============================================
   BLOG GRID
   ============================================ */
.blog-grid {
    padding: 80px 0;
}

.blog-grid__items {
    display: flex;
    align-items: stretch;
    gap: 80px 32px;
    flex-wrap: wrap;
}

/* Blog Card - 3 per row */
.blog-card {
    display: flex;
    padding: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    flex: 1 0 calc((100% - 64px) / 3);
    max-width: calc((100% - 64px) / 3);
    border-radius: 8px;
    background: #FFF;
    box-shadow: 0 4px 15px 3px rgba(39, 43, 43, 0.08);
}

/* Card image */
.blog-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 1.72 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f6;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card content */
.blog-card__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    align-self: stretch;
    flex: 1;
    padding: 0 8px;
}

/* Top section */
.blog-card__top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
    flex: 1;
}

/* Author - Desktop/Body Regular Emphasized */
.blog-card__author {
    color: var(--primary-colors-7336-e-3, #7336E3);
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 140%;
}

/* Card title - Desktop/Blog Card Header */
.blog-card__title {
    margin: 0;
    line-height: 110%;
}

.blog-card__title a {
    color: var(--Primary-colors-Purple-Dark, #1D004B);
    font-family: "Funnel Sans", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 110%;
    letter-spacing: 0.11px;
    text-decoration: none;
}

.blog-card__title a:hover {
    color: var(--color-primary, #7336E3);
}

/* Excerpt - Desktop/Body Small */
.blog-card__excerpt {
    color: var(--Colour-Pallette-New-Black-03, #1E1E1E);
    font-family: "Funnel Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 140%;
}

/* Bottom section */
.blog-card__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    margin-top: auto;
}

/* Tags - pill style like hero */
.blog-card__tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.blog-card__tag {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 60px;
    background: var(--Purple-Tints-1, #F0EDFF);
    color: var(--primary-colors-7336-e-3, #7336E3);
    font-family: "Funnel Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 120%;
}

.blog-card__tag-sep {
    display: none;
}

/* Read More link - uses btn-text */
.blog-card__link {
    font-size: 20px;
}

/* View More button */
.blog-grid__more {
    display: flex;
    justify-content: center;
    margin-top: 80px;
}

.blog-grid__load-more {
    width: 250px;
    padding: 18px 20px;
    justify-content: center;
    gap: 12px;
    border-radius: 4px;
    background: var(--color-primary, #7336E3);
    color: var(--Colour-Pallette-New-White-01, #FFF);
    font-family: "Funnel Sans", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: normal;
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog-grid__load-more:hover {
    background: var(--color-primary-hover, #8753E7);
}

/* CTO Blog Archive link */
.blog-grid__archive {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.blog-grid__archive .btn-text {
    font-size: 20px;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1280px) {
    .blog-hero__featured {
        gap: 60px;
    }

    .blog-hero__image {
        width: 50%;
        height: auto;
        aspect-ratio: 72 / 49;
    }

    .blog-card {
        flex: 1 0 calc((100% - 32px) / 2);
        max-width: calc((100% - 32px) / 2);
    }
}

@media (max-width: 1024px) {
    .blog-hero {
        padding: 100px 24px 40px;
    }

    .blog-hero__title {
        font-size: 48px;
        margin-bottom: 40px;
    }

    .blog-hero__featured {
        gap: 40px;
    }

    .blog-hero__post-title a {
        font-size: 32px;
    }

    .blog-grid {
        padding: 60px 24px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 0;
    }

    .blog-hero .container {
        padding: 0;
    }

    /* H1 - Mobile/H1, left-aligned per Figma */
    .blog-hero__title {
        color: var(--Primary-colors-Purple-Dark, #1D004B);
        font-family: "Funnel Sans", sans-serif;
        font-size: 42px;
        font-weight: 700;
        line-height: 120%;
        letter-spacing: 0.21px;
        text-align: left;
        padding: 24px 24px 20px;
        margin: 0;
    }

    /* Featured - column, 40px gap, 24px bottom padding */
    .blog-hero__featured {
        display: flex;
        padding-bottom: 24px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 40px;
        align-self: stretch;
    }

    /* Image - full width, no radius, edge to edge */
    .blog-hero__image {
        width: 100%;
        height: auto;
        aspect-ratio: 72 / 49;
        border-radius: 0;
    }

    .blog-hero__content {
        gap: 16px;
        padding: 0 24px;
    }

    .blog-hero__post-title {
        width: 100%;
    }

    /* Featured title - Mobile/H2 */
    .blog-hero__post-title a {
        color: var(--Primary-colors-Purple-Dark, #1D004B);
        font-family: "Funnel Sans", sans-serif;
        font-size: 32px;
        font-weight: 700;
        line-height: 120%;
        letter-spacing: 0.16px;
    }

    /* Featured excerpt - Desktop/Body L */
    .blog-hero__excerpt {
        overflow: hidden;
        color: var(--Primary-colors-Text, #000);
        text-overflow: ellipsis;
        font-family: "Funnel Sans", sans-serif;
        font-size: 20px;
        font-weight: 300;
        line-height: 150%;
    }

    /* Author/date - Desktop/Body Small */
    .blog-hero__meta {
        color: var(--Colour-Pallette-New-Black-03, #1E1E1E);
        font-family: "Funnel Sans", sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 140%;
    }

    /* Read more - Desktop/Button Large Emphasized */
    .blog-hero__link {
        font-family: "Funnel Sans", sans-serif;
        font-size: 20px;
        font-weight: 600;
    }

    .blog-grid {
        padding: 40px 0 60px;
    }

    .blog-grid__items {
        gap: 32px;
    }

    /* Cards - mobile layout: 1 per row */
    .blog-card {
        display: flex;
        padding: 8px 8px 24px 8px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 28px;
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
        background: #FFF;
        box-shadow: 0 4px 15px 3px rgba(39, 43, 43, 0.08);
    }

    .blog-card__image {
        width: 100%;
        aspect-ratio: 1.72 / 1;
        border-radius: 8px;
    }

    .blog-card__content {
        gap: 24px;
        padding: 0 8px;
    }

    .blog-card__top {
        gap: 12px;
    }

    .blog-card__author {
        font-size: 16px;
    }

    /* Card title - Desktop/Blog Card Header */
    .blog-card__title a {
        color: var(--Primary-colors-Purple-Dark, #1D004B);
        font-family: "Funnel Sans", sans-serif;
        font-size: 22px;
        font-weight: 700;
        line-height: 120%;
        letter-spacing: 0.11px;
    }

    /* Card excerpt - Desktop/Body Small */
    .blog-card__excerpt {
        color: var(--Colour-Pallette-New-Black-03, #1E1E1E);
        font-family: "Funnel Sans", sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 140%;
    }

    /* Case Studies Hero Mobile */
    .case-studies-hero {
        padding: 40px 16px;
    }

    .case-studies-hero__title {
        font-size: 42px;
        font-weight: 700;
        letter-spacing: 0.21px;
    }

    .case-studies-featured {
        padding-top: 0;
    }
}

/* ============================================
   CASE STUDIES HERO
   ============================================ */
.case-studies-hero {
    display: flex;
    padding: 101px 0 0;
    justify-content: center;
    align-items: center;
    background: var(--Primary-colors-Purple-Dark, #1D004B);
}

.case-studies-hero__inner {
    display: flex;
    width: 100%;
    max-width: 1440px;
    padding: 32px 10px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
}

.case-studies-hero__title {
    color: var(--Primary-colors-White, #FFF);
    text-align: left;
    width: 100%;
    font-family: "Funnel Sans", sans-serif;
    font-size: 60px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.3px;
    margin: 0;
}

.case-studies-featured {
    padding-top: 120px;
}
