.blog-title {
    font-size: 1.25rem;
    font-size: clamp(1.25rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: .5px;
    margin-bottom: .5rem;
    line-height: 1.2;
}

.blog-subtitle {
    font-size: 1rem;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
}

/* HERO SECTION */
.hero-blog {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-height: 400px;
    border-radius: 0;
}

/* Fondo */
.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.75) 30%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Texto Hero */
.hero-label {
    font-size: 1rem;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    /*color: #fff;*/ /* Asegura contraste sobre overlay oscuro */
    /*text-shadow: 0 2px 4px rgba(0,0,0,0.5);*/ /* Mejora legibilidad */
}

.hero-title {
    font-size: 2rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: .5rem;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 420px;
    color: #fff;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* GRID DE BLOG */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
    /*gap: 2rem;*/ 
}

.blog-link {
    display: flex;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    /*border-radius: 0.5rem;*/
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

    /* Accesibilidad: Foco visible */
    .blog-link:focus-visible {
        outline: 3px solid #0b4f6c;
        outline-offset: 4px;
        z-index: 10;
    }

/* Card contenedor */
.blog-card {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    transition: transform .3s ease, box-shadow .3s ease;
    will-change: transform;
    background: #fff;
    border-radius: 0.5rem;
    transform-origin: center;
}

/* Desktop hover */
@media (hover: hover) {

    .blog-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 35px rgba(0,0,0,.25);
    }

    .blog-link:hover .image-card::after {
        background: rgba(0,0,0,0.15);
    }

    .blog-link:hover h5 {
        transform: translateY(-2px);
    }
}

/* Mobile tap feedback */
.blog-link:active .blog-card {
    transform: scale(.985);
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.blog-link:active .image-card::after {
    background: rgba(0,0,0,0.12);
}

.blog-link:active h5 {
    transform: translateY(-1px);
}


/* IMAGEN CARD */
.image-card {
    position: relative;
    overflow: hidden;
    display: flex;
    max-height: auto;
    /*flex: 1;*/ 
}

    .image-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Overlay oscuro sobre imagen al hover */
    .image-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0);
        transition: background .3s ease;
        pointer-events: none;
    }

/* CONTENIDO TEXTO (Light & Dark) */
.text-card,
.dark-card {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Estilo Claro */
.text-card {
    background: #fff;
    color: #0e2340;
}

/* Estilo Oscuro (Gradiente) */
.dark-card {
    background-color: #083977;
    background: linear-gradient(to right, #083977, #3d7b92);
    color: #fff;
}

    .text-card h5,
    .dark-card h5 {
        font-weight: 700;
        margin-bottom: .75rem;
        text-align: center;
        font-size: 1.25rem;
        line-height: 1.3;
        transition: transform .3s ease;
    }

    .text-card p,
    .dark-card p {
        font-size: .9rem;
        line-height: 1.5; 
        margin-bottom: 1rem;
    }

/* Wrapper de contenido interno */
.content-wrapper {
    margin: auto 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: auto;
}

    .content-wrapper p {
        text-align: left; 
    }

/* Botón/Link "Leer más" */
.leer-link {
    /*margin-top: auto;*/ 
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    padding: 0.5rem 0;
}

/* FOOTER BLOG */
.blog-footer {
    color: #0b4f6c;
    font-weight: 700;
    font-size: 0.9rem;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    margin-top: 2rem;
}

    .blog-footer a {
        text-decoration: none;
        color: #0e2340;
        transition: color 0.2s ease;
    }

        .blog-footer a:hover {
            color: #0b4f6c;
            text-decoration: underline;
        }

/* BOTÓN SCROLL (Floating Action Button)*/
.scroll-btn {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #0b4f6c;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,.2);
    z-index: 999;
    transition: opacity .3s ease, transform .3s ease, background .3s ease;
}

    .scroll-btn:hover {
        background: #083977;
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,.3);
    }

    .scroll-btn:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 2px;
    }

    .scroll-btn.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-50%) translateY(10px);
    }
/* RESPONSIVE */

/* Desktop: Ajuste de altura de imagen */
@media (min-width: 992px) {
    .image-card img {
        height: 100%;
    }
}

/* Tablet: Stack vertical */
@media (max-width: 991px) {
    .blog-card {
        flex-direction: column;
        max-width: 600px; 
        margin: 0 auto;
    }

    .image-card {
        max-height: none; 
        aspect-ratio: 12/9;
    }

        .image-card img {
            height: 100%;
        }

    .text-card,
    .dark-card {
        min-height: auto; 
        padding: 1.5rem;
    }

    /* Reordenamiento: Texto primero, imagen después  */
    .blog-card .text-card,
    .blog-card .dark-card {
        order: 1;
    }

    .blog-card .image-card {
        order: 2;
    }
}

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr; 
        /*gap: 1.5rem;*/
    }
    .hero-title {
        font-size: 2rem; 
    }

    .blog-card {
        flex-direction: column;
    }

    .text-card,
    .dark-card {
        padding: 1.25rem;
    }
}

/* Preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .scroll-btn,
    .image-card::after,
    .blog-link h5 {
        transition: none !important;
        transform: none !important;
    }
}
