:root{
  --morado:#3f2a56;
  --dorado:#d7b44a;
  --fondo:#fbfaf7;
  --texto:#141218;
  --muted:#5f5a67;
  --borde: rgba(20,18,24,.12);
  --card:#ffffff;
  --radius:18px;
  --shadow: 0 18px 45px rgba(20,18,24,.10);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(215,180,74,.18), transparent 60%),
    radial-gradient(900px 420px at 90% 10%, rgba(63,42,86,.16), transparent 60%),
    var(--fondo);
  color:var(--texto);
}

a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
.container{width:min(1120px, 92%); margin:auto}

/* =========================
   HEADER / NAV
========================= */
header{
  position:sticky; top:0; z-index:50;
  background: rgba(251,250,247,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--borde);
}

.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0;
  gap:12px;
}

.brand{
  display:flex; align-items:center; gap:12px;
  min-width: 260px;
}
.brand img{
  width:42px; height:42px;
  border-radius:14px;
  object-fit:cover;
}
.brand .t{display:flex; flex-direction:column; line-height:1.1;}
.brand .t b{letter-spacing:.2px}
.brand .t span{font-size:13px; color:var(--muted)}

.navlinks{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}

/* Botón base */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--borde);
  background:#fff;
  cursor:pointer;
  transition:.18s ease;
  font-weight:700;
}
.btn:hover{transform: translateY(-1px)}
.btn.primary{
  background: linear-gradient(135deg, var(--morado), #2e1f40);
  color:#fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(63,42,86,.18);
}
.btn.gold{
  background: linear-gradient(135deg, var(--dorado), #b88f23);
  border-color: transparent;
  color:#2a1d00;
  font-weight:900;
}

/* Chip */
.chip{
  display:inline-flex; gap:8px; align-items:center;
  padding:8px 10px;
  border:1px solid var(--borde);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
  font-size:13px;
}

/* Card */
.card{
  background: var(--card);
  border:1px solid var(--borde);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Hamburguesa */
.menu-btn{
  display:none;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid var(--borde);
  background:#fff;
  cursor:pointer;
  transition:.18s ease;
  font-size:20px;
  line-height:1;
}
.menu-btn:hover{transform: translateY(-1px)}

/* =========================
   DROPDOWNS (index)
========================= */
.dropdown{ position:relative; }
.dropbtn .caret{ font-size:12px; opacity:.8; }

.dropdown-menu{
  position:absolute;
  top:48px;
  left:0;
  min-width: 360px;
  max-width: 440px;
  background:#fff;
  border:1px solid var(--borde);
  border-radius:16px;
  padding:8px;
  box-shadow: var(--shadow);
  display:none;
  z-index:100;
}

/* Desktop: hover abre dropdown */
.dropdown:hover .dropdown-menu{ display:block; }

.dropdown-menu a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
}
.dropdown-menu a:hover{ background: rgba(63,42,86,.08); }

.dd-title{ display:block; font-weight:900; }
.dd-meta{ display:block; margin-top:4px; color:var(--muted); font-size:12px; }

.dd-loading, .dd-empty{
  padding:10px 12px;
  color:var(--muted);
  font-size:13px;
}

/* =========================
   HERO / INDEX
========================= */
.hero-banner{
  margin: 18px 0 10px;
  min-height: 420px;
  border-radius: var(--radius);
  overflow:hidden;

  /* SIN oscurecer: casi transparente */
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.02)),
    url("/uia/assets/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.banner-actions{
  margin: 0 0 18px;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
}

.actions-right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.hero{
  padding:22px 0 18px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  align-items:stretch;
}

.hero .left{padding:22px}
.hero h1{
  margin:10px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing:-.7px;
}
.hero p{margin:0 0 14px; color:var(--muted); line-height:1.55}
.hero .cta{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.hero .right{padding:18px; display:flex; flex-direction:column; gap:12px}

.mini{
  padding:14px;
  border-radius: 16px;
  border:1px solid var(--borde);
  background: linear-gradient(180deg, rgba(215,180,74,.12), rgba(255,255,255,.9));
}
.mini b{display:block; margin-bottom:6px}
.mini small{color:var(--muted)}

.section{padding:18px 0 42px}
.section h2{margin:0 0 10px}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}

.tile{
  padding:16px;
  border-radius: var(--radius);
  border:1px solid var(--borde);
  background:#fff;
  transition:.18s ease;
}
.tile:hover{transform: translateY(-2px)}

.tile .top{
  display:flex; justify-content:space-between; gap:10px; align-items:flex-start;
}
.badge{
  background: rgba(63,42,86,.08);
  border:1px solid rgba(63,42,86,.16);
  color: var(--morado);
  font-weight:800;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
}
.badge.gold{
  background: rgba(215,180,74,.16);
  border:1px solid rgba(215,180,74,.28);
  color:#6b4e00;
}

.tile h3{margin:10px 0 6px; font-size:18px}
.tile p{margin:0; color:var(--muted); line-height:1.5; font-size:14px}

/* =========================
   UTILIDADES
========================= */
hr.sep{border:none; border-top:1px solid var(--borde); margin:18px 0}
.footer{
  border-top:1px solid var(--borde);
  padding:22px 0 40px;
  color:var(--muted);
  font-size:14px;
}
.muted{color:var(--muted)}
.p{color:var(--muted); line-height:1.6; margin:0}
.list{
  margin:0;
  padding-left: 18px;
  color:var(--muted);
  line-height:1.6;
}
.sub{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

/* =========================
   PÁGINA PROGRAMA
========================= */
.page{
  margin:18px 0 40px;
  padding:18px;
}

.crumbs{
  color:var(--muted);
  font-size:13px;
  margin-bottom:10px;
}

.program-img{
  width: 100%;
  height: clamp(190px, 22vw, 260px);   /* ✅ más UX, no ocupa media página */
  border-radius: 16px;
  border: 1px solid var(--borde);
  object-fit: cover;
  object-position: center 35%;         /* ✅ evita cortar caras */
  display: block;
  margin-bottom: 12px;
  background: #f5f5f5;
}

.page h1{
  margin: 0 0 8px;
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: -0.6px;
}

.page h2{
  margin: 10px 0 10px;
  letter-spacing: -0.2px;
}

/* Info grid (más pro: menos saturado) */
.info-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top: 10px;
}

.info-item{
  border:1px solid var(--borde);
  border-radius: 16px;
  padding:12px 12px;
  background: #fff;
}
.info-item b{
  display:block;
  font-size:12px;
  letter-spacing:.3px;
  color: #7a7682;
  text-transform: none;
  margin-bottom:4px;
  font-weight:600;
}
.info-item span{
  display:block;
  font-weight:500; /* <- antes era 800, esto quitó la saturación */
  color: var(--texto);
  line-height:1.35;
}

/* =========================
   TABS PRINCIPALES (pestañas)
========================= */
.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--borde);
  background:#fff;
  cursor:pointer;
  font-weight:900;
  transition:.18s ease;
  text-decoration:none;
}

.tab:hover{ transform: translateY(-1px); }

.tab.active{
  background: linear-gradient(135deg, var(--morado), #2e1f40);
  color:#fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(63,42,86,.18);
}

.tab-gold{
  background: linear-gradient(135deg, var(--dorado), #b88f23);
  border-color: transparent;
  color:#2a1d00;
  font-weight: 950;
}

.tab-panels{ padding-top: 8px; }

.panel{ display:none; }
.panel.show{ display:block; }

/* =========================
   PLAN - TABS POR SEMESTRE
========================= */
.sem-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 12px;
}

.sem-tab{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--borde);
  background:#fff;
  cursor:pointer;
  font-weight:900;
  transition:.18s ease;
}

.sem-tab:hover{ transform: translateY(-1px); }

.sem-tab.active{
  background: rgba(63,42,86,.10);
  border-color: rgba(63,42,86,.25);
  color: var(--morado);
}

.sem-panel{
  padding:14px 16px;
  border-radius: 18px;
  border:1px solid var(--borde);
  box-shadow: var(--shadow);
}

.sem-title{
  font-weight:950;
  margin-bottom:10px;
  color: var(--texto);
  letter-spacing: -.2px;
}

.sem-list{
  margin:0;
  padding-left: 18px;
  color:var(--muted);
  line-height: 1.6;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 920px){
  .brand{min-width:auto}

  .hero{grid-template-columns: 1fr}
  .grid{grid-template-columns: 1fr}

  .hero-banner{ min-height: 260px; }

  .banner-actions{
    flex-direction:column;
    align-items:stretch;
    justify-content:stretch;
  }
  .actions-right{ justify-content:stretch; }
  .actions-right .btn{ width:100%; }

  .nav{position:relative}

  .menu-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .navlinks{
    display:none;
    position:absolute;
    left:0; right:0;
    top:64px;
    background: rgba(251,250,247,.98);
    border:1px solid var(--borde);
    border-radius: 18px;
    padding:12px;
    box-shadow: var(--shadow);
  }

  .navlinks.open{
    display:flex;
    flex-direction:column;
    gap:10px;
    align-items:stretch;
  }

  .navlinks .btn{width:100%}

  /* Dropdown en móvil */
  .dropdown{ width:100%; }

  /* IMPORTANTE: anulamos hover en móvil para que NO se quede abierto */
  .dropdown:hover .dropdown-menu{ display:none; }

  .dropdown-menu{
    position:static;
    display:none;
    min-width:auto;
    max-width:none;
    margin-top:8px;
  }

  /* Solo abre cuando JS agrega .open */
  .dropdown.open .dropdown-menu{ display:block; }

 
  .info-grid{ grid-template-columns: 1fr; }

  /* Tabs full width */
  .tab{ width:100%; }
  .sem-tab{ width:100%; }
}

/* ===== CTA WhatsApp inferior ===== */
.cta-bottom{
  margin-top:18px;
  padding:14px 14px;
  border:1px solid var(--borde);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(37,211,102,.08), rgba(255,255,255,.92));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.cta-left{display:flex; flex-direction:column; gap:4px;}
.cta-kicker{font-weight:900; color:var(--texto);}
.cta-text{color:var(--muted); font-size:14px; line-height:1.45;}

.btn-whatsapp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius: 16px;
  background: #25D366;
  color:#0b2a17;
  font-weight:900;
  border:1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 30px rgba(37,211,102,.22);
  transition: .18s ease;
  white-space: nowrap;
}

.btn-whatsapp:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37,211,102,.28);
}

.wa-ico{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  background: rgba(255,255,255,.55);
}

@media (max-width: 920px){
  .cta-bottom{flex-direction:column; align-items:stretch;}
  .btn-whatsapp{width:100%;}
}

/* ===== Menú Oferta Educativa (Escolarizado/Mixto) ===== */
.dd-section{
  border-radius: 14px;
  overflow:hidden;
}

.dd-section + .dd-section{
  margin-top: 8px;
}

.dd-section-title{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--borde);
  background: rgba(63,42,86,.06);
  font-weight:900;
  cursor:pointer;
}

.dd-section-title:hover{
  background: rgba(63,42,86,.09);
}

.dd-caret{
  font-size:12px;
  opacity:.8;
}

.dd-section-list{
  display:none;
  padding: 6px 2px 2px;
}

.dd-section.open .dd-section-list{
  display:block;
}

.dd-item{
  display:block;
  padding:10px 12px;
  border-radius: 12px;
  font-weight:700;
  color: var(--texto);
}

.dd-item:hover{
  background: rgba(63,42,86,.08);
}

/* ===== FIX Dropdown: que NO se cierre al intentar seleccionar ===== */

/* Un puente invisible entre botón y menú (evita que se pierda el hover) */
.dropdown::after{
  content:"";
  position:absolute;
  left:0;
  top:44px;      /* debajo del botón */
  height:12px;   /* “puente” */
  width:100%;
}

/* Menú más abajo y arriba de todo */
.dropdown-menu{
  top:54px;      /* antes 48px */
  z-index:9999;
}

/* Mantener abierto si estás encima del menú */
.dropdown:hover .dropdown-menu{
  display:block;
}

/* =========================
   AJUSTE DE PESOS TIPOGRÁFICOS
   (menos saturación visual)
========================= */

/* Texto general */
body{
  font-weight: 400;
}

/* Títulos */
h1, h2, h3{
  font-weight: 600;
}

/* Botones */
.btn{
  font-weight: 600;
}

/* Botón principal */
.btn.primary,
.btn.gold{
  font-weight: 700;
}

/* Dropdown títulos */
.dd-title{
  font-weight: 600;
}

/* Tabs */
.tab,
.sem-tab{
  font-weight: 600;
}

/* Tab activa */
.tab.active{
  font-weight: 700;
}

/* Badges */
.badge{
  font-weight: 600;
}

/* Cards de información */
.info-item span{
  font-weight: 500;   /* antes 800 */
}

/* Cards / tiles */
.tile h3{
  font-weight: 600;
}

/* =========================
   NAV: igualar tamaño de botones (a y button)
========================= */
.navlinks .btn,
.navlinks button.btn{
  height: 44px;               /* altura uniforme */
  padding: 0 14px;            /* padding uniforme */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

/* Quitar estilos nativos del button (para que se vea igual que <a>) */
.navlinks button.btn{
  appearance: none;
  -webkit-appearance: none;
  border-radius: 14px;        /* igual que tu .btn */
  font-family: inherit;
  font-size: 14px;
}

/* Ajuste fino del caret para que no “estire” el botón */
.dropbtn .caret{
  margin-left: 6px;
  line-height: 1;
}

.program-img{ height: 210px; object-position: center 35%; }

.program-img{
  width:100%;
  aspect-ratio: 16 / 9 !important;
  max-height: 340px;
  height:auto !important;
  object-fit:cover !important;
  object-position:center 35% !important;
  border-radius:16px;
  border:1px solid var(--borde);
  display:block;
  margin-bottom:12px;
  background:#f5f5f5;
}