/* ==========================================================================
   ESTILOS DE LA SECCIÓN COMPROMISO Y SOSTENIBILIDAD (1FR + TU IDEA DE DIV)
   ========================================================================== */

.section-compromiso-sostenible {
    width: 100%;
    position: relative;
    background-image: url('../images/compromiso-bg.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax de fondo */
    padding: 80px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; 
}

/* Capa de fondo suave sobre el render */
.compromiso-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3); 
    z-index: 1;
}

/* ==========================================================================
   ANCHO DE PANTALLA COMPLETO (BREAKOUT CONTAINER)
   ========================================================================== */
.compromiso-cinta-container {
    position: relative;
    z-index: 2;
    width: 100vw; 
    left: calc(-50vw + 50%);
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   FILA SUPERIOR: REDISEÑO CON 1FR ESTRICTO
   ========================================================================== */
.compromiso-fila-superior {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Tres columnas idénticas */
    align-items: stretch; 
}

.compromiso-col {
    width: 100%; 
    min-height: 420px; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- Columna 1: Creamos Hogares Felices --- */
.col-creamos {
    background-color: rgba(255, 255, 255, 0.7); 
}

.col-creamos-inner {
    padding: 50px;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Distribuimos: Logo arriba, tu div de texto al centro */
    justify-content: space-between; 
    align-items: center; /* Centra el logo y el div de texto en la columna */
    box-sizing: border-box;
}

.compromiso-logo-m {
    width: 45px !important;
    max-width: 45px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 15px auto !important; /* Centrado en su propio espacio superior */
}

/* IMPLEMENTACIÓN DE TU IDEA DE DIV */
.col-creamos-texto {
    width: fit-content;       /* Ajusta su ancho al elemento interno más ancho */
    max-width: 100%;
    margin: auto auto;        /* Se centra perfectamente respecto al div padre */
    
    display: flex;
    flex-direction: column;
    align-items: flex-start;  /* Alinea los textos adentro al ras izquierdo */
    text-align: left;         /* Texto hacia la izquierda */
    box-sizing: border-box;
}

.compromiso-title {
    font-family: 'Exo', sans-serif;
    font-size: 2.6rem; 
    font-weight: 700;
    color: #2C2825;
    line-height: 1.15;
    margin: 0 0 20px 0;
}

.compromiso-tags {
    font-family: 'Exo', sans-serif;
    font-size: 0.95rem;
    color: #2C2825;
    font-weight: 700; 
    margin: 0;
}

/* --- Columna 2: Eficiencia Sostenible --- */
.col-eficiencia {
    background-color: rgba(44, 40, 37, 0.75); 
    color: #ffffff;
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    text-align: center; 
    box-sizing: border-box;
}

.compromiso-flecha-gigante {
    width: 20px !important;
    max-width: 20px !important;
    height: auto !important;
    margin-bottom: 20px !important;
    display: block !important;
}

.compromiso-sub-text {
    font-family: 'Exo', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #eeeeee; 
    margin: 0 0 5px 0;
}

.compromiso-header-ahorro {
    font-family: 'Exo', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    margin: 0 0 20px 0;
}

.compromiso-contador-container {
    display: flex;
    align-items: flex-start;
    justify-content: center; 
    margin-bottom: 15px;
}

.compromiso-num {
    font-family: 'Exo', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.compromiso-simbolo {
    font-family: 'Exo', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-left: 2px;
}

.compromiso-bottom-text {
    font-family: 'Exo', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: #dddddd;
    margin: 0;
}

/* --- Columna 3: Edificio --- */
.col-edificio {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    justify-content: flex-end; 
}

.col-edificio-footer {
    background-color: #8C1527; 
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.compromiso-logo-completo {
    max-width: 140px;
    height: auto;
    display: block;
}

/* ==========================================================================
   FILA INFERIOR: ACOPLADA Y TRASLÚCIDA
   ========================================================================== */
.compromiso-fila-inferior {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.75); 
    padding: 35px 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 0; 
}

.agua-texto-negrita {
    font-family: 'Exo', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #2C2825;
}

.compromiso-gota-img {
    width: 28px !important;
    max-width: 28px !important;
    height: auto !important;
    display: block !important;
}

.agua-texto-light {
    font-family: 'Exo', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: #2C2825;
}

/* ==========================================================================
   BOTÓN VER MAS
   ========================================================================== */
.compromiso-action-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.compromiso-ver-mas-btn {
    display: inline-block;
    background-color: #8C1527; 
    color: #ffffff;
    font-family: 'Exo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 15px 55px;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(140, 21, 39, 0.25);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.compromiso-ver-mas-btn:hover {
    background-color: #6d101e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 21, 39, 0.35);
}

/* ==========================================================================
   ANIMACIONES DE APARICIÓN SUAVES (REVEAL)
   ========================================================================== */
.reveal-item {
    opacity: 0;
    transform: translateY(35px); 
    will-change: transform, opacity;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE MÓVIL
   ========================================================================== */
@media screen and (max-width: 992px) {
    .section-compromiso-sostenible {
        background-attachment: scroll;
    }
    .compromiso-title {
        font-size: 2rem;
    }
    .col-creamos-inner {
        padding: 40px 30px;
    }
    .compromiso-num {
        font-size: 3.8rem;
    }
    .compromiso-simbolo {
        font-size: 2.2rem;
    }
    .agua-texto-negrita {
        font-size: 1.3rem;
    }
    .agua-texto-light {
        font-size: 1.25rem;
    }
}

@media screen and (max-width: 768px) {
    .section-compromiso-sostenible {
        padding: 60px 0;
    }
    .compromiso-cinta-container {
        width: 100%;
        left: auto;
        margin-left: 0;
    }
    .compromiso-fila-superior {
        display: flex;
        flex-direction: column;
    }
    .compromiso-col {
        width: 100%;
        min-height: auto;
    }
    .col-creamos-inner {
        padding: 30px;
        align-items: center;
        text-align: center;
    }
    .col-creamos-texto {
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }
    .col-eficiencia {
        padding: 40px 30px;
        align-items: center;
        text-align: center;
    }
    .compromiso-contador-container {
        justify-content: center;
    }
    .col-edificio {
        height: 300px; 
    }
    .compromiso-fila-inferior {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 30px 20px;
    }
    .agua-texto-negrita {
        font-size: 1.25rem;
    }
    .agua-texto-light {
        font-size: 1.1rem;
    }
}


/* ==========================================================================
   SLIDER DINÁMICO COLUMNA 2 - COMPROMISO
   ========================================================================== */

.col-eficiencia {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.compromiso-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Transición cruzada suave de slides */
.compromiso-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.compromiso-slide-item.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* CONTROLES Y NAVEGACIÓN DEL SLIDER */
.compromiso-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    z-index: 10;
}

.comp-prev-btn,
.comp-next-btn {
    background: transparent;
    border: none;
    color: #8C1527;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 8px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.comp-prev-btn:hover,
.comp-next-btn:hover {
    color: #2C2825;
    transform: scale(1.2);
}

.comp-dots-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comp-dot.active {
    background-color: #8C1527;
    width: 20px;
    border-radius: 4px;
}