/* AVI base styles with Nexus-inspired aesthetic */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #9aa0a6;
  --accent: #ff8a00;
  --card: #0b0b0b;
  --border: #1a1a1a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.has-bg-video { background: transparent; }

/* Video de fondo global */
.bg-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--bgY, 0%); z-index: 0; pointer-events: none; filter: saturate(1.05) contrast(1.05) brightness(.86); transition: filter .35s ease, object-position .12s linear; }
body.bg-soften .bg-video { filter: saturate(1.05) contrast(1.08) brightness(.72) blur(1.2px); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* Layout */
.container { width: min(1200px, 92vw); margin: 0 auto; }
.spacer-xxl { height: 72px; }
.spacer-xl { height: 48px; }
.spacer-lg { height: 32px; }
.spacer-md { height: 24px; }
.spacer-sm { height: 16px; }

/* Header */
.site-header {
  position: sticky;
  top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.6) 60%, rgba(0,0,0,0));
  backdrop-filter: blur(6px);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav {
  display: flex; gap: 18px;
  font-weight: 600;
}
.nav a { opacity: .7; transition: opacity .2s ease; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.pill {
  display:inline-block; padding:6px 10px; border:1px solid var(--border); border-radius:999px; font-size:12px; opacity:.9;
}

/* Hamburger menu */
.hamburger { display:inline-flex; width:40px; height:40px; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:10px; background:#121212; cursor:pointer; margin-left:12px; position: fixed; top: 14px; right: 14px; z-index: 200; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.hamburger span { position:relative; display:block; width:18px; height:2px; background:#fff; }
.hamburger span::before, .hamburger span::after { content:""; position:absolute; left:0; width:18px; height:2px; background:#fff; transition: transform .2s ease, opacity .2s ease; }
.hamburger span::before { top:-6px; }
.hamburger span::after { top:6px; }
.hamburger.is-open span { opacity:0; }
.hamburger.is-open span::before { transform: translateY(6px) rotate(45deg); opacity:1; }
.hamburger.is-open span::after { transform: translateY(-6px) rotate(-45deg); opacity:1; }

.mobile-menu { position: fixed; top:64px; right:14px; width: min(280px, 92vw); max-height: 72vh; overflow:auto; background: rgba(12,12,12,.96); border:1px solid var(--border); border-radius: 14px; display:none; z-index:190; box-shadow: 0 20px 48px rgba(0,0,0,.55); backdrop-filter: blur(8px); }
.mobile-menu.is-open { display:block; }
.mobile-menu .menu-list { list-style:none; margin:0; padding:10px; display:grid; gap:10px; }
.mobile-menu .menu-list a { display:block; padding:12px 14px; border:1px solid var(--border); border-radius:10px; text-align:left; background:#151515; }

/* Hide desktop nav when using hamburger */
.site-header .inner .nav { display:none; }

/* Hero */
.hero { position: relative; padding: 56px 0 8px; }
.hero.container { text-align: center; }
.hero.container .title-xxl, .hero.container .subtitle { margin-left:auto; margin-right:auto; text-align:center; width:100%; }
.hero-vid { position: relative; padding: 0; min-height: clamp(340px, 70vh, 760px); display:grid; align-items:end; }
.hero-vid .vid-wrap { position:absolute; inset:0; overflow:hidden; border-radius: 0 0 18px 18px; }
.hero-vid video { width:100%; height:100%; object-fit: cover; object-position: center top; filter: saturate(1.05) contrast(1.05) brightness(.86); }
.hero-vid::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65) 60%, rgba(0,0,0,.85)); }
.hero-content { position:relative; z-index:1; padding: 36px 0 28px; text-align: center; display:flex; flex-direction:column; align-items:center; }
.hero-content .title-xxl, .hero-content .subtitle { margin-left:auto; margin-right:auto; text-align:center; width:100%; }
.cta-row { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; }
.cta { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px; border:1px solid var(--border); background:#151515; color:var(--fg); transition: transform .15s ease, border-color .2s ease; }
.cta:hover { transform: translateY(-1px); border-color:#262626; }
.eyebrow { color: var(--accent); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 800; }
.title-xxl { font-size: clamp(36px, 6vw, 72px); line-height: 1.02; margin: 10px 0 12px; font-weight: 800; letter-spacing: -0.02em; }
.avi-mark { color: var(--accent); }
.subtitle { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); max-width: 72ch; }
/* Mejor legibilidad sobre video */
.hero .subtitle { color: #eaeaea; text-shadow: 0 1px 2px rgba(0,0,0,.45); }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Nombres de cursos como botones */
.course-names { display:flex; align-items:center; justify-content:center; gap: 18px; flex-wrap: wrap; padding: 20px 0 8px; }
.name-btn { display:inline-flex; align-items:center; justify-content:center; padding:12px 18px; border-radius:999px; border:1px solid var(--border); background: rgba(10,10,10,.55); backdrop-filter: blur(6px); font-weight:800; letter-spacing:.06em; text-transform:uppercase; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.name-btn:hover { transform: translateY(-1px); border-color:#262626; background: rgba(14,14,14,.66); }

/* Panel de curso (glass) */
.course-panel { position:relative; z-index:1; margin: 0 auto; padding: 36px 24px; width:min(1100px, 94vw); min-height: 100vh; display:grid; align-content:center; gap: 20px; border:1px solid var(--border); border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,10,10,.78), rgba(8,8,8,.72)); backdrop-filter: blur(12px); box-shadow: 0 30px 60px rgba(0,0,0,.45); text-align: center; transition: transform .3s ease, box-shadow .3s ease; transform-origin: center; will-change: transform; }
.course-panel:hover { transform: scale(1.2); box-shadow: 0 40px 80px rgba(0,0,0,.55); z-index:2; }
.course-panel .avatar { display:flex; align-items:center; justify-content:center; z-index:1; }
.avatar-video { display:block; width:min(25vw, 360px); max-height:30vh; object-fit:cover; background:#000; border-radius: 14px; box-shadow: 0 20px 40px rgba(0,0,0,.5); transition: transform .25s ease, box-shadow .25s ease; }
.avatar-video.is-zoomed { transform: scale(1.12); box-shadow: 0 30px 64px rgba(0,0,0,.6); }
.course-panel .hdr { display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 8px; margin-bottom: 12px; text-align:center; }
.course-panel .ttl { font-weight:800; letter-spacing:-.01em; font-size: clamp(26px, 4vw, 36px); }
.course-panel .meta { font-size: 12px; color: var(--accent); border:1px solid #2a1705; background:#140a03; padding:6px 10px; border-radius:999px; }
.course-panel .cols { display:block; text-align:center; }
.course-panel .cols > div { margin: 0 auto; max-width: 72ch; }
.course-panel .cols .muted { color: var(--muted); }
.course-panel .kicker { margin: 10px 0 6px; }
/* Centrado y limpieza de listas para mejor visibilidad */
.course-panel .list { list-style: none; padding-left: 0; margin: 8px 0 0; }
.course-panel .list li { margin: 6px 0; }

@media (max-width: 720px) {
  .course-panel .cols { grid-template-columns: 1fr; }
}

/* Flechas de scroll */
.scroll-arrow { position: absolute; left:50%; transform: translateX(-50%); bottom: 20px; z-index: 1; background:none; border:0; padding:6px; cursor:pointer; }
.scroll-arrow svg { display:block; width: 44px; height: 44px; stroke: var(--accent); stroke-width: 2.2; fill:none; opacity:.95; filter: drop-shadow(0 0 10px rgba(255,138,0,.18)); animation: arrowPulse 2s ease-in-out infinite; }
.scroll-arrow svg .line { stroke-linecap: round; }
.scroll-arrow.triple svg .line { animation: lineGlow 1.8s ease-in-out infinite; }
@keyframes lineGlow { 0%,100% { stroke: rgba(255,138,0,.9); } 50% { stroke: rgba(255,138,0,1); } }
.scroll-arrow-lg svg { width: 64px; height: 64px; opacity: .95; }
.scroll-arrow-xl svg { width: 160px; height: 160px; opacity: .99; }
.scroll-arrow-xxl svg { width: 260px; height: 260px; opacity: 1; }
@keyframes arrowPulse { 0%,100% { transform: translateY(0); opacity:.85; } 50% { transform: translateY(6px); opacity:1; } }
.between-panels { display:flex; align-items:center; justify-content:center; padding: 8px 0 4px; }

/* CTA de flecha en héroe */
.scroll-cta-hero { position:absolute; left:50%; top: 60vh; transform: translate(-50%, -50%); text-align:center; }
.scroll-label { margin-top: 6px; color: var(--accent); font-weight:800; letter-spacing:.18em; text-transform:uppercase; }

/* CTA grande "Ver cursos" en héroe */
.view-courses { display:inline-block; background:none; border:0; padding:0; margin: 0 0 20px; color: var(--accent); font-weight: 800; letter-spacing:.02em; cursor:pointer;
  font-size: clamp(28px, 5vw, 56px); text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.view-courses:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Scroll section to permitir recorrer el video completo */
.spacer-scroll { height: 80vh; }

.card {
  position: relative;
  background: linear-gradient(180deg, #0d0d0d, #0a0a0a);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: #262626; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.card-media { aspect-ratio: 16/9; background: #0f0f0f; overflow: hidden; }
.card-media img, .card-media video, .card-media div { width:100%; height:100%; object-fit: cover; transform: scale(1.02); transition: transform .45s ease; }
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.06); }
.card-body { padding: 14px; display:flex; align-items:center; justify-content: space-between; gap: 10px; }
.card-title { font-weight: 700; }
.chip { font-size: 12px; color: var(--accent); border: 1px solid #2a1705; background: #140a03; padding: 6px 10px; border-radius: 999px; }

/* Footer */
.site-footer { position: relative; z-index: 1; color: var(--muted); padding: 48px 0; border-top: 1px solid var(--border); margin-top: 48px; text-align:center; }
.copyright { color: var(--muted); font-size: 12px; }

/* Contenidos – grilla y tarjetas sutiles */
.resource-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap:16px; }
.resource-card { background: linear-gradient(180deg, rgba(13,13,13,.96), rgba(10,10,10,.92)); border:1px solid var(--border); border-radius:12px; padding:12px; text-align:left; box-shadow: 0 12px 26px rgba(0,0,0,.32); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.resource-card:hover { transform: translateY(-2px); border-color:#242424; box-shadow: 0 18px 36px rgba(0,0,0,.45); }
.resource-thumb { position:relative; aspect-ratio: 16/10; min-height: 160px; border-radius:10px; overflow:hidden; background: rgba(10,10,10,.82); border:1px solid var(--border); display:grid; place-items:center; padding: 0; }
.resource-thumb canvas { display:block; width:100%; height:auto; }
.resource-thumb .badge-pdf { position:absolute; left:12px; top:12px; width:56px; height:56px; border-radius:12px; display:grid; place-items:center; font-weight:900; color:#1b0e00; background: linear-gradient(0deg, #ff8a00, #ff6a00); box-shadow: 0 8px 20px rgba(255,138,0,.28); border:2px solid rgba(255,255,255,.65); }
.resource-thumb .thumb-label { position:absolute; right:12px; bottom:10px; color: var(--muted); font-size:12px; text-align:right; background: rgba(0,0,0,.35); padding:4px 8px; border-radius:8px; }
.resource-title { font-weight:700; margin:10px 0 4px; }
.resource-meta { font-size:12px; color:var(--muted); }
.resource-actions { display:flex; gap:10px; margin-top:10px; }
.link { color: var(--accent); font-weight:700; }

/* Footer logo-button (mismo tamaño que hamburguesa) */
.footer-logo { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid var(--border); border-radius:10px; background:#121212; overflow:hidden; box-shadow: 0 6px 18px rgba(0,0,0,.35); margin: 0 auto 10px; }
.footer-logo video { display:block; width:100%; height:100%; object-fit:cover; opacity:0; transition: opacity .25s ease; }
.footer-logo.is-visible video { opacity:1; }

/* Helpers */
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.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; }

/* Simple scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
  .reveal.rise { transform: translateY(22px); }
}

/* Fade-in más marcado para paneles de cursos */
.course-panel.reveal { opacity: 0; transform: translateY(26px) scale(.98); will-change: opacity, transform; }
.course-panel.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.course-panel.reveal.is-visible:hover { transform: translateY(0) scale(1.2); box-shadow: 0 40px 80px rgba(0,0,0,.55); }

/* Modal (Nexus-like, minimal) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.modal { display: none; }
.modal[open] { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: auto; }
.modal[open] .modal-backdrop { opacity: 1; pointer-events: auto; }
.modal-dialog { width:min(980px, 94vw); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #0c0c0c, #0a0a0a); box-shadow: 0 40px 80px rgba(0,0,0,.6); transform: translateY(12px) scale(.98); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.modal[open] .modal-dialog { transform: translateY(0) scale(1); opacity: 1; }
.modal-hd { display:flex; align-items:center; justify-content: space-between; padding: 16px 18px; border-bottom:1px solid var(--border); }
.modal-bd { padding: 18px; display:grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.modal-ft { padding: 16px 18px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap: 10px; }
.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; border:1px solid var(--border); background:#151515; color:var(--fg); cursor:pointer; transition: transform .15s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); border-color:#262626; }
.badge { display:inline-block; font-size:12px; color: var(--accent); border: 1px solid #2a1705; background:#140a03; padding: 4px 10px; border-radius:999px; }
.kicker { color: var(--accent); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 800; }
.divider { height:1px; background: var(--border); }
.list { margin: 8px 0 0; padding-left: 18px; }
.list li { margin: 4px 0; color: var(--muted); }

