/* =========================================================
   Matemática.com.mx
   Hoja de estilos principal
   Encabezado corregido: logo centrado + menú separado
   ========================================================= */

:root{
  --green:#0b7a3e;
  --green2:#13a05a;
  --blue:#123b8f;
  --yellow:#ffd83d;
  --dark:#10233f;
  --light:#f5f8fb;
  --white:#fff;
  --muted:#5d6b7c;
  --shadow:0 14px 35px rgba(16,35,63,.10);
  --radius:20px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:var(--dark);
  background:#fff;
  line-height:1.55;
}

a{text-decoration:none;color:inherit}

.container{
  width:min(1120px,92%);
  margin:auto;
}

.topbar{
  background:var(--dark);
  color:#fff;
  text-align:center;
  padding:9px 15px;
  font-size:.92rem;
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

header{
  position:relative;
  background:#fff;
  border-bottom:1px solid #e8edf2;
}

.header-inner{
  min-height:330px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding:22px 0 16px;
}

/* LOGOTIPO: grande, completo y centrado */
.logo{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  line-height:0;
  margin:0;
  padding:0;
}

.logo img{
  display:block;
  width:420px;
  height:auto;
  max-height:220px;
  object-fit:contain;
  margin:0 auto;
}

/* MENÚ: separado del logotipo y centrado */
header nav{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:22px;
  margin-top:20px;
  font-weight:700;
  font-size:.95rem;
}

header nav a{
  display:inline-block;
  padding:4px 0;
}

header nav a:hover{
  color:var(--green);
}

/* WHATSAPP: debajo del menú y centrado */
.header-wa{
  margin-top:12px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:0;
  border-radius:12px;
  padding:13px 20px;
  font-weight:800;
  cursor:pointer;
  transition:.2s;
  box-shadow:none;
}

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

.btn-green{
  background:var(--green);
  color:#fff;
}

.btn-yellow{
  background:var(--yellow);
  color:#17243a;
}

.btn-outline{
  border:2px solid var(--green);
  color:var(--green);
  background:#fff;
}

.footer-logo img{
  display:block;
  width:190px;
  height:auto;
  max-height:70px;
  object-fit:contain;
  margin-bottom:10px;
}

.logo span{color:var(--green)}

/* =========================================================
   HERO
   ========================================================= */

.hero{
  background:linear-gradient(135deg,#f4fbf7 0%,#fff 58%,#f1f6ff 100%);
  padding:74px 0 64px;
  overflow:hidden;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:48px;
  align-items:center;
}

.eyebrow{
  display:inline-block;
  background:#e3f6eb;
  color:var(--green);
  font-weight:900;
  padding:7px 12px;
  border-radius:99px;
  font-size:.86rem;
  margin-bottom:14px;
}

h1{
  font-size:clamp(2.4rem,5vw,4.6rem);
  line-height:1.02;
  margin:0 0 20px;
  letter-spacing:-2.5px;
}

h1 .green{color:var(--green)}
h1 .blue{color:var(--blue)}

.hero p{
  font-size:1.18rem;
  color:var(--muted);
  max-width:690px;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:26px 0;
}

.hero-points{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.pill{
  background:#fff;
  border:1px solid #e1e8ee;
  padding:9px 12px;
  border-radius:999px;
  font-weight:750;
  font-size:.9rem;
}

.hero-card{
  background:#fff;
  border-radius:28px;
  padding:28px;
  box-shadow:var(--shadow);
  border:1px solid #e7edf3;
}

.hero-card .big{
  font-size:3.3rem;
  font-weight:950;
  color:var(--green);
  line-height:1;
}

.hero-card h3{
  margin:12px 0 8px;
  font-size:1.35rem;
}

.hero-card ul{
  padding-left:20px;
  color:var(--muted);
}

/* =========================================================
   SECCIONES
   ========================================================= */

.section{padding:78px 0}

.section.alt{background:var(--light)}

.section-head{
  text-align:center;
  max-width:760px;
  margin:0 auto 42px;
}

.section-head h2{
  font-size:clamp(2rem,4vw,3rem);
  margin:0 0 10px;
  letter-spacing:-1px;
}

.section-head p{
  color:var(--muted);
  font-size:1.05rem;
}

/* =========================================================
   CURSOS
   ========================================================= */

.courses{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:16px;
}

.course{
  position:relative;
  background:#fff;
  border:1px solid #e5ebf0;
  border-radius:var(--radius);
  padding:24px;
  box-shadow:0 8px 22px rgba(16,35,63,.05);
  display:flex;
  flex-direction:column;
  min-height:270px;
}

.course-num{
  width:42px;
  height:42px;
  border-radius:12px;
  background:#e6f6ed;
  color:var(--green);
  display:grid;
  place-items:center;
  font-weight:950;
  margin-bottom:18px;
}

.course h3{
  font-size:1.13rem;
  line-height:1.25;
  margin:0 0 10px;
}

.course p{
  color:var(--muted);
  font-size:.94rem;
  margin:0 0 18px;
}

.course .cta{
  margin-top:auto;
  color:var(--green);
  font-weight:900;
}

.sequence{
  margin-top:32px;
  background:var(--dark);
  color:#fff;
  border-radius:22px;
  padding:24px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
  text-align:center;
}

.sequence div{
  padding:12px;
  border-right:1px solid rgba(255,255,255,.15);
}

.sequence div:last-child{border-right:0}

.sequence b{
  display:block;
  color:var(--yellow);
  font-size:1.2rem;
  margin-bottom:4px;
}

/* =========================================================
   BENEFICIOS
   ========================================================= */

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

.benefit{
  padding:28px;
  border-radius:var(--radius);
  background:#fff;
  border:1px solid #e4eaf0;
  box-shadow:0 8px 22px rgba(16,35,63,.05);
}

.icon{font-size:2rem}

.benefit h3{margin:10px 0 7px}

.benefit p{
  margin:0;
  color:var(--muted);
}

/* =========================================================
   HORARIOS
   ========================================================= */

.schedule{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}

.schedule-card{
  background:#fff;
  border-radius:var(--radius);
  padding:30px;
  border:2px solid #e3eaf0;
  box-shadow:var(--shadow);
}

.schedule-card.featured{border-color:var(--green)}

.schedule-card h3{margin-top:0}

.days{
  font-size:1.18rem;
  font-weight:900;
  color:var(--blue);
}

.time{
  font-size:2rem;
  font-weight:950;
  color:var(--green);
  margin:8px 0;
}

/* =========================================================
   PRECIOS Y SERVICIOS
   ========================================================= */

.price-wrap{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:stretch;
}

.price-card{
  border-radius:24px;
  padding:32px;
  background:#fff;
  border:1px solid #e1e8ee;
  box-shadow:var(--shadow);
}

.price-card.main{
  background:linear-gradient(145deg,#0b7a3e,#075d30);
  color:#fff;
  border:0;
}

.price{
  font-size:3.2rem;
  font-weight:950;
  line-height:1;
}

.price small{
  font-size:1rem;
  font-weight:700;
}

.deposit{
  display:inline-block;
  margin:16px 0;
  padding:9px 12px;
  background:var(--yellow);
  color:#17243a;
  border-radius:10px;
  font-weight:900;
}

.price-card ul{padding-left:20px}

.packages{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-top:22px;
}

.package{
  background:#f7f9fb;
  border-radius:16px;
  padding:18px;
  text-align:center;
  border:1px solid #e5eaf0;
}

.package strong{
  display:block;
  font-size:1.35rem;
  color:var(--blue);
}

.package span{
  color:var(--muted);
  font-size:.9rem;
}

.notice{
  margin-top:20px;
  padding:16px 18px;
  border-radius:14px;
  background:#fff6cf;
  border:1px solid #f2df7b;
  color:#5d4d00;
  font-weight:700;
}

/* =========================================================
   PASOS
   ========================================================= */

.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.step{
  background:#fff;
  border:1px solid #e3e9ef;
  border-radius:20px;
  padding:24px;
}

.step b{
  font-size:1.6rem;
  color:var(--green);
}

.step h3{margin:8px 0}

.step p{
  color:var(--muted);
  margin:0;
}

/* =========================================================
   CTA FINAL Y PIE
   ========================================================= */

.final-cta{
  padding:70px 0;
  background:linear-gradient(135deg,var(--blue),#0a2b68);
  color:#fff;
  text-align:center;
}

.final-cta h2{
  font-size:clamp(2rem,4vw,3.2rem);
  margin:0 0 10px;
}

.final-cta p{
  color:#dce7f8;
  font-size:1.1rem;
}

footer{
  background:#091a30;
  color:#b9c7d8;
  padding:34px 0;
}

.footer-grid{
  display:flex;
  justify-content:space-between;
  gap:25px;
  flex-wrap:wrap;
}

.footer-logo{
  font-size:1.3rem;
  font-weight:950;
  color:#fff;
}

/* Botón flotante de WhatsApp */
.float-wa{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:30;
  background:#25D366;
  color:#fff;
  width:58px;
  height:58px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.55rem;
  box-shadow:0 10px 25px rgba(0,0,0,.2);
}

/* =========================================================
   TABLET
   ========================================================= */

@media(max-width:980px){
  .hero-grid{grid-template-columns:1fr}

  .courses{grid-template-columns:repeat(2,1fr)}

  .sequence{
    grid-template-columns:repeat(5,1fr);
    font-size:.82rem;
  }

  .benefits,
  .steps{
    grid-template-columns:repeat(2,1fr);
  }

  .price-wrap,
  .schedule{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   CELULAR
   ========================================================= */

@media(max-width:700px){

  .container{
    width:min(94%,1120px);
  }

  .header-inner{
    min-height:0;
    padding:18px 0 20px;
  }

  .logo img{
    width:min(330px,88vw);
    max-height:none;
    height:auto;
  }

  /* En celular el menú NO se oculta */
  header nav{
    display:flex;
    width:100%;
    gap:8px 16px;
    margin-top:20px;
    font-size:.9rem;
  }

  header nav a{
    padding:3px 0;
  }

  .header-wa{
    margin-top:14px;
  }

  .hero{
    padding:52px 0;
  }

  .section{
    padding:58px 0;
  }

  .courses,
  .benefits,
  .steps,
  .packages{
    grid-template-columns:1fr;
  }

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

  .sequence div{
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.15);
  }

  h1{
    letter-spacing:-1.4px;
  }

  .hero-actions .btn{
    width:100%;
  }

  .float-wa{
    right:16px;
    bottom:16px;
  }
}
