/* =========================================================
   MBM - STYLE.CSS (LIMPIO Y ESTABLE) — OPTIMIZADO
   Ámbito: web principal (home/catálogo/header/footer/cards)
========================================================= */

/* ---------- Variables ---------- */
:root {
  --color-bg: #f8f1e7;
  --color-bg-soft: #fbf6ef;

  --color-green: #0b5939;
  --color-green-soft: #0f6a46;
  --color-green-dark: #094a30; /* faltaba en tu CSS */

  --color-text: #2e2a26;
  --color-text-soft: #6e645c;
  --color-white: #ffffff;

  --radius: 16px;
  --radius-pill: 9999px;
  --shadow-soft: 0 10px 26px rgba(0,0,0,0.14);

  --font-title: "Lora", serif;
  --font-body: "Inter", Arial, sans-serif;

  --header-offset: 110px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--header-offset);
}

section[id] { scroll-margin-top: var(--header-offset); }

.hidden { display: none !important; }

/* =========================================================
   HEADER
========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 999;
  background: var(--color-green);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-inner {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-branding { color: #fff; }

.header-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}

.header-subtitle {
  font-size: 12px;
  opacity: 0.85;
}

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

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
}
.main-nav a:hover { opacity: 1; }

.main-nav .nav-cta {
  height: 56px;
  min-width: 220px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  background: #0a5235;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   BOTONES (BASE)
   - Unifica <button> y <a> para evitar desajustes.
========================================================= */
.btn-primary,
.btn-secondary,
.card-btn,
.nav-cta {
  height: 56px;
  min-width: 240px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary,
.card-btn,
.nav-cta {
  background: var(--color-green);
  color: #fff;
}

.btn-primary:hover,
.card-btn:hover,
.nav-cta:hover {
  filter: brightness(0.96);
}

.btn-primary:active,
.card-btn:active,
.nav-cta:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

.btn-secondary:hover { background: rgba(11, 89, 57, 0.06); }

/* =========================================================
   HERO
========================================================= */
.hero {
  background: var(--color-bg-soft);
  padding: 48px 0 30px;
}

.hero-inner {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--color-text-soft);
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-quote {
  font-style: italic;
  color: var(--color-text-soft);
  margin-bottom: 18px;
}

.hero-subtitle {
  max-width: 1000px;
  margin: 0 auto 18px;
  color: var(--color-text-soft);
}

.hero-actions-split {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 28px;
  max-width: 980px;
  margin: 26px auto 22px;
}

.hero-logo-full {
  width: 260px;
  display: block;
  margin: 0 auto;
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: #8f847b;
}

/* =========================================================
   SECCIONES
========================================================= */
.section {
  width: 92%;
  max-width: 1200px;
  margin: 72px auto;
}

.section-soft {
  background: var(--color-bg-soft);
  padding: 44px;
  border-radius: var(--radius);
}

.section-header {
  text-align: center;
  margin-bottom: 26px;
}

.section-header h2 {
  font-family: var(--font-title);
  font-size: 32px;
}

.section-header p {
  max-width: 820px;
  margin: 0 auto 14px;
  color: var(--color-text-soft);
}

.section-disclaimer {
  max-width: 820px;
  margin: 10px auto 0;
  font-size: 14px;
  color: #8f847b;
}

/* =========================================================
   PILARES / CARDS
========================================================= */
.pillars,
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.pillar,
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 26px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

/* Texto de card: que no quede apelmazado */
.card p {
  margin: 0 0 14px;
  line-height: 1.45;
}

/* =========================================================
   FIX DEFINITIVO: "Tests destacados"
   - Botones iguales (a o button)
   - Alineados abajo
   - Móvil: ancho 100% con límite elegante
========================================================= */
.cards .card .card-btn,
.cards .card a.card-btn,
.cards .card button.card-btn {
  margin-top: auto;
  height: 46px;
  min-width: 200px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 9999px;
}

@media (max-width: 980px) {
  .cards,
  .pillars {
    grid-template-columns: 1fr;
  }

  .hero-actions-split {
    grid-template-columns: 1fr;
  }

  .cards .card .card-btn,
  .cards .card a.card-btn,
  .cards .card button.card-btn {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================================================
   CÓMO FUNCIONA MBM – PASOS
========================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 36px;
}

.step {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  text-align: left;
}

.step strong,
.step .step-number {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-green);
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
}

/* =========================================================
   FOOTER MBM
========================================================= */
.site-footer {
  background: var(--color-green);
  color: #fff;
  padding: 42px 0 26px;
  margin-top: 80px;
  width: 100%;
}

.footer-inner {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
}

.footer-slogan {
  font-size: 13px;
  margin-top: 6px;
  opacity: 0.85;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.85;
}
.footer-links a:hover { opacity: 1; }

.footer-bottom {
  text-align: center;
  margin-top: 26px;
  font-size: 12.5px;
  opacity: 0.75;
}

/* =========================================================
   TESTS PRÓXIMAMENTE (COMPACTO)
========================================================= */
.test-soon {
  min-height: calc(100vh - var(--header-offset) - 120px);
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.test-soon h1 {
  font-family: var(--font-title);
  font-size: 32px;
  margin-bottom: 6px;
}

.test-soon .test-status {
  font-size: 16px;
  color: var(--color-text-soft);
}

.test-soon .test-note {
  font-size: 14.5px;
  color: #8f847b;
  max-width: 560px;
  margin: 0 auto 12px;
}

.center-cta {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* =========================================================
   HEADER – MENÚ MÓVIL
========================================================= */
.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

@media (max-width: 768px) {
  .site-header { padding: 12px 16px; }
  .menu-toggle { display: block; }
  .main-nav { display: none; }
}

@media (min-width: 769px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu {
  position: fixed;
  top: var(--header-offset);
  left: 0;
  right: 0;
  background: var(--color-green);
  display: none;
  flex-direction: column;
  padding: 24px;
  gap: 18px;
  z-index: 999;
}

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

.mobile-menu .mobile-cta {
  margin-top: 16px;
  background: #ffffff;
  color: var(--color-green);
  padding: 14px;
  border-radius: var(--radius-pill);
  text-align: center;
  font-weight: 600;
}

.mobile-menu.open { display: flex; }
body.menu-open { overflow: hidden; }

/* =========================================================
   ✅ FIX MOVIL (forzado) — pegar AL FINAL del style.css
   Objetivo: menú correcto en móvil + hero limpio y centrado
========================================================= */

@media (max-width: 768px) {
  /* Header / navegación */
  .menu-toggle { 
    display: inline-flex !important; 
    align-items: center;
    justify-content: center;
  }

  .main-nav { 
    display: none !important; 
  }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 64px;              /* ajusta si tu header es más alto */
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 14px 16px;
  }
  .mobile-menu.open { 
    display: flex !important; 
    flex-direction: column;
    gap: 10px;
  }

  /* Evita scroll del body cuando el menú está abierto */
  body.menu-open { overflow: hidden; }

  /* Hero: que no quede “encajonado” */
  .page-wrapper,
  .hero-inner,
  .section-inner {
    width: 100%;
    max-width: 100% !important;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    line-height: 1.15;
  }

  .hero-actions-split {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-logo-center {
    order: 2; /* logo entre botones */
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-logo-full {
    width: min(240px, 70vw);
    height: auto;
  }

  .btn,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 360px;
    text-align: center;
  }
}

/* =======================================================
   FIX móvil: colocar "Sobre MBM" debajo del logo en el hero
======================================================= */
@media (max-width: 768px) {
  .hero-actions-split{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  /* Orden correcto: 1) botón arriba  2) logo  3) botón abajo */
  .hero-actions-split .btn.btn-primary { order: 1; }
  .hero-actions-split .hero-logo-center { order: 2; }
  .hero-actions-split .btn.btn-secondary { order: 3; }

  /* Un pelín de aire alrededor del logo */
  .hero-logo-center { margin: 6px 0; }
}

