/* ============================================================
   Base CSS — Colegio Docksta
   Reset, tipografía y utilidades globales
   ============================================================ */

/* ── Reset Moderno ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
address { font-style: normal; }
input, textarea, select { font-family: inherit; }

/* ── Skip Link (accesibilidad) ─────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-3) var(--space-6);
    background: var(--color-azul-oscuro);
    color: #fff;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-weight: 600;
    transition: top var(--transition-base);
}
.skip-link:focus { top: 0; }

/* ── Container ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color      : var(--color-azul-oscuro);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl),  2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* Componentes premium — neutralizar el clamp global en heading children */
/* docksta-premium.css ya aplica !important donde corresponde */
.pilar-card h1,
.pilar-card h2,
.pilar-card h3,
.pilar-card h4,
.biblioteca-promo h1,
.biblioteca-promo h2,
.slide__inner h1,
.slide__inner h2,
.card-noticia-premium__title,
.sidebar-widget__title {
    font-size: unset;
    font-family: unset;
    color: unset;
    line-height: unset;
    margin: unset;
}

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ── Sección ────────────────────────────────────────────────── */
.section {
    padding-block: var(--space-20);
}
.section--sm   { padding-block: var(--space-12); }
.section--lg   { padding-block: var(--space-24); }
.section--gris { background-color: var(--color-gris-100); }
.section--verde-suave { background-color: var(--color-verde-claro); }
.section--azul-suave  { background-color: var(--color-azul-claro); }
.section--oscuro { background-color: var(--color-azul-oscuro); color: var(--text-inverse); }
.section--oscuro h2, .section--oscuro h3 { color: #fff; }

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
    text-align: center;
    max-width: 680px;
    margin-inline: auto;
    margin-bottom: var(--space-12);
}
.section-header__eyebrow {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-verde);
    margin-bottom: var(--space-3);
}
.section-header__title { margin-bottom: var(--space-4); }
.section-header__desc  { color: var(--text-secondary); }

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: .03em;
    transition: all var(--transition-base);
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--color-verde);
    color: #fff;
    border-color: var(--color-verde);
}
.btn--primary:hover {
    background: var(--color-verde-oscuro);
    border-color: var(--color-verde-oscuro);
    transform: translateY(-1px);
    box-shadow: var(--shadow-verde);
}

.btn--secondary {
    background: var(--color-azul-oscuro);
    color: #fff;
    border-color: var(--color-azul-oscuro);
}
.btn--secondary:hover {
    background: var(--color-azul);
    border-color: var(--color-azul);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--color-verde);
    border-color: var(--color-verde);
}
.btn--outline:hover {
    background: var(--color-verde);
    color: #fff;
}

.btn--outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.6);
}
.btn--outline-white:hover {
    background: rgba(255,255,255,.15);
    border-color: #fff;
}

.btn--whatsapp {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}
.btn--whatsapp:hover {
    background: #128C7E;
    border-color: #128C7E;
}

.btn--sm { padding: 0.5rem 1.25rem; font-size: var(--text-xs); }
.btn--lg { padding: 1rem 2.25rem; font-size: var(--text-base); }

/* ── Badges / Etiquetas ─────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .25em .75em;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.badge--verde   { background: var(--color-verde-claro); color: var(--color-verde-oscuro); }
.badge--azul    { background: var(--color-azul-claro);  color: var(--color-azul); }
.badge--rojo    { background: #fde8e8; color: #c0392b; }
.badge--gris    { background: var(--color-gris-200); color: var(--color-gris-700); }

/* ── Grid Helpers ────────────────────────────────────────────── */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ── Aviso de Emergencia ────────────────────────────────────── */
.aviso-emergencia {
    background: #c0392b;
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-2) 0;
    text-align: center;
}
.aviso-emergencia .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

/* ── WhatsApp Flotante ───────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ── Animaciones de Entrada ──────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-fade-up   { animation: fadeUp var(--transition-slow) both; }
.animate-fade-in   { animation: fadeIn var(--transition-slow) both; }
.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }
.delay-4 { animation-delay: 400ms; }

/* ── Utilidades ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-verde  { color: var(--color-verde); }
.text-azul   { color: var(--color-azul-oscuro); }
.text-muted  { color: var(--text-muted); }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* ── Responsive Helpers ───────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --container-padding: var(--space-4);
        --space-20: 3.5rem;
        --space-24: 4rem;
    }
    .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}
