/* Blog Page Styles */

/* Hero Section */
.blog-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('../images/blog/image-background-water-blog-section-1.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #0D8EF4;
    padding: 40px 0 300px 0;
    color: white;
    position: relative;
    z-index: 1;
    height: 700px;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;


    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    line-height: 140%;
    font-weight: 400;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-title strong {
    font-weight: 800;
}

/* Section Label */
.section-label {
    text-transform: none;

    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
}

/* ============================
   ÚLTIMAS POSTAGENS SECTION
   ============================ */
.ultimas-section {
    position: relative;
    padding: 60px 0 80px;
    background-color: #1560c6;
    margin-top: -200px;
    z-index: 10;
}

/* Featured Grid: 1 large left + 2 stacked right */
.ultimas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    min-height: 500px;
}

/* Large featured card (left, spans 2 rows) */
.ultimas-card-featured {
    grid-row: 1 / 3;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 620px;
    /* Subtle border to keep card distinct */
}

.ultimas-card-featured .card-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ultimas-card-featured .card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ultimas-card-featured .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(9, 73, 160, 0) 0%,
            rgba(9, 73, 160, 0) 65%,
            rgba(9, 73, 160, 0.5) 80%,
            rgba(9, 73, 160, 0.9) 90%,
            rgba(9, 73, 160, 1) 100%);
    z-index: 2;
    pointer-events: none;
}

.ultimas-card-featured .card-info {
    position: relative;
    z-index: 3;
    padding: 30px;
}

.ultimas-card-featured .card-date {
    font-family: 'Poppins', sans-serif;


    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 8px;
    display: block;
}

.ultimas-card-featured .card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 23px;
    font-weight: 700;
    line-height: 130%;
    margin-bottom: 10px;
}

.ultimas-card-featured .card-excerpt {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 160%;
    opacity: 0.85;
}

/* Small cards (right column) */
.ultimas-card-small {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border for small cards too */
}

.ultimas-card-small .card-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ultimas-card-small .card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ultimas-card-small .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(9, 73, 160, 0) 0%,
            rgba(9, 73, 160, 0) 55%,
            rgba(9, 73, 160, 0.5) 75%,
            rgba(9, 73, 160, 0.9) 88%,
            rgba(9, 73, 160, 1) 100%);
    z-index: 2;
    pointer-events: none;
}

.ultimas-card-small .card-info {
    position: relative;
    z-index: 3;
    padding: 25px;
}

.ultimas-card-small .card-date {
    font-family: 'Poppins', sans-serif;


    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 6px;
    display: block;
}

.ultimas-card-small .card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 130%;
    margin-bottom: 8px;
}

.ultimas-card-small .card-excerpt {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    line-height: 160%;
    opacity: 0.85;
}

/* ============================
   RECENTES SECTION
   ============================ */
.recentes-section {
    padding: 60px 0 80px;
    background-color: #1560c6;
}

.recentes-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.recentes-list {
    flex: 1;
}

/* Horizontal post card for recentes */
.recente-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    text-decoration: none;
    color: white;
    padding: 20px 0;
    max-width: 790px;
}

.recente-card:first-child {
    padding-top: 0;
}

.recente-card-image {
    flex: 0 0 360px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
}

.recente-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recente-card-info {
    flex: 1;
}

.recente-card-info .card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 140%;
    color: white;
    margin-bottom: 8px;
}

.recente-card-info .card-excerpt {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    line-height: 160%;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
}

.recente-card-info .card-date {
    font-family: 'Poppins', sans-serif;


    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

/* CTA Sidebar */
.recentes-cta-sidebar {
    flex: 0 0 420px;
}

.cta-card {
    background-color: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    height: 740px;
}

.cta-card-image {
    padding: 30px 30px 0;
    display: flex;
    height: 450px;
    justify-content: center;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
}

.cta-card-image img {
    max-width: 100%;
    height: 350px;
    object-fit: contain;
}

.cta-card-content {

    padding: 15px 30px 30px;
    text-align: center;
    color: #003B8F;
}

.cta-card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 130%;
    margin-top: -30px;
    margin-bottom: 15px;
}

.cta-card-content p {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 160%;
    color: #0949A0;
    margin-bottom: 25px;
}

.btn-whatsapp-cta {
    display: inline-flex;
    align-items: center;
    background-color: #1E7DFF;
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;


    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    transition: background 0.2s;
}

.btn-whatsapp-cta:hover {
    background-color: #166bd1;
}

.btn-whatsapp-cta img {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    filter: brightness(0) invert(1);
}

/* Loading, Error, and Empty States */
.loading-state,
.error-state,
.no-posts-message {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p,
.error-state p,
.no-posts-message p {
    font-family: 'Poppins', sans-serif;


    font-size: 16px;
    margin: 10px 0;
}

.error-state {
    background-color: rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.btn-retry {
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #0D8EF4;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;


    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-retry:hover {
    background-color: #0b7ad1;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-hero {
        padding-bottom: 200px;
    }

    .hero-title {
        font-size: 22px;
        padding: 0 10px;
    }

    .hero-title br {
        display: none;
    }

    .ultimas-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .ultimas-card-featured {
        grid-row: auto;
        min-height: 350px;
    }

    .ultimas-card-small {
        min-height: 250px;
    }

    .recentes-layout {
        flex-direction: column;
    }

    .recentes-cta-sidebar {
        flex: none;
        width: 100%;
    }

    .recente-card {
        flex-direction: column;
    }

    .recente-card-image {
        flex: none;
        width: 100%;
        height: 200px;
    }

    .section-label {
        font-size: 18px;
    }

    .ultimas-card-featured .card-title {
        font-size: 24px;
    }

    .ultimas-card-small .card-title,
    .recente-card-info .card-title {
        font-size: 18px;
    }

    .cta-card-content h3 {
        font-size: 20px;
    }

    .cta-card-content h3 br {
        display: none;
    }
}