/* ===== SINAV — ESTILOS GLOBALES ===== */

:root {
    --celeste: #5bc0eb;
    --celeste-oscuro: #1b4965;
    --fondo-claro: #f4f9fc;
    --accent: #2ecc71;
    --dm-fondo: #121212;
    --dm-tarjeta: #1e1e1e;
    --dm-texto: #e0e0e0;
    --dm-texto-muted: #999;
    --dm-border: #333;
}

[data-bs-theme="dark"] {
    --fondo-claro: var(--dm-fondo);
}

/* === BASE === */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
    background-color: var(--fondo-claro);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body::before {
    content: '';
    display: block;
    height: 70px;
    flex-shrink: 0;
}

/* === NAVBAR MARKETING (con blur) === */
.navbar-marketing {
    background: rgba(91, 192, 235, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 15px 0;
}
.navbar-marketing.scrolled {
    background: rgba(91, 192, 235, 1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    padding: 10px 0;
}

/* === NAVBAR AUTH (sólido) === */
.navbar-simple {
    background: rgba(91, 192, 235, 1) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    padding: 15px 0;
}

/* Elementos compartidos de navbar */
.navbar-brand,
.navbar-marketing .nav-link,
.navbar-simple .nav-link {
    color: var(--celeste-oscuro) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}
.navbar-marketing .nav-link,
.navbar-simple .nav-link {
    position: relative;
    margin: 0 10px;
}
.navbar-marketing .nav-link::after,
.navbar-simple .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--celeste-oscuro);
    transition: all 0.3s ease;
}
.navbar-marketing .nav-link:hover::after,
.navbar-simple .nav-link:hover::after {
    width: 100%;
    left: 0;
}
.navbar-marketing .nav-link:hover,
.navbar-simple .nav-link:hover {
    transform: translateY(-2px) !important;
}

.social-icon {
    font-size: 1.2rem;
    margin-left: 15px;
    color: var(--celeste-oscuro);
    transition: all 0.3s ease;
    text-decoration: none;
}
.social-icon:hover {
    color: #fff;
    transform: scale(1.2) rotate(10deg);
}

/* Botón dark mode */
.dark-toggle {
    background: none;
    border: 2px solid var(--celeste-oscuro);
    color: var(--celeste-oscuro);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    padding: 0;
    margin-left: 12px;
}
.dark-toggle:hover {
    background: var(--celeste-oscuro);
    color: var(--celeste);
}
.dark-toggle:focus-visible {
    outline: 2px solid var(--celeste);
    outline-offset: 3px;
}

/* === HERO === */
.hero {
    background: linear-gradient(rgba(27, 73, 101, 0.88), rgba(27, 73, 101, 0.88));
    color: #fff;
    padding: clamp(110px, 14vw, 160px) 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}
.hero p {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    max-width: 800px;
    margin: 0 auto 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* === HERO GEARS (CSS conic-gradient + mask) === */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes spin-reverse {
    to { transform: rotate(-360deg); }
}

.hero-gears {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.gear {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%,
            transparent 25%,
            var(--gear-color) 25%,
            var(--gear-color) 36%,
            transparent 36%
        ),
        repeating-conic-gradient(
            from 0deg,
            var(--gear-color) 0deg 10deg,
            transparent 10deg 22.5deg
        );
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent 25%, #000 25%);
    mask: radial-gradient(circle at 50% 50%, transparent 25%, #000 25%);
    animation: spin 25s linear infinite;
}

.gear-main {
    --gear-color: var(--celeste);
    width: clamp(180px, 30vw, 280px);
    height: clamp(180px, 30vw, 280px);
    top: calc(50% - clamp(90px, 15vw, 140px) + 20px);
    left: calc(50% - clamp(90px, 15vw, 140px) + 40px);
    animation-duration: 30s;
}

.gear-secondary {
    --gear-color: var(--celeste-oscuro);
    width: clamp(100px, 18vw, 170px);
    height: clamp(100px, 18vw, 170px);
    top: -50px;
    right: 8%;
    animation-name: spin-reverse;
    animation-duration: 20s;
}

.gear-tertiary {
    --gear-color: var(--celeste);
    width: clamp(80px, 15vw, 140px);
    height: clamp(80px, 15vw, 140px);
    bottom: -40px;
    left: 5%;
    animation-duration: 18s;
}

.gear-quaternary {
    --gear-color: var(--celeste-oscuro);
    width: clamp(60px, 12vw, 100px);
    height: clamp(60px, 12vw, 100px);
    top: 15%;
    left: 12%;
    animation-name: spin-reverse;
    animation-duration: 14s;
}

[data-bs-theme="dark"] .gear-secondary,
[data-bs-theme="dark"] .gear-quaternary {
    --gear-color: var(--celeste);
}

/* === BOTONES === */
.btn-cta {
    background: var(--celeste);
    color: var(--celeste-oscuro);
    padding: 15px 35px;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 700;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.btn-cta:hover {
    background: var(--celeste-oscuro);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.btn-outline-white {
    border: 2px solid #fff;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-outline-white:hover {
    background: #fff;
    color: var(--celeste-oscuro);
}

/* === SECCIONES === */
.section {
    padding: clamp(60px, 10vw, 100px) 20px;
}
.section-title {
    margin-bottom: 60px;
    position: relative;
}
.section-title h2 {
    font-weight: 800;
    color: var(--celeste-oscuro);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-transform: uppercase;
}
.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--celeste);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}
.color-celeste-oscuro {
    color: var(--celeste-oscuro) !important;
}

/* === TARJETAS (servicios y módulos) === */
.service-card,
.module-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}
.service-card:hover,
.module-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--celeste);
}
.service-icon,
.module-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    display: inline-block;
    transition: all 0.4s;
}
.service-card:hover .service-icon,
.module-card:hover .module-icon {
    transform: scale(1.2) rotate(10deg);
}
.service-card h4,
.module-card h4 {
    color: var(--celeste-oscuro);
    font-weight: 700;
    margin-bottom: 15px;
}
.service-card p,
.module-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Colores de iconos */
.icon-pc { color: #e74c3c; }
.icon-print { color: #2ecc71; }
.icon-net { color: #f1c40f; }
.icon-soft { color: #6c5ce7; }
.icon-web { color: #e74c3c; }
.icon-app { color: #2ecc71; }
.icon-edu { color: #6c5ce7; }
.icon-admin { color: #e74c3c; }
.icon-academic { color: #2ecc71; }
.icon-teachers { color: #1abc9c; }
.icon-students { color: #6c5ce7; }
.icon-grades { color: #f1c40f; }
.icon-finance { color: #c0392b; }

/* === MISIÓN / VISIÓN === */
.mision-vision-card {
    background: #fff;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
}
.mision-vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.mision-vision-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    display: inline-block;
}
.icon-mision { color: #3498db; }
.icon-vision { color: #2ecc71; }

/* === CTA BANNER === */
.cta-banner {
    background: var(--celeste-oscuro);
    color: #fff;
    padding: clamp(50px, 8vw, 80px) 20px;
    border-radius: 30px;
    margin: 40px 0;
    text-align: center;
}

/* === FORMULARIOS === */
.form-control {
    border-radius: 15px;
    padding: 12px 20px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    transition: all 0.3s;
}
.form-control:focus {
    box-shadow: 0 0 15px rgba(91, 192, 235, 0.2);
    border-color: var(--celeste);
}

/* === TARJETAS DE AUTENTICACIÓN === */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(30px, 5vw, 60px) 20px;
}
.login-card,
.register-card {
    background: #fff;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    max-width: 450px;
}
.register-card {
    max-width: 600px;
}

/* === FOOTER PREMIUM (marketing) === */
.footer-premium {
    background: var(--celeste-oscuro);
    color: #fff;
    padding: 60px 20px 30px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}
.footer-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--celeste), var(--accent), var(--celeste));
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-section h5 {
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--celeste);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.footer-section ul {
    list-style: none;
    padding: 0;
}
.footer-section ul li {
    margin-bottom: 12px;
    transition: all 0.3s ease;
}
.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-section ul li a:hover {
    color: var(--celeste);
    transform: translateX(5px);
}
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 192, 235, 0.2);
    border-radius: 50%;
    color: var(--celeste);
    transition: all 0.3s ease;
    text-decoration: none;
}
.footer-social a:hover {
    background: var(--celeste);
    color: var(--celeste-oscuro);
    transform: translateY(-5px);
}
.footer-bottom {
    border-top: 1px solid rgba(91, 192, 235, 0.2);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* === FOOTER SIMPLE (auth) === */
.footer-simple {
    background: var(--celeste-oscuro);
    color: #fff;
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.footer-simple p {
    margin: 0;
    opacity: 0.9;
}

/* === WHATSAPP FLOTANTE === */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,.3);
    z-index: 999;
    transition: all .3s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1) rotate(15deg);
    color: #fff;
}

/* === ANIMACIONES === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.25s ease-out;
    will-change: opacity, transform;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.animate__animated {
    animation-duration: 0.5s !important;
}
.animate__delay-custom-1 {
    animation-delay: 0.2s !important;
}
.animate__delay-custom-2 {
    animation-delay: 0.4s !important;
}

/* ===== MODO OSCURO ===== */
[data-bs-theme="dark"] body {
    background-color: var(--dm-fondo);
    color: var(--dm-texto);
}

[data-bs-theme="dark"] .navbar-marketing {
    background: rgba(30, 30, 30, 0.95) !important;
}
[data-bs-theme="dark"] .navbar-marketing.scrolled {
    background: rgba(30, 30, 30, 1) !important;
}
[data-bs-theme="dark"] .navbar-simple {
    background: rgba(30, 30, 30, 1) !important;
}
[data-bs-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .navbar-marketing .nav-link,
[data-bs-theme="dark"] .navbar-simple .nav-link {
    color: var(--celeste) !important;
}
[data-bs-theme="dark"] .navbar-marketing .nav-link::after,
[data-bs-theme="dark"] .navbar-simple .nav-link::after {
    background: var(--celeste);
}
[data-bs-theme="dark"] .social-icon {
    color: var(--celeste);
}
[data-bs-theme="dark"] .social-icon:hover {
    color: var(--celeste-oscuro);
    transform: scale(1.2) rotate(10deg);
}
[data-bs-theme="dark"] .dark-toggle {
    border-color: var(--celeste);
    color: var(--celeste);
}
[data-bs-theme="dark"] .dark-toggle:hover {
    background: var(--celeste);
    color: var(--celeste-oscuro);
}
[data-bs-theme="dark"] .section-title h2 {
    color: var(--celeste);
}
[data-bs-theme="dark"] .service-card,
[data-bs-theme="dark"] .module-card,
[data-bs-theme="dark"] .mision-vision-card,
[data-bs-theme="dark"] .login-card,
[data-bs-theme="dark"] .register-card {
    background: var(--dm-tarjeta);
    border-color: var(--dm-border);
}
[data-bs-theme="dark"] .service-card p,
[data-bs-theme="dark"] .module-card p {
    color: var(--dm-texto-muted);
}
[data-bs-theme="dark"] .service-card h4,
[data-bs-theme="dark"] .module-card h4 {
    color: var(--celeste);
}
[data-bs-theme="dark"] .form-control {
    background: #2a2a2a;
    border-color: var(--dm-border);
    color: var(--dm-texto);
}
[data-bs-theme="dark"] .form-control:focus {
    background: #333;
}
[data-bs-theme="dark"] .text-muted {
    color: var(--dm-texto-muted) !important;
}
[data-bs-theme="dark"] .bg-white {
    background-color: var(--dm-tarjeta) !important;
}
[data-bs-theme="dark"] .btn-cta:hover {
    background: var(--celeste) !important;
    color: var(--celeste-oscuro) !important;
}
[data-bs-theme="dark"] .btn-outline-white:hover {
    background: var(--celeste);
    color: var(--celeste-oscuro);
}
[data-bs-theme="dark"] .cta-banner {
    background: #1a3a4e;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .navbar-marketing .nav-link,
    .navbar-simple .nav-link {
        margin: 5px 0;
    }
    .dark-toggle {
        margin: 10px 0 0 0;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: clamp(80px, 12vw, 100px) 20px;
        margin-top: 60px;
    }
    .hero h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }
    .hero p {
        font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .login-card,
    .register-card {
        padding: 30px 20px;
    }
    .service-card,
    .module-card {
        padding: 30px 20px;
    }
    .mision-vision-card {
        padding: 30px 20px;
    }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .section-title h2 {
        font-size: 1.5rem;
    }
    .btn-cta {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .section {
        padding: 40px 15px;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .login-card,
    .register-card {
        padding: 25px 15px;
    }
    .service-card,
    .module-card {
        padding: 25px 15px;
    }
    .mision-vision-card {
        padding: 25px 15px;
    }
}

/* === TOGGLER MÓVIL (menú hamburguesa) === */
.navbar-toggler {
    border: none;
    padding: 8px 14px;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #333;
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(91, 192, 235, 0.3);
}
[data-bs-theme="dark"] .navbar-toggler {
    background-color: var(--dm-tarjeta) !important;
    color: var(--dm-texto) !important;
}
