@font-face {
    font-family: 'Bradesco Sans';
    src: url('../assets/fonts/BradescoSans-Thin-web.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bradesco Sans';
    src: url('../assets/fonts/BradescoSans-Light-web.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bradesco Sans';
    src: url('../assets/fonts/BradescoSans-Regular-web.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bradesco Sans';
    src: url('../assets/fonts/BradescoSans-Medium-web.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #5881ab;
    --dark: #595959;
    --muted: #595959;
    --white: #ffffff;
    --card-gray: #adadad;
    --image-bg: #dbe8ef;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Bradesco Sans", sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.25;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1440px, calc(100% - 64px));
    margin: 0 auto;
}

.image-slot {
    background-color: var(--image-bg);
    background-image: linear-gradient(135deg, rgba(88, 129, 171, 0.25), rgba(255, 255, 255, 0.72));
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.blog-hero {
    padding: 140px 0 52px;
}

.blog-title {
    margin-left: calc(50% - 50vw);
    padding-left: calc(50vw - 50% + 70px);
    width: calc(min(270px, 70vw) + (50vw - 50%));
    min-height: 104px;
    display: flex;
    align-items: center;
    border-radius: 0 100px 100px 0;
    background: var(--primary);
    color: var(--white);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: normal;
    line-height: 1;
    text-transform: uppercase;
}

.with-bars {
    gap: 8px;
}

.with-bars::before {
    content: "";
    width: 3px;
    height: 34px;
    background: var(--white);
}

.with-bars::after {
    display: none;
}

.posts-section {
    padding-bottom: 70px;
}

.posts-feed-section {
    padding-bottom: 70px;
}

.featured-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr);
    gap: 42px;
    margin-bottom: 42px;
}

.side-posts {
    display: grid;
    gap: 28px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px;
}

.post-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card-gray);
    color: var(--white);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.posts-feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 52px;
}

.posts-feed-list,
.posts-feed-side {
    display: grid;
    gap: 22px;
}

.posts-feed-list .post-card-horizontal {
    min-height: 168px;
}

.posts-feed-list .post-card-horizontal .post-image {
    height: 100%;
}

.posts-feed-list .post-card-horizontal .post-content {
    padding: 14px 18px 12px;
}

.posts-feed-list .post-card-horizontal h2 {
    min-height: 58px;
    font-size: 0.83rem;
}

.posts-feed-list .post-card-horizontal .read-more {
    margin-top: 10px;
    padding: 4px 14px;
    min-height: 21px;
    font-size: 0.68rem;
}

.posts-feed-list .post-card-horizontal .post-meta {
    margin-top: 10px;
    padding-top: 6px;
    font-size: 0.62rem;
}

.post-card-side .post-image {
    min-height: 224px;
}

.post-card-side .post-content {
    padding: 14px 18px 12px;
}

.post-card-side h2 {
    min-height: 58px;
    font-size: 0.82rem;
}

.post-card-side .read-more {
    margin-top: 12px;
    padding: 4px 14px;
    min-height: 21px;
    font-size: 0.68rem;
}

.post-card-side .post-meta {
    margin-top: 10px;
    padding-top: 6px;
    font-size: 0.62rem;
}

.side-emphasis {
    position: relative;
}

.side-emphasis .post-image {
    min-height: 360px;
    height: 100%;
}

.side-emphasis .post-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 28px 30px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.5));
}

.side-emphasis h2 {
    min-height: auto;
    margin-bottom: 8px;
    font-size: clamp(1.95rem, 3.1vw, 2.45rem);
    font-weight: normal;
    line-height: 0.9;
}

.side-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 12px;
}

.side-copy {
    max-width: 360px;
    margin-bottom: 36px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

.side-emphasis .read-more {
    margin-top: 0;
}

.post-image {
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-large .post-image {
    height: 340px;
}

.post-card-horizontal {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    min-height: 188px;
}

.post-content {
    padding: 18px 22px 14px;
}

.post-card-large .post-content {
    padding: 20px 24px 16px;
}

.post-card-horizontal .post-content {
    display: flex;
    flex-direction: column;
    padding: 18px 20px 12px;
}

.post-category {
    display: block;
    margin-bottom: 14px;
    font-size: 0.72rem;
    font-weight: 500;
}

.post-card h2 {
    min-height: 72px;
    color: var(--white);
    font-size: clamp(0.9rem, 1.25vw, 1.02rem);
    font-weight: 500;
    line-height: 1.25;
}

.post-card-large h2 {
    min-height: 48px;
}

.post-card-horizontal h2 {
    min-height: 70px;
    font-size: 0.86rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 28px;
    margin-top: 18px;
    padding: 5px 19px;
    border-radius: 100px;
    background: var(--white);
    color: var(--dark);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.read-more:hover {
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card-large .read-more {
    float: right;
    margin-top: 10px;
    margin-bottom: 20px;
}

.post-meta {
    clear: both;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.75);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: normal;
}


@media (max-width: 900px) {
    .container {
        width: min(100% - 32px, 1120px);
    }

    .blog-title {
        width: min(230px, 80vw);
        min-height: 84px;
        padding-left: 40px;
    }

    /* Grids & Layouts on Mobile */
    .posts-section .container,
    .posts-feed-layout {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* Unwrap nested HTML structural divs to let all cards participate in the parent 2-column grids */
    .featured-grid,
    .post-grid,
    .featured-grid .side-posts,
    .posts-feed-list,
    .posts-feed-side {
        display: contents !important;
    }

    /* Standard Card Styling on Mobile: Square, Image Overlay */
    .post-card {
        aspect-ratio: 1/1 !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        height: auto !important;
        min-height: 0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    /* Absolute Image positioning to act as card background */
    .post-card .post-image {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
        min-height: 0 !important;
    }

    .post-card .post-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Content Overlay with Dark Gradient */
    .post-card .post-content {
        position: relative !important;
        z-index: 2 !important;
        padding: 12px !important;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 80%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        height: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Category Tag */
    .post-card .post-category {
        margin-bottom: 4px !important;
        color: var(--primary, #5881ab) !important;
        font-size: 0.65rem !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
    }

    /* Line-clamp Title to 2 lines */
    .post-card h2 {
        color: var(--white) !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        min-height: 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Hide unnecessary details on square mobile overlay */
    .post-card .read-more,
    .post-card .post-meta {
        display: none !important;
    }

    /* Brand Card Exception (Doação de Óvulos) - Span 2 Columns, Auto Height */
    .post-card.side-emphasis {
        aspect-ratio: auto !important;
        grid-column: span 2 !important;
        min-height: 250px !important;
    }

    .post-card.side-emphasis .post-content {
        position: absolute !important;
        inset: 0 !important;
        padding: 20px !important;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.7) 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    .post-card.side-emphasis h2 {
        font-size: 1.2rem !important;
        -webkit-line-clamp: unset !important;
        display: block !important;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    .post-card.side-emphasis .side-logo {
        max-width: 180px !important;
        margin-bottom: 10px !important;
        display: block !important;
    }

    .post-card.side-emphasis .side-copy {
        display: block !important;
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .post-card.side-emphasis .read-more {
        display: inline-flex !important;
        margin-top: 0 !important;
        padding: 6px 20px !important;
        font-size: 0.7rem !important;
        border-radius: 100px !important;
        background: var(--white) !important;
        color: var(--dark) !important;
        font-weight: 600 !important;
    }
}