/* ============================================================
   Farmacia Giner Banqueri — estilos
   Paleta: blanco · verde farmacia · verde menta · azul verdoso
   Tipos: Schibsted Grotesk (display) · Figtree (texto)
   ============================================================ */

:root {
  /* Verdes */
  --green-900: #0f3d27;
  --green-800: #155c39;
  --green-700: #1d7a4d;
  --green-600: #239e5f;   /* primario */
  --green-500: #34b873;
  --green-400: #5fcf91;

  /* Menta / fondos suaves */
  --mint-50:  #f3faf5;
  --mint-100: #e8f5ec;
  --mint-200: #d2ebd9;

  /* Azul verdoso (acento) */
  --teal-600: #2a8f8a;
  --teal-100: #e1f1f0;

  /* Cálido sutil */
  --sand-50: #faf7f1;
  --sand-100: #f3ece0;

  /* Neutros */
  --ink:     #18302a;
  --slate:   #4a5a54;
  --muted:   #788580;
  --line:    #e4ebe7;
  --gray-50: #f6f8f7;
  --white:   #ffffff;

  --radius:  20px;
  --radius-sm: 12px;
  --radius-lg: 32px;
  --shadow-sm: 0 1px 2px rgba(20,60,40,.05), 0 2px 8px rgba(20,60,40,.04);
  --shadow:    0 4px 14px rgba(20,60,40,.07), 0 14px 40px rgba(20,60,40,.06);
  --shadow-lg: 0 18px 50px rgba(20,60,40,.14);

  --maxw: 1180px;
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--green-900);
  font-weight: 700;
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-700);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--green-500);
}

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 18px 0 16px; }
.section-head p { font-size: 1.12rem; color: var(--slate); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 14px 24px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: 0 8px 20px rgba(35,158,95,.28); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(35,158,95,.34); }
.btn-ghost { background: #fff; color: var(--green-800); box-shadow: inset 0 0 0 1.6px var(--mint-200); }
.btn-ghost:hover { background: var(--mint-50); transform: translateY(-2px); box-shadow: inset 0 0 0 1.6px var(--green-400); }
.btn-dark { background: var(--green-900); color: #fff; }
.btn-dark:hover { background: var(--green-800); transform: translateY(-2px); }
.btn-lg { padding: 17px 30px; font-size: 1.06rem; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.cross {
  width: 38px; height: 38px; position: relative; flex: none;
  border-radius: 9px; background: var(--mint-100);
}
.cross i { position: absolute; background: var(--green-600); border-radius: 3px; top: 50%; left: 50%; }
.cross i:first-child { width: 18px; height: 6px; transform: translate(-50%,-50%); }
.cross i:last-child  { width: 6px; height: 18px; transform: translate(-50%,-50%); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; color: var(--green-900); line-height: 1.05; letter-spacing: -.01em; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-weight: 500; font-size: .96rem; color: var(--slate); white-space: nowrap;
  padding: 9px 14px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--green-800); background: var(--mint-50); }

.header-cta { display: flex; align-items: center; gap: 10px; }

.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; color: var(--green-900); }
.menu-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 540px at 88% -8%, var(--mint-100), transparent 60%),
    radial-gradient(700px 500px at -6% 110%, var(--teal-100), transparent 55%),
    var(--white);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 7px 14px 7px 10px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--slate);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); position: relative; }
.dot.open { box-shadow: 0 0 0 4px rgba(52,184,115,.22); }
.dot.closed { background: #d98a3a; box-shadow: 0 0 0 4px rgba(217,138,58,.2); }

.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.3rem); margin: 22px 0 0; }
.hero h1 .accent { color: var(--green-600); }
.hero-lead { font-size: 1.2rem; color: var(--slate); margin-top: 22px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line); }
.fact { }
.fact .k { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; color: var(--green-800); }
.fact .l { font-size: .9rem; color: var(--muted); }

/* Hero media */
.hero-media { position: relative; }
.hero-photo {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 4/5; background: var(--mint-100);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(190deg, transparent 55%, rgba(15,61,39,.32)); }

.hero-chip {
  position: absolute; background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-radius: 16px; box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
}
.hero-chip .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--mint-100); color: var(--green-700); display: grid; place-items: center; flex: none; }
.hero-chip .ic svg { width: 21px; height: 21px; }
.hero-chip .t { font-family: var(--font-display); font-weight: 700; font-size: .98rem; color: var(--green-900); line-height: 1.15; }
.hero-chip .s { font-size: .82rem; color: var(--muted); }
.hero-chip.tl { top: 22px; left: -22px; }
.hero-chip.br { bottom: 24px; right: -20px; }

/* ---------- Tira de confianza ---------- */
.trust { background: var(--green-900); color: #fff; }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding: 26px 0; }
.trust-item { display: flex; align-items: center; gap: 13px; font-weight: 500; color: rgba(255,255,255,.92); }
.trust-item svg { width: 24px; height: 24px; color: var(--green-400); flex: none; }

/* ---------- Sobre / Presentación ---------- */
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.about-photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 5/4; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-points { list-style: none; margin-top: 28px; display: grid; gap: 16px; }
.about-points li { display: flex; gap: 14px; align-items: flex-start; }
.about-points .tick { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--mint-100); color: var(--green-700); display: grid; place-items: center; margin-top: 2px; }
.about-points .tick svg { width: 15px; height: 15px; }
.about-points strong { color: var(--green-900); font-weight: 700; font-family: var(--font-display); }
.about-points span { color: var(--slate); }

/* ---------- Servicio a domicilio ---------- */
.domicilio { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.domicilio::before { content:""; position:absolute; inset:0; background: radial-gradient(600px 400px at 90% 120%, rgba(255,255,255,.12), transparent 60%); }
.domicilio-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: clamp(40px, 5vw, 64px); position: relative; }
.domicilio .eyebrow { color: var(--green-400); }
.domicilio .eyebrow::before { background: var(--green-400); }
.domicilio h2 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); margin: 16px 0 16px; }
.domicilio p { color: rgba(255,255,255,.9); font-size: 1.12rem; max-width: 46ch; }
.domicilio .btn-primary { background: #fff; color: var(--green-800); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.domicilio .btn-primary:hover { background: var(--mint-50); }
.domicilio-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.domicilio-steps { display: grid; gap: 14px; }
.dstep { display: flex; gap: 16px; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 18px 20px; }
.dstep .n { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #fff; color: var(--green-700); font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; }
.dstep .tt { font-family: var(--font-display); font-weight: 700; }
.dstep .ss { font-size: .9rem; color: rgba(255,255,255,.82); }

/* ---------- Servicios grid ---------- */
.services { background: var(--mint-50); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--mint-200); }
.card .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--mint-100); color: var(--green-700); display: grid; place-items: center; margin-bottom: 18px; }
.card .ic svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--slate); font-size: .96rem; }
.card.teal .ic { background: var(--teal-100); color: var(--teal-600); }

/* ---------- Galería ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 220px 220px; gap: 16px; }
.gtile { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; background: var(--mint-100); }
.gtile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gtile:hover img { transform: scale(1.05); }
.gtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(15,61,39,.42)); opacity: 0; transition: opacity .25s; }
.gtile:hover::after { opacity: 1; }
.gtile .cap { position: absolute; left: 18px; bottom: 14px; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .95rem; opacity: 0; transform: translateY(6px); transition: .25s; z-index: 2; }
.gtile:hover .cap { opacity: 1; transform: translateY(0); }
.gtile.big { grid-column: span 2; grid-row: span 2; }
.gtile.tall { grid-row: span 2; }

/* ---------- Ubicación / contacto ---------- */
.locate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.info-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-row:last-of-type { border-bottom: none; }
.info-row .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--mint-100); color: var(--green-700); display: grid; place-items: center; }
.info-row .ic svg { width: 22px; height: 22px; }
.info-row .lbl { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.info-row .val { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--green-900); }
.info-row .val a:hover { color: var(--green-600); }

.hours { list-style: none; margin-top: 4px; }
.hours li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 1rem; }
.hours li span:first-child { color: var(--slate); }
.hours li span:last-child { font-weight: 600; color: var(--green-900); font-variant-numeric: tabular-nums; }
.hours li.today { background: var(--mint-50); border-radius: 10px; padding: 9px 14px; margin: 2px -10px; }
.hours li.today span:first-child { color: var(--green-800); font-weight: 700; }
.hours li.closed span:last-child { color: var(--muted); font-weight: 500; }

.info-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Mapa real (Google Maps embed) */
.map-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 420px; background: var(--mint-100); }
.map-card .map-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map-label { position: absolute; left: 20px; bottom: 20px; right: 20px; z-index: 4; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; box-shadow: var(--shadow); }
.map-label .t { font-family: var(--font-display); font-weight: 700; color: var(--green-900); }
.map-label .s { font-size: .88rem; color: var(--muted); }

/* ---------- Contacto / form ---------- */
.contact { background: var(--green-900); color: #fff; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
.contact h2 { color: #fff; font-size: clamp(2rem,4vw,2.9rem); }
.contact .lead { color: rgba(255,255,255,.86); font-size: 1.12rem; margin-top: 16px; max-width: 40ch; }
.contact-quick { display: grid; gap: 12px; margin-top: 30px; }
.cq { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); border-radius: 14px; padding: 15px 18px; transition: background .2s; }
.cq:hover { background: rgba(255,255,255,.12); }
.cq .ic { width: 42px; height: 42px; border-radius: 11px; background: rgba(95,207,145,.18); color: var(--green-400); display: grid; place-items: center; flex: none; }
.cq .ic svg { width: 21px; height: 21px; }
.cq .l { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .05em; }
.cq .v { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }

.form-card { background: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 40px); box-shadow: var(--shadow-lg); color: var(--ink); }
.form-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.form-card .fc-sub { color: var(--slate); margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--green-900); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 16px; border-radius: 12px; border: 1.6px solid var(--line); background: var(--gray-50);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-500); background: #fff; box-shadow: 0 0 0 4px rgba(52,184,115,.13); }
.field textarea { resize: vertical; min-height: 120px; }
.field.invalid input, .field.invalid textarea { border-color: #d9534f; background: #fdf3f3; }
.field .err { display: none; color: #c0392b; font-size: .84rem; margin-top: 6px; }
.field.invalid .err { display: block; }

.check { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 22px; font-size: .92rem; color: var(--slate); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green-600); flex: none; }
.check a { color: var(--green-700); text-decoration: underline; }
.check.invalid { color: #c0392b; }

.form-note { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success.show { display: block; }
.form-success .ok { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--mint-100); color: var(--green-600); display: grid; place-items: center; }
.form-success .ok svg { width: 32px; height: 32px; }
.form-success h3 { margin-bottom: 8px; }
.form-success p { color: var(--slate); }

/* ---------- Footer ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.footer .brand { margin-bottom: 16px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; font-family: var(--font-body); font-weight: 700; }
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a, .footer-col li { color: var(--slate); font-size: .96rem; }
.footer-col a:hover { color: var(--green-700); }
.footer-about p { color: var(--slate); font-size: .96rem; max-width: 34ch; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .86rem; }
.footer-bottom .legal { display: flex; gap: 18px; flex-wrap: wrap; }

.disclaimer { background: var(--gray-50); }
.disclaimer .wrap { padding-block: 18px; }
.disclaimer p { font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15,30,24,.86); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 32px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox .lb-close { position: absolute; top: 22px; right: 26px; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.lightbox .lb-close:hover { background: rgba(255,255,255,.26); }
.lightbox .lb-close svg { width: 24px; height: 24px; }

/* ---------- Mobile nav panel ---------- */
.mobile-nav { display: none; position: fixed; inset: 76px 0 0; z-index: 49; background: rgba(255,255,255,.98); backdrop-filter: blur(10px); padding: 24px; flex-direction: column; gap: 6px; }
.mobile-nav.open { display: flex; }
.mobile-nav a { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--green-900); padding: 14px 8px; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 16px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .map-pulse { animation: none; } html { scroll-behavior: auto; } }
/* Salvaguarda: si el navegador no está pintando (pestaña en segundo plano / iframe throttled), mostramos sin animación */
.reveal-all .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .header-cta .btn-ghost { display: none; }
  .menu-toggle { display: flex; }
  .hero-grid, .about-grid, .domicilio-grid, .locate-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-chip.tl { left: 10px; }
  .hero-chip.br { right: 10px; }
  .gallery-grid { grid-template-rows: 180px 180px 180px; }
  .gtile.big { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .domicilio-actions .btn, .info-actions .btn { flex: 1 1 auto; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gtile.big, .gtile.tall { grid-column: span 1; grid-row: span 1; }
  .trust-inner { gap: 16px; }
  .map-label { flex-direction: column; align-items: flex-start; }
}
