/* ============================================================
   HanniEnglish · Estilos
   Paleta extraída del logo:
   - Azul marino  #14275C
   - Rojo         #E11E27
   - Blanco       #FFFFFF
   Cambia las variables de :root para reajustar toda la web.
   ============================================================ */

:root {
  /* Colores de marca */
  --navy: #14275c;
  --navy-dark: #0d1c45;
  --navy-light: #24408a;
  --red: #e11e27;
  --red-dark: #b8151d;
  --white: #ffffff;

  /* Neutros */
  --bg: #ffffff;
  --bg-alt: #f4f7fd;
  --text: #1c2438;
  --text-soft: #55607a;
  --border: #e3e8f2;

  /* UI */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 14px rgba(20, 39, 92, 0.08);
  --shadow: 0 12px 34px rgba(20, 39, 92, 0.12);
  --shadow-lg: 0 24px 60px rgba(20, 39, 92, 0.18);
  --container: 1160px;
  --header-h: 78px;

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; color: var(--navy); }

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

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(225, 30, 39, 0.28); }
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(225, 30, 39, 0.35); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn--whatsapp { background: #25d366; color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35); }
.btn--whatsapp:hover { background: #1eb355; transform: translateY(-2px); }
.btn--lg { padding: 16px 32px; font-size: 1.08rem; }
.btn--sm { padding: 9px 18px; font-size: .92rem; }
.btn--block { width: 100%; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.header__logo { height: 54px; width: auto; }

.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-family: var(--font-head); font-weight: 500; color: var(--navy);
  padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.nav__link:hover { background: var(--bg-alt); color: var(--red); }
.nav__cta-item { margin-left: 8px; }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 3px; transition: .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 72px 0 84px; background: linear-gradient(180deg, #f4f7fd 0%, #ffffff 100%); }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .5; z-index: 0; }
.hero__blob--1 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(36,64,138,.18), transparent 70%); top: -120px; right: -80px; }
.hero__blob--2 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(225,30,39,.14), transparent 70%); bottom: -140px; left: -100px; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }

.badge {
  display: inline-block; background: #fff; color: var(--navy); font-weight: 700;
  font-family: var(--font-head); font-size: .92rem; padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 22px;
}
.badge i { color: var(--red); margin-right: 4px; }
.hero__float i { color: var(--red); margin-right: 2px; }
.hero__title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; margin-bottom: 20px; }
.hero__subtitle { font-size: 1.18rem; color: var(--text-soft); max-width: 540px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; }
.hero__points li { display: inline-flex; align-items: center; gap: 8px; font-size: .96rem; font-weight: 500; color: var(--text-soft); }
.hero__points i { color: #1faa5c; font-size: .9rem; }

.hero__media { position: relative; display: flex; justify-content: center; }
.hero__card--main {
  background: #fff; border-radius: var(--radius-lg); padding: 34px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  animation: floaty 6s ease-in-out infinite;
}
.hero__card--main img { width: 320px; max-width: 70vw; }
.hero__float {
  position: absolute; background: #fff; border-radius: 999px; padding: 10px 18px;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--navy);
  box-shadow: var(--shadow); white-space: nowrap;
}
.hero__float--a { top: 6%; left: -4%; animation: floaty 5s ease-in-out infinite; }
.hero__float--b { bottom: 14%; right: -6%; animation: floaty 5.5s ease-in-out .4s infinite; }
.hero__float--c { bottom: -3%; left: 8%; animation: floaty 6.5s ease-in-out .8s infinite; }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ===== Trust bar ===== */
.trustbar { background: var(--navy); color: #fff; padding: 22px 0; }
.trustbar__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 32px; }
.trustbar__inner > span { font-family: var(--font-head); font-weight: 600; opacity: .85; }
.trustbar__items { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.trustbar__item { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; opacity: .95; }

/* ===== Secciones ===== */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section__eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-size: .82rem; color: var(--red); margin-bottom: 12px;
}
.section__eyebrow--light { color: #ffd0d3; }
.section__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: 14px; }
.section__lead { font-size: 1.12rem; color: var(--text-soft); }

/* ===== Cards / Cursos ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card--featured { border: 2px solid var(--red); box-shadow: var(--shadow); }
.card__ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: .8rem; padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.card__icon { font-size: 2rem; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 20px; margin-bottom: 18px; }
.card__icon--kids { background: #fff2f2; color: var(--red); }
.card__icon--teens { background: #eef2fc; color: var(--navy); }
.card__icon--exam { background: #fff7e6; color: #e8930c; }
.card__title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.card__age { font-family: var(--font-head); font-weight: 600; color: var(--red); margin-bottom: 14px; }
.card__text { color: var(--text-soft); margin-bottom: 18px; }
.card__list { display: grid; gap: 9px; margin-bottom: 22px; }
.card__list li { position: relative; padding-left: 28px; color: var(--text); }
.card__list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 2px; color: var(--red); font-size: .85rem; }
.card__link { font-family: var(--font-head); font-weight: 700; color: var(--navy); transition: color .2s, gap .2s; }
.card__link:hover { color: var(--red); }

.cards__extra { text-align: center; margin-top: 34px; color: var(--text-soft); font-size: 1.02rem; }
.cards__extra strong { color: var(--navy); font-family: var(--font-head); }

/* ===== Banda Test de nivel (placement) ===== */
.placement { background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; }
.placement__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 46px 24px; flex-wrap: wrap; }
.placement__title { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 6px; }
.placement__text p { color: #ffe3e5; max-width: 640px; }
.placement .btn--primary { background: #fff; color: var(--red); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.placement .btn--primary:hover { background: #fff; color: var(--red-dark); transform: translateY(-2px); }

/* ===== Qué incluye cada curso (structure) ===== */
.structure { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.structure__item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; transition: transform .2s, box-shadow .2s; }
.structure__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.structure__ico { font-size: 1.7rem; display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--bg-alt); color: var(--red); margin-bottom: 14px; }
.structure__item h3 { font-size: 1.12rem; margin-bottom: 6px; }
.structure__item p { color: var(--text-soft); font-size: .95rem; }

/* ===== Features / Método ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.feature__icon { font-size: 1.7rem; width: 62px; height: 62px; display: grid; place-items: center; background: var(--bg-alt); border-radius: 16px; margin-bottom: 16px; color: var(--navy); }
.section--alt .feature__icon { background: #fff; }
.feature__title { font-size: 1.22rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-soft); }

/* ===== Contacto ===== */
.contact { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.contact__title { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: 16px; }
.contact__text { color: #c7d0e8; font-size: 1.12rem; margin-bottom: 24px; }
.contact__list { display: grid; gap: 12px; margin-bottom: 28px; }
.contact__list li { font-size: 1.05rem; color: #e3e9f7; }
.contact__list a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.contact__list i { color: #ffd0d3; width: 24px; text-align: center; margin-right: 6px; }

/* Formulario */
.form { background: #fff; border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-lg); }
.form__title { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }
.form__group { margin-bottom: 16px; }
.form__group label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--navy); font-size: .92rem; margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--navy-light); box-shadow: 0 0 0 4px rgba(36, 64, 138, .12);
}
.form textarea { resize: vertical; }
.form__error { display: block; color: var(--red); font-size: .84rem; margin-top: 5px; min-height: 1em; }
.form input.is-invalid, .form select.is-invalid { border-color: var(--red); }
.form__note { text-align: center; font-size: .88rem; color: var(--text-soft); margin-top: 12px; }
.form__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 14px; }
.form__trust li { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--text-soft); }
.form__trust i { color: var(--navy-light); }
.form__trust .fa-whatsapp { color: #25d366; }
.form__success { text-align: center; font-weight: 700; color: #1a9d4b; margin-top: 14px; background: #e8f8ee; padding: 12px; border-radius: var(--radius-sm); }

/* ===== Footer ===== */
.footer { background: var(--navy-dark); color: #c7d0e8; padding: 56px 0 0; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer__logo { height: 66px; background: #fff; padding: 8px 12px; border-radius: 14px; margin-bottom: 16px; }
.footer__brand p { max-width: 340px; }
.footer__col h4 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer__col ul { display: grid; gap: 10px; }
.footer__col a:hover { color: #fff; }
.footer__social { display: flex; gap: 16px; margin-top: 18px; }
.footer__social a { font-family: var(--font-head); font-weight: 600; color: #fff; opacity: .85; }
.footer__social a:hover { opacity: 1; color: #ffd0d3; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; }
.footer__bottom p { font-size: .9rem; text-align: center; }

/* ===== WhatsApp flotante ===== */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 60px; height: 60px; background: #25d366; color: #fff;
  border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
  transition: transform .2s ease; animation: pulse 2.4s infinite;
}
.whatsapp-float:hover { transform: scale(1.08); }
@keyframes pulse {
  0% { box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .5); }
  70% { box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===== Animación de aparición ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__content { order: 2; }
  .hero__media { order: 1; }
  .hero__actions, .hero__points { justify-content: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .cards, .features { grid-template-columns: repeat(2, 1fr); }
  .structure { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .placement__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; box-shadow: var(--shadow);
    transform: translateY(-140%); transition: transform .35s ease;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 24px 26px; }
  .nav__link { padding: 14px 16px; }
  .nav__cta-item { margin: 8px 0 0; }
  .nav__cta { width: 100%; }
  .nav__toggle { display: flex; }
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 60px; }
  .cards, .features { grid-template-columns: 1fr; }
  .structure { grid-template-columns: 1fr; }
  .hero__float { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .container { padding: 0 18px; }
}

/* ===== Accesibilidad: reduce motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
