/* ────────────────────────────────────────────────────────────────────
   Botiquín Familiar Inteligente · CSS Corporativo Profesional
   ──────────────────────────────────────────────────────────────────── */

:root {
  /* Paleta corporativa */
  --primary: #059669;           /* Verde farmacia */
  --primary-dark: #047857;
  --primary-light: #10b981;
  --secondary: #0f172a;         /* Azul marino profundo */
  --accent: #3b82f6;            /* Azul profesional */

  /* Neutros */
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #f1f5f9;
  --text-dark: #1e293b;
  --text-primary: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;

  /* Spacing */
  --spacing-unit: 8px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Sizes */
  --max-width: 1200px;
}

/* ────────────────────────────────────────────────────────────────────
   Reset & Base Styles
   ──────────────────────────────────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--secondary);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; margin-bottom: var(--spacing-lg); }
h3 { font-size: 24px; }
h4 { font-size: 18px; color: var(--text-dark); }

p { color: var(--text-primary); line-height: 1.65; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

/* ────────────────────────────────────────────────────────────────────
   Header
   ──────────────────────────────────────────────────────────────────── */

.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  transition: transform 0.2s;
}

.logo:hover {
  transform: scale(1.05);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--primary);
}

/* ────────────────────────────────────────────────────────────────────
   Hero Section
   ──────────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: var(--spacing-3xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.hero-text h1 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 48px;
}

.hero-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  margin-bottom: var(--spacing-xl);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--spacing-lg);
  border-radius: 12px;
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* ────────────────────────────────────────────────────────────────────
   Buttons
   ──────────────────────────────────────────────────────────────────── */

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

/* ────────────────────────────────────────────────────────────────────
   Features Section
   ──────────────────────────────────────────────────────────────────── */

.features {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-white);
}

.features h2 {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-2xl);
}

.feature-card {
  padding: var(--spacing-2xl);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-light);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(5, 150, 105, 0.1);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: var(--spacing-md);
  display: block;
}

.feature-card h3 {
  color: var(--secondary);
  margin-bottom: var(--spacing-sm);
  font-size: 20px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ────────────────────────────────────────────────────────────────────
   Audience Section
   ──────────────────────────────────────────────────────────────────── */

.audience {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-gray);
}

.audience h2 {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-2xl);
}

.audience-card {
  background: white;
  padding: var(--spacing-2xl);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.audience-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.audience-card.highlight {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
}

.audience-card h3 {
  font-size: 24px;
  margin-bottom: var(--spacing-sm);
}

.audience-card.highlight h3 {
  color: white;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: var(--spacing-lg);
  display: block;
}

.audience-card.highlight .subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.benefits-list {
  list-style: none;
  margin: var(--spacing-lg) 0;
}

.benefits-list li {
  padding: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
  position: relative;
  color: var(--text-primary);
  font-size: 15px;
}

.benefits-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.audience-card.highlight .benefits-list li {
  color: rgba(255, 255, 255, 0.9);
}

.audience-card.highlight .benefits-list li::before {
  color: white;
}

.audience-card a {
  display: inline-block;
  margin-top: var(--spacing-lg);
}

/* ────────────────────────────────────────────────────────────────────
   FAQ Section
   ──────────────────────────────────────────────────────────────────── */

.faq {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-white);
}

.faq h2 {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-2xl);
}

.faq-item {
  padding: var(--spacing-lg);
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.faq-item h4 {
  margin-bottom: var(--spacing-sm);
  color: var(--secondary);
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────────────
   CTA Final Section
   ──────────────────────────────────────────────────────────────────── */

.cta-final {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: var(--spacing-3xl) 0;
  text-align: center;
}

.cta-final h2 {
  color: white;
  margin-bottom: var(--spacing-md);
}

.cta-final p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  margin-bottom: var(--spacing-2xl);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* ────────────────────────────────────────────────────────────────────
   Footer
   ──────────────────────────────────────────────────────────────────── */

.footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-3xl) 0 var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-family: var(--font-family);
  font-size: 16px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-sm);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ────────────────────────────────────────────────────────────────────
   Responsive
   ──────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }

  .nav {
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }

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

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

  .hero-text h1 {
    font-size: 32px;
  }

  .container {
    padding: 0 var(--spacing-lg);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }

  .nav {
    gap: var(--spacing-sm);
    font-size: 13px;
  }

  .header-content {
    padding: var(--spacing-md) 0;
  }

  .hero {
    padding: var(--spacing-2xl) 0;
  }

  .hero-text h1 {
    font-size: 24px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .features-grid,
  .audience-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Fila de botones al pie de las guías */
.doc-actions { margin-top: 32px; display: flex; gap: 12px; justify-content: space-between; }

/* ────────────────────────────────────────────────────────────────────
   Compatibilidad: sistema de páginas de documentación y guías
   (doc-hero, doc, band, cards, pill, steps…). El rediseño corporativo
   reescribió este archivo solo con las clases de index.html y dejó sin
   estilos el resto de páginas — este bloque las reviste con la misma
   paleta corporativa. (2026-07-20)
   ──────────────────────────────────────────────────────────────────── */

/* Cabecera de sitio (páginas doc) */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--secondary); border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .bar { max-width: var(--max-width); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; font-family: var(--font-display); }
.cross { width: 18px; height: 18px; border-radius: 4px; background: var(--primary); display: inline-block; position: relative; }
.cross::before, .cross::after { content: ''; position: absolute; background: #fff; }
.cross::before { left: 7px; top: 3px; width: 4px; height: 12px; }
.cross::after { top: 7px; left: 3px; width: 12px; height: 4px; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: #cbd5e1; text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: #fff; }

/* Hero de documentación */
.doc-hero { background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%); color: #fff; text-align: center; padding: 56px 24px; }
.doc-hero h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 10px; }
.doc-hero p { color: #cbd5e1; max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* Cuerpo de documento */
.doc { max-width: 820px; margin: 0 auto; padding: 40px 24px 64px; }
.doc > nav { margin-bottom: 24px; }
.doc > nav a { color: var(--primary-dark); text-decoration: none; font-weight: 600; font-size: .95rem; }
.doc h2 { font-family: var(--font-display); color: var(--secondary); font-size: 1.5rem; margin: 40px 0 14px; }
.doc h2:first-of-type { margin-top: 0; }
.doc h3 { color: var(--secondary); font-size: 1.12rem; margin: 26px 0 10px; }
.doc p { color: var(--text-primary); line-height: 1.7; margin-bottom: 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; }
.doc li { color: var(--text-primary); line-height: 1.7; margin-bottom: 8px; }
.doc a { color: var(--primary-dark); }

/* Pasos numerados */
ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 52px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
ol.steps > li > strong { display: block; color: var(--secondary); margin-bottom: 2px; }

/* Nota destacada */
.note { background: var(--bg-gray); border-left: 4px solid var(--primary); border-radius: 8px; padding: 14px 18px; margin: 18px 0; color: var(--text-primary); line-height: 1.65; }

/* Tablas de documento */
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: .95rem; }
.doc th { text-align: left; background: var(--bg-gray); color: var(--secondary); padding: 10px 12px; border-bottom: 2px solid var(--border-dark); }
.doc td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-primary); vertical-align: top; line-height: 1.55; }

/* Píldoras de estado */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill.ok { background: #d1fae5; color: var(--primary-dark); }
.pill.rev { background: #fef3c7; color: #92400e; }
.pill.ko { background: #fee2e2; color: #b91c1c; }

/* Botones legacy */
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn.ghost:hover { background: var(--bg-gray); }

/* Secciones band + tarjetas (farmacias.html, usuarios.html…) */
.band { padding: 56px 0; }
.band.alt { background: var(--bg-light); }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.band h2 { font-family: var(--font-display); color: var(--secondary); font-size: 1.7rem; margin-bottom: 8px; }
.band .sub { color: var(--text-secondary); margin-bottom: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--bg-white); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.card h3 { color: var(--secondary); font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-primary); line-height: 1.6; font-size: .95rem; }
.card a { color: var(--primary-dark); font-weight: 600; text-decoration: none; }
.ico { font-size: 1.6rem; margin-bottom: 10px; }

/* Hero legado (páginas con .hero + .vignette) */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.lead { color: var(--text-secondary); font-size: 1.08rem; line-height: 1.7; margin: 10px 0 18px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.vignette { background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.v-title { font-weight: 700; color: var(--secondary); margin-bottom: 12px; }
.v-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.v-item b { color: var(--secondary); display: block; font-size: .95rem; }
.v-item small { color: var(--text-secondary); }
.v-item > div { flex: 1; }
.dot { font-size: 1.2rem; }
.chip { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.chip.ok { background: #d1fae5; color: var(--primary-dark); }

/* Pie de sitio (páginas doc) */
.site-footer { background: var(--secondary); color: #cbd5e1; padding: 36px 0; margin-top: 48px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .credit strong { color: #fff; display: block; margin-bottom: 4px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #cbd5e1; text-decoration: none; font-size: .92rem; }
.site-footer a:hover { color: #fff; }

@media (max-width: 640px) {
  .site-header .bar { flex-direction: column; gap: 10px; }
  .doc-actions { flex-direction: column; }
  .doc-actions .btn { text-align: center; }
}

/* Hero legado (farmacias.html / usuarios.html): hijos directos + .vignette,
   sin .hero-content. Scoped con :has para no afectar al hero de index. */
.hero:has(> .vignette) { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; max-width: var(--max-width); margin: 0 auto; padding: 56px 24px; }
.hero:has(> .vignette) > div { position: relative; z-index: 1; }
.hero:has(> .vignette) h1 { color: #fff; font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 6px; }
.hero:has(> .vignette) .lead { color: #cbd5e1; }
@media (max-width: 800px) {
  .hero:has(> .vignette) { grid-template-columns: 1fr; }
}

/* Restos legacy menores */
.cta-wrap { text-align: center; }
.cta-sub { max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.warn-box { background: #fef3c7; border-left: 4px solid #d97706; border-radius: 8px; padding: 14px 18px; margin: 18px 0; color: #78350f; line-height: 1.6; }

/* Rejilla de ventajas del resumen ejecutivo (guía de reclamación) */
.benefit-grid { margin: 20px 0 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.benefit-grid .card { padding: 18px; }
.benefit-grid .ico { font-size: 1.4rem; margin-bottom: 6px; }
.benefit-grid h3 { font-size: 1rem; }
.benefit-grid p { font-size: .9rem; }

/* Rejilla compacta del catálogo de servicios */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; }
.mini-grid span { background: var(--bg-gray); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: .9rem; color: var(--text-primary); }

/* Logo del header (imagen del maletín Botiquín) */
.logo-img { border-radius: 8px; display: block; }
