/* assets/css/estilos_padres.css - VERSIÓN DEFINITIVA (PORTADA + INTERNAS) */

/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --primary: #3b100b;
    /* VINO TINTO */
    --primary-dark: #2a0b08;
    --accent: #d4af37;
    /* Dorado */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-main: #2c3e50;
    --shadow-soft: 0 20px 40px -10px rgba(59, 16, 11, 0.15);
}

* {
    box-sizing: border-box;
}

/* Estilo base (Aplica a todo el sitio, especialmente internas) */
body {
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
    background-color: #f8f9fa;
}

/* =========================================
   2. LANDING PAGE (MODO CINE / EDITORIAL)
   * Solo aplica al index.php con class="editorial-mode"
   ========================================= */

.editorial-mode {
    display: block;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--primary-dark);
    font-family: 'Lato', sans-serif;
}

/* Fondo de Video */
.video-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.video-bg-layer iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    min-width: 177.77vh;
    min-height: 56.25vw;
}

@media (max-aspect-ratio: 9/16) {
    .video-bg-layer iframe {
        min-width: 100vw;
        min-height: 177.77vw;
    }
}

.video-bg-layer video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}

/* --- BOTONES CIRCULARES (ESTRUCTURA) --- */
.top-left-controls {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 50;
}

.top-right-controls {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 50;
}

.btn-circle-wine {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(59, 16, 11, 0.65);
    /* Vino transparente */
    color: #fff;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- ANIMACIONES DE BOTONES LANDING --- */
/* 1. ENGRANE (Derecha): Rotación Mecánica */
.top-right-controls .btn-circle-wine:hover {
    background: rgba(59, 16, 11, 0.95);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* 2. PLAY / SONIDO (Izquierda): Fusión "Latido Radiante" */
@keyframes radiantPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.12);
        box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.top-left-controls .btn-circle-wine:hover {
    background: rgba(59, 16, 11, 0.8);
    animation: radiantPulse 2s infinite ease-in-out;
}

/* --- PANEL PRINCIPAL LANDING --- */
/* A) MÓVIL */
.main-editorial-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 50px;
}

.vignette-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom,
            rgba(59, 16, 11, 0) 0%,
            rgba(59, 16, 11, 0.4) 30%,
            rgba(59, 16, 11, 0.9) 80%,
            rgba(59, 16, 11, 1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
}

.editorial-content {
    width: 85%;
    max-width: 500px;
    text-align: center;
    position: relative;
    z-index: 11;
}

.logo-white {
    filter: brightness(0) invert(1);
    opacity: 1;
    max-width: 90px;
    margin: 0 auto 0px auto;
}

.text-pure-white {
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

h1.font-serif {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

p.font-sans {
    font-family: 'Lato', sans-serif;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 35px;
    opacity: 0.95;
}

/* --- BOTÓN REGISTRO LANDING (CON FLECHA SVG ESTILIZADA) --- */
.btn-minimalist {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 18px;
    background: #FFFFFF;
    color: var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-minimalist .arrow-svg {
    width: 20px;
    height: 20px;
    margin-left: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-minimalist:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.btn-minimalist:hover .arrow-svg {
    transform: translateX(5px);
}

/* B) ESCRITORIO / TABLET LANDING */
@media (min-width: 768px) {
    .main-editorial-panel {
        top: 0;
        bottom: auto;
        height: 100vh;
        justify-content: center;
    }

    .vignette-layer {
        background: radial-gradient(ellipse at center,
                rgba(59, 16, 11, 0.95) 0%,
                rgba(59, 16, 11, 0.8) 30%,
                rgba(59, 16, 11, 0.4) 60%,
                rgba(59, 16, 11, 0) 80%);
        -webkit-mask-image: none;
        mask-image: none;
        backdrop-filter: blur(3px);
    }

    h1.font-serif {
        font-size: 4rem;
        margin-bottom: 30px;
    }

    p.font-sans {
        font-size: 1.3rem;
        margin-bottom: 40px;
    }

    .logo-white {
        max-width: 140px;
        margin-bottom: 0px;
    }

    .btn-minimalist {
        max-width: 350px;
        margin: 0 auto;
    }
}

/* --- MODAL Y ALERTAS LANDING --- */
.rotate-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(59, 16, 11, 0.95);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    z-index: 2000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-rotate {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    animation: rotateAnim 2s infinite;
}

@keyframes rotateAnim {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(90deg);
    }

    50% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    z-index: 3001;
    transition: all 0.3s;
}

.btn-close:hover {
    background: white;
    color: var(--primary);
}

.modal-video-container {
    width: 100%;
    height: 100%;
    max-width: 500px;
    position: relative;
}

/* UTILIDADES */
.hidden {
    display: none !important;
}

.animate-enter {
    opacity: 0;
    animation: fadeUp 1s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* =========================================
   ENCUESTA Y PORTAL DE PARTICIPACIÓN
   ========================================= */
.encuesta-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #eee;
    box-shadow: var(--shadow-soft);
    text-align: left;
    margin-top: 20px;
}

.pilar-bloque {
    margin-bottom: 25px;
}

.pilar-bloque label {
    font-weight: bold;
    color: var(--primary);
    display: block;
    margin-bottom: 10px;
}

/* Estrellas interactivas */
.star-rating {
    font-size: 35px;
    color: #ddd;
    cursor: pointer;
    display: flex;
    gap: 5px;
}

.star.active {
    color: var(--accent);
    /* Dorado institucional */
}

/* Botones Sí/No (Radio) */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label {
    font-weight: normal !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-main);
}

/* Caja de información del portal (Fecha, Grupo, etc.) */
.info-box {
    background: #fdf6f5;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e8d0ce;
    text-align: left;
}

.nota-usb {
    background: #e7f3ff;
    color: #004085;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-top: 10px;
}

/* =========================================
   3. ESTILOS RESTAURADOS PARA PÁGINAS INTERNAS
   (Paso 1, 2, 3, Confirmación, etc.)
   ========================================= */

/* Contenedor Principal (Tarjeta de Vidrio) */
.glass-container {
    background: var(--glass-bg);
    width: 90%;
    max-width: 550px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    margin: 40px auto;
    /* Centrado con margen */
}

@media (max-width: 768px) {
    .glass-container {
        padding: 25px 20px;
        margin: 20px auto;
        width: 95%;
    }
}

/* Tipografía Interna (Específica para no chocar con landing) */
.glass-container h1,
h1:not(.font-serif) {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    line-height: 1.2;
    font-family: 'Segoe UI', sans-serif;
    /* Regresar a fuente original */
}

.glass-container p,
p:not(.font-sans) {
    text-align: center;
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: 'Segoe UI', sans-serif;
}

.glass-container img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
}

/* Botones Internos */
.btn-big {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 16, 11, 0.2);
}

.btn-big:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 16, 11, 0.3);
}

.btn-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-big:hover .btn-icon {
    transform: translateX(4px);
}

/* Botón Regresar */
button.btn-secondary,
a.btn-secondary {
    background: transparent;
    border: 1px solid #ccc;
    color: #888;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    display: block;
    margin: 30px auto 0 auto;
    text-align: center;
    text-decoration: none;
}

button.btn-secondary:hover,
a.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Inputs y Formularios */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 500;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

/* Grid de Selección (Paso 1) */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.card-option {
    background: white;
    padding: 20px 10px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-option:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-3px);
}

.card-option h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-main);
}

.card-option h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--primary);
}

/* Grid de Horarios (Paso 2) */
.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 25px;
    width: 100%;
}

.time-card {
    background: white;
    border: 1px solid rgba(59, 16, 11, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.time-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 16, 11, 0.15);
    border-color: var(--primary);
    background-color: #fffbfb;
}

.card-date {
    font-size: 0.85rem;
    color: #888;
    text-transform: capitalize;
    margin-bottom: 5px;
}

.card-time {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin: 5px 0;
}

.card-cta {
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Barra Progreso */
.progress-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.dot {
    height: 8px;
    width: 8px;
    background-color: #ddd;
    border-radius: 50%;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--primary);
    transform: scale(1.3);
}

/* Ticket y Alertas */
.ticket {
    background: #fff;
    border: 1px solid #eee;
    border-top: 4px solid var(--accent);
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: var(--shadow-soft);
}

.alert-empty {
    grid-column: 1 / -1;
    background: #fff;
    color: #c0392b;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #f2d7d5;
    text-align: center;
    font-size: 0.95rem;
}

/* Modal de Carga (Interno) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(59, 16, 11, 0.15);
    text-align: center;
    border: 1px solid #eee;
    border-top: 4px solid var(--primary);
}

.spinner {
    border: 3px solid rgba(59, 16, 11, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--primary);
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Fondo de Orbes Vivos (Solo en páginas internas) */
/* Usamos :not para que NO aparezcan en el index.php (editorial-mode) */
body:not(.editorial-mode)::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(59, 16, 11, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: floatOrb1 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

body:not(.editorial-mode)::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: floatOrb2 25s infinite alternate-reverse cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes floatOrb1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

@keyframes floatOrb2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-10%, -10%) scale(1.15);
    }
}

/* =========================================
   MODO CINE - TRANSICIONES DE INTERFAZ
   ========================================= */

/* 1. Transición de la capa oscura/desenfoque */
.vignette-layer {
    transition: opacity 0.8s ease-in-out, backdrop-filter 0.8s ease-in-out;
    will-change: opacity;
}

.vignette-layer.ui-hidden {
    opacity: 0;
    pointer-events: none;
    /* Evita que la capa invisible bloquee clics */
    backdrop-filter: blur(0px);
}

/* 2. Transición del panel de texto (Título, Párrafo y Botón de Registro) */
.editorial-content {
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.editorial-content.ui-hidden {
    opacity: 0;
    transform: translateY(40px);
    /* Efecto sutil de caída hacia abajo */
    pointer-events: none;
}

/* 3. Transición de los controles de las esquinas (Botón Play y Botón Admin) */
#main-play-control,
#main-admin-control {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#main-play-control.ui-hidden,
#main-admin-control.ui-hidden {
    opacity: 0;
    transform: scale(0.8);
    /* Efecto sutil de reducción al desaparecer */
    pointer-events: none;
}

/* =========================================
   MODALES PERSONALIZADOS (ALERTAS Y CONFIRMACIONES)
   ========================================= */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 16, 11, 0.8);
    /* Color vino institucional con transparencia */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.custom-modal-overlay.active .custom-modal-box {
    transform: translateY(0);
}

.custom-modal-icon {
    font-size: 45px;
    margin-bottom: 10px;
}

.custom-modal-title {
    color: var(--primary, #3b100b);
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.custom-modal-text {
    color: #555;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.custom-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-modal-cancel {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    transition: 0.2s;
}

.btn-modal-cancel:hover {
    background: #ccc;
}

.btn-modal-confirm {
    background: #c53030;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    transition: 0.2s;
}

.btn-modal-confirm:hover {
    background: #a02020;
    box-shadow: 0 4px 10px rgba(197, 48, 48, 0.4);
}