/* ===== FUENTES EDUCATIVAS ===== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700;800&family=Comic+Neue:wght@300;400;700&display=swap');

/* ===== VARIABLES TEMÁTICAS - EDUCACIÓN MEDIA BÁSICA ===== */
:root {
    /* Paleta de colores amigables y educativos */
    --primary-green: #4ade80;      /* Verde claro esperanzador */
    --primary-blue: #60a5fa;       /* Azul suave confiable */
    --primary-yellow: #fbbf24;     /* Amarillo cálido motivador */
    --primary-orange: #fb923c;     /* Naranja energético */
    --primary-purple: #a78bfa;     /* Púrpura inspirador */
    
    /* Colores de fondo y superficies */
    --bg-light: #fef7ed;           /* Crema cálido como papel */
    --bg-white: #ffffff;           /* Blanco puro */
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(254, 247, 237, 0.8);
    
    /* Textos */
    --text-dark: #1f2937;          /* Gris oscuro legible */
    --text-medium: #4b5563;        /* Gris medio */
    --text-light: #9ca3af;         /* Gris claro */
    
    /* Sombras educativas */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 15px 40px rgba(0, 0, 0, 0.15);
    
    /* Gradientes inspiradores */
    --gradient-knowledge: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    --gradient-growth: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    --gradient-creativity: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-orange) 100%);
    --gradient-warm: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

/* ===== TEMA OSCURO - MODO NOCTURNO DE ESTUDIO ===== */
[data-bs-theme="oscuro"] {
    --bg-light: #1f2937;
    --bg-white: #111827;
    --bg-card: rgba(31, 41, 55, 0.95);
    --bg-glass: rgba(17, 24, 39, 0.8);
    --text-dark: #f9fafb;
    --text-medium: #d1d5db;
    --text-light: #9ca3af;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* ===== CONFIGURACIÓN BASE ===== */
body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none; /* Ocultar cursor por defecto para usar el personalizado */
}

/* ===== FONDO ANIMADO EDUCATIVO ===== */
.educational-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(circle at 20% 80%, rgba(74, 222, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
        var(--bg-light);
}

/* ===== ELEMENTOS FLOTANTES ===== */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-book, .school-supply, .knowledge-symbol {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    pointer-events: none;
    animation: float-gentle 8s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Posicionamiento específico de elementos */
.book-1 { top: 10%; left: 15%; animation-delay: 0s; }
.book-2 { top: 60%; right: 20%; animation-delay: -2s; }
.book-3 { top: 30%; left: 80%; animation-delay: -4s; }
.book-4 { bottom: 20%; left: 10%; animation-delay: -6s; }

.supply-1 { top: 20%; right: 15%; animation-delay: -1s; }
.supply-2 { top: 70%; left: 25%; animation-delay: -3s; }
.supply-3 { top: 40%; right: 35%; animation-delay: -5s; }
.supply-4 { bottom: 30%; right: 10%; animation-delay: -7s; }
.supply-5 { top: 50%; left: 5%; animation-delay: -9s; }

.symbol-1 { top: 15%; left: 60%; animation-delay: -2.5s; }
.symbol-2 { bottom: 15%; right: 60%; animation-delay: -4.5s; }
.symbol-3 { top: 80%; left: 70%; animation-delay: -6.5s; }
.symbol-4 { top: 35%; left: 35%; animation-delay: -8.5s; }

/* ===== ONDAS DE CONOCIMIENTO ===== */
.knowledge-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, 
            transparent 40%, 
            rgba(74, 222, 128, 0.03) 45%, 
            rgba(74, 222, 128, 0.03) 55%, 
            transparent 60%);
    animation: wave-flow 20s linear infinite;
    border-radius: 50%;
}

.wave-1 { 
    animation-delay: 0s; 
    transform-origin: 30% 70%;
}
.wave-2 { 
    animation-delay: -7s; 
    transform-origin: 70% 30%;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(96, 165, 250, 0.03) 45%, 
        rgba(96, 165, 250, 0.03) 55%, 
        transparent 60%);
}
.wave-3 { 
    animation-delay: -14s; 
    transform-origin: 50% 50%;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(251, 191, 36, 0.02) 45%, 
        rgba(251, 191, 36, 0.02) 55%, 
        transparent 60%);
}

/* ===== PARTÍCULAS DE INSPIRACIÓN ===== */
.inspiration-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== CURSOR PERSONALIZADO EDUCATIVO ===== */
#educational-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease;
}

.cursor-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
    transition: all 0.2s ease;
}

.cursor-trail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    opacity: 0.3;
    transition: all 0.3s ease;
}

/* Estados del cursor */
#educational-cursor.hover .cursor-inner {
    width: 12px;
    height: 12px;
    background: var(--primary-yellow);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.8);
}

#educational-cursor.hover .cursor-trail {
    width: 35px;
    height: 35px;
    border-color: var(--primary-yellow);
    opacity: 0.5;
}

#educational-cursor.click .cursor-inner {
    width: 16px;
    height: 16px;
    background: var(--primary-orange);
    box-shadow: 0 0 30px rgba(251, 146, 60, 1);
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.page-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== SECCIÓN HERO EDUCATIVA ===== */
.hero-section {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 4rem 3rem;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(74, 222, 128, 0.03) 20px,
            rgba(74, 222, 128, 0.03) 40px
        );
    animation: diagonal-move 25s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-title {
    font-family: 'Fredoka', cursive;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.title-word {
    display: inline-block;
    margin: 0 0.2em;
    animation: word-bounce 2s ease-in-out infinite;
}

.title-word:nth-child(1) { animation-delay: 0s; color: var(--primary-green); }
.title-word:nth-child(2) { animation-delay: 0.2s; color: var(--primary-blue); }
.title-word:nth-child(3) { animation-delay: 0.4s; color: var(--primary-purple); }

.title-word.highlight {
    background: var(--gradient-creativity);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.page-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-medium);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.7;
}

/* ===== ICONOS EDUCATIVOS ===== */
.educational-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.edu-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.edu-icon:hover {
    transform: translateY(-10px) scale(1.05);
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: var(--gradient-knowledge);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.edu-icon:hover .icon-circle {
    box-shadow: var(--shadow-medium);
    transform: rotate(15deg);
}

.edu-icon span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== SECCIÓN DE CONTENIDO ===== */
.section-container {
    margin: 4rem 0;
}

.section-title {
    font-family: 'Fredoka', cursive;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-decoration {
    font-size: 2rem;
    animation: decoration-wiggle 2s ease-in-out infinite;
}

.title-decoration:nth-child(1) { animation-delay: 0s; }
.title-decoration:nth-child(3) { animation-delay: 1s; }

/* ===== GRID DE CURSOS ===== */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

/* ===== TARJETAS EDUCATIVAS ===== */
.educational-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
}

.educational-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-knowledge);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.educational-card[data-card-type="ebi"]::before {
    background: var(--gradient-growth);
}

.educational-card[data-card-type="rumbo"]::before {
    background: var(--gradient-creativity);
}

.educational-card:hover::before {
    opacity: 1;
}

.educational-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.educational-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: slide-in-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===== ILUSTRACIONES DE TARJETAS ===== */
.card-illustration {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-background {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--gradient-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.educational-card:hover .illustration-background {
    transform: rotate(10deg) scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Pila de libros para EBI */
.book-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book {
    width: 40px;
    height: 6px;
    border-radius: 2px;
    margin: -1px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: book-float 3s ease-in-out infinite;
}

.book-red {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    animation-delay: 0s;
}

.book-blue {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    animation-delay: 0.5s;
    width: 45px;
}

.book-green {
    background: linear-gradient(45deg, #10b981, #059669);
    animation-delay: 1s;
    width: 35px;
}

.lightbulb {
    position: absolute;
    top: -20px;
    right: -15px;
    font-size: 1.5rem;
    animation: lightbulb-glow 2s ease-in-out infinite;
}

/* Brújula para RUMBO */
.compass {
    font-size: 3rem;
    animation: compass-spin 4s linear infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.path-lines {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.path-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-yellow), var(--primary-orange));
    border-radius: 1px;
    opacity: 0.7;
    animation: path-extend 3s ease-in-out infinite;
}

.line-1 {
    top: 30%;
    left: 0;
    width: 60%;
    animation-delay: 0s;
}

.line-2 {
    top: 50%;
    right: 0;
    width: 70%;
    animation-delay: 1s;
}

.line-3 {
    bottom: 30%;
    left: 15%;
    width: 50%;
    animation-delay: 2s;
}

/* ===== CONTENIDO DE TARJETAS ===== */
.card-title {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.3;
}

.card-description {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: justify;
    font-size: 1rem;
}

/* ===== CARACTERÍSTICAS ===== */
.card-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-knowledge);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-item span {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* ===== BOTONES EDUCATIVOS ===== */
.btn-educational {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-knowledge);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.educational-card[data-card-type="ebi"] .btn-educational {
    background: var(--gradient-growth);
}

.educational-card[data-card-type="rumbo"] .btn-educational {
    background: var(--gradient-creativity);
}

.btn-educational:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: transform 0.3s ease;
}

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

/* ===== CALL TO ACTION EDUCATIVO ===== */
.educational-cta {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.educational-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, 
            rgba(74, 222, 128, 0.1) 0%, 
            transparent 30%),
        radial-gradient(circle at 70% 70%, 
            rgba(96, 165, 250, 0.08) 0%, 
            transparent 40%);
    animation: cta-background-flow 15s ease-in-out infinite;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: rocket-bounce 2s ease-in-out infinite;
}

.educational-cta h3 {
    font-family: 'Fredoka', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.educational-cta p {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary-action {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: var(--gradient-creativity);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.btn-primary-action:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-strong);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.btn-primary-action:hover .btn-shine {
    left: 100%;
}

/* ===== DECORACIONES CTA ===== */
.cta-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.decoration-book {
    position: absolute;
    top: 20%;
    right: 10%;
    font-size: 2rem;
    animation: float-gentle 4s ease-in-out infinite;
    animation-delay: 0s;
}

.decoration-star {
    position: absolute;
    font-size: 1.5rem;
    animation: star-twinkle 2s ease-in-out infinite;
}

.star-1 {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.star-2 {
    bottom: 20%;
    right: 20%;
    animation-delay: 1s;
}

.star-3 {
    top: 60%;
    left: 10%;
    animation-delay: 2s;
}

/* ===== BOTÓN DE TEMA EDUCATIVO PERSONALIZADO ===== */
.educational-theme-button {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 3px solid var(--primary-blue);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: theme-button-appear 1s ease 0.5s forwards;
    opacity: 0;
}

.educational-theme-button:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-strong);
    border-color: var(--primary-yellow);
}

.educational-theme-button input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.theme-icon-educational {
    font-size: 1.8rem;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.educational-theme-button.dark-mode {
    border-color: var(--primary-purple);
    background: rgba(31, 41, 55, 0.95);
}

.educational-theme-button.dark-mode .theme-icon-educational {
    transform: rotate(360deg);
}

/* ===== ANIMACIONES ===== */
@keyframes float-gentle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes wave-flow {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes word-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes decoration-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes book-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes lightbulb-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
        transform: scale(1.1);
    }
}

@keyframes compass-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes path-extend {
    0%, 100% { width: 20%; opacity: 0.3; }
    50% { width: 80%; opacity: 0.8; }
}

@keyframes diagonal-move {
    0% { transform: translateX(-100px) translateY(100px); }
    100% { transform: translateX(100px) translateY(-100px); }
}

@keyframes cta-background-flow {
    0%, 100% { transform: rotate(0deg) scale(1); }
    33% { transform: rotate(120deg) scale(1.1); }
    66% { transform: rotate(240deg) scale(0.9); }
}

@keyframes rocket-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes star-twinkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes theme-button-appear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        cursor: auto; /* Restaurar cursor en móviles */
    }
    
    #educational-cursor {
        display: none;
    }
    
    .page-container {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 3rem 2rem;
        margin-bottom: 3rem;
    }
    
    .educational-icons {
        gap: 1rem;
    }
    
    .edu-icon {
        padding: 0.75rem;
    }
    
    .icon-circle {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .cursos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .educational-card {
        padding: 2rem;
    }
    
    .card-illustration {
        width: 100px;
        height: 100px;
    }
    
    .educational-cta {
        padding: 3rem 2rem;
    }
    
    .educational-theme-button {
        width: 60px;
        height: 60px;
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .theme-icon-educational {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cursos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .educational-card {
        padding: 1.5rem;
    }
    
    .card-illustration {
        width: 80px;
        height: 80px;
    }
    
    .feature-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn-educational {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-book,
    .school-supply,
    .knowledge-symbol,
    .wave,
    #educational-cursor {
        display: none;
    }
    
    body {
        cursor: auto;
    }
}
.educational-theme-button .theme-icon-educational {
    user-select: none; /* Evita que el texto del ícono se pueda seleccionar */
}
/* ===== ESTILOS DE IMPRESIÓN ===== */
@media print {
    /* Reset general para impresión */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
        backdrop-filter: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    /* Ocultar elementos decorativos e innecesarios */
    #header-placeholder,
    #footer-placeholder,
    #theme-toggle-placeholder,
    #arrow-button-placeholder,
    #preloader-placeholder,
    #educational-cursor,
    .educational-background,
    .floating-elements,
    .knowledge-waves,
    .inspiration-particles,
    .skip-link,
    .educational-theme-button,
    .cta-decoration,
    .btn-shine,
    .cursor-inner,
    .cursor-trail {
        display: none !important;
    }
    
    /* Configuración de página */
    @page {
        margin: 2cm;
        size: A4 portrait;
    }
    
    /* Contenedor principal */
    body {
        margin: 0;
        padding: 0;
        font-family: 'Nunito', Arial, sans-serif;
        font-size: 12pt;
        line-height: 1.6;
        color: black;
        background: white;
    }
    
    .page-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Hero Section */
    .hero-section {
        background: white !important;
        border: 2px solid black;
        border-radius: 0;
        padding: 1.5cm;
        margin-bottom: 1cm;
        page-break-after: avoid;
    }
    
    .hero-section::before {
        display: none;
    }
    
    .page-title {
        font-size: 24pt;
        font-weight: bold;
        color: black;
        margin-bottom: 0.5cm;
        text-align: center;
        line-height: 1.2;
    }
    
    .title-word {
        display: inline;
        margin: 0;
        color: black !important;
        background: white !important;
        -webkit-text-fill-color: black !important;
    }
    
    .page-subtitle {
        font-size: 11pt;
        color: black;
        margin-bottom: 0.5cm;
        text-align: center;
        line-height: 1.5;
    }
    
    /* Ocultar iconos decorativos */
    .educational-icons,
    .title-decoration {
        display: none;
    }
    
    /* Título de sección */
    .section-title {
        font-size: 18pt;
        font-weight: bold;
        color: black;
        margin: 1cm 0 0.5cm 0;
        text-align: center;
        border-bottom: 2px solid black;
        padding-bottom: 0.3cm;
        page-break-after: avoid;
    }
    
    /* Grid de cursos */
    .cursos-grid {
        display: block;
    }
    
    /* Tarjetas educativas */
    .educational-card {
        background: white !important;
        border: 2px solid black;
        border-radius: 0;
        padding: 0.8cm;
        margin-bottom: 0.8cm;
        page-break-inside: avoid;
        opacity: 1;
        transform: none;
    }
    
    .educational-card::before {
        display: none;
    }
    
    /* Ocultar ilustraciones */
    .card-header,
    .card-illustration,
    .illustration-background,
    .book-stack,
    .lightbulb,
    .compass,
    .path-lines {
        display: none;
    }
    
    /* Contenido de tarjetas */
    .card-body {
        margin: 0;
        padding: 0;
    }
    
    .card-title {
        font-size: 14pt;
        font-weight: bold;
        color: black;
        margin-bottom: 0.4cm;
        text-align: left;
        border-bottom: 1px solid black;
        padding-bottom: 0.2cm;
    }
    
    .card-description {
        font-size: 11pt;
        color: black;
        line-height: 1.6;
        margin-bottom: 0.4cm;
        text-align: justify;
    }
    
    /* Características */
    .card-features {
        margin-bottom: 0.5cm;
    }
    
    .feature-item {
        background: white !important;
        border: 1px solid black;
        border-radius: 0;
        padding: 0.3cm;
        margin-bottom: 0.2cm;
    }
    
    .feature-icon {
        display: inline-block;
        width: auto;
        height: auto;
        background: white !important;
        border: none;
        font-size: 11pt;
        margin-right: 0.2cm;
    }
    
    .feature-item span {
        font-size: 10pt;
        color: black;
        font-weight: normal;
    }
    
    /* Ocultar botones y CTAs interactivos */
    .card-footer,
    .btn-educational,
    .educational-cta,
    .call-to-action {
        display: none;
    }
    
    /* Prevenir saltos de página problemáticos */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    p, ul, ol {
        orphans: 3;
        widows: 3;
    }
    
    /* Enlaces */
    a {
        color: black;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: none;
    }
}