/* Estilos para la página de Antes y Después */

.antes-despues-hero {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}

.antes-despues-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.antes-despues-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.antes-despues-contenido {
    padding: 80px 0;
}

.transformacion {
    margin-bottom: 100px;
}

.transformacion h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-align: left;
    color: var(--primary-color);
}

.transformacion h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px 0 30px;
}

.transformacion-descripcion {
    margin-bottom: 40px;
}

.transformacion-descripcion p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 900px;
}

/* Estilos para el comparador de imágenes */
.comparacion-slider {
    margin-bottom: 60px;
}

.comparacion-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    height: 500px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.imagen-antes,
.imagen-despues {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.imagen-antes {
    left: 0;
    z-index: 1;
    width: 100%;
}

.imagen-despues {
    left: 0; /* Fijamos la imagen a la izquierda, igual que la primera */
    z-index: 2;
    width: 100%; /* La imagen ocupa todo el ancho */
    clip-path: inset(0 0 0 50%); /* Inicialmente muestra el 50% derecho de la imagen */
}

.imagen-antes img,
.imagen-despues img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.etiqueta {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
}

.imagen-antes .etiqueta {
    left: 20px;
}

.imagen-despues .etiqueta {
    right: 20px;
}

.slider-divisor {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: white;
    transform: translateX(-50%);
    z-index: 3;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.divisor-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.divisor-handle i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Estilos para el proceso de transformación */
.proceso-pasos {
    margin-top: 60px;
}

.proceso-pasos h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.pasos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}

.paso {
    flex: 1;
    min-width: 250px;
    display: flex;
    gap: 15px;
}

.paso-numero {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.paso-contenido {
    flex-grow: 1;
}

.paso-contenido h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.paso-contenido p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.paso-contenido img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
    .antes-despues-hero h1 {
        font-size: 2.5rem;
    }
    
    .transformacion h2 {
        font-size: 2rem;
    }
    
    .comparacion-container {
        height: 400px;
    }
    
    .pasos-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .antes-despues-hero {
        padding: 100px 0 40px;
    }
    
    .antes-despues-hero h1 {
        font-size: 2rem;
    }
    
    .transformacion {
        margin-bottom: 70px;
    }
    
    .transformacion h2 {
        font-size: 1.8rem;
    }
    
    .comparacion-container {
        height: 350px;
    }
    
    /* Cambio a disposición vertical para el comparador */
    .comparacion-container.vertical-mobile {
        display: flex;
        flex-direction: column;
        height: auto;
    }
    
    .comparacion-container.vertical-mobile .imagen-antes,
    .comparacion-container.vertical-mobile .imagen-despues {
        position: relative;
        width: 100%;
        height: 350px;
    }
    
    .comparacion-container.vertical-mobile .imagen-despues {
        clip-path: none;
    }
    
    .comparacion-container.vertical-mobile .slider-divisor {
        display: none;
    }
}

@media (max-width: 576px) {
    .antes-despues-hero h1 {
        font-size: 1.8rem;
    }
    
    .comparacion-container {
        height: 250px;
    }
    
    .comparacion-container.vertical-mobile .imagen-antes,
    .comparacion-container.vertical-mobile .imagen-despues {
        height: 250px;
    }
    
    .etiqueta {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .divisor-handle {
        width: 30px;
        height: 30px;
    }
}


.h-750{
    height: 750px;
}

/* Estilos para el modal de imágenes */
.modal-imagen {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-imagen.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-contenido {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-imagen.show .modal-contenido {
    transform: scale(1);
}

.cerrar-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Cursor para indicar que las imágenes son clickeables */
.imagen-antes img, 
.imagen-despues img,
.paso-contenido img {
    cursor: pointer;
}

/* Estilos para la navegación del modal */
.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    box-sizing: border-box;
    transform: translateY(-50%);
}

.modal-nav-btn {
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}