/* ==========================================================================
   ESTILOS PÁGINA BLOG COMPLETO Y CORREGIDO
   ========================================================================== */

.page-blog-container,
.blog,
.archive {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Exo', sans-serif;
}

/* 1. HERO BANNER A SANGRE SUPERIOR */
.page-blog-container .pagina-texto-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0 !important;
    padding-top: 70px;
    box-sizing: border-box;
}

.page-blog-container .pagina-texto-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.page-blog-container .pagina-texto-hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.page-blog-container .pagina-texto-hero-title {
    font-size: 3.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    color: #ffffff;
}

.page-blog-container .pagina-texto-breadcrumbs {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #e0e0e0;
}

.page-blog-container .pagina-texto-breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
}

/* 2. FILTROS DE CATEGORÍAS */
.blog-filters-section {
    background: #ffffff;
    padding: 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.blog-filters-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.filter-icon-left,
.filter-icon-right {
    font-size: 1.3rem;
    color: #333333;
}

.blog-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.blog-cat-item button {
    background: transparent;
    border: none;
    padding: 10px 22px;
    font-family: 'Exo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-cat-item.active button {
    background-color: #8C1527;
    color: #ffffff;
}

/* 3. CARRUSEL SUPERIOR HERO */
.blog-hero-slider-section {
    max-width: 1100px;
    margin: 40px auto 30px auto;
    padding: 0 20px;
}

.blog-slider-container {
    position: relative;
    width: 100%;
}

.blog-slider-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 4px;
    overflow: hidden;
}

.blog-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.blog-slide-item.active {
    opacity: 1;
    visibility: visible;
}

.blog-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.blog-slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
    padding: 40px 30px 30px 30px;
    box-sizing: border-box;
}

.blog-badge-cat {
    display: inline-block;
    background-color: #8C1527;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 14px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.blog-slide-title {
    color: #ffffff;
    font-size: 2.1rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
}

/* 4. FLECHAS DE NAVEGACIÓN CORREGIDAS (TAMAÑO Y FILTROS) */
.blog-slider-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.blog-arrow-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 5px !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.blog-arrow-btn img {
    width: 18px !important;
    max-width: 18px !important;
    height: auto !important;
    display: block !important;

    /* Filtro CSS para convertir la flecha blanca en color Oscuro (#2C2825) */
    filter: invert(13%) sepia(8%) saturate(980%) hue-rotate(340deg) brightness(94%) contrast(90%);
    transition: filter 0.3s ease, transform 0.2s ease;
}

.blog-arrow-btn.active img {
    /* Filtro CSS para convertir la flecha blanca en color Guinda (#8C1527) */
    filter: invert(14%) sepia(74%) saturate(4522%) hue-rotate(338deg) brightness(88%) contrast(93%);
    transform: scale(1.2);
}

/* 5. GRILLA DE CARDS GENERALES */
.blog-grid-section {
    max-width: 1100px;
    margin: 40px auto 70px auto;
    padding: 0 20px;
}

.blog-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.blog-card-item {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.blog-card-item:hover {
    transform: translateY(-5px);
}

.blog-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-badge {
    position: absolute;
    bottom: 0;
    left: 20px;
    background-color: #8C1527;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    letter-spacing: 1px;
}

.blog-card-body {
    padding: 20px 20px 25px 20px;
    background: #ffffff;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.05rem;
    color: #333333;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* 6. FRASE FINAL CENTRADA Y ESTILIZADA (CORRECCIÓN FINAL) */
.proyectos-bottom-phrase {
    width: 100%;
    text-align: center;
    padding: 50px 20px 70px 20px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.proyectos-bottom-phrase p {
    font-size: 1.8rem;
    color: #2C2825;
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.3;
    font-weight: 400;
}

.proyectos-bottom-phrase p strong {
    color: #8C1527;
    font-weight: 700;
}

.proyectos-bottom-phrase p span {
    color: #8C1527;
    font-weight: 700;
}

/* RESPONSIVE */
@media screen and (max-width: 992px) {
    .blog-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .blog-slider-wrapper {
        height: 320px;
    }
    .blog-slide-title {
        font-size: 1.4rem;
    }
    .blog-grid-wrapper {
        grid-template-columns: 1fr;
    }
    .proyectos-bottom-phrase p {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   ESTILOS SINGLE POST NOTA INTERNA (DISEÑO FIDELIZADO)
   ========================================================================== */

.page-single-post-container {
    width: 100%;
    background: #ffffff;
}

.single-post-body-section {
    padding: 0 20px 60px 20px;
    background: #ffffff;
}

/* Badge Superior Flotante */
.single-badge-wrapper {
    text-align: center;
    margin-top: -18px;
    position: relative;
    z-index: 10;
}

.single-post-category-badge {
    display: inline-block;
    background-color: #8C1527;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Wrapper del Contenido */
.single-post-wrapper {
    max-width: 820px;
    margin: 40px auto 0 auto;
    font-family: 'Exo', sans-serif;
}

.single-post-main-title {
    font-size: 2.3rem;
    color: #8C1527;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 20px 0;
}

/* Botón Compartir */
.single-share-block {
    text-align: center;
    margin-bottom: 35px;
}

.btn-share-post {
    background: transparent;
    border: none;
    color: #2C2825;
    font-family: 'Exo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    transition: opacity 0.2s ease;
}

.btn-share-post.dark {
    background-color: #2C2825;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 2px;
}

.btn-share-post:hover {
    opacity: 0.8;
}

/* Formatos de Texto e Imágenes dentro de la nota */
.single-post-content-body {
    font-size: 1.02rem;
    color: #555555;
    line-height: 1.7;
    text-align: center;
}

.single-post-content-body p {
    margin-bottom: 22px;
}

/* Titulares H2 intercalados con bloques de color */
.single-post-content-body h2 {
    background-color: #8C1527;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 16px 20px;
    margin: 45px 0 25px 0;
    text-align: center;
    border-radius: 2px;
    line-height: 1.3;
}

/* El segundo H2 (o pares) en fondo Oscuro como en la captura */
.single-post-content-body h2:nth-of-type(even) {
    background-color: #2C2825;
}

.single-post-content-body h3 {
    color: #8C1527;
    font-size: 1.2rem;
    margin: 30px 0 15px 0;
}

.single-post-content-body ul,
.single-post-content-body ol {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: center;
}

.single-post-content-body li {
    margin-bottom: 8px;
    color: #8C1527;
    font-weight: 700;
}

.single-post-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 35px auto;
    border-radius: 2px;
}

/* 3. SECCIÓN INFERIOR OSCURA (TAMBIÉN PUEDE INTERESARTE) */
.single-related-dark-section {
    background-color: #2B2825;
    padding: 60px 20px 80px 20px;
    width: 100%;
    box-sizing: border-box;
}

.single-related-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.related-dark-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 1px;
}