/* =========================================================
   IBEST — Design system
   Un solo archivo, sin dependencias externas ni frameworks.
   ========================================================= */

:root{
  --navy: #0F2436;
  --navy-deep: #0A1A26;
  --paper: #F4F6F5;
  --surface: #FFFFFF;
  --ink: #12202A;
  --ink-soft: #56666E;
  --line: #E1E6E4;
  --teal: #0EA5A0;
  --teal-deep: #086B68;
  --teal-tint: rgba(14,165,160,0.10);
  --amber: #D98B2B;
  --amber-tint: rgba(217,139,43,0.14);
  --whatsapp: #25D366;
  --radius: 6px;
  --max: 1180px;
  --shadow: 0 1px 2px rgba(15,36,54,0.06), 0 6px 20px rgba(15,36,54,0.05);
}

@media (prefers-color-scheme: dark){
  :root{
    --paper:#0B1A22; --surface:#102530; --ink:#E7EEEC; --ink-soft:#9FB0AC;
    --line:#1E3540; --teal:#3FD9CE; --teal-deep:#2BB6AC; --teal-tint: rgba(63,217,206,0.12);
    --amber:#E8A84D; --amber-tint: rgba(232,168,77,0.16);
  }
}
:root[data-theme="dark"]{
  --paper:#0B1A22; --surface:#102530; --ink:#E7EEEC; --ink-soft:#9FB0AC;
  --line:#1E3540; --teal:#3FD9CE; --teal-deep:#2BB6AC; --teal-tint: rgba(63,217,206,0.12);
  --amber:#E8A84D; --amber-tint: rgba(232,168,77,0.16);
}
:root[data-theme="light"]{
  --paper:#F4F6F5; --surface:#FFFFFF; --ink:#12202A; --ink-soft:#56666E;
  --line:#E1E6E4; --teal:#0EA5A0; --teal-deep:#086B68; --teal-tint: rgba(14,165,160,0.10);
  --amber:#D98B2B; --amber-tint: rgba(217,139,43,0.14);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height:1.5; -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ margin:0 0 0.4em; line-height:1.15; letter-spacing:-0.01em; text-wrap:balance; }
p{ margin:0 0 1em; color:var(--ink-soft); }
.mono{ font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric:tabular-nums; }
:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; } }

.container{ max-width:var(--max); margin:0 auto; padding:0 24px; }
.section{ padding: 56px 0; }
.section.tight{ padding:36px 0; }
.section-head{ max-width:60ch; margin-bottom:32px; }
.eyebrow{
  display:inline-block; font-size:0.72rem; font-weight:700; letter-spacing:0.10em;
  text-transform:uppercase; color:var(--teal); margin-bottom:10px;
}
.section-head h2{ font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-head p{ font-size:1.02rem; }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  font-weight:700; font-size:0.92rem; padding:12px 22px; border-radius:var(--radius);
  border:1px solid transparent; cursor:pointer; transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space:nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background:var(--teal); color:#04231F; }
.btn-primary:hover{ background:var(--teal-deep); color:#fff; }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-outline:hover{ border-color:var(--teal); color:var(--teal); }
.btn-whatsapp{ background:var(--whatsapp); color:#fff; }
.btn-whatsapp:hover{ background:#1DB855; }
.btn-block{ width:100%; }
.btn svg{ width:18px; height:18px; flex:0 0 auto; }

/* ---------- Header ---------- */
header.site{
  background:var(--navy); color:#fff; position:sticky; top:0; z-index:50;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.nav-bar{ display:flex; align-items:center; justify-content:space-between; gap:24px; padding:14px 0; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand img{ height:34px; width:auto; display:block; }
nav.main{ display:flex; align-items:center; gap:2px; }
nav.main a{
  color:rgba(255,255,255,0.82); font-size:0.9rem; font-weight:600; padding:10px 14px;
  border-radius:var(--radius); position:relative;
}
nav.main a:hover, nav.main a.active{ color:#fff; background:rgba(255,255,255,0.08); }
.nav-cta{ display:flex; align-items:center; gap:10px; }
.menu-toggle{
  display:none; background:none; border:1px solid rgba(255,255,255,0.25); color:#fff;
  width:40px; height:40px; border-radius:var(--radius); cursor:pointer;
}
@media (max-width: 900px){
  nav.main{ display:none; }
  .menu-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  nav.main.open{
    display:flex; flex-direction:column; align-items:stretch; gap:2px;
    position:absolute; left:0; right:0; top:100%; background:var(--navy);
    padding:10px 20px 18px; border-top:1px solid rgba(255,255,255,0.08);
  }
}

/* ---------- Hero ---------- */
.hero{
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color:#fff; position:relative; overflow:hidden;
}
.hero::after{
  content:""; position:absolute; inset:0;
  background: radial-gradient(600px 320px at 82% 20%, rgba(63,217,206,0.20), transparent 70%);
  pointer-events:none;
}
.hero-inner{ position:relative; padding: 72px 0 64px; display:grid; grid-template-columns: 1.1fr 0.9fr; gap:40px; align-items:center; }
@media (max-width: 860px){ .hero-inner{ grid-template-columns:1fr; padding:52px 0; } }
.hero h1{ font-size:clamp(2rem,4.2vw,3.1rem); }
.hero .lede{ color:#C7D6D2; font-size:1.08rem; max-width:52ch; }
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; }
.hero-panel{
  background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14);
  border-radius:10px; padding:26px; backdrop-filter: blur(2px);
}
.hero-panel .line{ display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,0.10); font-size:0.9rem; }
.hero-panel .line:last-child{ border-bottom:none; }
.hero-panel .line b{ color:#fff; }
.hero-panel .line span{ color:#9FB4AF; }

/* ---------- Business lines grid ---------- */
.lines-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
@media (max-width:960px){ .lines-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .lines-grid{ grid-template-columns:1fr; } }
.line-card{
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:24px; display:flex; flex-direction:column; gap:10px; transition:border-color .15s ease, transform .15s ease;
}
.line-card:hover{ border-color:var(--teal); transform:translateY(-2px); }
.line-card .icon{ width:38px; height:38px; color:var(--teal); }
.line-card h3{ font-size:1.05rem; }
.line-card p{ font-size:0.88rem; margin-bottom:0; }
.line-card .go{ margin-top:auto; font-size:0.82rem; font-weight:700; color:var(--teal); }

/* ---------- Category chips (subpage nav for equipos-medicos) ---------- */
.cat-nav{ display:flex; flex-wrap:wrap; gap:8px; margin: 6px 0 34px; }
.cat-nav a{
  font-size:0.82rem; font-weight:600; padding:8px 14px; border-radius:20px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-soft);
}
.cat-nav a:hover{ border-color:var(--teal); color:var(--teal); }
.cat-nav a.active{ background:var(--teal); border-color:var(--teal); color:#04231F; }

/* ---------- Specialty filter pills ---------- */
.pill-filters{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:26px; }
.pill{
  font-size:0.8rem; font-weight:600; padding:7px 14px; border-radius:20px; cursor:pointer;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-soft);
}
.pill[aria-pressed="true"]{ background:var(--teal-tint); border-color:var(--teal); color:var(--teal-deep); }

/* ---------- Product grid / cards ---------- */
.product-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
@media (max-width:920px){ .product-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .product-grid{ grid-template-columns:1fr; } }

.product-card{
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:20px; display:flex; flex-direction:column; gap:8px; box-shadow:var(--shadow);
}
.product-card .badges{ display:flex; gap:6px; flex-wrap:wrap; min-height:20px; }
.badge{ font-size:0.65rem; font-weight:800; letter-spacing:0.05em; text-transform:uppercase; padding:3px 8px; border-radius:20px; }
.badge.nuevo{ background:var(--amber-tint); color:var(--amber); }
.badge.destacado{ background:var(--teal-tint); color:var(--teal-deep); }
.product-card .p-tipo{ font-size:0.72rem; color:var(--ink-soft); text-transform:uppercase; letter-spacing:0.04em; font-weight:700; }
.product-card h4{ font-size:1.05rem; margin-bottom:2px; }
.product-card .p-tags{ display:flex; flex-wrap:wrap; gap:5px; margin:2px 0 6px; }
.product-card .tag{ font-size:0.68rem; color:var(--ink-soft); background:var(--paper); border:1px solid var(--line); padding:2px 7px; border-radius:4px; }
.product-card ul.specs{ list-style:none; margin:0 0 8px; padding:0; font-size:0.84rem; color:var(--ink-soft); display:flex; flex-direction:column; gap:4px; }
.product-card ul.specs li{ padding-left:14px; position:relative; }
.product-card ul.specs li::before{ content:"—"; position:absolute; left:0; color:var(--teal); }
.product-card .p-actions{ margin-top:auto; padding-top:10px; }
.empty-state{ padding:40px 20px; text-align:center; color:var(--ink-soft); border:1px dashed var(--line); border-radius:10px; }

/* ---------- Category section title on grouped listing pages ---------- */
.cat-block{ margin-bottom:46px; }
.cat-block h3{ font-size:1.2rem; display:flex; align-items:center; gap:10px; }
.cat-block h3 small{ font-size:0.7rem; font-weight:700; color:var(--ink-soft); background:var(--paper); border:1px solid var(--line); padding:3px 9px; border-radius:20px; }

/* ---------- Banner / carousel ---------- */
.banner{
  position:relative; border-radius:12px; overflow:hidden; color:#fff;
  min-height:220px; display:flex; align-items:flex-end; padding:28px 30px;
}
.banner .bg{ position:absolute; inset:0; z-index:0; }
.banner .content{ position:relative; z-index:1; max-width:60ch; }
.banner .eyebrow{ color:#EAF7F5; }
.banner h3{ font-size:1.5rem; }
.banner p{ color:rgba(255,255,255,0.85); }

/* ---------- Callout / feature strip ---------- */
.strip{ background:var(--navy); color:#fff; border-radius:12px; padding:32px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.strip h3{ font-size:1.3rem; margin-bottom:6px; }
.strip p{ color:#B9CBC7; margin-bottom:0; max-width:46ch; }

/* ---------- Cards row (nosotros valores, casos) ---------- */
.cards-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width:820px){ .cards-row{ grid-template-columns:1fr; } }
.info-card{ background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:20px; }
.info-card h4{ font-size:0.98rem; }
.info-card p{ font-size:0.88rem; margin-bottom:0; }

/* ---------- Forms ---------- */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }
.field{ display:flex; flex-direction:column; gap:6px; }
.field.full{ grid-column:1 / -1; }
.field label{ font-size:0.8rem; font-weight:700; color:var(--ink); }
.field input, .field select, .field textarea{
  font: inherit; padding:11px 13px; border:1px solid var(--line); border-radius:var(--radius);
  background:var(--surface); color:var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--teal); }
.field small.hint{ color:var(--ink-soft); font-size:0.76rem; }
.form-card{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:28px; box-shadow:var(--shadow); }
.form-note{ display:flex; gap:10px; align-items:flex-start; background:var(--teal-tint); border-radius:var(--radius); padding:12px 14px; font-size:0.85rem; color:var(--teal-deep); margin-bottom:18px; }

/* ---------- Footer ---------- */
footer.site{ background:var(--navy); color:#C7D6D2; margin-top:70px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding:48px 0 26px; }
@media (max-width:820px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:520px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-grid h5{ color:#fff; font-size:0.78rem; letter-spacing:0.08em; text-transform:uppercase; margin-bottom:14px; }
.footer-grid ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; font-size:0.88rem; }
.footer-grid a:hover{ color:#fff; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,0.1); padding:18px 0; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:0.78rem; color:#8FA6A0; }

/* ---------- Floating WhatsApp ---------- */
.wa-float{
  position:fixed; right:20px; bottom:20px; z-index:60; width:56px; height:56px; border-radius:50%;
  background:var(--whatsapp); display:flex; align-items:center; justify-content:center; box-shadow:0 6px 20px rgba(0,0,0,0.25);
  transition:transform .15s ease;
}
.wa-float:hover{ transform:scale(1.06); }
.wa-float svg{ width:28px; height:28px; fill:#fff; }

/* ---------- Breadcrumb ---------- */
.crumb{ font-size:0.82rem; color:var(--ink-soft); margin-bottom:14px; }
.crumb a{ color:var(--ink-soft); } .crumb a:hover{ color:var(--teal); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero{ background:var(--navy); color:#fff; padding:46px 0 40px; }
.page-hero .eyebrow{ color:#7FE0CB; }
.page-hero h1{ font-size:clamp(1.7rem,3.4vw,2.4rem); }
.page-hero p{ color:#C7D6D2; max-width:60ch; margin-bottom:0; }
