/* =========================================================
   CSMSYS · Academia de Ciberseguridad
   Hoja de estilos principal
   ========================================================= */

/* ---------- 1. VARIABLES / TOKENS ---------- */
:root{
  --bg:            #0A0E1A;
  --bg-alt:        #0D1424;
  --surface:       #121A2B;
  --surface-elev:  #1B2438;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text:          #E9EDF5;
  --text-muted:    #8D97AC;
  --text-faint:    #5C6579;

  --accent:        #F5C62F;
  --accent-dim:    #2AA595;
  --accent-2:      #F6C72F;
  --accent-2-dim:  #C98836;
  --danger:        #FF5C5C;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --max-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-h: 76px;

  --shadow-glow: 0 0 40px rgba(62, 217, 196, 0.15);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. RESET Y BASE ---------- */
*, *::before, *::after{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }
button{ font: inherit; cursor: pointer; }
input, textarea{ font: inherit; }

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container{
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section{ position: relative; }

/* ---------- 3. UTILIDADES ---------- */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 16px;
}

.eyebrow::before{
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.text-accent{
  position: relative;
  display: inline-block;
  line-height: 1;
  color: var(--accent);
}

.text-accent::after{
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: -0.08em;
  height: 0.09em;
  background: var(--accent);
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: draw-underline 0.7s var(--ease) 0.35s forwards;
  pointer-events: none;
}

@keyframes draw-underline{
  to{ transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce){
  .text-accent::after{ animation: none; transform: scaleX(1); }
}

.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-head h2{ font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 14px; }
.section-head p{ color: var(--text-muted); font-size: 1.05rem; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary{ background: var(--accent-2); color: #1a1204; }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px rgba(242, 169, 76, 0.28); }

.btn-ghost{ background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.reveal{ opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ---------- 4. HEADER / NAVEGACIÓN ---------- */
.site-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10, 14, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled{ background: rgba(10, 14, 26, 0.85); border-bottom-color: var(--border); }

.header-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-img{ height: 62px; width: auto; }

.logo-fallback{
  display: none;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.logo-fallback span{ color: var(--accent); }

.main-nav ul{ display: flex; align-items: center; gap: 8px; }

.nav-link{
  position: relative;
  display: inline-block;
  padding: 10px 16px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-link:hover{ color: var(--text); background: var(--surface); }
.nav-link.active{ color: var(--accent); }

.nav-cta{
  margin-left: 8px;
  padding: 10px 20px;
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-cta:hover{ border-color: var(--accent); color: var(--accent); }

.menu-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
}

.menu-toggle span{
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2){ opacity: 0; }
.menu-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- 4b. FRANJA CTF ---------- */
.ctf-banner{
  position: relative;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--header-h) + 24px) 0 24px;
}

.ctf-banner .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ctf-banner-eyebrow{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.ctf-banner-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 4px;
}

.ctf-banner-desc{
  color: var(--text-muted);
  font-size: 0.92rem;
}

.ctf-banner .btn{ white-space: nowrap; }
.ctf-banner .btn svg{ width: 16px; height: 16px; }

@media (max-width: 480px){
  .ctf-banner .container{ flex-direction: column; align-items: flex-start; }
  .ctf-banner .btn{ width: 100%; justify-content: center; }
}

/* ---------- 5. HERO ---------- */
.hero{ min-height: 100vh; display: flex; align-items: center; padding-top: var(--header-h); overflow: hidden; }

.hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(62, 217, 196, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(242, 169, 76, 0.08), transparent 60%);
}

.hero-bg svg{ position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

/* ---- Mapa de ataques animado (Hero) ---- */
.attack-map{ opacity: 0.75; }
.map-dots circle{ fill: #0665A4; opacity: 0.45; }
.attack-path{ fill: none; stroke: #0665A4; stroke-width: 1; opacity: 0.35; }
.origin-dot{ fill: #FF5C5C; }
.origin-ping{ fill: none; stroke: #FF5C5C; stroke-width: 1.4; }
.target-dot{ fill: #F5C62F; }
.target-ping{ fill: none; stroke: #F5C62F; stroke-width: 1.4; }
.pulse-glow{ fill: url(#pulseGlow); }
.pulse-core{ fill: #F5C62F; }
.attack-label{ font-family: var(--font-mono); font-size: 11px; fill: #F5C62F; letter-spacing: 0.03em; }

.map-caption{
  position: absolute;
  top: 96px;
  right: 24px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.hero-content{ position: relative; z-index: 1; max-width: 760px; padding: 80px 0 100px; }
.hero-content h1{ font-size: clamp(2.4rem, 5.5vw, 4.2rem); margin-bottom: 20px; }

.hero-typed{
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--accent);
  min-height: 1.6em;
  margin-bottom: 22px;
}

.hero-typed .cursor{ display: inline-block; margin-left: 2px; animation: blink 1s step-end infinite; }

.hero-desc{ color: var(--text-muted); font-size: 1.08rem; max-width: 560px; margin-bottom: 36px; }

.hero-actions{ display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 48px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 640px;
}

.hero-stats .stat-num{ font-family: var(--font-display); font-size: 1.9rem; color: var(--text); }

.hero-stats .stat-label{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scroll-cue{
  position: absolute;
  bottom: 32px;
  left: 24px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-cue .line{ width: 32px; height: 1px; background: var(--text-faint); position: relative; overflow: hidden; }

.scroll-cue .line::after{
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scroll-line 2.2s ease-in-out infinite;
}

/* ---------- 6. QUIÉNES SOMOS ---------- */
.about{ padding: 120px 0; background: var(--bg-alt); }
.about .container{ display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-text p{ color: var(--text-muted); margin-bottom: 18px; font-size: 1.02rem; }
.about-text p:first-of-type{ font-size: 1.12rem; }

.about-visual{
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.about-visual svg{ width: 100%; height: 100%; }

/* ---------- 6b. CURSOS ---------- */
.courses{ padding: 120px 0; }
.courses-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }

.course-card{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.course-card:hover{ transform: translateY(-6px); border-color: var(--accent); background: var(--surface-elev); }

.course-level{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  margin-bottom: 18px;
}

.level-basico{ color: #4ADE80; border-color: rgba(74, 222, 128, 0.4); }
.level-intermedio{ color: #F2A94C; border-color: rgba(242, 169, 76, 0.4); }
.level-avanzado{ color: var(--danger); border-color: rgba(255, 92, 92, 0.4); }

.course-card h3{ font-size: 1.2rem; margin-bottom: 10px; }
.course-card > p{ color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }

.course-tags{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.course-tags span{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

.course-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  transition: gap 0.25s var(--ease);
}

.course-link svg{ width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.course-link:hover{ gap: 10px; }
.course-link:hover svg{ transform: translateX(2px); }

/* ---------- 7. OBJETIVOS ---------- */
.objectives{ padding: 120px 0; }
.objectives-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }

.objective-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.objective-card:hover{ transform: translateY(-6px); border-color: var(--accent); background: var(--surface-elev); }

.objective-icon{
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(62, 217, 196, 0.1);
  color: var(--accent);
}

.objective-icon svg{ width: 24px; height: 24px; }
.objective-card h3{ font-size: 1.15rem; margin-bottom: 10px; }
.objective-card p{ color: var(--text-muted); font-size: 0.95rem; }

/* ---------- 8. CONTACTO ---------- */
.contact{ padding: 120px 0; background: var(--bg-alt); }
.contact .container{ display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
.contact-info h2{ font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 16px; }
.contact-info > p{ color: var(--text-muted); margin-bottom: 36px; max-width: 420px; }

/* Cubre cualquier texto nuevo (párrafos, listas, negritas) que quede
   anidado más adentro de .contact-info, sin importar en qué contenedor */
.contact-info p,
.contact-info li,
.contact-info strong,
.contact-info ol,
.contact-info ul{
  color: var(--text-muted);
}

.contact-item{ display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }

.contact-item .icon{
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}

.contact-item .icon svg{ width: 20px; height: 20px; }

.contact-item .label{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 3px;
}

.contact-item .value{ color: var(--text-muted); font-size: 0.98rem; }

.social-row{ display: flex; gap: 12px; margin-top: 32px; }

.social-row a{
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.social-row a:hover{ color: var(--accent); border-color: var(--accent); }
.social-row svg{ width: 18px; height: 18px; }

.contact-form{ background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group{ margin-bottom: 20px; }

.form-group label{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea{
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(62, 217, 196, 0.15);
}

.form-group textarea{ resize: vertical; min-height: 130px; }

.hp-field{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-submit{ width: 100%; justify-content: center; }

.form-status{
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-status.is-success{ display: block; background: rgba(62, 217, 196, 0.1); border: 1px solid var(--accent-dim); color: var(--accent); }
.form-status.is-error{ display: block; background: rgba(255, 92, 92, 0.1); border: 1px solid var(--danger); color: var(--danger); }

/* ---------- 9. FOOTER ---------- */
.site-footer{ background: var(--bg); border-top: 1px solid var(--border); padding: 72px 0 0; }
.footer-grid{ display: grid; grid-template-columns: 1.4fr 0.8fr 1fr; gap: 48px; padding-bottom: 56px; }
.footer-brand .logo{ margin-bottom: 18px; }
.footer-brand p{ color: var(--text-muted); font-size: 0.95rem; max-width: 320px; margin-bottom: 20px; }

.footer-col h4{
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.footer-col ul li{ margin-bottom: 12px; color: var(--text-muted); font-size: 0.95rem; }

.footer-col a{ color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s var(--ease); }
.footer-col a:hover{ color: var(--accent); }

.footer-bottom{
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-bottom a{ color: var(--text-faint); }
.footer-bottom a:hover{ color: var(--accent); }

/* ---------- 10. ANIMACIONES ---------- */
@keyframes pulse-dot{ 0%, 100%{ opacity: 1; } 50%{ opacity: 0.35; } }
@keyframes blink{ 0%, 100%{ opacity: 1; } 50%{ opacity: 0; } }
@keyframes scroll-line{ 0%{ left: -100%; } 100%{ left: 100%; } }
@keyframes scan-move{ 0%{ transform: translateY(-10%); } 100%{ transform: translateY(110%); } }
@keyframes node-pulse{ 0%, 100%{ r: 3; opacity: 0.9; } 50%{ r: 5; opacity: 0.4; } }

/* ---------- 11. RESPONSIVE ---------- */
@media (max-width: 900px){
  .about .container{ grid-template-columns: 1fr; }
  .about-visual{ order: -1; aspect-ratio: 16 / 10; }
  .contact .container{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; }
}

@media (max-width: 760px){
  .main-nav{
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-h));
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    padding: 32px 24px;
  }

  .main-nav.is-open{ transform: translateX(0); }
  .main-nav ul{ flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-link{ width: 100%; padding: 16px; font-size: 1.05rem; }
  .nav-cta{ margin: 12px 0 0; width: 100%; text-align: center; }
  .menu-toggle{ display: flex; }
  .hero-stats{ grid-template-columns: repeat(2, auto); gap: 32px; }
  .form-row{ grid-template-columns: 1fr; }
  .contact-form{ padding: 28px; }
  .footer-grid{ grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 480px){
  .container{ padding: 0 18px; }
  .hero-content{ padding: 60px 0 80px; }
  .about, .objectives, .contact{ padding: 80px 0; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
  .hero-stats{ grid-template-columns: 1fr 1fr; }
}

/* ---------- 12. NOTIFICACIÓN DE PRUEBA SOCIAL ---------- */
.social-proof{
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 90;
  max-width: 320px;
  pointer-events: none;
}

.social-proof-card{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 34px 14px 16px;
  box-shadow: var(--shadow-card);
  pointer-events: auto;
  transform: translateX(-130%);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.social-proof-card.is-visible{ transform: translateX(0); opacity: 1; }

.social-proof-icon{
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(245, 198, 47, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.social-proof-icon svg{ width: 18px; height: 18px; }

.social-proof-text{ font-size: 0.85rem; color: var(--text); line-height: 1.4; }

.social-proof-meta{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.social-proof-close{
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 4px;
}

.social-proof-close:hover{ color: var(--text); }

@media (max-width: 480px){
  .social-proof{ left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ---------- 13. BOTÓN FLOTANTE DE WHATSAPP ---------- */
.whatsapp-float{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #0A0E1A;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease);
}

.whatsapp-float:hover{ transform: scale(1.08); }
.whatsapp-float svg{ width: 26px; height: 26px; }

.whatsapp-ping{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.6;
  animation: whatsapp-pulse 2.2s ease-out infinite;
}

@keyframes whatsapp-pulse{
  0%{ transform: scale(1); opacity: 0.5; }
  100%{ transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  .whatsapp-ping{ animation: none; display: none; }
}

@media (max-width: 480px){
  .whatsapp-float{ right: 14px; bottom: 14px; width: 50px; height: 50px; }
  .whatsapp-float svg{ width: 22px; height: 22px; }
}

/* ---------- 14. BANNER DE BECAS ---------- */
.becas-banner{
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  padding: 48px 0;
}

.becas-banner .container{
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.becas-banner-icon{
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(26, 18, 4, 0.15);
  color: #1a1204;
  display: flex;
  align-items: center;
  justify-content: center;
}

.becas-banner-icon svg{ width: 28px; height: 28px; }

.becas-banner-text{ flex: 1; min-width: 240px; }

.becas-banner-eyebrow{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(26, 18, 4, 0.7);
  margin-bottom: 6px;
}

.becas-banner-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: #1a1204;
  margin-bottom: 4px;
}

.becas-banner-desc{
  color: rgba(26, 18, 4, 0.8);
  font-size: 0.95rem;
  max-width: 520px;
}

.becas-banner-btn{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.25s var(--ease);
}

.becas-banner-btn:hover{ transform: translateY(-2px); }

@media (max-width: 700px){
  .becas-banner .container{ flex-direction: column; align-items: flex-start; text-align: left; }
  .becas-banner-btn{ width: 100%; text-align: center; }
}

/* ---------- 15. PREGUNTAS FRECUENTES ---------- */
.faq{ padding: 120px 0; }

.faq-list{ display: flex; flex-direction: column; gap: 12px; max-width: 780px; }

.faq-item{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.faq-item[open]{ border-color: var(--border-strong); }

.faq-question{
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.faq-question::-webkit-details-marker{ display: none; }

.faq-icon{
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}

.faq-item[open] .faq-icon{ transform: rotate(45deg); }

.faq-answer{
  padding: 0 24px 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 480px){
  .faq-question{ padding: 16px 18px; font-size: 0.95rem; }
  .faq-answer{ padding: 0 18px 18px; }
}

/* ---------- 16. BADGE DE CURSO DESTACADO ---------- */
.course-featured{
  position: absolute;
  top: -11px;
  right: 20px;
  background: var(--accent-2);
  color: #1a1204;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

/* ---------- 17. BOTÓN FLOTANTE DE FAQ ---------- */
.faq-float{
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 95;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #1a1204;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease);
}

.faq-float:hover{ transform: scale(1.08); }
.faq-float svg{ width: 26px; height: 26px; }

@media (max-width: 480px){
  .faq-float{ right: 14px; bottom: 76px; width: 50px; height: 50px; }
  .faq-float svg{ width: 23px; height: 23px; }
}

/* ---------- 18. PANEL DE FAQ TIPO CHAT ---------- */
.faq-chat{
  position: fixed;
  right: 20px;
  bottom: 158px;
  z-index: 96;
  width: 320px;
  max-height: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.faq-chat.is-open{
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.faq-chat-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface-elev);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.faq-chat-close{
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.faq-chat-close:hover{ color: var(--text); }

.faq-chat-body{
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-chat-body .faq-item{ margin: 0; overflow: visible; }

.faq-chat-body .faq-question{
  padding: 14px 16px;
  font-size: 0.85rem;
  line-height: 1.35;
  align-items: flex-start;
  gap: 10px;
}

.faq-chat-body .faq-icon{
  margin-top: 1px;
  width: 22px;
  height: 22px;
  font-size: 0.95rem;
}

.faq-chat-body .faq-answer{ padding: 0 16px 14px; font-size: 0.82rem; line-height: 1.5; }

@media (max-width: 480px){
  .faq-chat{
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 138px;
    max-height: 55vh;
  }
}

/* ---------- 19. AVISO DE COOKIES ---------- */
.cookie-banner{
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 200;
  width: calc(100% - 32px);
  max-width: clamp(300px, calc(100vw - 760px), 900px);
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transform: translateX(-50%) translateY(140%);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  pointer-events: none;
}

.cookie-banner.is-visible{
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner-text{
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  flex: 1 1 260px;
  min-width: 0;
}

.cookie-banner-text a{
  color: var(--accent);
  text-decoration: underline;
}

.cookie-banner-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-banner-actions .btn{ padding: 9px 20px; font-size: 0.85rem; }

@media (max-width: 640px){
  .cookie-banner{
    width: calc(100% - 20px);
    max-width: none;
    bottom: 12px;
    padding: 16px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .cookie-banner-actions{ justify-content: stretch; }
  .cookie-banner-actions .btn{ flex: 1; }
}

@media (prefers-reduced-motion: reduce){
  .cookie-banner{ transition: opacity 0.3s ease; transform: none; }
}

/* ---------- 20. ENLACE DE MENÚ EN DOS LÍNEAS ---------- */
.nav-link-stack{
  text-align: center;
  line-height: 1.2;
  font-size: 0.83rem;
  padding-top: 7px;
  padding-bottom: 7px;
}

/* ---------- 21. PROYECTOS (GITHUB) ---------- */
.projects{ padding: 120px 0; }

.projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.project-card:hover{
  transform: translateY(-6px);
  border-color: var(--accent);
  background: var(--surface-elev);
}

.project-icon{
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(245, 198, 47, 0.1);
  color: var(--accent);
}

.project-icon svg{ width: 20px; height: 20px; }

.project-card h3{ font-size: 1.02rem; margin-bottom: 8px; }

.project-card p{
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.project-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tags span{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
}

.project-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  transition: gap 0.25s var(--ease);
}

.project-link svg{ width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.project-card:hover .project-link{ gap: 10px; }
.project-card:hover .project-link svg{ transform: translateX(2px); }

/* ---------- VIDEO INSTITUCIONAL ---------- */
.video-section{ padding: 10px 0 40px; }

/* Reduce el espacio solo cuando el video está justo antes de "Quiénes somos" */
.video-section + .about{ padding-top: 50px; }
.video-section-head{
  margin-bottom: 24px;
}

.video-wrapper{
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.video-wrapper iframe{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

@media (max-width: 480px){
  .video-section{ padding: 60px 0 20px; }
}