/* ==========================================================================
   Obres BCN — hoja de estilos única
   Sin librerías. Fuentes del sistema. Mobile-first. CLS ~0.
   ========================================================================== */

:root {
  --azul: #1F3A5F;
  --azul-900: #16293f;
  --madera: #D8C3A5;
  --madera-soft: #ede3d3;
  --blanco: #F7F5F2;
  --texto: #2B2B2B;
  --texto-soft: #555049;
  --verde: #2E7D32;
  --verde-700: #256528;
  --linea: #e4ded5;
  --sombra: 0 1px 2px rgba(31, 58, 95, .06), 0 8px 24px rgba(31, 58, 95, .07);
  --sombra-fuerte: 0 12px 40px rgba(31, 58, 95, .14);
  --radio: 14px;
  --radio-sm: 10px;
  --max: 1140px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --paso: clamp(1rem, 0.6rem + 1.6vw, 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.18; color: var(--azul); letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--texto-soft); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--paso); }

section { padding-block: clamp(2.75rem, 1.5rem + 5vw, 5rem); }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--verde-700); margin: 0 0 .6rem;
}
.eyebrow.alt { color: var(--azul); }

.lead { font-size: 1.15rem; color: var(--texto-soft); max-width: 60ch; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--azul); color: #fff; padding: .75rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 242, .9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--linea);
}
.nav {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}
.brand {
  font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: var(--azul);
  white-space: nowrap; margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand b { color: var(--azul); }
.brand span { color: #b08d57; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--linea); border-radius: 10px;
  background: #fff; cursor: pointer; color: var(--azul);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-menu { display: none; }
.nav-menu a { color: var(--texto); font-weight: 600; padding: .4rem .2rem; }
.nav-menu a:hover { color: var(--azul); text-decoration: none; }
.nav .nav-cta { display: none; }

.lang-switch { font-size: .85rem; font-weight: 600; }
.lang-switch a { color: var(--texto-soft); }

@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex; align-items: center; gap: 1.6rem; margin-left: 1rem;
  }
  .nav .nav-cta { display: inline-flex; }
}

/* mobile drawer */
.mobile-menu {
  display: none;
  border-bottom: 1px solid var(--linea);
  background: var(--blanco);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: .5rem var(--paso) 1rem; }
.mobile-menu li { border-bottom: 1px solid var(--linea); }
.mobile-menu a { display: block; padding: .9rem .2rem; font-weight: 600; color: var(--texto); }
.mobile-menu .btn { margin-top: .9rem; width: 100%; }
@media (min-width: 920px) { .mobile-menu { display: none !important; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 700; line-height: 1; cursor: pointer;
  padding: .95rem 1.4rem; border-radius: 12px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--verde); color: #fff; box-shadow: 0 6px 18px rgba(46,125,50,.25); }
.btn-primary:hover { background: var(--verde-700); }
.btn-ghost { background: transparent; color: var(--azul); border-color: rgba(31,58,95,.3); }
.btn-ghost:hover { background: rgba(31,58,95,.06); }
.btn-dark { background: var(--azul); color: #fff; }
.btn-dark:hover { background: var(--azul-900); }
.btn-wa { background: #1eb15a; color: #fff; }
.btn-wa:hover { background: #169949; }
.btn-block { width: 100%; }
.btn-lg { padding: 1.1rem 1.7rem; font-size: 1.05rem; }

.btn:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid #7aa7d6; outline-offset: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(216,195,165,.45), transparent 60%),
    linear-gradient(180deg, #fff, var(--blanco));
  border-bottom: 1px solid var(--linea);
}
.hero .container { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem); }
.hero h1 { margin-bottom: .4em; }
.hero .lead { margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-card {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem; box-shadow: var(--sombra);
}
.hero-card h2 { font-size: 1.05rem; margin-bottom: .8rem; }
.hero-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.hero-card li { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; color: var(--texto); }
.hero-card svg { width: 22px; height: 22px; color: var(--verde); flex: none; }
@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.25fr .9fr; align-items: center; gap: 3rem; }
}

/* ---------- Tira de confianza ---------- */
.trust { background: var(--azul); color: #fff; }
.trust .container { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.trust-item { display: flex; gap: .7rem; align-items: flex-start; }
.trust-item svg { width: 24px; height: 24px; color: var(--madera); flex: none; }
.trust-item p { color: #dfe6ef; margin: .15rem 0 0; font-size: .95rem; }
.trust-item strong { color: #fff; display: block; }
@media (min-width: 700px)  { .trust .container { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .trust .container { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; } }

/* ---------- Grid de tarjetas de servicio ---------- */
.section-head { max-width: 64ch; margin-bottom: 2rem; }
.cards { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 620px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem; box-shadow: var(--sombra);
  display: flex; flex-direction: column; gap: .5rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sombra-fuerte); border-color: var(--madera); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--madera-soft); color: var(--azul); margin-bottom: .4rem;
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin: 0; }
.card p { margin: 0; font-size: .97rem; }
.card .card-link { margin-top: auto; padding-top: .7rem; font-weight: 700; color: var(--verde-700); display: inline-flex; align-items: center; gap: .3rem; }
.card .card-link svg { width: 16px; height: 16px; }

/* ---------- Bloque alternado (texto + lista) ---------- */
.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.split.alt { background: #fff; }
.feature-list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .8rem; }
.feature-list li { display: flex; gap: .65rem; align-items: flex-start; }
.feature-list svg { width: 22px; height: 22px; color: var(--verde); flex: none; margin-top: .15rem; }

.panel {
  background: var(--madera-soft); border-radius: var(--radio); padding: 1.6rem;
  border: 1px solid var(--madera);
}
.panel h3 { margin-top: 0; }
.panel ul { margin: 0; padding-left: 1.1rem; }
.panel li { margin-bottom: .5rem; color: var(--texto-soft); }

/* bloque GEO de respuesta directa */
.geo-answer {
  background: #fff; border-left: 4px solid var(--verde); border-radius: var(--radio-sm);
  padding: 1.2rem 1.4rem; box-shadow: var(--sombra); margin: 1.5rem 0;
}
.geo-answer p { margin: 0; color: var(--texto); font-size: 1.05rem; }

/* ---------- Sección farmacias (destacada) ---------- */
.feature-strong { background: linear-gradient(160deg, var(--azul), var(--azul-900)); color: #fff; }
.feature-strong h2, .feature-strong h3 { color: #fff; }
.feature-strong p { color: #d9e2ee; }
.feature-strong .eyebrow { color: var(--madera); }
.feature-strong .panel { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); }
.feature-strong .panel li { color: #d9e2ee; }
.feature-strong .feature-list svg { color: var(--madera); }

/* ---------- Proceso ---------- */
.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 700px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.3rem;
  position: relative;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-weight: 800; color: var(--madera); font-size: 1.4rem; display: block; margin-bottom: .3rem;
}
.step h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
.step p { margin: 0; font-size: .95rem; }

/* ---------- CTA banda ---------- */
.cta-band {
  background: var(--madera-soft); border-radius: var(--radio);
  padding: clamp(1.5rem, 1rem + 3vw, 2.6rem); text-align: center;
  border: 1px solid var(--madera);
}
.cta-band h2 { margin-bottom: .4rem; }
.cta-band p { max-width: 55ch; margin-inline: auto; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.2rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .7rem; max-width: 800px; }
.faq details {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio-sm); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 1.2rem; font-weight: 700; color: var(--azul);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--verde); line-height: 1; flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 1.2rem 1.1rem; }
.faq .faq-body p { margin: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .9rem; padding-block: 1rem 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.crumbs li { color: var(--texto-soft); }
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--madera); }
.crumbs a { color: var(--texto-soft); }

/* ---------- Enlaces internos relacionados ---------- */
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.related a {
  display: inline-block; padding: .55rem .9rem; border: 1px solid var(--linea); border-radius: 999px;
  background: #fff; font-weight: 600; font-size: .92rem; color: var(--azul);
}
.related a:hover { background: var(--madera-soft); text-decoration: none; border-color: var(--madera); }

/* ---------- Formulario ---------- */
.form-wrap { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .form-wrap { grid-template-columns: 1.1fr .9fr; } }
.form-card {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: clamp(1.3rem, 1rem + 2vw, 2rem); box-shadow: var(--sombra);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--texto); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--texto);
  padding: .8rem .9rem; border: 1px solid #cfc8bd; border-radius: 10px; background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: .85rem; color: var(--texto-soft); }
.contact-aside { display: grid; gap: 1rem; align-content: start; }
.contact-aside .box {
  background: var(--azul); color: #fff; border-radius: var(--radio); padding: 1.4rem;
}
.contact-aside .box h3 { color: #fff; }
.contact-aside .box a { color: #fff; font-weight: 700; }
.contact-aside .box p { color: #d9e2ee; }

/* ---------- Footer ---------- */
.site-footer { background: var(--azul-900); color: #cdd7e3; padding-block: 2.6rem 1.4rem; }
.site-footer a { color: #cdd7e3; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 700px)  { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 1rem; margin: 0 0 .8rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-brand { font-weight: 800; font-size: 1.25rem; color: #fff; }
.footer-brand span { color: var(--madera); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem;
  font-size: .85rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between;
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #1eb15a; color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.wa-float:hover { background: #169949; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- utilidades ---------- */
.muted { color: var(--texto-soft); }
.center { text-align: center; }
.mt-2 { margin-top: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
