/* Estilos para los modales de Viajes Individuales y Grupales - Diseño Futurista Glassmorphism */

/* Animaciones de entrada para el modal mejoradas */
@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateX(15deg) rotateY(10deg) translateY(30px);
        filter: blur(5px);
    }
    50% {
        opacity: 0.9;
        transform: scale(0.95) rotateX(8deg) rotateY(5deg) translateY(15px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateX(0deg) rotateY(0deg) translateY(0px);
        filter: blur(0px);
    }
}

@keyframes modalSlideOut {
    0% {
        opacity: 1;
        transform: scale(1) rotateX(0deg) rotateY(0deg) translateY(0px);
        filter: blur(0px);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9) rotateX(-10deg) rotateY(-8deg) translateY(-20px);
        filter: blur(5px);
    }
    100% {
        opacity: 0;
        transform: scale(0.7) rotateX(-20deg) rotateY(-15deg) translateY(-50px);
        filter: blur(10px);
    }
}

/* Efecto neón brillante */
@keyframes neonGlow {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(59, 130, 246, 0.5),
            0 0 10px rgba(59, 130, 246, 0.3),
            0 0 15px rgba(59, 130, 246, 0.2),
            inset 0 0 20px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow: 
            0 0 10px rgba(147, 51, 234, 0.6),
            0 0 20px rgba(147, 51, 234, 0.4),
            0 0 30px rgba(147, 51, 234, 0.3),
            inset 0 0 30px rgba(147, 51, 234, 0.15);
    }
}

/* Overlay del modal con gradientes pastel suaves y glassmorphism */
.modal-overlay {
    backdrop-filter: blur(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.3), 
        rgba(59, 130, 246, 0.35), 
        rgba(236, 72, 153, 0.25),
        rgba(167, 139, 250, 0.2)
    );
    background-size: 400% 400%;
    animation: gentleGradientShift 15s ease-in-out infinite;
}

/* Modal Individual con fondo oscuro elegante */
#modalIndividual.modal-overlay {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.95), 
        rgba(51, 65, 85, 0.95)
    );
    backdrop-filter: blur(10px);
}

/* Modal Grupal con fondo oscuro elegante */
#modalGrupal.modal-overlay {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.95), 
        rgba(51, 65, 85, 0.95)
    );
    backdrop-filter: blur(10px);
}

@keyframes gentleGradientShift {
    0% {
        background-position: 0% 50%;
        opacity: 0.8;
    }
    25% {
        background-position: 100% 0%;
        opacity: 0.9;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
    75% {
        background-position: 0% 100%;
        opacity: 0.9;
    }
    100% {
        background-position: 0% 50%;
        opacity: 0.8;
    }
}

/* Contenedor del modal con glassmorphism mejorado */
.modal-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 90vh;
    max-width: 90vw;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Efecto de brillo neón en el borde */
.modal-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.8), 
        rgba(147, 51, 234, 0.8), 
        rgba(236, 72, 153, 0.8),
        rgba(59, 130, 246, 0.8)
    );
    background-size: 400% 400%;
    border-radius: 26px;
    z-index: -1;
    animation: neonGlow 3s ease-in-out infinite;
    opacity: 0.7;
}

/* Modal Individual específico */
#modalIndividual .modal-container {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Modal Grupal específico */
#modalGrupal .modal-container {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Efecto de brillo neón específico para cada modal */
#modalIndividual .modal-container::before {
    background: linear-gradient(45deg, 
        rgba(147, 51, 234, 0.8), 
        rgba(59, 130, 246, 0.8), 
        rgba(236, 72, 153, 0.8),
        rgba(147, 51, 234, 0.8)
    );
    animation: neonGlow 3s ease-in-out infinite;
}

#modalGrupal .modal-container::before {
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.8), 
        rgba(147, 51, 234, 0.8), 
        rgba(236, 72, 153, 0.8),
        rgba(59, 130, 246, 0.8)
    );
    animation: neonGlow 3s ease-in-out infinite;
}

/* Animación de entrada del modal */
.modal-animate {
    animation: modalSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Animación de salida del modal */
.closing {
    animation: modalSlideOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Header del modal con glassmorphism profesional */
.modal-container .sticky {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

/* Títulos principales profesionales */
.modal-container h2 {
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    background: linear-gradient(90deg, 
        #ffffff, 
        #3b82f6, 
        #8b5cf6, 
        #3b82f6, 
        #ffffff
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: modalShimmerAccent 3s ease-in-out infinite;
}

/* Animación de acento para títulos de modales */
@keyframes modalShimmerAccent {
    0% {
        background-position: -200% 0;
    }
    50% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Efecto de brillo en los títulos */
.modal-container h2::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%
    );
    background-size: 200% 100%;
    animation: modalTitleShine 2.5s ease-in-out infinite;
    pointer-events: none;
    border-radius: 4px;
}

@keyframes modalTitleShine {
    0% {
        background-position: -200% 0;
        opacity: 0;
    }
    50% {
        background-position: 200% 0;
        opacity: 1;
    }
    100% {
        background-position: -200% 0;
        opacity: 0;
    }
}

/* Efecto de hover para acelerar la animación en modales */
.modal-container:hover h2 {
    animation-duration: 1.5s;
}

.modal-container:hover h2::after {
    animation-duration: 1s;
    opacity: 0.8;
}

/* Efecto de pulso sutil para títulos de modales */
.modal-container h2 {
    animation: modalShimmerAccent 3s ease-in-out infinite, 
               modalSubtlePulse 4s ease-in-out infinite;
}

@keyframes modalSubtlePulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

/* Efectos específicos para modal Individual */
#modalIndividual .modal-container h2 {
    background: linear-gradient(90deg, 
        #ffffff, 
        #3b82f6, 
        #8b5cf6, 
        #3b82f6, 
        #ffffff
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Efectos específicos para modal Grupal */
#modalGrupal .modal-container h2 {
    background: linear-gradient(90deg, 
        #ffffff, 
        #10b981, 
        #06b6d4, 
        #10b981, 
        #ffffff
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Botón de cerrar con efecto hover mejorado */
.close-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1000;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.3),
        0 0 0 1px rgba(239, 68, 68, 0.2);
}

/* Headers de acordeón profesionales */
.accordion-header {
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Subtítulos profesionales */
.accordion-header span {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: 'Montserrat', sans-serif;
}

/* Hover en headers de acordeón */
.accordion-header:hover {
    background: rgba(51, 65, 85, 0.9) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.3);
}

/* Contenido del modal con scroll */
.modal-container .p-6 {
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 120px);
    padding: 1.5rem;
}

/* Contenido de acordeón profesional */
.accordion-content {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
}

/* Tarjetas de opciones profesionales */
.option-card {
    background: rgba(30, 41, 59, 0.6) !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en las tarjetas */
.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
    transition: left 0.5s ease;
}

.option-card:hover::before {
    left: 100%;
}

/* Hover en tarjetas de opciones */
.option-card:hover {
    background: rgba(51, 65, 85, 0.8) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.3);
}

/* Texto de las opciones */
.option-card span {
    color: #ffffff !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Iconos con colores vivos */
.option-card span:contains('🌍'), .option-card span:contains('🇦🇷'), .option-card span:contains('🇧🇷'), 
.option-card span:contains('🇨🇱'), .option-card span:contains('🇺🇾') {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Efectos específicos para iconos de colores */
.option-card span:contains('❄️') { filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5)); }
.option-card span:contains('👵') { filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.5)); }
.option-card span:contains('🚢') { filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5)); }
.option-card span:contains('📸') { filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5)); }
.option-card span:contains('🌌') { filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.5)); }
.option-card span:contains('🧘') { filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5)); }
.option-card span:contains('🍷') { filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5)); }

/* Scrollbar personalizada con glassmorphism */
.modal-container::-webkit-scrollbar,
.modal-container .p-6::-webkit-scrollbar,
.accordion-content::-webkit-scrollbar {
    width: 8px;
}

.modal-container::-webkit-scrollbar-track,
.modal-container .p-6::-webkit-scrollbar-track,
.accordion-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-container::-webkit-scrollbar-thumb,
.modal-container .p-6::-webkit-scrollbar-thumb,
.accordion-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(147, 51, 234, 0.6), 
        rgba(59, 130, 246, 0.6)
    );
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-container::-webkit-scrollbar-thumb:hover,
.modal-container .p-6::-webkit-scrollbar-thumb:hover,
.accordion-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(147, 51, 234, 0.8), 
        rgba(59, 130, 246, 0.8)
    );
}

/* Responsive design mejorado */
@media (max-width: 768px) {
    .modal-container {
        margin: 0.5rem;
        max-height: 95vh;
        border-radius: 20px;
        width: calc(100vw - 1rem);
    }
    
    .modal-container::before {
        border-radius: 22px;
    }
    
    .modal-container .sticky {
        border-radius: 20px 20px 0 0;
        padding: 1rem;
    }
    
    .modal-container .p-6 {
        max-height: calc(95vh - 100px);
        padding: 1rem;
    }
    
    .accordion-header {
        padding: 0.75rem !important;
        border-radius: 12px !important;
    }
    
    .option-card {
        padding: 0.75rem !important;
        border-radius: 10px !important;
    }
    
    .accordion-content {
        max-height: 250px;
    }
}

/* Efectos de partículas flotantes */
.modal-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-10px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-5px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Efecto de profundidad en el modal */
.modal-container {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.modal-container > * {
    transform: translateZ(0);
    transition: transform 0.3s ease;
}

.modal-container:hover > * {
    transform: translateZ(10px);
}

/* Mejoras en la accesibilidad */
.modal-container:focus-within {
    outline: 2px solid rgba(147, 51, 234, 0.5);
    outline-offset: 2px;
}

/* Efecto de carga suave */
.modal-overlay.show {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px);
    }
}
