.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;
    }
}

.article-modal {
    background: #f8f9fb;
}

/* Header sticky con sombra sutil para separación visual */
.article-modal-header {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.editorial-header {
    margin-bottom: 1rem;
}

/* TIPOGRAFÍA */
.article-title {
    font-size: clamp(1.25rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: .5px;
    margin-bottom: 0;
    line-height: 1.2;
}

.article-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.article-hero {
    min-height: 320px;
    max-height: 420px;
    overflow: hidden;
}

/* IMAGEN PRINCIPAL */
.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
    
}

/*.article-image {
    width: 100%;
    height: auto; 
    aspect-ratio: 1 / 1;
    max-height: 400px;
    object-fit: cover;
    display: block; 
}*/

.article-hero > div {
    min-height: 320px;
    max-height: 420px;
}

/*.summary-box,
.summary-dark {
    background: linear-gradient(to right, #083977, #3d7b92);
    color: #ffffff;
    padding: 2rem;
    display: flex;
    align-items: center;
    line-height: 1.7;*/
    /*border-radius: 8px;*/
/*}*/

.summary-box,
.summary-dark {
    background: linear-gradient(to right, #083977, #3d7b92);
    color: #ffffff;
    padding: clamp(1.8rem, 3vw, 3rem);
    display: flex;
    align-items: center;
    line-height: 1.7;
    height: auto;
}

.summary-box {
    font-size: clamp(1.3rem, 1.6vw, 1.6rem);
}

.summary-dark {
    font-size: clamp(1.2rem, 1.5vw, 1.6rem);
}

/* CONTENIDO EDITORIAL */
.editorial-divider {
    width: 80px;
    height: 3px;
    background: #0b4f6c;
    margin: 2rem auto;
    border: none;
}

.article-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; 
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    line-height: 1.8;
    color: #1e2a35;
}

    .article-content h5,
    .article-content h6 {
        font-size: clamp(1.05rem, 1.3vw, 1.3rem);
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .article-content p {
        margin-bottom: 2rem;
    }

    .article-content ul {
        margin-left: 1.2rem;
        padding-left: 1.2rem;
    }

    .article-content li {
        margin-bottom: .6rem;
    }

.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-weight: 600;
    margin-top: 2rem;
}

/* FOOTER & BREADCRUMBS */
.blog-footer {
    color: #0b4f6c;
    font-weight: 700;
    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,
        .blog-footer a:focus-visible {
            text-decoration: underline;
            color: #0b4f6c;
        }

.blog-breadcrumb {
    margin-bottom: 1.5rem;
}

    .blog-breadcrumb .breadcrumb {
        background: transparent;
        font-size: .9rem;
        padding: 0;
        margin: 0;
    }

    .blog-breadcrumb a {
        text-decoration: none;
        color: #0b4f6c;
        transition: color 0.2s ease;
    }

        .blog-breadcrumb a:hover,
        .blog-breadcrumb a:focus-visible {
            text-decoration: underline;
            color: #083977;
        }

    .blog-breadcrumb .active {
        color: #6c757d;
        cursor: default;
    }

/* NAVEGACIÓN ENTRE ARTÍCULOS */
.article-navigation {
    border-top: 1px solid #e5e5e5;
    padding-top: 2rem;
    margin-top: 3rem;
}

.nav-article {
    text-decoration: none;
    font-weight: 600;
    color: #0b4f6c;
    transition: opacity .2s ease, transform .2s ease;
    font-size: clamp(0.8rem, 0.9vw, 1rem);
    display: inline-block;
}

    .nav-article:hover {
        opacity: .85;
    }

    .nav-article:focus-visible {
        outline: 2px solid #0b4f6c;
        outline-offset: 3px;
        border-radius: 2px;
    }

@media (max-width: 768px) {
    .editorial-header {
        margin-bottom: 1.2rem;
    }

    .article-content {
        max-width: 100%;
        padding: 0 0.75rem;
        line-height: 1.7;
    }

        .article-content p {
            margin-bottom: 1.5rem;
        }


    .article-hero,
    .article-hero > div {
        min-height: auto;
        max-height: none;
    }

    .summary-box,
    .summary-dark {
        padding: 1.5rem;
        font-size: 1.1rem;
        flex-direction: column;
        text-align: center;
    }

   /* .article-image {
        max-height: 300px;
        aspect-ratio: 16/9; 
    }*/

    .article-image {
        width: 100%;
        height: auto;
        aspect-ratio: 12/9;
        object-fit: cover;
        object-position: center;
    }

    .summary-box,
    .summary-dark {
        min-height: auto;
        padding: 1.5rem;
    }
}

/* PREFERENCIAS DE USUARIO */
@media (prefers-reduced-motion: reduce) {
    .nav-article,
    .blog-footer a,
    .blog-breadcrumb a {
        transition: none !important;
    }
}
