/* =========================================================
   Grupo El Olam, S. A. — Hoja de estilos
   Marca: azul Olam #09295c + cobre del sello #d18d3c
   Motivo: el arco (ventanas de la fachada y sello circular)
   ========================================================= */

:root {
  --navy: #09295c;
  --navy-700: #0d3674;
  --ink: #0c122d;
  --copper: #d18d3c;
  --copper-deep: #9a5f1c;   /* cobre con contraste AA para texto sobre blanco */
  --copper-soft: #f6e7d4;
  --leaf: #3f7d3a;
  --slate: #4f566e;
  --mist: #eef3f9;
  --line: #d9e2ee;
  --paper: #ffffff;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + .35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + .7vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.8rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.6vw, 4.2rem);
  --step-5: clamp(2.8rem, 2rem + 4vw, 5.6rem);

  --wrap: 1220px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);
  --arch: 999px 999px 28px 28px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 30px 60px -30px rgba(9, 41, 92, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  color: var(--navy);
  font-weight: 700;
}
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 200; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #dfe7f3; }
.section--navy h2, .section--navy h3 { color: #fff; }

.lede { font-size: var(--step-1); color: var(--slate); max-width: 60ch; line-height: 1.6; }
.section--navy .lede { color: #c5d2e6; }
.kicker {
  display: inline-flex; align-items: center; gap: .55em;
  font-weight: 600; color: var(--copper-deep); margin-bottom: 1rem; font-size: var(--step-0);
}
.kicker::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.section--navy .kicker { color: var(--copper); }
.head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.head h2 { font-size: var(--step-4); }
.head--center { margin-inline: auto; text-align: center; }
.head--center .lede { margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--navy); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid transparent;
  background: var(--bg); color: var(--fg); font-weight: 600; text-decoration: none;
  cursor: pointer; transition: transform .25s var(--ease), background .25s, box-shadow .25s;
  line-height: 1.1; white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(9, 41, 92, .6); }
.btn--copper { --bg: var(--copper); --fg: var(--ink); }
.btn--copper:hover { --bg: #dd9a4b; }
.btn--ghost { --bg: transparent; --fg: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); box-shadow: none; }
.btn--white { --bg: #fff; --fg: var(--navy); }
.btn--wa { --bg: #0f8340; --fg: #fff; }
.btn--wa:hover { --bg: #12924a; }
.btn--sm { padding: .7em 1.1em; font-size: var(--step--1); }
.link {
  display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--navy);
  text-decoration: none; background: linear-gradient(var(--copper), var(--copper)) 0 100% / 0 2px no-repeat;
  transition: background-size .3s var(--ease);
}
.link:hover { background-size: 100% 2px; }
.link svg { width: 1em; height: 1em; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--ink); color: #c9d3e6; font-size: var(--step--1); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 8px; }
.topbar a { text-decoration: none; color: #fff; }
.topbar__live { display: inline-flex; align-items: center; gap: .6em; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.topbar__links { display: flex; gap: 22px; }
.topbar__links span { opacity: .6; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
/* El desenfoque va en un pseudo-elemento: si estuviera en .header, el menú móvil (fixed) quedaría atrapado dentro */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(9, 41, 92, .5); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 84px; transition: height .3s var(--ease); }
.header.is-scrolled .wrap { height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 54px; height: 54px; transition: width .3s, height .3s; }
.header.is-scrolled .brand img { width: 46px; height: 46px; }
.brand__name { font-family: var(--f-display); font-weight: 700; color: var(--navy); line-height: 1.05; font-size: 1.15rem; letter-spacing: -.01em; }
.brand__name small { display: block; font-family: var(--f-body); font-weight: 500; font-size: .74rem; color: var(--slate); letter-spacing: 0; margin-top: 3px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) {
  display: block; padding: .55em .9em; border-radius: 999px; text-decoration: none; font-weight: 500;
  color: var(--ink); font-size: .96rem; transition: background .2s, color .2s;
}
.nav a:not(.btn):hover { background: var(--mist); }
.nav a:not(.btn)[aria-current="page"] { background: var(--navy); color: #fff; }
.header__cta { flex: none; }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; place-items: center; }
.burger span { display: block; width: 18px; height: 2px; background: var(--navy); border-radius: 2px; position: relative; transition: .3s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--navy); border-radius: 2px; transition: .3s; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
.nav-open .burger span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1080px) {
  .burger { display: grid; }
  .header__cta { display: none; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px); background: var(--navy);
    padding: 110px 28px 28px; transform: translateX(100%); visibility: hidden;
    transition: transform .45s var(--ease), visibility 0s linear .45s;
    display: flex; flex-direction: column; gap: 24px; z-index: -1; overflow-y: auto;
  }
  .nav-open .nav { transform: none; visibility: visible; transition: transform .45s var(--ease); }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a:not(.btn) { color: #fff; font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; padding: .35em .6em; border-radius: 14px; }
  .nav a:not(.btn):hover { background: rgba(255, 255, 255, .08); }
  .nav a:not(.btn)[aria-current="page"] { background: var(--copper); color: var(--ink); }
  .nav__extra { display: flex !important; }
  .nav-open .burger { background: #fff; position: relative; z-index: 2; }
  .scrim { position: fixed; inset: 0; background: rgba(12, 18, 45, .5); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 90; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
}
.nav__extra { display: none; flex-direction: column; gap: 10px; margin-top: auto; }
@media (max-width: 720px) { .topbar__links { display: none; } .brand__name small { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 110px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 58%; height: 100%;
  background: radial-gradient(circle at 70% 40%, var(--mist) 0 55%, transparent 56%);
  z-index: -1;
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.5rem); letter-spacing: -.035em; margin-bottom: .35em; text-wrap: balance; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero h1 .line > span { display: inline-block; }
.hero__welcome { font-weight: 600; color: var(--copper-deep); margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6em; }
.hero__welcome img { width: 28px; height: 28px; }
.hero .lede { margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__phone { display: flex; align-items: center; gap: 14px; margin-top: 2.2rem; text-decoration: none; }
.hero__phone-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--copper-soft); color: var(--copper-deep); display: grid; place-items: center; flex: none; }
.hero__phone-icon svg { width: 22px; height: 22px; }
.hero__phone small { display: block; color: var(--slate); font-size: var(--step--1); }
.hero__phone strong { font-family: var(--f-display); font-size: var(--step-2); color: var(--navy); letter-spacing: -.01em; }

.hero__media { position: relative; justify-self: end; width: min(100%, 520px); }
.arch { border-radius: var(--arch); overflow: hidden; position: relative; background: var(--mist); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.hero__arch { aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.hero__arch img { object-position: 50% 30%; }
.hero__mini {
  position: absolute; left: -12%; bottom: 8%; width: 42%; aspect-ratio: 3 / 4;
  border: 6px solid #fff; box-shadow: var(--shadow);
}
.seal {
  position: absolute; right: -6%; top: -4%; width: clamp(130px, 14vw, 180px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.seal__ring { position: absolute; inset: 0; animation: spin 28s linear infinite; }
.seal__ring text { font-family: var(--f-body); font-weight: 700; font-size: 11.4px; letter-spacing: 3.2px; fill: var(--navy); }
.seal__core { position: relative; z-index: 1; width: 58%; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 12px 30px -12px rgba(9, 41, 92, .45); display: grid; place-items: center; }
.seal__core img { width: 86%; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge-24 {
  position: absolute; right: -4%; bottom: 14%; background: var(--navy); color: #fff; border-radius: 22px;
  padding: 14px 18px 14px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow);
}
.badge-24 b { font-family: var(--f-display); font-size: 1.9rem; line-height: 1; color: var(--copper); }
.badge-24 span { font-size: .86rem; line-height: 1.25; }

/* Secuencia de entrada del hero (único momento orquestado) */
.js .hero [data-in] { opacity: 0; transform: translateY(24px); }
.js .hero h1 .line > span { transform: translateY(105%); }
.is-loaded .hero [data-in] { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 120ms + 350ms); }
.is-loaded .hero h1 .line > span { transform: none; transition: transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js .hero__arch { clip-path: inset(100% 0 0 0 round 999px 999px 28px 28px); }
.is-loaded .hero__arch { clip-path: inset(0 0 0 0 round 999px 999px 28px 28px); transition: clip-path 1.3s var(--ease) .15s; }

@media (max-width: 900px) {
  .hero::before { width: 100%; height: 60%; inset: auto 0 0 0; background: radial-gradient(circle at 50% 60%, var(--mist) 0 60%, transparent 61%); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__media { justify-self: center; width: min(88%, 440px); margin-top: 16px; }
  .hero__mini { left: -8%; }
  .seal { right: -8%; }
}

/* ---------- Selector "¿Qué necesitas hoy?" ---------- */
.need { margin-top: calc(var(--section) * -.35); position: relative; z-index: 2; }
.need__box {
  background: var(--navy); color: #dfe7f3; border-radius: var(--r-lg); padding: clamp(24px, 4vw, 44px);
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 4vw, 56px); box-shadow: var(--shadow);
}
.need__box h2 { color: #fff; font-size: var(--step-3); margin-bottom: .3em; }
.need__box p { color: #b9c7dd; margin: 0; }
.need__opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.need__opt {
  text-align: left; padding: 18px; border-radius: var(--r-md); border: 1.5px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .04); color: #fff; cursor: pointer; transition: .25s var(--ease);
  display: flex; align-items: center; gap: 14px;
}
.need__opt svg { width: 28px; height: 28px; color: var(--copper); flex: none; }
.need__opt strong { font-family: var(--f-display); font-size: 1.12rem; font-weight: 600; line-height: 1.2; }
.need__opt:hover { border-color: rgba(255, 255, 255, .4); }
.need__opt[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.need__opt[aria-pressed="true"] svg { color: var(--copper-deep); }
.need__answer {
  grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); min-height: 72px;
}
.need__answer p { flex: 1 1 260px; color: #dfe7f3; }
.need__answer .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.need__answer[data-fresh] { animation: fadeIn .45s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 900px) {
  .need__box { grid-template-columns: 1fr; }
  .need__answer { grid-column: 1; }
}
@media (max-width: 560px) { .need__opts { grid-template-columns: 1fr; } .need__opt { padding: 14px 16px; } }

/* ---------- Historia + cifras ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); align-items: stretch; }
.story__media { position: relative; display: flex; }
.story__media .arch { flex: 1; min-height: 460px; }   /* la foto iguala la altura del texto */
.story__caption {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); width: max-content; max-width: 90%;
  background: #fff; border-radius: 999px; padding: 12px 22px; box-shadow: var(--shadow); font-weight: 600; color: var(--navy); font-size: var(--step--1);
  display: flex; gap: 10px; align-items: center;
}
.story__caption svg { width: 18px; height: 18px; color: var(--copper-deep); }
.story h2 { font-size: var(--step-4); }
.hebrew { font-family: "Frank Ruhl Libre", serif; font-size: 1.25em; color: var(--copper-deep); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 2rem 0; }
.stat { background: #fff; padding: 22px 20px; }
.stat b { display: block; font-family: var(--f-display); font-size: var(--step-3); color: var(--navy); line-height: 1; letter-spacing: -.03em; }
.stat span { color: var(--slate); font-size: var(--step--1); }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .story__media { width: min(100%, 460px); margin-inline: auto; }
  .story__media .arch { aspect-ratio: 4 / 4.6; min-height: 0; }
}

/* ---------- Servicios (pestañas) ---------- */
.svc { display: grid; grid-template-columns: 340px 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.svc__tabs { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 110px; }
.svc__tab {
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; text-align: left;
  padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  transition: .25s var(--ease);
}
.svc__tab img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.svc__tab strong { display: block; font-family: var(--f-display); font-size: 1.2rem; color: var(--navy); }
.svc__tab small { color: var(--slate); font-size: .86rem; line-height: 1.35; display: block; }
.svc__tab:hover { border-color: #b7c6da; }
.svc__tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); }
.svc__tab[aria-selected="true"] strong { color: #fff; }
.svc__tab[aria-selected="true"] small { color: #b9c7dd; }
.svc__panel { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: #fff; border-radius: var(--r-lg); padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line); }
.svc__panel[hidden] { display: none; }
.svc__panel .arch { aspect-ratio: 4 / 5; }
.svc__panel h3 { font-size: var(--step-3); }
.svc__panel ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 8px; }
.svc__panel li { display: flex; gap: 10px; align-items: flex-start; }
.svc__panel li svg { width: 20px; height: 20px; color: var(--leaf); flex: none; margin-top: 3px; }
.svc__panel.is-entering { animation: fadeIn .5s var(--ease); }
@media (max-width: 980px) {
  .svc { grid-template-columns: 1fr; }
  .svc__tabs { position: static; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .svc__tab { flex: 0 0 min(78%, 280px); scroll-snap-align: start; }
}
@media (max-width: 640px) { .svc__panel { grid-template-columns: 1fr; } .svc__panel .arch { aspect-ratio: 4 / 3.4; } }

/* ---------- Por qué confiar ---------- */
.trust { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.trust__list { display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.trust__item { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.trust__item svg { width: 30px; height: 30px; color: var(--copper); margin-top: 4px; }
.trust__item h3 { font-size: var(--step-1); margin-bottom: .2em; }
.trust__item p { margin: 0; color: #b9c7dd; }
.trust__visual { position: relative; }
.trust__visual .arch { aspect-ratio: 4 / 5; }
.clock24 {
  position: absolute; left: -40px; top: 12%; width: 150px; aspect-ratio: 1; border-radius: 50%;
  background: var(--copper); color: var(--ink); display: grid; place-items: center; text-align: center; box-shadow: var(--shadow);
}
.clock24 b { font-family: var(--f-display); font-size: 3rem; line-height: .9; display: block; }
.clock24 span { font-weight: 600; font-size: .85rem; line-height: 1.2; display: block; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr; } .trust__visual { width: min(100%, 420px); margin-inline: auto; } .clock24 { left: -14px; width: 120px; } .clock24 b { font-size: 2.4rem; } }

/* ---------- Galería ---------- */
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.gallery-nav { display: flex; gap: 8px; }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--navy); transition: .2s; }
.icon-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.icon-btn svg { width: 20px; height: 20px; }
/* Carrusel continuo: la cinta se anima con CSS (fluida y sin depender de JS) */
.gallery { overflow: hidden; padding-block: 8px 24px; }
.gallery__shift { transform: translateX(var(--shift, 0px)); transition: transform .6s var(--ease); }
.gallery__shift.no-anim { transition: none; }
.gallery__track {
  display: flex; width: max-content;
  animation: marquee var(--marquee, 70s) linear infinite;
  will-change: transform;
}
.gallery__set { display: flex; }
.gallery:hover .gallery__track,
.gallery:focus-within .gallery__track,
.gallery.is-paused .gallery__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.gallery figure { margin: 0 16px 0 0; width: clamp(240px, 26vw, 330px); flex: none; }
.gallery button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.gallery button:focus-visible { outline: 3px solid var(--copper); outline-offset: 4px; border-radius: 20px; }
.gallery .shot { aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: var(--mist); }
.gallery figure:nth-child(3n+1) .shot { border-radius: var(--arch); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery button:hover img { transform: scale(1.05); }
.gallery figcaption { font-weight: 600; color: var(--navy); margin-top: 10px; font-size: .96rem; }

@media (prefers-reduced-motion: reduce) {
  .gallery { overflow-x: auto; }
  .gallery__track { animation: none; }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); width: 100%; }
.lightbox::backdrop { background: rgba(12, 18, 45, .9); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 18px; }
.lightbox p { color: #fff; text-align: center; margin-top: 12px; font-weight: 600; }
.lightbox__close { position: fixed; top: 18px; right: 18px; }

/* ---------- Testimonios ---------- */
.quotes { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.quote-slider { position: relative; }
.quote {
  background: #fff; border-radius: var(--r-lg); padding: clamp(26px, 4vw, 44px); border: 1px solid var(--line);
}
.quote[hidden] { display: none; }
.quote.is-entering { animation: fadeIn .5s var(--ease); }
.quote blockquote { margin: 0 0 1.4rem; font-family: var(--f-display); font-size: var(--step-2); line-height: 1.3; color: var(--navy); font-weight: 500; letter-spacing: -.015em; }
.quote__who { display: flex; gap: 14px; align-items: center; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--copper-soft); color: var(--copper-deep); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; flex: none; }
.quote__who strong { display: block; color: var(--ink); }
.quote__who span { color: var(--slate); font-size: var(--step--1); }
.stars { color: var(--copper); letter-spacing: 2px; margin-left: auto; font-size: 1.05rem; }
.quote-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.dots { display: flex; gap: 8px; margin-right: auto; }
.dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: width .3s var(--ease), background .3s; }
.dots button[aria-current="true"] { width: 30px; background: var(--navy); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Frase de fe ---------- */
.motto { text-align: center; padding-block: clamp(64px, 9vw, 120px); position: relative; overflow: hidden; }
.motto p {
  font-family: var(--f-display); font-size: var(--step-4); color: var(--navy); line-height: 1.1;
  letter-spacing: -.03em; max-width: 18ch; margin: 0 auto; font-weight: 600; text-wrap: balance;
}
.motto cite { display: block; font-style: normal; color: var(--slate); margin-top: 1.4rem; }
.motto__ring { position: absolute; left: 50%; top: 50%; width: min(90vw, 640px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid var(--copper-soft); border-radius: 50%; z-index: -1; }
.motto__ring::after { content: ""; position: absolute; inset: 26px; border: 1px dashed #ecd2b1; border-radius: 50%; }

/* ---------- CTA + contacto ---------- */
.cta {
  background: var(--navy); color: #dfe7f3; border-radius: var(--r-lg); overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; position: relative;
}
.cta__body { padding: clamp(28px, 5vw, 64px); }
.cta h2 { color: #fff; font-size: var(--step-4); }
.cta .lede { color: #c5d2e6; margin-bottom: 1.8rem; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta__img { position: relative; min-height: 320px; }
.cta__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta__img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy), transparent 40%); z-index: 1; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } .cta__img::before { background: linear-gradient(180deg, var(--navy), transparent 40%); } }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.info {
  display: flex; gap: 16px; padding: 22px; border-radius: var(--r-md); background: var(--mist);
}
.info svg { width: 26px; height: 26px; color: var(--copper-deep); flex: none; margin-top: 2px; }
.info h3 { font-family: var(--f-body); font-size: 1rem; font-weight: 700; margin: 0 0 .3em; color: var(--ink); letter-spacing: 0; }
.info p, .info a:not(.link) { margin: 0; color: var(--slate); text-decoration: none; display: block; }
.info a:not(.link):hover { color: var(--navy); text-decoration: underline; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }

.map { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); min-height: 360px; background: var(--mist); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; filter: saturate(.8); }

/* ---------- Footer ---------- */
/* La última sección no necesita tanto aire: el pie ya aporta el suyo */
main > section:last-child { padding-bottom: clamp(48px, 5vw, 80px); }
.footer { background: var(--ink); color: #aab6cc; padding-block: 72px 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer .brand__name { color: #fff; }
.footer .brand__name small { color: #aab6cc; display: block; }
.footer h3 { color: #fff; font-family: var(--f-body); font-size: 1rem; letter-spacing: 0; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a:not(.btn) { text-decoration: none; color: #aab6cc; }
.footer a:not(.btn):hover { color: #fff; }
.footer__motto { margin-top: 1.2rem; max-width: 34ch; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--step--1); }
.footer__subs { display: flex; gap: 10px; margin-top: 1.4rem; }
.footer__subs img { width: 76px; height: 56px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; align-items: center; gap: 10px;
  background: #0f8340; color: #fff; border-radius: 999px; padding: 12px; text-decoration: none; font-weight: 600;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .45); transition: padding .3s var(--ease);
}
.wa-float svg { width: 30px; height: 30px; flex: none; }
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .4s var(--ease); }
.wa-float:hover span, .wa-float:focus-visible span { max-width: 220px; }
.wa-float:hover, .wa-float:focus-visible { padding-right: 20px; }

/* ---------- Diálogo de cita ---------- */
.booking {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(94vw, 620px); max-height: 92vh;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); color: var(--ink);
}
.booking::backdrop { background: rgba(12, 18, 45, .6); backdrop-filter: blur(3px); }
.booking[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.booking__head { background: var(--navy); color: #fff; padding: 26px 28px; display: flex; gap: 16px; align-items: center; }
.booking__head img { width: 52px; height: 52px; background: #fff; border-radius: 50%; }
.booking__head h2 { color: #fff; font-size: var(--step-2); margin: 0; }
.booking__head p { margin: 0; color: #b9c7dd; font-size: var(--step--1); }
.booking__head .icon-btn { margin-left: auto; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); width: 44px; height: 44px; flex: none; }
.booking form { padding: 24px 28px 28px; }
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.steps span.on { background: var(--copper); }
.step[hidden] { display: none; }
.step h3 { font-size: var(--step-1); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .6em 1em; border-radius: 999px; border: 1.5px solid var(--line); cursor: pointer;
  font-weight: 500; transition: .2s; background: #fff;
}
.chip span:hover { border-color: var(--navy); }
.chip input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip input:focus-visible + span { outline: 3px solid var(--copper); outline-offset: 2px; }
.step__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .94rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85em 1em; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(9, 41, 92, .12); }
.field .hint { font-size: .84rem; color: var(--slate); }
.field .err { font-size: .86rem; color: #b42318; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #b42318; }
.field.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.form-note { font-size: .88rem; color: var(--slate); margin-top: 10px; }

/* ---------- Encabezado de página interior ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 80px) clamp(48px, 6vw, 88px); position: relative; overflow: hidden; }
.page-hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.page-hero h1 { font-size: var(--step-5); letter-spacing: -.035em; }
.page-hero .arch { aspect-ratio: 5 / 5.4; box-shadow: var(--shadow); }
.crumbs { display: flex; gap: 8px; font-size: var(--step--1); color: var(--slate); margin-bottom: 1.2rem; list-style: none; padding: 0; }
.crumbs a { color: var(--navy); font-weight: 600; text-decoration: none; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.page-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.6rem; }
.tag { display: inline-flex; align-items: center; gap: .5em; padding: .5em .95em; border-radius: 999px; background: var(--mist); color: var(--navy); font-weight: 600; font-size: .92rem; }
.tag svg { width: 1.1em; height: 1.1em; color: var(--copper-deep); }
.page-hero__logo { position: absolute; left: -26px; bottom: -22px; width: 150px; background: #fff; border-radius: 22px; padding: 8px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero__media { width: min(100%, 440px); margin-inline: auto; } .page-hero__logo { left: -8px; width: 120px; } }

/* ---------- Clínica ---------- */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.area { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 4; color: #fff; isolation: isolate; }
.area img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.area::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(9, 41, 92, .92)); z-index: -1; }
.area:hover img { transform: scale(1.05); }
.area__txt { position: absolute; inset: auto 0 0 0; padding: 22px; }
.area h3 { color: #fff; font-size: var(--step-1); margin: 0; }
.area p { margin: .3em 0 0; color: #d4deec; font-size: .92rem; line-height: 1.45; }
.area svg { width: 30px; height: 30px; color: var(--copper); margin-bottom: 10px; }
@media (max-width: 980px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .areas { grid-template-columns: 1fr; } .area { aspect-ratio: 4 / 3.4; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
/* Columnas que igualan su altura para no dejar aire debajo de las fotos */
.split--stretch { align-items: stretch; }
.arch--fill { height: 100%; min-height: 420px; }
.mosaic--fill { height: 100%; grid-template-rows: 1fr 1fr; }
.sticky-col { position: sticky; top: 110px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .arch--fill { min-height: 0; aspect-ratio: 4 / 4.6; }
  .mosaic--fill { height: auto; }
  .sticky-col { position: static; }
}

.surgery { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.surgery li {
  display: flex; align-items: center; gap: 18px; padding: 18px 6px; border-bottom: 1px solid var(--line);
  font-family: var(--f-display); font-size: var(--step-1); color: var(--navy); font-weight: 600; transition: padding .3s var(--ease), background .3s;
}
.surgery li svg { width: 22px; height: 22px; color: var(--copper-deep); flex: none; }
.surgery li:hover { padding-left: 16px; background: linear-gradient(90deg, var(--mist), transparent); }

.spec-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.spec { padding: .8em 1.25em; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 600; color: var(--navy); display: inline-flex; gap: .55em; align-items: center; }
.spec svg { width: 1.2em; height: 1.2em; color: var(--copper-deep); }

.proc { columns: 2; column-gap: 28px; list-style: none; padding: 0; margin: 0; }
.proc li { break-inside: avoid; display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.proc li svg { width: 20px; height: 20px; color: var(--leaf); flex: none; margin-top: 4px; }
@media (max-width: 640px) { .proc { columns: 1; } }

.search { position: relative; margin-bottom: 18px; }
.search input { width: 100%; padding: .9em 1em .9em 3em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; }
.search input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(9, 41, 92, .12); }
.search svg { position: absolute; left: 1.1em; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate); }
.search-empty { color: var(--slate); padding: 12px 0; }

/* ---------- Tarjetas de lista (laboratorio / farmacia) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature { padding: clamp(22px, 3vw, 34px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; transition: background .3s; }
.feature:hover { background: var(--mist); }
.feature svg { width: 34px; height: 34px; color: var(--copper-deep); margin-bottom: 18px; }
.feature h3 { font-size: var(--step-1); }
.feature p { color: var(--slate); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .features { grid-template-columns: 1fr; } }

.mosaic { display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: 240px 240px; gap: 14px; }
.mosaic > * { border-radius: var(--r-lg); overflow: hidden; margin: 0; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic > :first-child { grid-row: span 2; border-radius: var(--arch); }
@media (max-width: 700px) { .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 280px 180px 180px; } .mosaic > :first-child { grid-column: span 2; grid-row: auto; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); font-weight: 600; color: var(--navy); }
.checklist li svg { width: 26px; height: 26px; color: var(--copper-deep); flex: none; }

/* ---------- Quiénes somos ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 48px; padding-bottom: 34px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--copper); }
.timeline li:last-child { padding-bottom: 0; }
.timeline time { font-family: var(--f-display); font-weight: 700; color: var(--copper-deep); font-size: var(--step-1); display: block; }
.timeline h3 { font-size: var(--step-1); margin: .2em 0 .3em; }
.timeline p { color: var(--slate); margin: 0; }

.name-card { background: var(--navy); color: #dfe7f3; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.name-card .he { font-family: "Frank Ruhl Libre", serif; font-size: clamp(4rem, 10vw, 7.5rem); color: var(--copper); line-height: 1; margin-bottom: .1em; }
.name-card h2 { color: #fff; font-size: var(--step-3); }
.name-card p { max-width: 52ch; margin-inline: auto; color: #c5d2e6; }

.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mv article { padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: var(--mist); }
.mv article:first-child { border-radius: 140px 140px var(--r-lg) var(--r-lg); padding-top: 64px; }
.mv h3 { font-size: var(--step-2); }
.mv p { color: var(--slate); margin: 0; }
@media (max-width: 760px) { .mv { grid-template-columns: 1fr; } }

.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.value { padding: 24px 20px; border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .16); }
.value svg { width: 30px; height: 30px; color: var(--copper); margin-bottom: 16px; }
.value h3 { font-size: 1.1rem; }
.value p { margin: 0; color: #b9c7dd; font-size: .95rem; }
@media (max-width: 1000px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

.brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.brands figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; text-align: center; }
.brands img { height: 150px; width: 100%; object-fit: contain; }
.brands figcaption { font-weight: 600; color: var(--navy); margin-top: 10px; }
@media (max-width: 700px) { .brands { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact__form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 40px); }
.contact__side { display: grid; gap: 14px; }
.send-via { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Revelado discreto (solo imágenes grandes) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .hero [data-in], .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero h1 .line > span { transform: none; }
  .js .hero__arch { clip-path: none; }
}
