:root{
  --bg0:#070a0f;
  --bg1:#0b1320;
  --panel: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);

  /* Nueva paleta (elegante navidad) */
  --emerald:#19c37d;
  --emerald2:#0ea868;
  --gold:#f2c14e;
  --gold2:#e6b13a;
  --danger:#ff5c7a;

  --shadow: 0 20px 60px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(25,195,125,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(242,193,78,.14), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* nieve */
#snow{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.75;
}

/* NAV */
.nav{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 18px;
  backdrop-filter: blur(12px);
  background: rgba(7,10,15,.55);
  border-bottom: 1px solid var(--border);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  text-decoration:none;
  font-weight:850;
  letter-spacing:.2px;
}

.brand-badge{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius:12px;
  color:#06120c;
  font-weight:950;
  background: linear-gradient(135deg, var(--gold), var(--emerald));
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.nav-links{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
}

.nav-links a{
  color: rgba(255,255,255,.78);
  text-decoration:none;
  font-weight:650;
  font-size:13px;
  padding:8px 10px;
  border-radius:10px;
  transition:.15s;
}
.nav-links a:hover{
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.search-pill{
  width:38px; height:38px;
  border-radius:12px;
  display:grid; place-items:center;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  transition:.15s;
}
.search-pill:hover{ transform: translateY(-1px); }

.link-ghost{
  color: rgba(255,255,255,.78);
  text-decoration:none;
  font-weight:750;
  font-size:13px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
}
.link-ghost:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.04);
}

.btn,
.btn-accent{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  font-weight:900;
  font-size:13px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  transition:.15s;
}

.btn{
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.btn-mini{
  padding:8px 11px;
  border-radius:11px;
  border-color: rgba(242,193,78,.25);
  background: rgba(242,193,78,.10);
}

.btn-accent{
  background: linear-gradient(135deg, var(--emerald), var(--gold));
  color:#07130f;
  box-shadow: 0 18px 40px rgba(25,195,125,.18);
}
.btn-accent:hover{ transform: translateY(-1px); }

.live-dot{
  color: var(--danger);
  text-shadow: 0 0 14px rgba(255,92,122,.55);
}

/* HERO */
.hero{
  position:relative;
  z-index:1;
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 18px 80px;
  text-align:center;
}

.hero-tag{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(25,195,125,.25);
  background: rgba(25,195,125,.10);
  color: rgba(255,255,255,.88);
  font-weight:850;
  font-size:13px;
}

.hero-title{
  margin:18px 0 8px;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: .2px;
  font-weight: 950;
  line-height:1.05;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.72));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero-sub{
  margin: 0 auto 24px;
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.hero-sub b{
  color: rgba(255,255,255,.92);
  background: rgba(242,193,78,.12);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(242,193,78,.25);
}

.count-wrap{
  margin: 26px auto 18px;
  max-width: 720px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.count-label{
  font-weight:850;
  font-size:13px;
  color: rgba(255,255,255,.80);
  margin-bottom: 12px;
}

.count{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.count-item{
  position:relative;
  padding: 14px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
}

.count-num{
  font-size: 28px;
  font-weight: 950;
  letter-spacing: .5px;
  color: #fff;
}

.count-text{
  margin-top: 2px;
  font-size: 12px;
  font-weight: 850;
  color: rgba(255,255,255,.70);
}

.count-sep{
  position:absolute;
  right:-6px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(242,193,78,.65);
  box-shadow: 0 0 0 6px rgba(242,193,78,.12);
}
.count-item:last-child .count-sep{ display:none; }

/* FORM */
.lead-form{
  margin: 22px auto 0;
  max-width: 520px;
  display:grid;
  gap:10px;
}

.lead-form input{
  width:100%;
  padding: 14px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(5,10,14,.50);
  color: var(--text);
  outline:none;
  font-weight:700;
}
.lead-form input::placeholder{ color: rgba(255,255,255,.45); }

.lead-form button{
  padding: 14px 14px;
  border-radius: 14px;
  border: none;
  cursor:pointer;
  font-weight: 950;
  letter-spacing:.2px;
  color:#07130f;
  background: linear-gradient(135deg, var(--gold), var(--emerald));
  box-shadow: 0 20px 50px rgba(242,193,78,.14);
  transition:.15s;
}
.lead-form button:hover{ transform: translateY(-1px); }

.form-hint{
  font-size: 12px;
  color: rgba(255,255,255,.60);
}

/* responsive */
@media (max-width: 900px){
  .nav-links{ display:none; }
  .count{ grid-template-columns: repeat(2, 1fr); }
}



/* ====== Cursos preview (index.php) ====== */
.courses-preview{
  padding: 40px 0 70px;
}

.courses-inner{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.courses-head{
  text-align: center;
  margin-bottom: 18px;
}

.courses-head h2{
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: .2px;
}

.courses-head p{
  margin: 0;
  opacity: .8;
  font-size: 13px;
}

.courses-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.course-card{
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 38px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  transition: transform .15s ease, border-color .15s ease;
}

.course-card:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
}

.course-badges{
  display:flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.course-badge{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.course-badge-accent{
  background: rgba(130,200,255,.16);
  border-color: rgba(130,200,255,.30);
}

.course-video{
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,.10);
}

.course-video video{
  width: 100%;
  display: block;
  max-height: 180px;
}

.course-title{
  margin: 12px 0 6px;
  font-size: 15.5px;
  font-weight: 900;
}

.course-desc{
  margin: 0 0 12px;
  font-size: 12.2px;
  opacity: .8;
  line-height: 1.35;
}

.course-cta{
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12.6px;
  color: #0b1220;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .15s ease, filter .15s ease;
}

.course-cta:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}

@media (max-width: 980px){
  .courses-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px){
  .courses-grid{ grid-template-columns: 1fr; }
  .course-video video{ max-height: 220px; }
}

/* ====== FIX: evitar que el video del preview ocupe toda la pantalla ====== */
.courses-preview .course-video{
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.courses-preview .course-video video{
  width: 100% !important;
  height: 180px !important;      /* ?? esto evita que tome 100vh */
  max-height: 180px !important;
  display: block !important;
  object-fit: cover !important;  /* recorta elegante */
  background: #000;
}

@media (max-width: 680px){
  .courses-preview .course-video video{
    height: 220px !important;
    max-height: 220px !important;
  }
}


/* ===== FIX DEFINITIVO: limitar videos del preview (index.php) ===== */
#cursosPreview{
  padding: 36px 0 70px;
}

#cursosPreview .courses-inner{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

#cursosPreview .course-video{
  height: 200px !important;      /* controla el alto del “cuadro” */
  max-height: 200px !important;
  overflow: hidden !important;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255,255,255,.10);
}

#cursosPreview video.preview-video{
  width: 100% !important;
  height: 100% !important;       /* se adapta al cuadro de 200px */
  max-height: 100% !important;
  display: block !important;
  object-fit: cover !important;  /* recorte elegante */
}

@media (max-width: 680px){
  #cursosPreview .course-video{
    height: 230px !important;
    max-height: 230px !important;
  }
}
