/* ================================================
   MATH POWER - ESTILOS PERSONALIZADOS
   ================================================ */

/* === RESET Y BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f7faff;
    overflow-x: hidden;
}

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

.whatsapp-float:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
    }
}

/* === NAVEGACIÓN STICKY === */
.sticky-nav {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* Efecto de línea en links de navegación */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #7acaf1;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* === ANIMACIONES PERSONALIZADAS === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animación de entrada para secciones */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === EFECTOS DE HOVER EN TARJETAS === */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
}

/* === GRADIENTES PERSONALIZADOS === */
.gradient-hero {
    background: linear-gradient(135deg, rgba(122, 202, 241, 0.2) 0%, rgba(247, 250, 255, 1) 50%, rgba(253, 189, 42, 0.1) 100%);
}

.gradient-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* === BOTONES MEJORADOS === */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* === FORMULARIOS === */
input:focus,
textarea:focus {
    outline: none;
    border-color: #7acaf1;
    box-shadow: 0 0 0 3px rgba(122, 202, 241, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Validación de formularios */
input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* === TESTIMONIOS === */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 80px;
    color: rgba(122, 202, 241, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
}

/* === SOMBRAS PERSONALIZADAS === */
.shadow-custom {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.shadow-custom-hover:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* === LOADING SPINNER === */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(122, 202, 241, 0.2);
    border-top-color: #7acaf1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === SCROLLBAR PERSONALIZADA === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #7acaf1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5ab5db;
}

/* === SELECCIÓN DE TEXTO === */
::selection {
    background-color: #7acaf1;
    color: white;
}

::-moz-selection {
    background-color: #7acaf1;
    color: white;
}

/* === IMÁGENES RESPONSIVE === */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === LAZY LOADING === */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* === BREAKPOINTS ADICIONALES === */

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Desktop Large (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1280px;
    }
}

/* === MODO OSCURO (PREPARADO PARA FUTURA IMPLEMENTACIÓN) === */
@media (prefers-color-scheme: dark) {
    /* body {
        background-color: #1a202c;
        color: #e2e8f0;
    } */
}

/* === ACCESIBILIDAD === */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #fdbd2a;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus visible para accesibilidad con teclado */
*:focus-visible {
    outline: 3px solid #7acaf1;
    outline-offset: 2px;
}

/* === UTILITIES === */
.text-balance {
    text-wrap: balance;
}

.no-scroll {
    overflow: hidden;
}

/* === PRINT STYLES === */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* === PERFORMANCE === */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reducir motion para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}