/* MySchool — Web institucional */

*, *::before, *::after { box-sizing: border-box; }
* { font-family: 'Inter', sans-serif; scroll-behavior: smooth; }

/* ── Slider ── */
.slide { display: none; }
.slide.active { display: flex; }

.slide-title {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0,0,0,.45);
    margin-bottom: 1.25rem;
}
.slide-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    margin-bottom: 1.25rem;
}
.slide-body {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: rgba(255,255,255,.78);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 36rem;
}
.slide-body a,
.slide-body .btnInscripcion {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.85rem 2.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    background: #fff;
    color: #0f172a !important;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
    transition: transform .2s, box-shadow .2s;
}
.slide-body a:hover,
.slide-body .btnInscripcion:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.slide-accent-line {
    width: 3.5rem;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,.55);
    margin-bottom: 1.5rem;
}

/* ── Lightbox ── */
#lightbox {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.92); z-index: 9999;
    align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }

/* ── Skeleton loader ── */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Line clamp ── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── FAQ accordion ── */
.faq-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-body { max-height: 500px; }
.faq-icon { transition: transform .3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── Stats counter ── */
.stat-counter { display: inline-block; }

/* ── WhatsApp float ── */
#wa-float {
    display: none; position: fixed; bottom: 24px; right: 24px; z-index: 1000;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff;
    align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,.45);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
#wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(37,211,102,.55); }

/* ── Cookie banner ── */
#cookie-banner {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: #1e293b; color: #f1f5f9;
    padding: 16px 24px; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; font-size: 13px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}

/* ── Site banner (announcement) ── */
#site-banner {
    display: none; align-items: center; justify-content: center;
    padding: 10px 20px; font-size: 13px; font-weight: 600; color: #fff;
    position: fixed; top: 0; left: 0; right: 0; z-index: 60; gap: 10px;
}

/* ── Scroll progress bar ── */
#scroll-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    z-index: 9999; transition: width .1s linear;
    box-shadow: 0 0 8px rgba(99,102,241,.5);
}

/* ── Back to top ── */
#back-top {
    display: none; position: fixed; bottom: 92px; right: 24px; z-index: 998;
    width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
    background: #1e293b; color: #fff;
    align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    transition: transform .2s, box-shadow .2s, opacity .2s;
    opacity: .85;
}
#back-top.visible { display: flex; }
#back-top:hover { transform: translateY(-3px); opacity: 1; box-shadow: 0 6px 20px rgba(0,0,0,.35); }

/* ── Mobile drawer ── */
#mob-overlay {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
}
#mob-overlay.open { display: block; }
#mob-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
    width: min(300px, 85vw); background: #fff;
    transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0,0,0,.18);
}
#mob-drawer.open { transform: translateX(0); }
.mob-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid #f1f5f9;
}
.mob-drawer-close {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e2e8f0;
    background: transparent; cursor: pointer; display: flex;
    align-items: center; justify-content: center; color: #64748b;
    transition: background .15s;
}
.mob-drawer-close:hover { background: #f8fafc; }
.mob-drawer-links { padding: 12px 0; flex: 1; }
.mob-drawer-links a {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 20px; font-size: 15px; font-weight: 500;
    color: #334155; text-decoration: none; transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}
.mob-drawer-links a:hover, .mob-drawer-links a.active-nav {
    background: #f8faff; color: #4f46e5; border-left-color: #4f46e5;
}
.mob-drawer-links a.mob-cta {
    margin: 12px 20px 0; border-radius: 10px; border-left: none;
    background: #4f46e5; color: #fff; justify-content: center; font-weight: 700;
}
.mob-drawer-links a.mob-cta:hover { background: #4338ca; }
.mob-drawer-links a.mob-student {
    color: #d97706; font-weight: 700; display: none;
}
.mob-drawer-links a.mob-student.visible { display: flex; }

/* ── Active nav link ── */
.nav-link.active-nav { opacity: 1 !important; font-weight: 600; }
.nav-link.active-nav::after {
    content: ''; display: block;
    height: 2px; border-radius: 2px;
    background: currentColor; margin-top: 2px;
}

/* ── Wave dividers ── */
.wave-divider { line-height: 0; overflow: hidden; }
.wave-divider svg { display: block; width: 100%; }

/* ── Course search ── */
.course-search-wrap {
    max-width: 400px; margin: 0 auto 20px; position: relative;
}
.course-search-wrap svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: #94a3b8; pointer-events: none;
}
#course-search {
    width: 100%; padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0; border-radius: 999px;
    font-size: 14px; color: #334155; background: #f8fafc;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
#course-search:focus {
    border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    background: #fff;
}

/* ── ¿Por qué elegirnos? ── */
#porque-section { background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%); }
.porque-card {
    background: #fff; border-radius: 20px; padding: 32px 24px;
    text-align: center; box-shadow: 0 2px 20px rgba(99,102,241,.08);
    transition: transform .25s, box-shadow .25s;
    border: 1px solid rgba(99,102,241,.08);
}
.porque-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(99,102,241,.15); }
.porque-icon {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}

/* ── Share button on news ── */
.news-share-btn {
    position: absolute; top: 10px; right: 10px; z-index: 10;
    width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.news-share-btn svg { width: 15px; height: 15px; color: #334155; }
.group:hover .news-share-btn { opacity: 1; }
.news-share-btn:hover { transform: scale(1.1); }
