/* ==========================================================================
   ESTILOS PÁGINA BLOG - REDISEÑO CON CARRUSEL Y SIDEBAR INTEGRADOS
   ========================================================================== */

.page-blog-container,
.blog,
.archive {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

/* --------------------------------------------------------------------------
   1. HERO BANNER PRINCIPAL
   -------------------------------------------------------------------------- */
.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-family: 'Montserrat', sans-serif;
    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-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #e0e0e0;
}

.page-blog-container .pagina-texto-breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   2. LAYOUT PRINCIPAL: CONTENIDO (IZQUIERDA) + SIDEBAR DERECHO
   -------------------------------------------------------------------------- */
.blog-content-layout-section {
    max-width: 1200px;
    margin: 50px auto 70px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.blog-main-layout {
    display: grid;
    grid-template-columns: 1fr 280px; /* Columna principal izquierda + Sidebar fijo derecho */
    gap: 40px;
    align-items: start;
}

.blog-posts-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 35px; /* Espacio uniforme entre el carrusel y la grilla abajo */
}

/* --------------------------------------------------------------------------
   3. CARRUSEL DESTACADO (AJUSTADO PARA LA COLUMNA IZQUIERDA)
   -------------------------------------------------------------------------- */
.blog-hero-slider-section {
    width: 100%;
}

.blog-slider-container {
    position: relative;
    width: 100%;
}

.blog-slider-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    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: 30px 25px 25px 25px;
    box-sizing: border-box;
}

.blog-badge-cat {
    display: inline-block;
    background-color: #8C1527;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.blog-slide-title {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
}

/* Flechas de Navegación del Slider */
.blog-slider-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.blog-arrow-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 5px !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Aplicación de Filtro Exacto para #A40D27 (Normal) y #74091B (Active / Hover) */
.blog-arrow-btn img {
    width: 18px !important;
    max-width: 18px !important;
    height: auto !important;
    display: block !important;
    /* Forzar conversión previa a negro absoluto y luego al color exacto #A40D27 */
    filter: brightness(0) saturate(100%) invert(13%) sepia(82%) saturate(5412%) hue-rotate(338deg) brightness(85%) contrast(97%) !important;
    transition: filter 0.3s ease, transform 0.2s ease;
}

.blog-arrow-btn.active img,
.blog-arrow-btn:hover img {
    /* Forzar conversión a color más oscuro #74091B */
    filter: brightness(0) saturate(100%) invert(10%) sepia(75%) saturate(6000%) hue-rotate(338deg) brightness(60%) contrast(100%) !important;
    transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   4. GRILLA DE ARTÍCULOS GENERALES (2 COLUMNAS INTERNAS)
   -------------------------------------------------------------------------- */
.blog-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 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, box-shadow 0.3s ease;
}

.blog-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.blog-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card-item:hover .blog-card-img-wrapper img {
    transform: scale(1.05);
}

.blog-card-badge {
    position: absolute;
    bottom: 0;
    left: 15px;
    background-color: #8C1527;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    letter-spacing: 1px;
}

.blog-card-body {
    padding: 20px;
    background: #ffffff;
    flex-grow: 1;
}

.blog-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: #333333;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* FECHA DENTRO DE LA TARJETA */
.blog-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    color: #888888;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.blog-card-date i {
    font-size: 0.8rem;
    color: #8C1527; /* Ícono de calendario en color guinda */
}

.blog-card-item:hover .blog-card-title {
    color: #8C1527;
}

/* --------------------------------------------------------------------------
   5. SIDEBAR DERECHO DE CATEGORÍAS
   -------------------------------------------------------------------------- */
.blog-sidebar-right {
    position: sticky;
    top: 90px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 25px 20px;
    box-sizing: border-box;
}

.sidebar-widget-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #8C1527;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #8C1527;
    letter-spacing: 1px;
}

.blog-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-cat-item button {
    width: 100%;
    text-align: left;
    background: #f9f9f9;
    border: none;
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333333;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.blog-cat-item button:hover {
    background-color: #2C2825;
    color: #ffffff;
}

.blog-cat-item.active button {
    background-color: #8C1527;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. FRASE FINAL CENTRADA
   -------------------------------------------------------------------------- */
.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-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: #2C2825;
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.3;
    font-weight: 400;
}

.proyectos-bottom-phrase p strong,
.proyectos-bottom-phrase p span {
    color: #8C1527;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. ADAPTACIÓN RESPONSIVE
   -------------------------------------------------------------------------- */
@media screen and (max-width: 992px) {
    .blog-main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .blog-sidebar-right {
        order: -1;
        position: static;
    }

    .blog-categories-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .blog-cat-item button {
        text-align: center;
        width: auto;
    }
}

@media screen and (max-width: 600px) {
    .blog-slider-wrapper {
        height: 300px;
    }

    .blog-slide-title {
        font-size: 1.3rem;
    }

    .blog-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .proyectos-bottom-phrase p {
        font-size: 1.3rem;
    }
}