/* --- 1. ANIMACIONES GLOBALES --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes titleRiseGlow {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
        letter-spacing: 0.02em;
        text-shadow: 0 0 0 rgba(46, 26, 95, 0);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
        text-shadow: 0 10px 28px rgba(46, 26, 95, 0.18);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: normal;
        text-shadow: 0 6px 20px rgba(46, 26, 95, 0.12);
    }
}

@keyframes titleFloat {
    0%, 100% { 
        transform: translateY(0) scale(1);
        text-shadow: 0 4px 12px rgba(46, 26, 95, 0.1);
    }
    50% { 
        transform: translateY(-3px) scale(1.01);
        text-shadow: 0 5px 14px rgba(46, 26, 95, 0.12);
    }
}

.animate-on-scroll { opacity: 0; }
.is-visible { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fade-in { animation: fadeInScale 0.4s ease-out forwards; }
.hero-title-anim {
    animation: titleRiseGlow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both, titleFloat 3s ease-in-out 0.25s infinite;
    color: #421D9D;
}

/* Delays para efectos escalonados */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* --- 2. DISEÑO GENERAL Y HERO --- */
.bg-hero-preguntas {
    background: linear-gradient(123.79deg, rgba(250, 255, 254, 0) 50.71%, rgba(255, 255, 255, 0.2) 52.17%),
                linear-gradient(280.42deg, rgba(59, 188, 168, 0.176) 13.12%, rgba(255, 251, 251, 0.2) 45.24%),
                linear-gradient(101.84deg, rgba(59, 188, 168, 0.582) 18.18%, rgba(238, 249, 247, 0.6) 46.15%),
                rgba(59, 188, 168, 0.2);
}

.shadow-hard-purple {
    box-shadow: 0 4px 20px -2px rgba(46, 26, 95, 0.2);
}

/* --- 3. COMPONENTES (FAQ / ACORDEÓN) --- */
.faq-answer {
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.faq-answer.hidden {
    display: none;
    opacity: 0;
}

.faq-answer:not(.hidden) {
    display: block;
    opacity: 1;
}

.rotate-180 {
    transform: rotate(180deg);
}

.hidden {
    display: none !important;
}

/* --- 4. BOTÓN FLOTANTE WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

/* Responsive tablet */
@media (max-width: 1024px) {
    .contact-card {
        padding: 2rem;
    }
}

/* --- 5. TARJETA DE CONTACTO FINAL --- */
.contact-cta-container { 
    margin-top: 3rem; 
    padding: 20px 0;
}

.contact-card {
    background-color: #EEF9F7;
    border-radius: 40px;
    padding: 2.5rem;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
    border: 1px solid rgba(59, 188, 168, 0.2);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (max-width: 1366px) {
    .contact-card {
        max-width: 42rem;
        padding: 2rem;
    }
}

.search-error-text {
    color: #ef4444;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-icon-box {
    margin-bottom: 1rem;
    font-size: 3rem;
    color: #3BBCA8;
}

.contact-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2E1A5F;
    margin-bottom: 0.5rem;
}

.contact-card-description {
    color: rgba(46, 26, 95, 0.6);
    margin-bottom: 2rem;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .contact-actions { flex-direction: row; }
}

.btn-whatsapp-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #4ADE80;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-whatsapp-cta:hover {
    background-color: #3dbd6d;
    transform: scale(1.05);
}

/* Responsive móvil */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        bottom: 20px;
        right: 20px;
    }

    .contact-card {
        border-radius: 24px;
        padding: 1.5rem;
    }
}


/* --- PUNTOS FLOTANTES DE FONDO --- */

/* 1. Definimos la animación */
@keyframes floatBreathing {
    0%, 100% {
        opacity: 0; /* Empieza y termina invisible */
        transform: translateY(0) scale(0.5); /* Pequeño y en su sitio */
    }
    50% {
        opacity: 0.4; /* A mitad de camino es semitransparente */
        transform: translateY(-20px) scale(1); /* Se mueve arriba y crece */
    }
}

/* 2. Estilo base del punto */
.floating-dot {
    position: absolute;
    background-color: #ffffff; /* Puntos blancos para contraste sutil */
    border-radius: 50%; /* Círculo perfecto */
    opacity: 0; /* Comienzan invisibles */
    /* Aplicamos la animación: nombre | duración | suavizado | repetición */
    animation: floatBreathing ease-in-out infinite;
    z-index: 0; /* Asegura que queden detrás del contenido */
}

/* 3. Personalización de cada punto (Posición, tamaño y retraso) */
/* Variamos los tiempos y delays para que no se vean sincronizados */

.dot-1 {
    top: 15%; left: 10%;
    width: 20px; height: 20px;
    animation-duration: 8s; animation-delay: 0s;
}

.dot-2 {
    top: 70%; left: 85%;
    width: 30px; height: 30px;
    animation-duration: 12s; animation-delay: 1s;
    background-color: #3BBCA8; /* Un punto turquesa para variar */
    opacity: 0.2;
}

.dot-3 {
    top: 40%; left: 30%;
    width: 15px; height: 15px;
    animation-duration: 10s; animation-delay: 3s;
}

.dot-4 {
    top: 20%; left: 80%;
    width: 25px; height: 25px;
    animation-duration: 14s; animation-delay: 2s;
}

.dot-5 {
    top: 85%; left: 20%;
    width: 18px; height: 18px;
    animation-duration: 9s; animation-delay: 5s;
    background-color: #3BBCA8; /* Otro punto turquesa */
}

.dot-6 {
    top: 50%; left: 60%;
    width: 12px; height: 12px;
    animation-duration: 11s; animation-delay: 4s;
}

/* Un toque extra para las tarjetas del acordeón */
.faq-item {
    border: 1px solid rgba(59, 188, 168, 0.15); /* Un borde casi invisible que conecta con el logo */
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #3BBCA8; /* Se ilumina el color del logo al pasar el mouse */
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(46, 26, 95, 0.12);
}

.faq-question {
    transition: background-color 0.3s ease;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-category-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(59, 188, 168, 0.25);
}

/* --- 6. MICROINTERACCIONES Y ESTADOS ACTIVOS --- */
#faq-search {
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

#faq-search:focus-visible {
    border-color: #2E1A5F;
    box-shadow: 0 0 0 4px rgba(59, 188, 168, 0.25), 0 12px 24px rgba(46, 26, 95, 0.15);
    transform: translateY(-1px);
}

.faq-category-btn {
    position: relative;
    overflow: hidden;
}

.faq-category-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 80%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.faq-category-btn:hover::after {
    transform: translateX(120%);
}

.faq-category-btn.is-active {
    background: linear-gradient(135deg, #2E1A5F 0%, #3BBCA8 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(46, 26, 95, 0.25);
}

.faq-item {
    position: relative;
}

.faq-item.is-open {
    border-color: rgba(59, 188, 168, 0.45);
    box-shadow: 0 16px 34px rgba(46, 26, 95, 0.16);
}

.faq-item.is-open .faq-question {
    background: linear-gradient(90deg, rgba(59, 188, 168, 0.12), rgba(59, 188, 168, 0));
}

.faq-question span {
    background-image: linear-gradient(120deg, #3BBCA8, #2E1A5F);
    background-repeat: no-repeat;
    background-size: 0 2px;
    background-position: 0 100%;
    transition: background-size 0.3s ease;
}

.faq-item:hover .faq-question span,
.faq-item.is-open .faq-question span {
    background-size: 100% 2px;
}

.faq-question:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(46, 26, 95, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .is-visible,
    .animate-fade-in,
    .floating-dot,
    .faq-category-btn,
    .faq-item {
        animation: none !important;
        transition: none !important;
    }
}