/* ============================================================
   IENSP Dibulla — styles.css  (reescrito completo)
   ============================================================ */

:root {
  --azul:      #004080;
  --azul-m:    #0077b6;
  --azul-c:    #87ceeb;
  --azul-osc:  #002b55;
  --naranja:   #ffa600;
  --dorado:    #c8a84b;
  --blanco:    #ffffff;
  --gris-f:    #f4f6f9;
  --gris:      #666;
  --texto:     #2c3e50;
  --sombra-s:  0 2px 12px rgba(0,0,0,.08);
  --sombra-m:  0 8px 30px rgba(0,0,0,.12);
  --sombra-l:  0 18px 50px rgba(0,0,0,.18);
  --r:         14px;
  --r-lg:      22px;
  --t:         .3s cubic-bezier(.4,0,.2,1);
}

/* ── RESET ─────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }

body { 
font-family:"Pilar","Roboto",sans-serif; 
background:#fff; 
color:#222; 
overflow-x:hidden; 
text-align: justify;
}

img  { max-width:100%; height:auto; display:block; }
a    { text-decoration:none; color:inherit; }
button { font-family:inherit; }
*:focus-visible { outline:3px solid var(--naranja); outline-offset:3px; border-radius:4px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
           overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ── SCROLL-TOP BTN ─────────────────────────────────────────── */
.scroll-top-btn {
  position:fixed; bottom:26px; right:22px;
  width:50px; height:50px; border-radius:50%;
  background:var(--azul); color:#fff; border:none; cursor:pointer;
  font-size:18px; display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 20px rgba(0,64,128,.4); z-index:999;
  opacity:0; transform:translateY(20px) scale(.8);
  transition:opacity var(--t), transform var(--t), background var(--t);
  pointer-events:none;
}
.scroll-top-btn.visible { opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.scroll-top-btn:hover   { background:var(--azul-osc); transform:translateY(-3px) scale(1.05); }

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */
.nav {
  width:100%; height:74px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 32px;
  background:var(--azul-m);
  position:sticky; top:0; z-index:300;
  transition:box-shadow var(--t), background var(--t);
}
.nav.scrolled { background:#00588f; box-shadow:0 4px 24px rgba(0,0,0,.3); }

.nav-brand { display:flex; align-items:center; gap:12px; flex-shrink:0; }

.logo {
  width:52px; height:52px; object-fit:cover; border-radius:50%;
  border:2px solid rgba(255,255,255,.4);
  /* Animación solo en desktop y lenta */
}
@media (min-width:1025px) {
  .logo { animation:logoPulse 7s ease-in-out infinite; }
}
@keyframes logoPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }

.nav-nombre {
  color:#fff; font-size:15px; font-weight:700;
  letter-spacing:.5px; white-space:nowrap;
}

/* Links */
.opciones { display:flex; list-style:none; gap:2px; align-items:center; }

.link-opciones {
  display:block; color:rgba(255,255,255,.9); padding:8px 13px;
  font-size:13px; text-transform:uppercase; letter-spacing:.5px;
  border-radius:6px; white-space:nowrap;
  transition:background var(--t), color var(--t);
}
.link-opciones:hover, .link-opciones:focus {
  background:rgba(255,255,255,.15); color:#fff;
}
.link-opcionesd::after { content:" ▾"; font-size:10px; opacity:.7; }

/* Submenú */
.li-d { position:relative; }
.hidden-options {
  position:absolute; top:calc(100% + 8px); left:0; min-width:210px;
  background:var(--azul-osc); border-radius:10px; box-shadow:var(--sombra-l);
  opacity:0; visibility:hidden; transform:translateY(-8px);
  transition:opacity .22s ease, transform .22s ease, visibility .22s;
  overflow:hidden; z-index:400;
}
.li-d:hover>.hidden-options, .li-d:focus-within>.hidden-options {
  opacity:1; visibility:visible; transform:translateY(0);
}
.li-desplegable { border-bottom:1px solid rgba(255,255,255,.08); }
.li-desplegable:last-child { border-bottom:none; }
.link-desplegable {
  display:block; padding:12px 18px; color:rgba(255,255,255,.85); font-size:13.5px;
  transition:background var(--t);
}
.link-desplegable:hover { background:rgba(255,255,255,.1); color:#fff; }

/* Nav actions */
.nav-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }

.register-user {
  width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,.18); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--t), transform var(--t);
}
.register-user img { width:22px; height:22px; }
.register-user:hover { background:rgba(255,255,255,.32); transform:rotate(22deg); }

/* Hamburguesa */
.menu {
  display:none; flex-direction:column; gap:6px;
  width:42px; height:42px; border-radius:10px;
  background:rgba(255,255,255,.15); border:none; cursor:pointer;
  align-items:center; justify-content:center;
  transition:background var(--t), transform .2s; padding:0;
  position:relative; z-index:300;
}
.menu:hover { background:rgba(255,255,255,.28); }
.menu.active { background:rgba(255,255,255,.22); }
.hamburger-line {
  display:block; width:22px; height:2.5px; background:#fff;
  border-radius:3px;
  transition:transform .4s cubic-bezier(.4,0,.2,1), opacity .3s ease, width .3s ease;
  transform-origin:center;
}
.menu.active .hamburger-line:nth-child(1) {
  transform:translateY(8.5px) rotate(45deg);
  width:20px;
}
.menu.active .hamburger-line:nth-child(2) {
  opacity:0; transform:scaleX(0);
}
.menu.active .hamburger-line:nth-child(3) {
  transform:translateY(-8.5px) rotate(-45deg);
  width:20px;
}

/* Overlay */
.menu-overlay {
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,0);
  z-index:199; opacity:0;
  transition:opacity .4s ease;
}
.menu-overlay.active {
  background:rgba(0,0,0,.55); opacity:1;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.header { width:100%; min-height:570px; display:flex; position:relative; }

.container1-header {
  width:55%; min-height:570px;
  background:url("imagenes/background-image-education.png") center/cover no-repeat;
  display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden;
}
.opaco {
  position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(0,24,64,.88) 0%,rgba(0,60,120,.7) 100%);
  z-index:1;
}
.content-principal {
  position:relative; z-index:5; width:min(420px, 92%);
  background:rgba(255,255,255,.97); border-radius:20px;
  padding:28px 26px 22px; box-shadow:0 20px 60px rgba(0,0,0,.3);
}
.div-interactive { margin-bottom:6px; }
.div-interactive p {
  font-size:clamp(36px,5.5vw,64px); color:#aaa;
  font-family:"Roboto",sans-serif; line-height:1; margin-bottom:2px;
}
.interactive-text {
  color:var(--azul-c); font-size:clamp(34px,5.2vw,62px);
  display:inline-block; line-height:1;
  border-right:3px solid var(--azul-c);
  animation:blinkCaret .75s step-end infinite; padding-right:4px;
}
@keyframes blinkCaret {
  0%,100%{border-right-color:var(--azul-c)} 50%{border-right-color:transparent}
}
.age-school { margin:12px 0 18px; }
.age-school p { color:var(--azul-m); font-size:17px; font-weight:700; letter-spacing:1px; }
.contact-button {
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 22px; background:var(--azul); color:#fff;
  border:2px solid var(--azul); border-radius:10px; font-size:15px;
  cursor:pointer; transition:all var(--t); letter-spacing:.5px;
  position:relative; overflow:hidden;
}
.contact-button:hover { background:transparent; color:var(--azul); }

.container2-header {
  flex:1;
  background:url("imagenes/principal3.jpg") top center/cover no-repeat;
  filter:blur(1.5px); position:relative;
}

/* Partículas */
.particle {
  position:absolute; border-radius:50%; background:rgba(255,255,255,.14);
  pointer-events:none; z-index:2; animation:floatP linear infinite;
}
.particle:nth-child(1){width:10px;height:10px;left:7%;animation-duration:9s;bottom:-10px}
.particle:nth-child(2){width:18px;height:18px;left:21%;animation-duration:13s;bottom:-10px;animation-delay:1.5s}
.particle:nth-child(3){width:7px;height:7px;left:39%;animation-duration:8s;bottom:-10px;animation-delay:2.5s}
.particle:nth-child(4){width:14px;height:14px;left:56%;animation-duration:11s;bottom:-10px;animation-delay:.8s}
.particle:nth-child(5){width:9px;height:9px;left:72%;animation-duration:10s;bottom:-10px;animation-delay:3.2s}
.particle:nth-child(6){width:20px;height:20px;left:88%;animation-duration:14s;bottom:-10px;animation-delay:1s}
@keyframes floatP {
  0%   {transform:translateY(0);opacity:0}
  10%  {opacity:1}
  90%  {opacity:.4}
  100% {transform:translateY(-640px);opacity:0}
}

/* ═══════════════════════════════════════════════════════════════
   MAIN PRESENTATION
   ═══════════════════════════════════════════════════════════════ */
.main-presentation { width:100%; display:flex; flex-direction:column; margin-top:70px; }

.text-main { width:90%; max-width:900px; padding:20px 50px; }

h1 {
  font-size:clamp(22px,3vw,36px);
  color:var(--azul);
  font-style:italic;
  margin-bottom:26px;
  letter-spacing:1px;
  line-height:1.35;
}
.resaltar-name { color:var(--naranja); }
.p-p { font-size:clamp(15px,1.7vw,20px); text-align:justify; line-height:1.75; color:#333; margin-top:14px; }

/* Lema banner */
.lema-banner {
  display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap;
  background:linear-gradient(90deg,var(--azul),var(--azul-m));
  padding:22px 40px; margin:44px 0;
}
.lema-span { color:#fff; font-size:clamp(15px,2vw,20px); text-align:center; }
.lema-icon { color:var(--naranja); font-size:18px; }

/* Stats */
.stats-row {
  display:grid; grid-template-columns:repeat(4,1fr);
  border-top:3px solid var(--azul); border-bottom:3px solid var(--azul);
  background:var(--gris-f); margin-bottom:70px;
}
.stat-item {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:28px 16px; border-right:1px solid #ddd; text-align:center;
}
.stat-item:last-child { border-right:none; }
.stat-num { font-size:clamp(28px,4vw,52px); color:var(--azul); font-weight:900; line-height:1; display:block; }
.stat-label { font-size:12px; color:var(--gris); margin-top:6px; text-transform:uppercase; letter-spacing:.5px; }

/* Box important */
.box-important {
  width:100%; display:flex; flex-wrap:wrap; justify-content:center;
  align-items:flex-start; gap:60px 70px; padding:30px 20px 100px;
}
.content-important-main {
  width:310px; height:500px; position:relative;
  background-size:cover; background-position:center; border-radius:16px;
  overflow:hidden; box-shadow:var(--sombra-m);
  transition:transform var(--t), box-shadow var(--t);
}
.content-important-main:hover { transform:translateY(-8px) scale(1.02); box-shadow:var(--sombra-l); }
.img-content1 { background-image:url("imagenes/jovenes-pilaristas-felices.jpg"); }
.img-content2 { background-image:url("imagenes/egresados-pilaristas.jpg"); }
.img-content3 { background-image:url("imagenes/p.jpg"); }
.img-content4 { background-image:url("imagenes/huellas-pilaristas.png"); background-position:right; }
.number-box {
  width:66px; height:66px; border-radius:50%; background:var(--naranja);
  display:flex; align-items:center; justify-content:center;
  position:absolute; top:16px; left:16px; z-index:5;
  box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.img-important { width:36px; height:36px; object-fit:contain; }
.h3-important {
  position:absolute; top:94px; left:16px; color:#fff; font-size:18px;
  text-shadow:0 2px 6px rgba(0,0,0,.5); z-index:5;
}
.p-div-present {
  position:absolute; bottom:0; left:0; right:0; z-index:5;
  background:linear-gradient(to top,rgba(255,166,0,.93) 65%,transparent);
  padding:28px 18px 18px;
}
.p-present { font-size:14.5px; color:#fff; text-align:center; line-height:1.5; }

/* ── Section header (reutilizable) ── */
.section-header { text-align:center; margin-bottom:38px; }
.section-divider {
  width:56px; height:4px; border-radius:2px; margin:14px auto;
  background:linear-gradient(90deg,var(--azul),var(--azul-m));
}

/* ═══════════════════════════════════════════════════════════════
   INSTITUCIONAL
   ═══════════════════════════════════════════════════════════════ */
.institucional {
  width:100%; padding:80px 20px 60px; text-align:center; color:#fff; margin-top:40px;
  background:linear-gradient(135deg,#0050a0,#0077b6 55%,#009fd4);
  clip-path:polygon(0 0,100% 0,100% 82%,0 100%);
}
.institucional h2 { font-size:clamp(26px,4vw,44px); font-weight:700; }

.cards {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:26px; padding:0 24px; max-width:1200px; margin:-52px auto 70px;
}
.card {
  background:#fff; padding:30px 26px 26px; border-radius:var(--r-lg);
  box-shadow:var(--sombra-m); position:relative; overflow:hidden;
  transition:transform var(--t), box-shadow var(--t);
}
.card:hover { transform:translateY(-8px); box-shadow:var(--sombra-l); }
.card::before {
  content:""; position:absolute; top:0; left:-20%; width:140%; height:5px;
  background:linear-gradient(90deg,var(--azul),var(--azul-m));
}
.card-icon-top {
  width:50px; height:50px; border-radius:12px; margin-bottom:16px;
  background:linear-gradient(135deg,var(--azul),var(--azul-m));
  color:#fff; font-size:20px; display:flex; align-items:center; justify-content:center;
}
.card h2 { color:var(--azul); font-size:1.4rem; margin-bottom:12px; }
.card p   { color:#444; line-height:1.7; font-size:.98rem; }

/* ═══════════════════════════════════════════════════════════════
   PLAN DE ESTUDIOS
   ═══════════════════════════════════════════════════════════════ */
.plan-de-estudios {
  max-width:1100px; margin:60px auto; padding:48px 40px;
  background:#fff; border-radius:var(--r-lg); box-shadow:var(--sombra-m); line-height:1.8;
}
.h2-pde { font-size:clamp(24px,3.5vw,38px); color:#222; font-weight:700; }
.c-d { color:var(--azul-m); }
.black-main { font-weight:700; color:#000; }
.plan-de-estudios p { font-size:1rem; color:#444; margin-bottom:18px; }

.categorias-academicas-primaria, .categorias-académicas-primaria { display:flex; justify-content:center; margin:36px 0; }
.categoria-content {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:20px; width:100%;
}
.box-category {
  background:var(--gris-f); border-radius:16px; overflow:hidden; text-align:center;
  box-shadow:var(--sombra-s); transition:transform var(--t), box-shadow var(--t);
}
.box-category:hover { transform:translateY(-8px); box-shadow:var(--sombra-m); }
.img-category { width:100%; height:150px; object-fit:cover; }
.h3-category {
  padding:13px 10px; font-size:1rem; font-weight:600; color:var(--azul);
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.h3-category i { color:var(--naranja); }

/* ═══════════════════════════════════════════════════════════════
   CARRUSEL COLEGIO (Dinámico)
   ═══════════════════════════════════════════════════════════════ */
.carrusel-section { width:90%; max-width:1200px; margin:80px auto; padding:0 10px; }
.h2-cp { color:var(--azul-m); font-size:clamp(24px,3.5vw,38px); }
.h3-cp { font-size:1rem; color:var(--gris); font-weight:400; margin-top:8px; }

.carrusel {
  position:relative; width:100%; border-radius:20px; overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,.18); margin-top:30px;
}
.carrusel-track {
  position:relative; width:100%; height:0; padding-bottom:50%;
  overflow:hidden;
}
.carrusel-slide {
  position:absolute; top:0; left:0; width:100%; height:100%;
  opacity:0; transform:translateX(60px); transition:none; pointer-events:none;
}
.carrusel-slide.active {
  opacity:1; transform:translateX(0); pointer-events:auto;
  transition:transform .7s cubic-bezier(.4,0,.2,1), opacity .7s ease;
}
.carrusel-slide.exiting {
  opacity:0; transform:translateX(-60px);
  transition:transform .7s cubic-bezier(.4,0,.2,1), opacity .5s ease;
}
.carrusel-slide img {
  width:100%; height:100%; object-fit:cover; display:block;
  transform:scale(1);
}

/* Ken Burns variants */
.carrusel-slide[data-kb="kb1"] img { animation:kb1 7s ease-in-out infinite alternate; }
.carrusel-slide[data-kb="kb2"] img { animation:kb2 7s ease-in-out infinite alternate; }
.carrusel-slide[data-kb="kb3"] img { animation:kb3 7s ease-in-out infinite alternate; }
.carrusel-slide[data-kb="kb4"] img { animation:kb4 7s ease-in-out infinite alternate; }
.carrusel-slide[data-kb="kb5"] img { animation:kb5 7s ease-in-out infinite alternate; }
.carrusel-slide[data-kb="kb6"] img { animation:kb6 7s ease-in-out infinite alternate; }

.carrusel-slide:not(.active) img { animation-play-state:paused; }

@keyframes kb1 {
  0%   { transform:scale(1)    translate(0,0); }
  100% { transform:scale(1.15) translate(-2%,-1%); }
}
@keyframes kb2 {
  0%   { transform:scale(1.1)  translate(1%,1%); }
  100% { transform:scale(1)    translate(-1%,-1%); }
}
@keyframes kb3 {
  0%   { transform:scale(1)    translate(-1%,0); }
  100% { transform:scale(1.12) translate(2%,1%); }
}
@keyframes kb4 {
  0%   { transform:scale(1.08) translate(0,1%); }
  100% { transform:scale(1)    translate(1%,-1%); }
}
@keyframes kb5 {
  0%   { transform:scale(1)    translate(1%,0); }
  100% { transform:scale(1.14) translate(-2%,1%); }
}
@keyframes kb6 {
  0%   { transform:scale(1.1)  translate(-1%,-1%); }
  100% { transform:scale(1)    translate(1%,0); }
}

.carrusel-caption {
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(transparent, rgba(0,30,80,.75));
  color:#fff; padding:40px 24px 20px;
  font-size:clamp(14px,2vw,20px); font-weight:600; text-align:center;
  z-index:2;
}

/* ── Progress bar ─────────────────────────────────────────── */
.carrusel-progress {
  position:absolute; bottom:0; left:0; right:0; height:4px;
  background:rgba(255,255,255,.25); z-index:10;
}
.carrusel-progress-bar {
  height:100%; width:0; background:var(--azul-m);
  border-radius:0 2px 2px 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.carrusel-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,.85); border:none; cursor:pointer;
  width:44px; height:44px; border-radius:50%; font-size:18px;
  color:var(--azul); display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 10px rgba(0,0,0,.2); transition:background var(--t), transform var(--t);
  z-index:5;
}
.carrusel-btn:hover { background:#fff; transform:translateY(-50%) scale(1.1); }
.carrusel-prev { left:14px; }
.carrusel-next { right:14px; }

/* ── Dots ─────────────────────────────────────────────────── */
.carrusel-dots {
  position:absolute; bottom:14px; left:50%; transform:translateX(-50%);
  display:flex; gap:8px; z-index:5;
}
.carrusel-dot {
  width:10px; height:10px; border-radius:50%; border:2px solid #fff;
  background:transparent; cursor:pointer; transition:background var(--t), transform var(--t);
}
.carrusel-dot.active { background:#fff; transform:scale(1.2); }

/* ── Thumbnails ───────────────────────────────────────────── */
.carrusel-thumbs {
  display:flex; justify-content:center; gap:10px; margin-top:16px;
  overflow-x:auto; padding:4px 0; scrollbar-width:thin;
}
.carrusel-thumb {
  flex:0 0 80px; height:56px; border-radius:8px; overflow:hidden;
  cursor:pointer; opacity:.55; border:2px solid transparent;
  transition:opacity var(--t), border-color var(--t), transform var(--t);
}
.carrusel-thumb:hover { opacity:.85; transform:translateY(-2px); }
.carrusel-thumb.active { opacity:1; border-color:var(--azul-m); }
.carrusel-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

/* ═══════════════════════════════════════════════════════════════
   NOTICIAS Y EVENTOS
   ═══════════════════════════════════════════════════════════════ */
.container-event { width:100%; margin:80px 0 60px; }

.eventos {
  width:100%; min-height:260px; display:flex; align-items:center; justify-content:center;
  background:url("imagenes/eventos-imagen-representativa.png") center/cover no-repeat;
  position:relative;
}
.eventos::after {
  content:""; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(0,32,72,.82) 0%,rgba(0,90,170,.62) 100%);
}
.content-present {
  position:relative; z-index:2; text-align:center; padding:48px 20px; color:#fff; max-width:580px;
}
.h2-event { font-size:clamp(22px,4vw,40px); margin-bottom:12px; color:#fff; }
.content-present p { font-size:.97rem; opacity:.9; }

.content-event-and-news { width:90%; max-width:1200px; margin:50px auto 0; }

/* Cards eventos — diseño nuevo, sin position:absolute roto */
.container-card-event {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(290px,1fr));
  gap:28px;
}
.card-small {
  background:#fff; border-radius:16px; overflow:hidden;
  box-shadow:var(--sombra-s); display:flex; flex-direction:column;
  transition:transform var(--t), box-shadow var(--t);
}
.card-small:hover { transform:translateY(-6px); box-shadow:var(--sombra-m); }

.card-img-wrap { position:relative; overflow:hidden; flex-shrink:0; }
.event-img-content {
  width:100%; height:200px; object-fit:cover; display:block;
  transition:transform .5s ease;
}
.card-small:hover .event-img-content { transform:scale(1.06); }

.card-badge {
  position:absolute; top:12px; left:12px;
  background:var(--azul); color:#fff; padding:4px 12px;
  border-radius:20px; font-size:10.5px; font-weight:600;
  letter-spacing:.5px; text-transform:uppercase;
}
.card-badge--proximos { background:#d47000; }
.card-badge--noticia  { background:#007ab6; }
.card-badge--sioci    { background:#6c3483; }
.card-badge--comunicados { background:#c0392b; }

.card-body { padding:14px 16px 8px; flex:1; }
.name-event { font-size:14.5px; color:var(--azul); font-weight:600; line-height:1.4; margin-bottom:8px; }
.date-event { font-size:12.5px; color:var(--gris); font-weight:400; display:flex; align-items:center; gap:6px; }
.desc-event { display:none; }

/* Botón evento — flujo normal, no absolute */
.about-it-event {
  display:flex; align-items:center; justify-content:center; gap:7px;
  margin:12px 14px 14px; padding:10px; width:calc(100% - 28px);
  background:var(--azul); color:#fff; border:2px solid var(--azul);
  border-radius:8px; font-size:13px; font-family:"Pilar",sans-serif;
  cursor:pointer; transition:all var(--t); flex-shrink:0;
  position:relative; overflow:hidden;
}
.about-it-event:hover { background:transparent; color:var(--azul); }

/* ═══════════════════════════════════════════════════════════════
   MODALES — unificado, centrado, bonito
   ═══════════════════════════════════════════════════════════════ */
.modal {
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,.65); backdrop-filter:blur(6px);
  z-index:800; justify-content:center; align-items:center;
  padding:16px; animation:fadeInModal .28s ease;
}
@keyframes fadeInModal { from{opacity:0} to{opacity:1} }
@keyframes slideUpModal { from{transform:translateY(28px);opacity:0} to{transform:translateY(0);opacity:1} }

/* Modal de evento */
.modal-content {
  background:#fff; border-radius:20px; overflow:hidden;
  width:100%; max-width:620px; max-height:88dvh;
  display:flex; flex-direction:column;
  animation:slideUpModal .32s ease; box-shadow:0 30px 80px rgba(0,0,0,.35);
  position:relative;
}
.modal-content>img {
  width:100%; height:240px; object-fit:cover; display:block; flex-shrink:0;
}
.modal-body-text { padding:22px 26px 26px; overflow-y:auto; }
.modal-body-text h3 { font-size:1.2rem; color:var(--azul); margin-bottom:12px; line-height:1.4; }
.modal-body-text p  { font-size:.93rem; color:#444; line-height:1.7; }

/* Botón cerrar unificado */
.modal-close-btn {
  position:absolute; top:12px; right:12px;
  width:36px; height:36px; border-radius:50%;
  background:rgba(0,0,0,.25); border:none; color:#fff;
  font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background var(--t), transform var(--t); z-index:10; line-height:1;
}
.modal-close-btn:hover { background:rgba(0,0,0,.55); transform:rotate(90deg); }

/* Modales de recursos: botón cerrar con estilo diferente */
.modal-box .modal-close-btn {
  position:static; background:transparent; color:var(--azul);
  border:1.5px solid #ddd; border-radius:6px; width:32px; height:32px;
}
.modal-box .modal-close-btn:hover { background:var(--azul); color:#fff; border-color:var(--azul); transform:none; }

/* Modal recursos */
.modal-box {
  background:#fff; border-radius:20px; width:100%; max-width:500px;
  max-height:88dvh; overflow-y:auto;
  animation:slideUpModal .32s ease; box-shadow:0 30px 80px rgba(0,0,0,.35);
}
.modal-box-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px 16px; border-bottom:2px solid var(--gris-f);
  position:sticky; top:0; background:#fff; z-index:2;
}
.modal-box-header h3 {
  color:var(--azul); font-size:1.1rem;
  display:flex; align-items:center; gap:9px;
}
.modal-box-header h3 i { color:var(--azul-m); }

.lista-modal { list-style:none; padding:14px 20px 22px; display:flex; flex-direction:column; gap:8px; }
.lista-modal li a.a-recur {
  display:flex; align-items:center; gap:12px;
  padding:13px 16px; background:var(--gris-f); border-radius:10px;
  color:var(--azul); font-size:14px; text-decoration:none;
  transition:all var(--t);
}
.lista-modal li a.a-recur:hover { background:var(--azul); color:#fff; transform:translateX(4px); }
.lista-modal li a.a-recur i { font-size:12px; flex-shrink:0; }

/* Coming soon */
.coming-soon-body { padding:36px 22px; text-align:center; }
.coming-soon-icon {
  font-size:50px; color:var(--azul-m); display:block;
  margin-bottom:16px; animation:pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
.coming-soon-body p { font-size:.95rem; color:var(--gris); line-height:1.7; }

/* ═══════════════════════════════════════════════════════════════
   RECURSOS DIGITALES
   ═══════════════════════════════════════════════════════════════ */
.recursos-container { width:100%; padding:80px 24px; background:var(--gris-f); margin-top:60px; }
.titulo-recursos { font-size:clamp(22px,3.5vw,38px); color:var(--azul); text-align:center; }
.sub-recursos {
  font-size:1rem; color:var(--gris); text-align:center;
  max-width:580px; margin:0 auto 48px; line-height:1.6;
}
.recursos-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:26px; max-width:1100px; margin:0 auto;
}
.recurso-card {
  background:#fff; padding:34px 26px 26px; border-radius:var(--r-lg);
  box-shadow:var(--sombra-s); transition:transform var(--t), box-shadow var(--t); text-align:center;
}
.recurso-card:hover { transform:translateY(-8px); box-shadow:var(--sombra-m); }
.recurso-icon-wrap {
  width:70px; height:70px; border-radius:50%; margin:0 auto 18px;
  background:linear-gradient(135deg,var(--azul),var(--azul-m));
  display:flex; align-items:center; justify-content:center;
}
.recurso-icon { font-size:28px; color:#fff; }
.recurso-card h3 { color:var(--azul); font-size:1.1rem; margin-bottom:10px; }
.recurso-card p  { color:var(--gris); font-size:.92rem; line-height:1.6; margin-bottom:20px; text-align:center; }
.btn-recursos {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--azul); color:#fff; padding:10px 20px;
  border-radius:8px; font-size:13.5px; border:2px solid var(--azul);
  cursor:pointer; transition:all var(--t);
  font-family:"Pilar",sans-serif; position:relative; overflow:hidden;
}
.btn-recursos:hover { background:transparent; color:var(--azul); }
@keyframes rippleAnim { to { transform:scale(3); opacity:0; } }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
footer { display:block; width:100%; }
.container-footer {
  width:100%; display:flex; justify-content:space-evenly; align-items:center;
  flex-wrap:wrap; gap:20px;
  background:url("imagenes/evento-pilarista-dia-del-ingles.jpg") center/cover no-repeat;
  position:relative; padding:60px 20px;
}
.special-creator{
  color: rgba(255, 255, 0, 0.733);
}
.opaco-ft { position:absolute; inset:0; background:rgba(0,0,0,.76); z-index:0; }
.logo-footer {
  width:150px; height:150px; object-fit:cover; border-radius:50%;
  background:#fff; border:4px solid rgba(255,255,255,.3);
  position:relative; z-index:2;
  animation:floatLogo 5s ease-in-out infinite;
}
@keyframes floatLogo { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-11px)} }
.contacto { position:relative; z-index:2; color:#fff; display:flex; flex-direction:column; gap:14px; }
.contacto h3 { color:var(--azul-c); font-size:1.25rem; margin-bottom:6px; }
.content-icon-and-info { display:flex; align-items:center; gap:12px; }
.img-info-ft { width:30px; height:30px; object-fit:contain; }
.contacto p { font-size:14.5px; color:rgba(255,255,255,.85); }
.colaboradores { position:relative; z-index:2; color:#fff; display:flex; flex-direction:column; gap:10px; }
.h3-c { color:var(--azul-c); font-size:1.25rem; margin-bottom:6px; }
.c-name { padding-left:18px; display:flex; flex-direction:column; gap:8px; }
.c-name li { font-size:14.5px; color:rgba(255,255,255,.85); list-style:circle; }
.copy-r { background:var(--azul-osc); text-align:center; padding:20px; color:rgba(255,255,255,.7); font-size:13px; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════════════════════════ */

/* ── 1024px ───────────────────────────────────────────────────── */
@media (max-width:1024px) {
  .menu { display:flex; }
  .nav-nombre { display:none; }

  /* Full-Screen Overlay */
  .opciones {
    position:fixed; inset:0;
    width:100vw; height:100dvh;
    background:linear-gradient(160deg,#001a36 0%,#002b55 40%,#004d99 100%);
    flex-direction:column; align-items:center; justify-content:center;
    padding:80px 24px 40px; gap:6px;
    z-index:250; overflow-y:auto;
    opacity:0; visibility:hidden;
    transition:opacity .4s ease, visibility .4s ease;
  }
  .opciones.nav-open {
    opacity:1; visibility:visible;
  }
  .opciones li {
    width:100%; max-width:340px;
    opacity:0;
    transform:translateY(24px) scale(.96);
    transition:opacity .4s ease, transform .4s cubic-bezier(.4,0,.15,1);
  }
  .opciones.nav-open li {
    opacity:1;
    transform:translateY(0) scale(1);
  }
  /* Stagger animation delays */
  .opciones.nav-open li:nth-child(1) { transition-delay:.06s; }
  .opciones.nav-open li:nth-child(2) { transition-delay:.12s; }
  .opciones.nav-open li:nth-child(3) { transition-delay:.18s; }
  .opciones.nav-open li:nth-child(4) { transition-delay:.24s; }
  .opciones.nav-open li:nth-child(5) { transition-delay:.30s; }

  .link-opciones {
    font-size:20px; font-weight:600; padding:16px 20px; border-radius:12px;
    display:block; text-align:center; letter-spacing:.3px;
    border-bottom:none; background:rgba(255,255,255,.04);
    transition:background .25s ease, transform .2s ease;
  }
  .link-opciones:hover,
  .link-opciones:active {
    background:rgba(255,255,255,.1);
    transform:scale(1.02);
  }
  .link-opcionesd::after { content:" ▾"; font-size:12px; margin-left:4px; }

  /* Submenús móvil: colapsables */
  .hidden-options {
    position:static; visibility:visible; transform:none;
    background:rgba(0,0,0,.2); border-radius:10px;
    margin:4px auto 6px; box-shadow:none;
    max-width:300px;
    max-height:0; overflow:hidden; opacity:0;
    transition:max-height .35s cubic-bezier(.4,0,.2,1), opacity .3s ease, margin .3s ease;
  }
  .li-d.open > .hidden-options {
    max-height:400px; opacity:1;
    margin:4px auto 8px;
  }
  .li-d:hover>.hidden-options { opacity:1; }
  .li-desplegable { border-bottom:none; }
  .link-desplegable {
    font-size:15px; font-weight:500; padding:12px 16px;
    transition:background .2s ease;
  }
  .link-desplegable:active {
    background:rgba(255,255,255,.1);
  }

  /* Header */
  .header { flex-direction:column; min-height:auto; }
  .container1-header { width:100%; min-height:440px; }
  .container2-header { display:none; }

  /* Main */
  .text-main { padding:20px 22px; width:100%; max-width:100%; }
  .stats-row { grid-template-columns:repeat(2,1fr); }
  .stat-item:nth-child(2) { border-right:none; }
  .box-important { gap:30px; padding:20px 16px 60px; }

  /* Plan */
  .plan-de-estudios { margin:40px 14px; padding:34px 22px; }

  /* Comunidad */
  .carrusel-section { width:100%; padding:0 14px; }

  /* Tablets: content-important height */
  .content-important-main { height:420px; width:280px; }
}
@media(max-width:1024px) and (min-width:481px){
  .box-important { gap:30px 40px; }
}

/* ── 768px ───────────────────────────────────────────────────── */
@media (max-width:768px) {
  .nav { padding:0 14px; height:64px; }
  .logo { width:46px; height:46px; }

  .container1-header { min-height:380px; }
  .content-principal { width:90vw; }

  h1 { font-size:clamp(19px,5vw,26px); }

  .lema-banner { padding:16px 18px; gap:10px; }

  .cards { padding:0 14px; gap:18px; margin-bottom:50px; }
  .card  { padding:22px 18px; }

  .categoria-content { grid-template-columns:repeat(2,1fr); gap:14px; }
  .img-category { height:120px; }

  .entes { gap:12px; }
  .image-container { width:130px; }
  .image-entes { width:88px; height:88px; }

  .container-event { margin:50px 0 36px; }
  .content-event-and-news { width:96%; }
  .container-card-event { grid-template-columns:1fr; max-width:400px; margin:0 auto; }

  .modal-content>img { height:180px; }
  .modal-body-text { padding:18px 20px; }
  .modal-box { max-width:94vw; }

  .container-footer { padding:40px 16px; justify-content:center; gap:28px; }
  .logo-footer { width:120px; height:120px; }

  /* Mejoras */
  .recursos-container { padding:50px 16px; }
  .institucional { padding:50px 16px 40px; }
  .plan-de-estudios { margin:24px 10px; padding:24px 16px; }
  .content-important-main { height:380px; width:260px; }
  .h3-important { font-size:16px; }
  .p-present { font-size:13px; }
  .dark-toggle { width:36px; height:36px; font-size:14px; }
  .copy-r { padding:14px 16px; font-size:13px; text-align:center; }
}

/* ── 480px ───────────────────────────────────────────────────── */
@media (max-width:480px) {
  .nav { padding:0 10px; height:60px; }
  .logo { width:38px; height:38px; border-width:1.5px; }
  .nav-actions { gap:6px; }
  .register-user { width:34px; height:34px; }
  .register-user img { width:18px; height:18px; }
  .dark-toggle { width:34px; height:34px; font-size:14px; }
  .menu { width:38px; height:38px; border-radius:8px; gap:5px; }
  .hamburger-line { width:20px; height:2px; }

  .container1-header { min-height:340px; }
  .content-principal { width:93vw; padding:18px 16px; border-radius:14px; }
  .div-interactive p  { font-size:30px; }
  .interactive-text   { font-size:28px; }

  .lema-banner { padding:14px; }
  .lema-icon   { display:none; }

  .stats-row { grid-template-columns:repeat(2,1fr); margin-bottom:50px; }
  .stat-item { padding:20px 12px; }
  .stat-num  { font-size:30px; }
  .stat-label { font-size:11px; }

  .box-important { gap:22px; padding:16px 10px 60px; }
  .content-important-main { width:88vw; max-width:330px; height:360px; }

  .institucional { clip-path:polygon(0 0,100% 0,100% 90%,0 100%); padding:60px 14px 50px; }
  .cards { grid-template-columns:1fr; padding:0 10px; margin-bottom:36px; }

  .categoria-content { grid-template-columns:repeat(2,1fr); gap:10px; }

  .container-card-event { grid-template-columns:1fr; }
  .recursos-grid { grid-template-columns:1fr; }

  .modal { padding:8px; }
  .modal-content { max-width:98vw; }
  .modal-content>img { height:140px; }
  .modal-body-text { padding:14px; }

  .container-footer { padding:32px 12px; }
  .copy-r { padding:16px 12px; font-size:12px; }

  .scroll-top-btn { width:44px; height:44px; right:14px; bottom:18px; }

  /* Section headers */
  .section-header h2 { font-size:clamp(18px,5vw,28px); }
  .section-divider { width:40px; }

  /* Login modal */
  .modal-login-box { max-width:96vw; border-radius:16px; }
  .modal-login-header { padding:22px 18px 16px; border-radius:16px 16px 0 0; }
  .modal-login-icon { width:54px; height:54px; font-size:24px; margin-bottom:10px; }
  .modal-login-header h3 { font-size:1.15rem; }
  .modal-login-body { padding:20px 18px 24px; }
  .login-campo input { padding:10px 12px; font-size:.9rem; }
  .btn-login-submit { padding:11px; font-size:.9rem; }

  /* Countdown */
  .countdown-banner { padding:12px 10px; }
  .countdown-inner { gap:10px; }
  .countdown-label { font-size:11px; gap:4px; }
  .countdown-label i { font-size:14px; }
  .clock-unit { padding:5px 7px; min-width:40px; border-radius:8px; }
  .clock-unit span { font-size:20px; }
  .clock-unit small { font-size:9px; }
  .clock-sep { font-size:18px; margin-bottom:0; }

  /* Botones flotantes */
  .whatsapp-btn.visible { bottom:72px; right:12px; width:44px; height:44px; font-size:22px; }
  .scroll-top-btn { bottom:12px; right:12px; width:40px; height:40px; font-size:16px; }

  /* Touch */
  .image-container { width:110px; }
  .image-entes { width:76px; height:76px; }
}

/* ── 360px ───────────────────────────────────────────────────── */
@media (max-width:360px) {
  .nav { padding:0 8px; }
  .logo { width:36px; height:36px; }
  .div-interactive p { font-size:24px; }
  .interactive-text  { font-size:22px; }
  .content-principal { padding:14px; }
  .image-container   { width:130px; }
  .image-entes       { width:84px; height:84px; }
}

/* ============================================================
   NUEVAS FEATURES: Dark mode · WhatsApp · Countdown · Testimonios
   ============================================================ */

/* ── DARK MODE toggle btn ──────────────────────────────────── */
.dark-toggle {
  width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,.18); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:16px;
  transition:background var(--t), transform var(--t);
}
.dark-toggle:hover { background:rgba(255,255,255,.32); transform:rotate(20deg); }

/* ── DARK MODE global ──────────────────────────────────────── */
body.dark-mode {
  --azul:     #5aaeff;
  --azul-m:   #3b9ede;
  --naranja:  #ffb833;
  background: #0f1117;
  color: #e0e0e0;
}
body.dark-mode .nav          { background: #0a1628; }
body.dark-mode .nav.scrolled { background: #061020; }
body.dark-mode .content-principal,
body.dark-mode .card,
body.dark-mode .plan-de-estudios,
body.dark-mode .recurso-card,
body.dark-mode .card-small   { background: #1a2236; color: #ddd; }
body.dark-mode .card h2,
body.dark-mode .card-icon-top { color: #5aaeff; }
body.dark-mode .card p        { color: #bbb; }
body.dark-mode .box-category  { background: #1a2236; }
body.dark-mode .h3-category   { color: #5aaeff; }
body.dark-mode .stats-row     { background: #12192b; border-color:#2a3a5c; }
body.dark-mode .stat-item     { border-color:#2a3a5c; }
body.dark-mode .stat-num      { color:#5aaeff; }
body.dark-mode .stat-label    { color:#888; }
body.dark-mode .lema-banner   { background:linear-gradient(90deg,#0a1e40,#0d3060); }
body.dark-mode .name-event    { color:#5aaeff; }
body.dark-mode .date-event    { color:#888; }
body.dark-mode .about-it-event { background:#1a4080; border-color:#1a4080; }
body.dark-mode .about-it-event:hover { background:transparent; color:#5aaeff; }
body.dark-mode .recursos-container { background:#12192b; }
body.dark-mode .btn-recursos  { background:#1a4080; border-color:#1a4080; }
body.dark-mode .btn-recursos:hover { background:transparent; color:#5aaeff; }
body.dark-mode .countdown-banner  { background:linear-gradient(90deg,#0a1e40,#0d3060); }
body.dark-mode .copy-r        { background:#060d1a; }
body.dark-mode .div-interactive p { color:#666; }
body.dark-mode .interactive-text  { color:#5aaeff; border-right-color:#5aaeff; }
body.dark-mode .age-school p      { color:#3b9ede; }
body.dark-mode h1                 { color:#5aaeff; }
body.dark-mode .p-p               { color:#bbb; }
body.dark-mode .image-container   { background:#1a2236; }
body.dark-mode .name-ente         { color:#ddd; }
body.dark-mode .modal-content,
body.dark-mode .modal-box         { background:#1a2236; }
body.dark-mode .modal-box-header  { background:#1a2236; border-color:#2a3a5c; }
body.dark-mode .modal-box-header h3 { color:#5aaeff; }
body.dark-mode .lista-modal li a.a-recur { background:#12192b; color:#5aaeff; }
body.dark-mode .lista-modal li a.a-recur:hover { background:#1a4080; color:#fff; }
body.dark-mode .dark-toggle i::before { content:"\f185"; } /* sol cuando está en dark */

/* ── WHATSAPP BTN ──────────────────────────────────────────── */
.whatsapp-btn {
  position:fixed; bottom:88px; right:22px;
  width:52px; height:52px; border-radius:50%;
  background:#25d366; color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:26px; z-index:999;
  box-shadow:0 4px 20px rgba(37,211,102,.45);
  opacity:0; transform:translateY(20px) scale(.8);
  pointer-events:none;
  transition:opacity .4s ease, transform .4s ease, box-shadow var(--t);
}
.whatsapp-btn.visible {
  opacity:1; transform:translateY(0) scale(1);
  pointer-events:auto;
  animation:waPulse 2.5s ease-in-out infinite;
}
.whatsapp-btn:hover {
  transform:translateY(-3px) scale(1.08) !important;
  box-shadow:0 8px 28px rgba(37,211,102,.6);
  animation:none;
}
@keyframes waPulse {
  0%,100%{box-shadow:0 4px 20px rgba(37,211,102,.45)}
  50%{box-shadow:0 4px 28px rgba(37,211,102,.75), 0 0 0 8px rgba(37,211,102,.12)}
}

/* ── COUNTDOWN BANNER ─────────────────────────────────────── */
.countdown-banner {
  width:100%;
  background:linear-gradient(90deg,var(--azul) 0%,var(--azul-m) 100%);
  padding:18px 20px; display:flex; justify-content:center;
}
.countdown-inner {
  display:flex; align-items:center; justify-content:center;
  gap:28px; flex-wrap:wrap; max-width:900px; width:100%;
}
.countdown-label {
  display:flex; align-items:center; gap:10px; color:#fff;
  font-size:clamp(13px,2vw,16px); white-space:nowrap; flex-wrap:wrap;
  justify-content:center;
}
.countdown-label i { color:var(--naranja); font-size:20px; }
.countdown-clocks { display:flex; align-items:center; gap:6px; }
.clock-unit {
  display:flex; flex-direction:column; align-items:center;
  background:rgba(255,255,255,.15); border-radius:10px;
  padding:8px 14px; min-width:56px;
}
.clock-unit span {
  font-size:clamp(22px,4vw,34px); font-weight:900; color:#fff; line-height:1;
  font-variant-numeric:tabular-nums;
}
.clock-unit small { font-size:10px; color:rgba(255,255,255,.7); text-transform:uppercase; margin-top:2px; }
.clock-sep { color:#fff; font-size:28px; font-weight:900; opacity:.6; margin-bottom:14px; }
@media(max-width:600px){
  .countdown-inner { gap:16px; }
  .clock-unit { padding:6px 10px; min-width:46px; }
}

/* ── WHATSAPP BTN ──────────────────────────────────────────── */
.modal-contacto-box {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.35s ease;
}
@keyframes slideUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}
.modal-contacto-header {
  background: linear-gradient(135deg, var(--azul), #1a5276);
  padding: 30px 35px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #fff;
}
.modal-contacto-badge {
  display: inline-block;
  background: rgba(200,168,75,0.25);
  border: 1px solid var(--dorado);
  color: var(--dorado);
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.modal-contacto-header h2 { font-size: 1.4rem; margin-bottom: 6px; }
.modal-contacto-header p { opacity: 0.8; font-size: 0.9rem; }
.modal-contacto-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  margin-left: 15px;
}
.modal-contacto-close:hover { background: rgba(255,255,255,0.3); }
.modal-contacto-body {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0;
}
.contacto-info {
  background: #f4f6f9;
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-radius: 0 0 0 20px;
}
.contacto-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contacto-info-item i {
  color: var(--azul);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.contacto-info-item strong {
  display: block;
  color: var(--azul);
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.contacto-info-item span { color: #555; font-size: 0.88rem; }
.contacto-form {
  padding: 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--azul);
}
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid #ddd;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--texto);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}
.btn-enviar-contacto {
  background: var(--azul);
  color: #fff;
  border: none;
  padding: 13px 30px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  font-family: inherit;
  align-self: flex-start;
}
.btn-enviar-contacto:hover { background: #1a5276; transform: translateY(-2px); }
.btn-enviar-contacto:disabled { background: #aaa; cursor: not-allowed; transform: none; }
.contacto-feedback {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}
.contacto-feedback.exito {
  background: #e8f5e9;
  color: #1a7a3c;
  border: 1px solid #a5d6a7;
}
.contacto-feedback.error {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f1a9a0;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL LOGIN
   ═══════════════════════════════════════════════════════════════ */
.modal-login-box {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUpModal .32s ease;
  overflow: hidden;
}
.modal-login-header {
  background: linear-gradient(135deg, var(--azul), #1a5276);
  padding: 30px 30px 24px;
  text-align: center;
  color: #fff;
  position: relative;
}
.modal-login-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 28px;
  border: 2px solid rgba(255,255,255,.3);
}
.modal-login-header h3 { font-size: 1.3rem; margin-bottom: 4px; }
.modal-login-header p { font-size: .88rem; opacity: .8; }
.modal-login-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.15); color: #fff;
}
.modal-login-close:hover { background: rgba(255,255,255,.3); }

.modal-login-body { padding: 28px 30px 30px; }

.login-form { display: flex; flex-direction: column; gap: 18px; }

.login-campo { display: flex; flex-direction: column; gap: 6px; }
.login-campo label {
  font-size: .85rem; font-weight: 700; color: var(--azul);
  display: flex; align-items: center; gap: 6px;
}
.login-campo label i { font-size: .8rem; opacity: .7; }
.login-campo input {
  border: 1.5px solid #ddd; border-radius: 10px;
  padding: 11px 14px; font-size: .95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s; outline: none;
  background: #fff;
}
.login-campo input:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(0,64,128,.1);
}

.login-password-wrap {
  position: relative; display: flex; align-items: center;
}
.login-password-wrap input { width: 100%; padding-right: 42px; }
.toggle-password {
  position: absolute; right: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--gris); font-size: .9rem; padding: 4px;
  transition: color .2s;
}
.toggle-password:hover { color: var(--azul); }

.login-error {
  padding: 10px 14px; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  background: #fdecea; color: #c0392b;
  border: 1px solid #f1a9a0;
}

.btn-login-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  background: var(--azul); color: #fff; border: none;
  border-radius: 10px; font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: background .3s, transform .2s;
  font-family: inherit;
}
.btn-login-submit:hover { background: var(--azul-osc); transform: translateY(-2px); }
.btn-login-submit:disabled { background: #aaa; cursor: not-allowed; transform: none; }

.login-links { text-align: center; margin-top: 4px; }
.login-link-olvidar {
  font-size: .82rem; color: var(--azul-m);
  text-decoration: none; transition: color .2s;
}
.login-link-olvidar:hover { color: var(--azul); text-decoration: underline; }

#login-gears-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: .35;
}
.modal-login-box { position: relative; overflow: hidden; }
.modal-login-box .modal-login-header,
.modal-login-box .modal-login-body { position: relative; z-index: 1; }

/* Navbar: estado logueado — dropdown */
.user-logged { position: relative; }
.user-avatar-btn {
  background: rgba(255,255,255,.18); border: none; cursor: pointer;
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.user-avatar-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.08); }
.user-avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--azul), var(--azul-osc));
  color: #fff; font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
}

/* Dropdown panel */
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 260px; background: #fff; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .25s, visibility .25s;
  z-index: 100; overflow: hidden; border: 1px solid rgba(0,0,0,.06);
}
.user-logged.open .user-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(0,119,182,.04), rgba(0,119,182,.08));
}
.user-dropdown-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--azul), var(--azul-osc));
  color: #fff; font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,119,182,.3);
}
.user-dropdown-info { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.user-dropdown-name {
  font-size: .92rem; font-weight: 700; color: var(--texto);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.2;
}
.user-dropdown-surname {
  font-size: .82rem; font-weight: 500; color: #555;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.2;
}
.user-dropdown-email {
  font-size: .73rem; color: #888;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}
.user-dropdown-role {
  font-size: .68rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--azul), #005fa3); padding: 3px 10px;
  border-radius: 20px; margin-top: 5px; display: inline-block;
  width: fit-content; letter-spacing: .2px;
}
.user-dropdown-divider {
  height: 1px; background: rgba(0,0,0,.07); margin: 0;
}
.user-dropdown-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 18px; border: none; background: none;
  color: var(--texto); font-size: .85rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.user-dropdown-link i { width: 18px; text-align: center; font-size: .9rem; }
.user-dropdown-link:hover { background: rgba(0,119,182,.06); }
.user-dropdown-logout { color: #dc3545; font-weight: 600; }
.user-dropdown-logout:hover { background: rgba(220,53,69,.06); }

/* Dark mode — login */
body.dark-mode .modal-login-box { background: #1a2236; }
body.dark-mode .modal-login-header { background: linear-gradient(135deg, #0a1e40, #0d3060); }
body.dark-mode .modal-login-body { background: #1a2236; }
body.dark-mode .login-campo input {
  background: #12192b; border-color: #2a3a5c; color: #ddd;
}
body.dark-mode .login-campo input:focus {
  border-color: #5aaeff;
  box-shadow: 0 0 0 3px rgba(90,174,255,.15);
}
body.dark-mode .login-campo label { color: #5aaeff; }
body.dark-mode .login-error { background: #3a1520; color: #f1a9a0; border-color: #5a2030; }
body.dark-mode .user-logged .user-avatar-btn { background: rgba(255,255,255,.12); }
body.dark-mode .user-dropdown { background: #1a2236; border-color: rgba(255,255,255,.06); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
body.dark-mode .user-dropdown-header { background: linear-gradient(135deg, rgba(90,174,255,.06), rgba(90,174,255,.12)); }
body.dark-mode .user-dropdown-name { color: #e0e0e0; }
body.dark-mode .user-dropdown-surname { color: #aab; }
body.dark-mode .user-dropdown-email { color: #8899aa; }
body.dark-mode .user-dropdown-role { color: #fff; background: linear-gradient(135deg, #2563eb, #1a4fa0); }
body.dark-mode .user-dropdown-divider { background: rgba(255,255,255,.08); }
body.dark-mode .user-dropdown-link { color: #ccc; }
body.dark-mode .user-dropdown-link:hover { background: rgba(90,174,255,.08); }
body.dark-mode .user-dropdown-logout { color: #f1a9a0; }
body.dark-mode .user-dropdown-logout:hover { background: rgba(220,53,69,.12); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE EXTRA — BREAKPOINTS ADICIONALES
   ═══════════════════════════════════════════════════════════════ */

/* ── TABLET MENOR (max-width: 800px) ───────────────────────── */
@media(max-width:800px){
  .modal-contacto-body { grid-template-columns:1fr; }
  .contacto-info { border-radius:0 0 20px 20px; }
  .form-row { grid-template-columns:1fr; }
  .modal-contacto-box { max-width:94vw; max-height:85vh; }
}

/* ── MÓVIL (max-width: 600px) ──────────────────────────────── */
@media(max-width:600px){
  .header { min-height:auto; }
  .container1-header { min-height:420px; background-position:center 30%; }
  .content-principal { width:min(92vw,340px); padding:20px 18px 16px; border-radius:16px; box-shadow:0 12px 40px rgba(0,0,0,.35); }
  .div-interactive p { font-size:28px; }
  .interactive-text { font-size:26px; }
  .age-school p { font-size:14px; }
  .contact-button { padding:10px 18px; font-size:14px; }

  .countdown-clocks { gap:4px; }
  .clock-sep { margin-bottom:0; font-size:22px; }
  .clock-unit { padding:6px 8px; min-width:44px; border-radius:8px; }
  .countdown-label { font-size:12px; gap:6px; }
  .countdown-label i { font-size:16px; }
  .countdown-banner { padding:14px 12px; }

  .box-important { gap:20px; padding:16px 12px 50px; flex-direction:column; align-items:center; }
  .content-important-main { width:min(88vw,320px); height:340px; }
  .h3-important { font-size:15px; top:80px; }
  .p-present { font-size:13px; }
  .number-box { width:56px; height:56px; top:12px; left:12px; }
  .number-box i { font-size:1.4rem !important; }

  .carrusel-section { padding:0 10px; }
  .carrusel-caption { font-size:14px; padding:30px 16px 14px; }
  .grupo-titulo { font-size:.95rem; padding:6px 0 10px; margin-bottom:18px; }
  .entes { gap:10px; }
  .image-container { width:100px; padding:12px 8px; border-radius:12px; }
  .image-entes { width:70px; height:70px; border-width:2px; }
  .name-ente { font-size:12px; margin-bottom:4px; }
  .name-ente-pie { font-size:10px; padding:2px 10px; }

  .container-event { margin:40px 0 30px; }
  .eventos { min-height:200px; }
  .content-present { padding:32px 16px; }
  .h2-event { font-size:24px; margin-bottom:8px; }
  .content-event-and-news { width:94%; margin-top:30px; }
  .container-card-event { grid-template-columns:1fr; gap:18px; max-width:380px; margin:0 auto; }
  .card-small { border-radius:14px; }
  .event-img-content { height:170px; }
  .card-body { padding:12px 14px 6px; }
  .about-it-event { margin:10px 12px 12px; padding:9px; font-size:12.5px; }

  .institucional { clip-path:polygon(0 0,100% 0,100% 92%,0 100%); padding:50px 14px 44px; margin-top:20px; }
  .institucional h2 { font-size:26px; }
  .cards { grid-template-columns:1fr; gap:16px; padding:0 12px; margin:-40px auto 40px; }
  .card { padding:22px 18px 20px; border-radius:16px; }
  .card h2 { font-size:1.2rem; }
  .card p { font-size:.9rem; line-height:1.6; }

  .plan-de-estudios { margin:20px 10px; padding:22px 16px; border-radius:16px; }
  .h2-pde { font-size:22px; }
  .plan-de-estudios p { font-size:.9rem; }
  .categoria-content { grid-template-columns:repeat(2,1fr); gap:10px; }
  .box-category { border-radius:12px; }
  .img-category { height:110px; }
  .h3-category { font-size:.88rem; padding:10px 6px; }

  .recursos-container { padding:40px 14px; }
  .titulo-recursos { font-size:22px; }
  .sub-recursos { font-size:.9rem; margin-bottom:32px; }
  .recursos-grid { grid-template-columns:1fr; gap:16px; }
  .recurso-card { padding:26px 18px 22px; border-radius:16px; }
  .recurso-icon-wrap { width:58px; height:58px; }
  .recurso-icon { font-size:24px; }

  .container-footer { flex-direction:column; align-items:center; text-align:center; padding:36px 16px; gap:24px; }
  .logo-footer { width:110px; height:110px; border-width:3px; }
  .contacto { align-items:center; gap:10px; }
  .contacto h3 { font-size:1.1rem; }
  .content-icon-and-info { justify-content:center; }
  .contacto p { font-size:13px; }
  .colaboradores { align-items:center; }
  .h3-c { font-size:1.1rem; }
  .c-name li { font-size:13px; }
  .copy-r { padding:16px 12px; font-size:12px; }

  .modal { padding:8px; }
  .modal-content { max-width:98vw; border-radius:16px; }
  .modal-content > img { height:160px; }
  .modal-body-text { padding:16px 14px; }
  .modal-body-text h3 { font-size:1.05rem; }
  .modal-body-text p { font-size:.88rem; }
  .modal-box { max-width:96vw; border-radius:16px; }
  .modal-box-header { padding:16px 18px 12px; }
  .lista-modal { padding:10px 14px 18px; }
  .lista-modal li a.a-recur { padding:11px 12px; font-size:13px; }

  .carrusel-section { margin:40px auto; }
  .carrusel { border-radius:14px; }
  .carrusel-track { padding-bottom:65%; }
  .carrusel-btn { width:36px; height:36px; font-size:14px; }
  .carrusel-prev { left:8px; }
  .carrusel-next { right:8px; }
  .carrusel-dot { width:8px; height:8px; }
  .carrusel-thumb { flex:0 0 60px; height:42px; }
  .carrusel-thumbs { gap:6px; }
}

/* ── TOUCH: sin hover en móvil ─────────────────────────────── */
@media(hover:none) and (pointer:coarse){
  .card:hover, .recurso-card:hover, .box-category:hover,
  .content-important-main:hover {
    transform:none; box-shadow:var(--sombra-s);
  }
  .about-it-event:hover { background:var(--azul); color:#fff; }
  .btn-recursos:hover { background:var(--azul); color:#fff; }
}

/* ── SAFE AREA (notch phones) ──────────────────────────────── */
@supports(padding:max(0px)){
  .nav { padding-left:max(10px, env(safe-area-inset-left)); padding-right:max(10px, env(safe-area-inset-right)); }
  .copy-r { padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

/* ── FOOTER LEGAL ─────────────────────────────────────────── */
.legal-footer {
  text-align: center; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.15);
  font-size: .8rem; position: relative; z-index: 2;
  background: var(--azul-osc);
}
.legal-footer a {
  color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; font-weight: 500;
}
.legal-footer a:hover { color: #fff; text-decoration: underline; }
.legal-sep { margin: 0 10px; opacity: .35; color: rgba(255,255,255,.4); }
body.dark-mode .legal-footer a { color: rgba(200,215,240,.65); }
body.dark-mode .legal-footer a:hover { color: #c8d7f0; }
