/* ================================================
   YNSUMEDIC — Hoja de Estilos Principal
   Paleta extraída del logo corporativo
   ================================================ */

:root {
  /* ── Paleta del Logo ── */
  --green-50:  #f0faf0;
  --green-100: #ddf4d8;
  --green-200: #b7e8ae;
  --green-300: #84d475;
  --green-400: #55c43a;
  --green-500: #3bae22;   /* Verde principal "YNSU" */
  --green-600: #2d8a1a;
  --green-700: #1f6212;
  --green-800: #144410;
  --green-900: #0b280a;

  --blue-50:  #edf4fb;
  --blue-100: #d4e8f5;
  --blue-200: #aacfe9;
  --blue-300: #6aaed8;
  --blue-400: #3384c8;
  --blue-500: #1d68af;   /* Azul principal "MEDIC" */
  --blue-600: #155290;
  --blue-700: #0f3c6c;
  --blue-800: #0a2847;
  --blue-900: #051524;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --navy:     #0d1b35;
  --navy-l:   #1a2d4e;

  /* ── Gradientes de Marca ── */
  --grad-brand:   linear-gradient(135deg, #3bae22 0%, #1d68af 100%);
  --grad-green:   linear-gradient(135deg, #55c43a 0%, #2d8a1a 100%);
  --grad-blue:    linear-gradient(135deg, #3384c8 0%, #0f3c6c 100%);
  --grad-hero:    linear-gradient(160deg, rgba(13,27,53,.92) 0%, rgba(13,27,53,.72) 60%, rgba(13,27,53,.82) 100%);
  --grad-dark:    linear-gradient(135deg, #0d1b35 0%, #1a2d4e 100%);

  /* ── Tipografía ── */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* ── Espaciado ── */
  --py:  5rem;
  --cw:  1280px;

  /* ── Radios ── */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
  --r-f:  9999px;

  /* ── Sombras ── */
  --sh-sm:  0 1px 4px rgba(0,0,0,.08);
  --sh-md:  0 4px 16px rgba(0,0,0,.10);
  --sh-lg:  0 10px 40px rgba(0,0,0,.12);
  --sh-xl:  0 20px 60px rgba(0,0,0,.16);
  --sh-g:   0 8px 32px rgba(59,174,34,.28);
  --sh-b:   0 8px 32px rgba(29,104,175,.28);

  /* ── Transiciones ── */
  --tr:  all .3s cubic-bezier(.4,0,.2,1);
  --tr-f: all .15s cubic-bezier(.4,0,.2,1);
}

/* ── Reset Base ─────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;          /* evita scroll horizontal en todo el doc */
}
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}
img,video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul,ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input,textarea,select { font-family: inherit; }

/* ── Layout ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--cw);
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;   /* garantiza que el padding no desborde */
}
.section    { padding: var(--py) 0; }
.section-sm { padding: 2.5rem 0; }
.section-lg { padding: 7rem 0; }
.section-dark  { background: var(--navy); }
.section-gray  { background: var(--gray-50); }
.section-brand { background: var(--grad-brand); }

/* ── Tipografía ─────────────────────────────── */
.h-xl { font-size: clamp(2.6rem,5.5vw,4.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.h-lg { font-size: clamp(2rem,3.5vw,3rem);     font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
.h-md { font-size: clamp(1.5rem,2.5vw,2.2rem); font-weight: 700; line-height: 1.2;  letter-spacing: -.02em; }
.h-sm { font-size: 1.2rem;  font-weight: 700; line-height: 1.3; }
.label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-white  { color: var(--white); }
.text-green  { color: var(--green-500); }
.text-blue   { color: var(--blue-500); }
.text-muted  { color: var(--gray-500); }

/* ── Section Header ─────────────────────────── */
.sec-hdr { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.sec-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem 1rem;
  background: var(--green-100); color: var(--green-700);
  border-radius: var(--r-f); font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem;
}
.sec-badge.blue { background: var(--blue-100); color: var(--blue-700); }

/* ── Botones ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.9rem; border-radius: var(--r-f);
  font-size: .95rem; font-weight: 700; letter-spacing: .01em;
  transition: var(--tr); white-space: nowrap; cursor: pointer;
}
.btn-green  { background: var(--grad-green); color: var(--white); box-shadow: var(--sh-g); }
.btn-green:hover  { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(59,174,34,.38); }
.btn-blue   { background: var(--grad-blue);  color: var(--white); box-shadow: var(--sh-b); }
.btn-blue:hover   { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(29,104,175,.38); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-white  { background: var(--white); color: var(--green-700); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.btn-wout   { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.55); }
.btn-wout:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn-lg { padding: 1rem 2.4rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.3rem; font-size: .85rem; }

/* ── Navbar ──────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1.3rem 0; transition: var(--tr);
}
.navbar.scrolled {
  background: rgba(255,255,255,.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: .8rem 0; box-shadow: 0 1px 24px rgba(0,0,0,.09);
}
.nb-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.nb-logo  { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.nb-logo img { height: 42px; width: auto; }
.nb-logo-text { font-size: 1.55rem; font-weight: 800; letter-spacing: -.025em; }
.nb-logo-text .g { color: var(--green-500); }
.nb-logo-text .b { color: var(--blue-500); }

.nb-nav { display: flex; align-items: center; gap: .15rem; }
.nb-nav a {
  padding: .5rem .9rem; font-size: .9rem; font-weight: 500;
  color: rgba(255,255,255,.82); border-radius: var(--r-sm);
  transition: var(--tr-f); position: relative;
}
.navbar.scrolled .nb-nav a { color: var(--gray-700); }
.nb-nav a::after {
  content:''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--green-500); border-radius: 2px; transition: var(--tr-f);
}
.nb-nav a:hover::after, .nb-nav a.active::after { width: calc(100% - 1.5rem); }
.nb-nav a:hover { color: var(--white); }
.navbar.scrolled .nb-nav a:hover { color: var(--green-600); }

.nb-cta { display: flex; align-items: center; gap: .75rem; }
.nb-ham {
  display: none; flex-direction: column; gap: 5px;
  padding: .5rem; flex-shrink: 0;          /* no se aplasta en flex */
  border-radius: var(--r-sm);
}
.nb-ham span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: var(--tr-f);
  transform-origin: center;
}
.navbar.scrolled .nb-ham span { background: var(--gray-700); }

/* ─── Mobile nav — animación max-height ───────────
   Siempre es display:flex pero colapsado a altura 0.
   Al agregar .open se expande con transición suave;
   nunca "asoma" porque overflow:hidden lo contiene.
──────────────────────────────────────────────── */
.nb-mobile {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-top: 0 solid var(--gray-100); /* se activa con .open */
  max-height: 0;
  overflow: hidden;
  transition:
    max-height .38s cubic-bezier(.4, 0, .2, 1),
    border-top-width .38s cubic-bezier(.4, 0, .2, 1);
}
.nb-mobile.open {
  max-height: 560px;                   /* mayor que el contenido real */
  border-top-width: 1px;
}
.nb-mobile a {
  padding: .75rem 1.5rem; font-size: .95rem; font-weight: 500;
  color: var(--gray-700); border-bottom: 1px solid var(--gray-100); transition: var(--tr-f);
  flex-shrink: 0;
}
.nb-mobile a:hover { color: var(--green-600); background: var(--green-50); }
.nb-mobile .btn { margin: .75rem 1.5rem; flex-shrink: 0; }

/* ── Hero ────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--navy); overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .35; z-index: 0;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 60% at 15% 55%, rgba(59,174,34,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(29,104,175,.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 65% 80%, rgba(29,104,175,.14) 0%, transparent 50%),
    linear-gradient(145deg, #09142a 0%, #0d1b35 45%, #0f2040 100%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 1; opacity: .035;
  background-image: linear-gradient(var(--green-400) 1px, transparent 1px),
                    linear-gradient(90deg, var(--green-400) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-overlay { position: absolute; inset: 0; z-index: 2; background: var(--grad-hero); }
.hero-content { position: relative; z-index: 10; padding: 9rem 0 5rem; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem 1.2rem; margin-bottom: 1.5rem;
  background: rgba(59,174,34,.14); border: 1px solid rgba(59,174,34,.28);
  border-radius: var(--r-f); color: var(--green-400);
  font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.hero-badge-dot {
  width: 6px; height: 6px; background: var(--green-400); border-radius: 50%;
  animation: pulse-d 2.2s infinite;
}
@keyframes pulse-d {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.75); }
}

.hero-title {
  font-size: clamp(2.6rem,5.5vw,4.5rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -.03em;
  color: var(--white); margin-bottom: 1.5rem; max-width: 820px;
}
.hero-title .accent {
  background: linear-gradient(135deg,#5dc93a 0%,#3bae22 40%,#1d68af 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; line-height: 1.78; color: rgba(255,255,255,.7);
  max-width: 560px; margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 4rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 1px;
  max-width: 720px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-lg); overflow: hidden;
}
.hero-stat { padding: 1.3rem 1.5rem; background: rgba(255,255,255,.03); text-align: center; }
.hero-stat-n { font-size: 1.8rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: .25rem; }
.hero-stat-n em { color: var(--green-400); font-style: normal; }
.hero-stat-l { font-size: .72rem; color: rgba(255,255,255,.5); font-weight: 500; letter-spacing: .04em; }

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; flex-direction: column; align-items: center; gap: .45rem;
  color: rgba(255,255,255,.38); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  animation: bounce-d 2.5s infinite;
}
@keyframes bounce-d {
  0%,100% { transform:translateX(-50%) translateY(0); }
  50%      { transform:translateX(-50%) translateY(6px); }
}

/* ── Trust Bar ───────────────────────────────── */
.trust-bar { background: var(--white); overflow: hidden; }
.trust-label {
  text-align: center; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gray-400); margin-bottom: 1.75rem;
}
.trust-marquee {
  display: flex; overflow: hidden; gap: 0; position: relative;
  width: 100%;        /* no excede el viewport */
  max-width: 100vw;
}
.trust-track {
  display: flex; gap: 1.5rem; flex-shrink: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.trust-logo {
  flex-shrink: 0; height: 42px; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100); border-radius: var(--r-md);
  font-size: .8rem; font-weight: 800; color: var(--gray-400);
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; min-width: 130px;
  transition: var(--tr-f);
}
.trust-logo:hover { background: var(--gray-200); color: var(--gray-600); }

/* ── Servicios ───────────────────────────────── */
.srv-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.srv-card {
  background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--r-lg);
  padding: 2rem; transition: var(--tr); position: relative; overflow: hidden;
}
.srv-card::before {
  content:''; position: absolute; top:0; left:0; right:0; height:3px;
  background: var(--grad-brand); opacity:0; transition: var(--tr);
}
.srv-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: var(--green-200); }
.srv-card:hover::before { opacity: 1; }

.srv-icon {
  width: 56px; height: 56px; background: var(--green-100); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem;
  transition: var(--tr);
}
.srv-card:hover .srv-icon { background: var(--green-500); }
.srv-icon svg { width: 28px; height: 28px; color: var(--green-600); transition: var(--tr); }
.srv-card:hover .srv-icon svg { color: var(--white); }

.srv-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .55rem; }
.srv-desc  { font-size: .9rem; color: var(--gray-500); line-height: 1.65; margin-bottom: 1.25rem; }
.srv-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .86rem; font-weight: 700; color: var(--green-500); transition: var(--tr-f);
}
.srv-link:hover { gap: .6rem; color: var(--green-700); }

/* ── Productos ───────────────────────────────── */
.prod-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.prod-card {
  background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--r-lg);
  overflow: hidden; transition: var(--tr);
}
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--sh-xl); border-color: var(--blue-200); }

.prod-img {
  aspect-ratio: 4/3; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100), var(--blue-50));
  display: flex; align-items: center; justify-content: center;
}
.prod-img svg { width: 64px; height: 64px; color: var(--gray-300); }
.prod-badge {
  position: absolute; top: .75rem; left: .75rem;
  padding: .25rem .8rem; border-radius: var(--r-f);
  font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.badge-g { background: var(--green-500); color: var(--white); }
.badge-b { background: var(--blue-500);  color: var(--white); }
.badge-a { background: var(--gray-800);  color: var(--white); }

.prod-body { padding: 1.5rem; }
.prod-cat  { font-size: .72rem; font-weight: 700; color: var(--blue-500); letter-spacing: .07em; text-transform: uppercase; margin-bottom: .45rem; }
.prod-name { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); line-height: 1.3; margin-bottom: .5rem; }
.prod-desc { font-size: .875rem; color: var(--gray-500); line-height: 1.62; margin-bottom: 1.25rem; }
.prod-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; border-top: 1px solid var(--gray-100);
}

/* ── Beneficios ──────────────────────────────── */
.ben-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.ben-item { display: flex; gap: 1rem; align-items: flex-start; }
.ben-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: rgba(59,174,34,.12); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.ben-icon svg { width: 24px; height: 24px; color: var(--green-400); }
.ben-text h3 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: .35rem; }
.ben-text p  { font-size: .87rem; color: rgba(255,255,255,.58); line-height: 1.6; }

/* ── Estadísticas ────────────────────────────── */
.stats-sec { background: linear-gradient(135deg, var(--green-50), var(--blue-50)); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { text-align: center; padding: 3.5rem 2rem; position: relative; }
.stat-item:not(:last-child)::after {
  content:''; position: absolute; right:0; top:25%; height:50%; width:1px; background: var(--gray-200);
}
.stat-n {
  font-size: clamp(2.5rem,4vw,3.5rem); font-weight: 800; line-height: 1;
  background: var(--grad-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block; margin-bottom: .5rem;
}
.stat-l { font-size: .88rem; color: var(--gray-500); font-weight: 500; }

/* ── CTA Banner ──────────────────────────────── */
.cta-banner { background: var(--grad-brand); padding: 4rem 0; }
.cta-inner  { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-text h2 { font-size: clamp(1.5rem,3vw,2.3rem); font-weight: 800; color: var(--white); margin-bottom: .4rem; }
.cta-text p  { color: rgba(255,255,255,.78); font-size: 1.05rem; }
.cta-actions { display: flex; gap: .85rem; flex-shrink: 0; }

/* ── Testimoniales ───────────────────────────── */
.test-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.test-card {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 2rem; transition: var(--tr); position: relative;
}
.test-card::before {
  content:'"'; position: absolute; top: 1.2rem; right: 1.75rem;
  font-size: 5rem; font-weight: 800; color: var(--gray-100); line-height: 1; font-family: serif;
}
.test-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.test-stars { display: flex; gap: .2rem; margin-bottom: 1rem; }
.test-stars svg { width: 18px; height: 18px; color: #F59E0B; fill: #F59E0B; }
.test-text  { font-size: .9rem; color: var(--gray-600); line-height: 1.72; margin-bottom: 1.5rem; }
.test-author { display: flex; align-items: center; gap: .85rem; }
.test-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad-brand); display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; color: var(--white); flex-shrink: 0;
}
.test-info h4 { font-size: .9rem; font-weight: 700; color: var(--gray-900); margin-bottom: .1rem; }
.test-info p  { font-size: .78rem; color: var(--gray-400); }

/* ── Blog ────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.blog-card {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden; transition: var(--tr);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--green-200); }

.blog-img {
  aspect-ratio: 16/9; position: relative;
  background: linear-gradient(135deg, var(--green-100), var(--blue-100));
  display: flex; align-items: center; justify-content: center;
}
.blog-img svg { width: 48px; height: 48px; color: var(--gray-300); }
.blog-cat {
  position: absolute; bottom: .75rem; left: .75rem;
  padding: .22rem .75rem; background: var(--green-500); color: var(--white);
  border-radius: var(--r-f); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.blog-body { padding: 1.5rem; }
.blog-meta { display: flex; gap: 1rem; font-size: .78rem; color: var(--gray-400); margin-bottom: .75rem; }
.blog-title {
  font-size: .98rem; font-weight: 700; color: var(--gray-900);
  line-height: 1.4; margin-bottom: .55rem; transition: var(--tr-f);
}
.blog-card:hover .blog-title { color: var(--green-600); }
.blog-exc {
  font-size: .87rem; color: var(--gray-500); line-height: 1.65; margin-bottom: 1.2rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-more {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-weight: 700; color: var(--blue-500); transition: var(--tr-f);
}
.blog-more:hover { gap: .6rem; color: var(--blue-700); }

/* ── Contacto ────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 3rem; align-items: start; }
.contact-info {
  background: var(--nav, var(--navy)); background: var(--grad-dark);
  border-radius: var(--r-lg); padding: 2.5rem; color: var(--white);
}
.contact-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: .4rem; }
.contact-info > p { color: rgba(255,255,255,.62); font-size: .9rem; line-height: 1.65; margin-bottom: 2rem; }
.c-detail { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.4rem; }
.c-icon {
  width: 40px; height: 40px; flex-shrink: 0; background: rgba(59,174,34,.14);
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
}
.c-icon svg { width: 20px; height: 20px; color: var(--green-400); }
.c-text strong { display: block; font-size: .74rem; font-weight: 700; color: rgba(255,255,255,.45); letter-spacing: .07em; text-transform: uppercase; margin-bottom: .2rem; }
.c-text span  { font-size: .92rem; color: var(--white); }

.contact-form-card {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: .83rem; font-weight: 700; color: var(--gray-700); margin-bottom: .4rem; }
.form-label .req { color: var(--green-500); margin-left: 2px; }
.form-ctrl {
  width: 100%; padding: .72rem 1rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md); font-size: .95rem; color: var(--gray-800);
  background: var(--white); transition: var(--tr-f); outline: none;
}
.form-ctrl:focus { border-color: var(--green-400); box-shadow: 0 0 0 3px rgba(59,174,34,.12); }
.form-ctrl::placeholder { color: var(--gray-400); }
textarea.form-ctrl { min-height: 120px; resize: vertical; }
.form-select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem;
}
.form-check { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.2rem; }
.form-check input { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; accent-color: var(--green-500); }
.form-check-lbl { font-size: .83rem; color: var(--gray-600); line-height: 1.5; }
.form-check-lbl a { color: var(--green-600); font-weight: 700; }
.form-err { font-size: .78rem; color: #EF4444; margin-top: .3rem; display: none; }
.form-group.error .form-ctrl { border-color: #EF4444; }
.form-group.error .form-err  { display: block; }
.form-success {
  text-align: center; padding: 3rem 2rem;
}
.form-success-ico {
  width: 72px; height: 72px; background: var(--green-100); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
}
.form-success-ico svg { width: 36px; height: 36px; color: var(--green-500); }
.form-success h3 { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; }
.form-success p  { font-size: .92rem; color: var(--gray-500); }

/* ── Footer ──────────────────────────────────── */
.footer { background: var(--navy); color: var(--white); }
.foot-main {
  padding: 4.5rem 0 3rem; display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.foot-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.foot-logo img { height: 40px; }
.foot-desc { font-size: .88rem; color: rgba(255,255,255,.52); line-height: 1.72; margin-bottom: 1.5rem; }
.foot-social { display: flex; gap: .6rem; }
.foot-soc-link {
  width: 36px; height: 36px; background: rgba(255,255,255,.08); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; transition: var(--tr-f);
}
.foot-soc-link:hover { background: var(--green-500); }
.foot-soc-link svg { width: 17px; height: 17px; }
.foot-col-title { font-size: .73rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.38); margin-bottom: 1.2rem; }
.foot-links { display: flex; flex-direction: column; gap: .55rem; }
.foot-links a { font-size: .88rem; color: rgba(255,255,255,.62); transition: var(--tr-f); }
.foot-links a:hover { color: var(--green-400); }
.foot-ci { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .9rem; font-size: .87rem; color: rgba(255,255,255,.62); }
.foot-ci svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; color: var(--green-400); }
.foot-recl {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem;
  padding: .38rem 1rem; background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.28);
  border-radius: var(--r-sm); color: #FCA5A5; font-size: .78rem; font-weight: 700; transition: var(--tr-f);
}
.foot-recl:hover { background: rgba(239,68,68,.24); }
.foot-bottom {
  padding: 1.5rem 0; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.foot-copy { font-size: .82rem; color: rgba(255,255,255,.38); }
.foot-legal { display: flex; gap: 1.5rem; }
.foot-legal a { font-size: .8rem; color: rgba(255,255,255,.38); transition: var(--tr-f); }
.foot-legal a:hover { color: var(--green-400); }

/* ── Floating Buttons ────────────────────────── */
.wp-float {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 900;
  width: 56px; height: 56px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.42); transition: var(--tr);
  animation: wp-pulse 3s infinite;
}
.wp-float:hover { transform: scale(1.1); animation: none; box-shadow: 0 8px 32px rgba(37,211,102,.5); }
.wp-float svg { width: 28px; height: 28px; color: var(--white); fill: var(--white); }
@keyframes wp-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.42); }
  50%      { box-shadow: 0 4px 30px rgba(37,211,102,.6), 0 0 0 8px rgba(37,211,102,.1); }
}

.btt {
  position: fixed; bottom: 5.5rem; right: 2rem; z-index: 900;
  width: 44px; height: 44px; background: var(--navy-l); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-md); opacity: 0; transform: translateY(10px);
  transition: var(--tr); pointer-events: none;
}
.btt.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.btt svg { width: 20px; height: 20px; color: var(--white); }

/* ── Animaciones de Scroll ───────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.4,0,.2,1), transform .65s cubic-bezier(.4,0,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.rd1 { transition-delay: .1s; } .rd2 { transition-delay: .2s; }
.rd3 { transition-delay: .3s; } .rd4 { transition-delay: .4s; }
.rd5 { transition-delay: .5s; } .rd6 { transition-delay: .6s; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
  :root { --py: 4rem; }
  .srv-grid, .prod-grid, .test-grid, .blog-grid { grid-template-columns: repeat(2,1fr); }
  .foot-main { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-actions { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --py: 3rem; }

  /* Navbar mobile */
  .nb-nav, .nb-cta { display: none; }
  .nb-ham { display: flex; }

  /* Asegurar que la barra de nav no desborde */
  .nb-inner { gap: .75rem; }
  .nb-logo-text { font-size: 1.35rem; }

  /* Grids pasan a 1 columna */
  .srv-grid, .prod-grid, .test-grid, .blog-grid, .ben-grid { grid-template-columns: 1fr; }

  /* Hero stats: 2 columnas en tablet/mobile */
  .hero-stats { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .hero-stat-n { font-size: 1.5rem; }

  /* Hero padding ajustado */
  .hero-content { padding: 7rem 0 4rem; }

  /* Formulario */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .foot-main { grid-template-columns: 1fr; gap: 2rem; }
  .foot-bottom { flex-direction: column; text-align: center; }
  .foot-legal { justify-content: center; flex-wrap: wrap; }

  /* CTA banner */
  .cta-inner { gap: 1.5rem; }
}

@media (max-width: 480px) {
  /* Hero */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat { padding: 1rem 1rem; }
  .hero-stat-n { font-size: 1.35rem; }
  .hero-stat-l { font-size: .65rem; }

  /* Stats section */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 2rem 1rem; }
  .stat-item:not(:last-child)::after { display: none; }

  /* CTA */
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn { width: 100%; justify-content: center; }

  /* Logo texto más pequeño en móvil pequeño */
  .nb-logo-text { font-size: 1.2rem; }
  .nb-logo img  { height: 36px; }

  /* Section padding más compacto */
  :root { --py: 2.5rem; }

  /* Contacto: texto de info más compacto */
  .contact-info { padding: 1.75rem; }
  .contact-form-card { padding: 1.5rem; }
}

/* Pantallas muy pequeñas (< 360px) */
@media (max-width: 360px) {
  .hero-title { font-size: 2.1rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 1rem; }
  .nb-logo-text { display: none; }
}

/* ════════════════════════════════════════════
   LAYOUTS DE PÁGINAS INTERNAS
   Clases para nosotros, servicios, blog —
   se deben usar en lugar de grids inline para
   que los breakpoints funcionen correctamente.
════════════════════════════════════════════ */

/* Hero de página interna */
.page-hero {
  background: var(--grad-dark);
  padding: 8rem 0 4.5rem;
  color: var(--white);
}
.page-hero h1 { color: var(--white); }
.page-hero p  { font-size: 1.1rem; color: rgba(255,255,255,.7); max-width: 600px; line-height: 1.75; margin-top: 1.2rem; }

/* Split 2 columnas (texto | visual) */
.pg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Split invertido: visual DOM-primero, texto DOM-segundo → en desktop imagen derecha */
.pg-split--rev { direction: rtl; }
.pg-split--rev > * { direction: ltr; }

/* Bloque de servicio con anchor */
.pg-block {
  margin-bottom: 5rem;
  scroll-margin-top: 90px;
}
.pg-block:last-child { margin-bottom: 0; }

/* Caja visual / ilustración */
.pg-visual {
  background: linear-gradient(135deg, var(--green-50), var(--blue-50));
  border-radius: var(--r-xl);
  padding: 2.5rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-visual--blue { background: linear-gradient(135deg, var(--blue-50), var(--green-50)); }

/* Grid 3 columnas para tarjetas (misión/visión/valores) */
.pg-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Tarjeta blanca interna */
.pg-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 2rem;
}
.pg-card-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.pg-card-icon--green { background: var(--green-100); }
.pg-card-icon--blue  { background: var(--blue-100); }
.pg-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .6rem; }
.pg-card p  { font-size: .9rem; color: var(--gray-500); line-height: 1.7; }

/* Grid 2 columnas — stats y datos rápidos */
.pg-stats-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.pg-stat-box {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
}
.pg-stat-box .num {
  font-size: 2.25rem; font-weight: 800; line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.pg-stat-box .lbl { font-size: .82rem; color: var(--gray-500); margin-top: .3rem; }

/* Artículo destacado (blog) */
.pg-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  margin-bottom: 3rem;
}
.pg-featured-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--green-100), var(--blue-100));
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
}

/* Lista de checks de servicio */
.srv-checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .7rem; margin-top: 1.2rem; }
.srv-checklist li {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .92rem; color: var(--gray-700);
}
.srv-checklist li svg { flex-shrink: 0; margin-top: 2px; color: var(--green-500); }

/* Newsletter form */
.newsletter-form {
  display: flex; gap: .75rem;
  max-width: 460px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: .75rem 1.2rem;
  border: 1.5px solid rgba(255,255,255,.15); border-radius: var(--r-f);
  background: rgba(255,255,255,.07); color: var(--white);
  font-size: .95rem; outline: none; font-family: inherit;
  min-width: 0;      /* evita desbordamiento en flex */
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.45); }

/* ── Responsive páginas internas ── */
@media (max-width: 768px) {
  .pg-split       { grid-template-columns: 1fr; gap: 2rem; }
  .pg-split--rev  { direction: ltr; }           /* reset: apila en DOM order */
  .pg-cards-3     { grid-template-columns: 1fr; }
  .pg-featured    { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.5rem; }
  .pg-block       { margin-bottom: 3.5rem; }
  .pg-visual      { min-height: 200px; padding: 2rem; }
  .page-hero      { padding: 7rem 0 3rem; }
}
@media (max-width: 480px) {
  .pg-featured    { padding: 1.25rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; }
  .newsletter-form .btn  { width: 100%; justify-content: center; }
}
