/* Prevent FOUC (Flash of Unstyled Content) */
html {
    visibility: hidden;
    opacity: 0;
}

html.wf-active,
html.fonts-loaded {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* Fallback: show content after 100ms even if fonts don't load */
@keyframes fadeIn {
    to {
        visibility: visible;
        opacity: 1;
    }
}

/* Prevent layout shift while fonts load */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reserve space for carousel images */
#carrusel-container img {
    aspect-ratio: 560 / 420;
}

.carrusel-slide {
    transition: opacity 1s ease-in-out;
}

#carrusel-container {
    user-select: none;
    /* Evitar selección de texto al arrastrar */
}

.carrusel-btn {
    transition: all 0.3s ease;
}

.carrusel-btn.bg-white {
    transform: scale(1.3);
}

/* ANIMACIONES DE SCROLL HACIA ARRIBA */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones específicas para cada sección */
#nosotros .section-animate {
    transition-delay: 0.1s;
}

#sobre-nosotros .section-animate {
    transition-delay: 0.2s;
}

#galeria .section-animate {
    transition-delay: 0.3s;
}

#cursos .section-animate {
    transition-delay: 0.4s;
}

#testimonios .section-animate {
    transition-delay: 0.5s;
}

#faq .section-animate {
    transition-delay: 0.6s;
}

#ubicacion .section-animate {
    transition-delay: 0.7s;
}

/* Animación para elementos dentro de las secciones */
.animate-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-item.delay-1 {
    transition-delay: 0.1s;
}

.animate-item.delay-2 {
    transition-delay: 0.2s;
}

.animate-item.delay-3 {
    transition-delay: 0.3s;
}

.animate-item.delay-4 {
    transition-delay: 0.4s;
}

.animate-item.delay-5 {
    transition-delay: 0.5s;
}

.section-animate.visible .animate-item {
    opacity: 1;
    transform: translateY(0);
}

/* Efecto de brillo en iconos */
.group:hover .relative.w-16.h-16 {
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(157, 18, 146, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(157, 18, 146, 0.6);
    }
}

/* Animación de entrada para tarjetas */
.group {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.group:nth-child(1) {
    animation-delay: 0.1s;
}

.group:nth-child(2) {
    animation-delay: 0.2s;
}

.group:nth-child(3) {
    animation-delay: 0.3s;
}

.group:nth-child(4) {
    animation-delay: 0.4s;
}

.group:nth-child(5) {
    animation-delay: 0.5s;
}

.group:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.check-icon {
    font-size: 14px;
}

input[type="checkbox"]:checked+span>.check-icon {
    display: block !important;
}

.curso-card {
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.curso-card:hover {
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

.sticky {
    position: sticky;
}

.btn-mas-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(236, 72, 153, 0.3);
}

.hero-gradient {
    background: linear-gradient(90deg, #0f052e 0%, #1e1b4b 40%, transparent 100%);
}

.card-shadow {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Estilos específicos para mejorar legibilidad en móvil */
@media (max-width: 640px) {
    .curso-card {
        font-size: 15px;
        /* Tamaño base más grande */
    }

    .curso-card h3 {
        font-size: 1.125rem;
        /* 18px en móvil */
        line-height: 1.3;
    }

    .curso-card .material-symbols-outlined {
        font-size: 18px;
        /* Iconos más grandes */
    }

    .curso-card div[class*="text-slate"] {
        font-size: 14px;
        /* Texto de detalles */
    }

    .curso-card strong {
        font-size: 15px;
        /* Texto en negrita más grande */
    }

    .curso-card .bg-slate-100 {
        padding: 16px;
        /* Más padding para el botón */
    }

    .curso-card .btn-mas-info {
        padding-top: 12px;
        padding-bottom: 12px;
        font-size: 15px;
    }
}

/* Para tablets */
@media (min-width: 641px) and (max-width: 1023px) {
    .curso-card h3 {
        font-size: 1.1rem;
    }

    .curso-card div[class*="text-slate"] {
        font-size: 14px;
    }
}

/* Ajustar altura del hero */
.min-h-screen {
    min-height: calc(100vh - 80px);
    /* Resta la altura del header */
}

/* Mejorar responsividad del texto */
@media (max-width: 768px) {
    .min-h-screen {
        min-height: calc(100vh - 64px);
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Ajuste específico para el hero */
.h-screen {
    height: 100vh;
    /* Altura exacta de la ventana */
    margin-top: -5rem;
    /* Compensa el espacio del header */
    padding-top: 5rem;
    /* Vuelve a agregar espacio para el contenido */
}

/* Mejorar responsividad en móvil */
@media (max-width: 768px) {
    .h-screen {
        margin-top: -4rem;
        padding-top: 4rem;
    }
}

/* Reducir tamaño de números estadísticos en móviles pequeños */
@media (max-width: 440px) {

    .text-4xl.font-bold.text-primary,
    .text-4xl.font-bold.text-brand-purple {
        font-size: 2rem !important;
        /* Reducido de text-4xl (2.25rem) a 2rem */
    }
}

/* Estrellas rellenadas */
.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}