/* ============================================
   VENDEMÁS — Design System Base
   ============================================ */

/* ----- CSS Custom Properties ----- */
:root {
  /* Brand Colors — Paleta oficial VendeMás */
  /* Colores predominantes (naranja) */
  --color-orange: #FF9532;       /* Naranja principal — botones, CTA, acentos */
  --color-orange-light: #FFBE1A; /* Naranja claro / acento dorado */
  --color-orange-deep: #FF742E;  /* Naranja intenso — hover, énfasis, degradados */
  
  /* Colores secundarios (azul) */
  --color-blue: #1196EB;         /* Azul — fondos, secciones */
  --color-blue-light: #90CBE5;   /* Azul claro suave — fondos secundarios */
  --color-blue-pale: #EAF6FE;    /* Azul muy claro — fondos de sección */
  
  /* Color oscuro (ink) */
  --color-ink: #053146;          /* Azul petróleo — texto principal, footer */

  /* Colores oscuros — solo para detalles mínimos, NUNCA como fondo dominante */
  --color-ink: #053146;          /* Texto principal — azul petróleo (Brandbook oficial) */
  --color-dark: #053146;         /* Sinónimo de ink */
  --color-dark-blue: #053146;    /* Azul oscuro profundo — solo acentos */
  --color-black: #053146;        /* Reasignado a azul oscuro suave */
  
  /* Colores de sección — fondos vibrantes (v2: alegría, no oscuridad) */
  --color-hero-bg: #0D0D0D;      /* Solo para Hero y CTA final — contraste dramático */
  --color-orange-brand: #FF931E; /* Naranja de marca para fondos de sección */
  --color-blue-brand: #0071BC;   /* Azul de marca para fondos de sección */

  /* Neutros cálidos */
  --color-gray-light: #F7F7F7;
  --color-gray-medium: #E5E5E5;
  --color-gray: #6B7B85;
  --color-white: #FFFFFF;
  --color-paper: #FFFDF9;        /* Crema — fondo de body y secciones claras (look "PREFERIDO") */

  /* "Coral" no existe como color de marca — varias secciones (Blog, Podcast, cursos)
     lo referenciaban sin que estuviera definido nunca (bug: se renderizaban sin color).
     Se alias al naranja intenso de marca, que cubre la misma función de acento cálido. */
  --color-coral: #FF742E;
  --color-coral-dark: #E85A2E;
  --color-coral-light: #FFEEE3;
  --color-coral-pale: #FFEEE3;

  /* Tinte claro del dorado de marca — tarjetas/chips sobre fondo crema/blanco */
  --color-gold-pale: #FFF3D6;

  /* Alias — se usaban en algunas plantillas sin estar nunca definidas */
  --color-blue-dark: #0C5A8C;
  --color-orange-pale: var(--color-gold-pale);

  /* Typography */
  --font-heading: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Manrope', sans-serif;

  /* Spacing */
  --section-padding: clamp(3rem, 8vw, 6rem);
  --container-width: 1200px;
  --container-padding: 1.25rem;

  /* Transitions */
  --transition: 0.3s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ----- Font Face Declarations ----- */
@font-face {
  font-family: 'Open Sans';
  src: url('../font/OpenSans-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: 'Pathway Extreme';
  src: url('../font/PathwayExtreme-VariableFont_opsz,wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('../font/Manrope-VariableFont_wght.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../font/BricolageGrotesque-VariableFont_opsz,wdth,wght.ttf') format('truetype');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* ----- CSS Reset ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Base de las unidades rem del sitio (16px por defecto del navegador) —
     casi toda la tipografía del theme (títulos, botones, badges, párrafos)
     está en rem/clamp(rem), así que subir esta base agranda las fuentes de
     todo el sitio "unos píxeles" de una sola vez, a pedido del cliente. */
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 768px) {
  html {
    /* Baja la base rem un escalón en móvil (18px → 16px) para reducir
       "en 1" todas las fuentes del sitio de una sola vez — mismo mecanismo
       que la nota de arriba, aplicado solo a mobile a pedido del cliente. */
    font-size: 16px;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 4.2vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h4 { font-size: clamp(1.15rem, 2.5vw, 1.55rem); }

p {
  margin-bottom: 1.1rem;
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ----- Section ----- */
.section {
  padding: var(--section-padding) 0;
}

.section--dark {
  background: var(--color-blue);
  color: var(--color-white);
}

.section--gray {
  background: var(--color-gray-light);
}

.section--blue-light {
  background: var(--color-blue-pale);
  color: var(--color-ink);
}

/* #FF742E (--color-orange-deep) no se usa para áreas de relleno grandes —
   instrucción directa del cliente. Para un naranja intenso a tamaño de
   sección se mezcla el naranja principal con el ink (mismo recurso que ya
   usan .hero--tone-blue/gold), en vez del hex intenso puro. */
.section--orange {
  background: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  color: var(--color-white);
}

/* --color-coral es alias de #FF742E (ver arriba) — no se usa como relleno
   grande, misma mezcla que .section--orange en vez del hex intenso puro. */
.section--coral {
  background: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  color: var(--color-white);
}

.section--coral-light {
  background: var(--color-coral-light);
  color: var(--color-ink);
}

.section--white {
  background: var(--color-white);
  color: var(--color-ink);
}

/* ----- Section Label ----- */
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 0.75rem;
}

/* ----- Section Title ----- */
.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  color: var(--color-gray);
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.section--dark .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.section--orange .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.65rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  border-color: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px color-mix(in srgb, var(--color-orange) 40%, transparent);
}

.btn--secondary {
  background: transparent;
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.btn--secondary:hover {
  background: var(--color-blue);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-ink);
  border-color: var(--color-white);
}

.btn--white:hover {
  background: transparent;
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--white-solid {
  background: var(--color-white);
  color: var(--color-blue);
  border-color: var(--color-white);
}

.btn--white-solid:hover {
  background: var(--color-blue);
  color: var(--color-white);
  border-color: var(--color-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(17, 150, 235, 0.4);
}

.btn--outline-orange {
  background: transparent;
  color: var(--color-orange);
  border-color: var(--color-orange);
}

.btn--outline-orange:hover {
  background: var(--color-orange);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--ink {
  background: var(--color-ink);
  color: var(--color-white);
  border-color: var(--color-ink);
}

.btn--ink:hover {
  background: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  border-color: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(5, 49, 70, 0.35);
}

.btn--whatsapp {
  background: #25D366;
  color: var(--color-white);
  border-color: #25D366;
}

.btn--whatsapp:hover {
  background: #1ebe5b;
  border-color: #1ebe5b;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn--large {
  padding: 0.85rem 2.25rem;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .btn {
    width: 100%;
    max-width: 360px;
    white-space: normal;
  }
}

@media (max-width: 576px) {
  .btn {
    max-width: 100%;
  }
}

/* ----- Grid Utilities ----- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ----- Screen Reader Only ----- */
.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;
}

/* ----- Header Sticky ----- */
.header--sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.header--sticky.header--scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.header__toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-ink);
  transition: all 0.3s ease;
}

.header__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__toggle.active span:nth-child(2) {
  opacity: 0;
}

.header__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-orange);
}

.header__cta {
  background: var(--color-orange);
  color: var(--color-white) !important;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: all 0.3s ease;
}

.header__cta:hover {
  background: color-mix(in srgb, var(--color-ink) 20%, var(--color-orange) 80%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px color-mix(in srgb, var(--color-orange) 40%, transparent);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .header__toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .header__nav.open {
    transform: translateX(0);
  }

  .header__nav a {
    font-size: 1.25rem;
  }

  .header__cta {
    font-size: 1.1rem;
    padding: 1rem 2rem;
  }
}

/* ----- Footer Modern ----- */
.footer--modern {
  background: var(--color-ink);
  color: var(--color-white);
  padding: 0 0 1.5rem;
}

.footer--modern .container {
  max-width: none;
}

/* Grid de 12 columnas: 1-2 y 11-12 quedan vacías (margen a los lados),
   el contenido real (marca + 3 columnas de enlaces) se reparte en las 8
   columnas centrales, 2 columnas por cada bloque de contenido. */
.footer__main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand {
  grid-column: 3 / span 2;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 0.875rem;
}

.footer__logo img {
  height: 24px;
  width: auto;
}

.footer__tagline {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.footer__description {
  max-width: 260px;
  font-size: 0.875rem;
  color: rgb(143, 176, 192);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.footer__social {
  display: flex;
  gap: 0.6rem;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-white);
  transition: all 0.3s ease;
}

.footer__social a:hover {
  background: var(--color-orange);
  transform: translateY(-3px);
}

/* Ocupa las columnas 5-10 del grid de 12 de .footer__main (2 columnas por
   cada bloque: Programas, Empresa, Contacto), dejando 1-2 y 11-12 vacías
   como margen — ver comentario de .footer__main arriba. */
.footer__links {
  grid-column: 5 / span 6;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer__col-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
  color: var(--color-white);
}

.footer__col nav {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer__col a {
  color: rgb(184, 212, 227);
  font-size: 0.875rem;
  line-height: 1.3;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer__col a:hover {
  color: var(--color-orange);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer__contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(184, 212, 227);
  font-size: 0.875rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer__contact-link:hover {
  color: var(--color-orange);
}

.footer__contact-link svg {
  flex-shrink: 0;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  font-size: 0.8rem;
  color: rgb(110, 147, 164);
  margin: 0;
}

.footer__legal {
  display: flex;
  gap: 1.25rem;
}

.footer__legal a {
  color: rgb(110, 147, 164);
  font-size: 0.8rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer__legal a:hover {
  color: var(--color-orange);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

/* Footer Responsive */
@media (max-width: 1024px) {
  .footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__links {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .footer--modern {
    padding: 2rem 0 1rem;
  }

  .footer__main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__links {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer__legal {
    flex-direction: column;
    gap: 0.5rem;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
