/* --- SECCIÓN: REVELACIÓN (FOTOS ESTILO TARJETA) --- */
#reveal-section {
    position: relative;
    height: 100vh;
    background-color: #f4f4f4;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    perspective: 1000px;
}

.hidden-content {
    max-width: 500px;
    z-index: 1;
    padding: 40px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease 0.3s;
    background-color: #408b6e;
    border-radius: 10px;
}

.hidden-content h2 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.hidden-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ffffff;
}

.reveal-img-wrapper {
    position: absolute;
    top: 50%;
    height: 450px;
    width: 350px;
    z-index: 5;
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 10px solid #408b6e;
}

/* Imagen Izquierda */
.reveal-left {
    left: 50%;
    margin-left: -390px;
    background-image: url('../images/87fotos/18.jpg');
    transform: translateY(-50%) rotate(-6deg);
}

/* Imagen Derecha */
.reveal-right {
    left: 50%;
    margin-left: 30px;
    background-image: url('../images/87fotos/19.jpg');
    transform: translateY(-50%) rotate(4deg);
}

/* --- CLASES ACTIVAS PARA LA REVELACIÓN --- */
#reveal-section.active .reveal-left {
    transform: translateY(-50%) translateX(-250px) rotate(-15deg);
}

#reveal-section.active .reveal-right {
    transform: translateY(-50%) translateX(250px) rotate(15deg);
}

#reveal-section.active .hidden-content {
    opacity: 1;
    transform: scale(1);
}

/* --- ANIMACIONES GENERALES --- */
@keyframes popFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) rotate(-5deg); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1) rotate(5deg); }
}

@keyframes textEnter {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInVideo {
    to { opacity: 1; }
}


/* =========================================
   RESPONSIVE: MÓVILES (Celulares y Tablets pequeñas)
   Estrategia: Apertura Vertical
   ========================================= */
@media screen and (max-width: 768px) {
    
    /* Ajustar contenedor de texto */
    .hidden-content {
        width: 90%;
        padding: 20px;
    }

    .hidden-content h2 {
        font-size: 2rem; /* Texto más pequeño */
    }

    /* Redimensionar imágenes (Tarjetas) */
    .reveal-img-wrapper {
        width: 260px;  /* Más estrechas */
        height: 340px; /* Más cortas */
        /* Reseteamos márgenes fijos del escritorio */
        margin-left: 0 !important; 
        left: 50%;
        /* Centramos base */
        transform: translate(-50%, -50%);
    }

    /* POSICIÓN INICIAL (Cerrado) */
    /* Apilamos las cartas con una ligera rotación */
    .reveal-left {
        /* Usamos translate(-50%, -50%) para centrar y luego rotamos */
        transform: translate(-50%, -50%) rotate(-5deg);
        z-index: 6; /* Aseguramos que una esté sobre la otra */
    }

    .reveal-right {
        transform: translate(-50%, -50%) rotate(5deg);
        z-index: 5;
    }

    /* ESTADO ACTIVO (Abierto / Revelado) */
    /* En móvil, una sube y la otra baja para dejar ver el texto */
    
    #reveal-section.active .reveal-left {
        /* Se mueve hacia ARRIBA (-130%) y rota */
        transform: translate(-50%, -130%) rotate(-10deg);
    }

    #reveal-section.active .reveal-right {
        /* Se mueve hacia ABAJO (30%) y rota */
        transform: translate(-50%, 30%) rotate(10deg);
    }
}

/* =========================================
   RESPONSIVE: PANTALLAS GIGANTES (+1800px)
   Estrategia: Escalar todo proporcionalmente
   ========================================= */
@media screen and (min-width: 1801px) {
    
    /* Contenedor de texto más amplio */
    .hidden-content {
        max-width: 800px;
        padding: 60px;
    }

    .hidden-content h2 {
        font-size: 4rem;
    }

    .hidden-content p {
        font-size: 2.5rem;
    }

    /* Imágenes más grandes */
    .reveal-img-wrapper {
        width: 500px;
        height: 650px;
        border-width: 15px; /* Borde más grueso */
    }

    /* Ajustar posiciones iniciales para las nuevas dimensiones */
    .reveal-left {
        margin-left: -550px; /* Más separado del centro */
    }

    .reveal-right {
        margin-left: 50px;
    }

    /* Ajustar la animación de apertura para que se abran más */
    #reveal-section.active .reveal-left {
        /* Aumentamos el translateX para alejarlo más */
        transform: translateY(-50%) translateX(-410px) rotate(-15deg);
    }

    #reveal-section.active .reveal-right {
        transform: translateY(-50%) translateX(410px) rotate(15deg);
    }
}


/* =========================================
   Responsive: Laptops y Desktop (1200px - 1799px)
   ========================================= */
@media screen and (min-width: 1200px) and (max-width: 1799px) {
    
    /* Contenedor de texto: un poco más estrecho para no cansar la vista */
    .hidden-content {
        max-width: 650px;
        padding: 40px;
    }

    .hidden-content h2 {
        font-size: 2.8rem; /* Tamaño legible pero impactante */
    }

    .hidden-content p {
        font-size: 1.4rem;
    }

    /* Imágenes: Redimensionadas para dejar aire a los lados */
    .reveal-img-wrapper {
        width: 380px;
        height: 520px;
        border-width: 10px; /* Borde un poco más fino */
    }

    /* Posiciones iniciales (ajustadas al nuevo ancho de imagen) */
    .reveal-left {
        margin-left: -420px; /* Suficiente para que se toquen o solapen levemente en el centro */
    }

    .reveal-right {
        margin-left: 40px;
    }

    /* Animación de apertura: El desplazamiento es menor al de 1801px */
    #reveal-section.active .reveal-left {
        /* Se mueve lo justo para dejar ver el texto sin salirse de la pantalla */
        transform: translateY(-50%) translateX(-320px) rotate(-10deg);
    }

    #reveal-section.active .reveal-right {
        transform: translateY(-50%) translateX(320px) rotate(10deg);
    }
}