/* =========================================================
   Dra. Mariela Nazar — Dermatología Estética en Salta
   Hoja de estilos única del sitio (sin frameworks).
   Sistema visual tomado del diseño de Google Stitch
   ("Medicina Estética Premium"): Lora + Montserrat,
   fondo marfil rosado, marrón institucional #2C1813.
   ========================================================= */

@font-face { font-family: "Lora"; src: url("../fonts/Lora.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --bg: #FFF8F6;           /* Fondo general (surface) */
  --bg-soft: #FAF2F0;      /* Secciones alternadas */
  --bg-card: #FFFFFF;      /* Tarjetas */
  --beige: #E4DED7;        /* Beige claro */
  --ivory: #EFDAD2;        /* Marfil cálido */
  --nude: #ECC5B8;
  --blue: #E3ECEE;         /* Celeste claro */
  --brown: #2C1813;        /* Marrón institucional */
  --warm: #83523C;         /* Marrón cálido: etiquetas y acentos */
  --ink: #1E1B1A;          /* Títulos */
  --text: #504442;         /* Texto */
  --muted: #6E625F;        /* Texto secundario */
  --taupe: #958B89;
  --line: #E6D9D5;
  --line-strong: #D3C3BF;
  --coral: #D98C71;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 7.5rem);
  --radius: 4px;
  --header-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1rem; line-height: 1.7; letter-spacing: .01em;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--warm); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--brown); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ivory); color: var(--brown); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.12; letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; }
h1 em { display: block; }
h2 { font-size: clamp(1.75rem, 3vw, 2.3rem); line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.35; }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.2em; padding: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--brown); color: var(--ivory); padding: .7rem 1rem; z-index: 200; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Etiqueta superior (eyebrow) */
.eyebrow { display: block; font: 600 .74rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--warm); margin: 0 0 1.25rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: 0 2rem;
  font: 500 .9rem/1 var(--sans); letter-spacing: .05em;
  border-radius: var(--radius); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .5s ease, color .5s ease, border-color .5s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--brown); color: var(--ivory); }
.btn--primary:hover { background: #47291f; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--taupe); }
.btn--ghost:hover { border-color: var(--brown); background: rgba(44, 24, 19, .04); color: var(--brown); }
.btn--light { background: var(--ivory); color: var(--brown); }
.btn--light:hover { background: #fff; color: var(--brown); }
.btn--line-light { background: transparent; color: var(--ivory); border-color: rgba(239, 218, 210, .45); }
.btn--line-light:hover { border-color: var(--ivory); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }

.text-link {
  display: inline-block; font: 600 .78rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--warm); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .2rem;
  transition: opacity .4s ease, color .4s ease;
}
.text-link:hover { color: var(--brown); }
.btn-row .text-link { color: var(--ink); border-color: var(--taupe); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow .4s ease;
}
/* El fondo translúcido va en una capa aparte: si el desenfoque (backdrop-filter) estuviera
   en la cabecera misma, el menú móvil (position: fixed) quedaría encerrado dentro de ella. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(255, 248, 246, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -24px rgba(44, 24, 19, .3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
/* Logotipo: nombre en Lora, mayúsculas y espaciado amplio (como en Stitch) */
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; color: var(--ink); }
.brand__name { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.brand__tag { font: 500 .58rem/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: var(--warm); margin-top: .55rem; white-space: nowrap; }
@media (max-width: 420px) { .brand__name { font-size: 1.05rem; letter-spacing: .1em; } .brand__tag { font-size: .52rem; letter-spacing: .26em; } }

.nav { display: flex; align-items: center; gap: .5rem; }
.nav__list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link, .nav__toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  font: 500 .78rem/1 var(--sans); letter-spacing: .06em; color: var(--text);
  padding: .9rem .65rem; border: 0; background: none; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: color .3s ease;
}
.nav__link:hover, .nav__toggle:hover, .nav__item.is-open > .nav__toggle { color: var(--ink); }
.nav__link[aria-current="page"], .nav__toggle.is-current { color: var(--ink); text-decoration: underline; text-underline-offset: .55em; text-decoration-thickness: 1px; }
.nav__toggle svg { width: 11px; height: 11px; transition: transform .3s ease; }
.nav__item.is-open > .nav__toggle svg { transform: rotate(180deg); }
.nav__cta { margin-left: .75rem; min-height: 44px; padding: 0 1.3rem; font-size: .78rem; white-space: nowrap; }

.dropdown {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translate(-50%, 6px);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 50px -30px rgba(44, 24, 19, .4);
  padding: 1rem; min-width: 260px;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.nav__item.is-open > .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown ul { list-style: none; margin: 0; padding: 0; }
.dropdown a { display: block; padding: .5rem .6rem; color: var(--text); text-decoration: none; font-size: .88rem; line-height: 1.35; border-radius: 2px; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--bg-soft); color: var(--ink); }
.dropdown__title { display: block; font: 600 .7rem/1.4 var(--sans) !important; letter-spacing: .18em; text-transform: uppercase; color: var(--warm) !important; padding: .4rem .6rem .7rem !important; }
.dropdown__title:hover { background: none !important; color: var(--brown) !important; }
.dropdown--mega { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; min-width: 720px; padding: 1.75rem; }
.dropdown__all { grid-column: 1 / -1; margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.dropdown__all a { display: inline; padding: 0; font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--warm); }
.dropdown__all a:hover { background: none; color: var(--brown); }
.dropdown--mega .dropdown__col + .dropdown__col { border-left: 1px solid var(--line); padding-left: 1.25rem; }

.menu-button { display: none; }
@media (max-width: 1180px) {
  .menu-button {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem;
    border: 1px solid var(--taupe); border-radius: var(--radius); background: transparent; color: var(--ink);
    font: 500 .8rem var(--sans); letter-spacing: .08em; cursor: pointer;
  }
  .menu-button svg { width: 20px; height: 20px; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 99;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding: 1rem var(--gutter) 2rem; border-top: 1px solid var(--line);
    transform: translateX(100%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__link, .nav__toggle { width: 100%; min-height: 56px; justify-content: space-between; font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0; color: var(--ink); padding: 1.1rem 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .nav__toggle svg { width: 14px; height: 14px; }
  .dropdown a { padding: .7rem .6rem; font-size: 1rem; }
  .dropdown, .dropdown--mega {
    position: static; transform: none !important; min-width: 0; box-shadow: none; border: 0; background: transparent;
    display: none; opacity: 1; visibility: visible; padding: 0 0 1rem;
  }
  .nav__item.is-open > .dropdown { display: block; }
  .dropdown--mega .dropdown__col + .dropdown__col { border-left: 0; padding-left: 0; margin-top: .75rem; }
  .nav__cta { margin: 1.75rem 0 0; width: 100%; min-height: 54px; }
  body.nav-open { overflow: hidden; }
  .header-inner { gap: .75rem; }
  .brand { min-width: 0; }
  body.nav-open .wa-float { opacity: 0; visibility: hidden; }
  .menu-button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}

/* Celulares chicos (320–380 px): logotipo y botón más compactos para que entren en una línea */
@media (max-width: 380px) {
  .brand__name { font-size: .92rem; letter-spacing: .07em; }
  .brand__tag { font-size: .46rem; letter-spacing: .2em; margin-top: .45rem; }
  .menu-button { padding: 0 .7rem; gap: .35rem; font-size: .72rem; letter-spacing: .04em; }
}

/* ---------- Ruta de navegación (se muestra como etiqueta superior) ---------- */
.breadcrumb { margin: 0 0 1.4rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; font: 600 .72rem/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--warm); }
.breadcrumb li + li::before { content: "·"; margin-right: .5rem; color: var(--taupe); }
.breadcrumb a { color: var(--taupe); text-decoration: none; }
.breadcrumb a:hover { color: var(--brown); }

/* ---------- Imágenes ---------- */
.img-box, .media { position: relative; overflow: hidden; background: var(--beige); border-radius: 2px; }
.img-box img, .media img { width: 100%; height: 100%; object-fit: cover; }
.img-missing { display: none !important; }
.img-note {
  position: absolute; right: .7rem; bottom: .7rem; padding: .25rem .6rem; border-radius: 999px;
  background: rgba(44, 24, 19, .5); color: #F4E6E0; font: 500 .64rem/1.2 var(--sans); letter-spacing: .06em;
  pointer-events: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 2;
}

/* ---------- Hero en dos columnas (inicio, índices, equipo) ---------- */
.hero { padding: clamp(2.5rem, 7vw, 6.5rem) 0 clamp(3.5rem, 8vw, 7rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.hero__lead { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--text); max-width: 33rem; margin-top: 1.5rem; }
.hero__figure { position: relative; margin: 0 0 3rem; }
.hero__figure .media { aspect-ratio: 4 / 5; }
.hero__card {
  position: absolute; left: -2rem; bottom: -3rem; z-index: 3; max-width: 22rem;
  background: var(--bg-card); padding: 1.6rem 1.8rem; box-shadow: 0 24px 50px -30px rgba(44, 24, 19, .35);
}
.hero__card p { font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--warm); margin: 0; }
.hero__card .eyebrow { margin-bottom: .6rem; font-size: .66rem; }
.hero--simple { padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero--simple .hero__grid { grid-template-columns: minmax(0, 1fr); }
.hero--simple .hero__lead { max-width: 44rem; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { max-width: 34rem; }
  .hero__figure .media { aspect-ratio: 4 / 4.4; }
  .hero__card { left: 1rem; right: 1rem; bottom: -2.5rem; max-width: none; }
}

/* ---------- Hero a todo el ancho (páginas de tratamientos y problemas) ---------- */
.hero-full { position: relative; min-height: clamp(560px, 72vh, 720px); display: flex; align-items: center; overflow: hidden; background: var(--bg-soft); }
.hero-full__media { position: absolute; inset: 0; }
.hero-full__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; }
.hero-full__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 248, 246, .97) 0%, rgba(255, 248, 246, .9) 34%, rgba(255, 248, 246, .45) 58%, rgba(255, 248, 246, 0) 80%);
}
.hero-full__inner { position: relative; z-index: 2; padding-block: clamp(3rem, 8vw, 6rem); }
.hero-full__text { max-width: 36rem; }
.hero-full .img-note { z-index: 3; right: 1.2rem; bottom: 1.2rem; }
@media (max-width: 860px) {
  .hero-full { display: block; min-height: 0; background: var(--bg); }
  .hero-full__media { position: relative; aspect-ratio: 4 / 3.4; }
  .hero-full__media::after { background: linear-gradient(180deg, rgba(255, 248, 246, 0) 55%, rgba(255, 248, 246, 1) 100%); }
  .hero-full__inner { padding-block: .5rem 3.5rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section--soft { background: var(--bg-soft); }
.section--beige { background: var(--beige); }
.section--blue { background: var(--blue); }
.section--white { background: var(--bg-card); }
.section__head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head p { color: var(--text); font-size: 1rem; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.section__head--row > div { max-width: 40rem; }
.section__head--row > div p:last-child { margin-bottom: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 6.5rem); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }
.prose { max-width: 36rem; }

/* Foto con marco interior (bloque de tecnología) */
.framed { position: relative; padding: 1.25rem; background: var(--beige); }
.framed .media { aspect-ratio: 4 / 4.6; }
.framed::after { content: ""; position: absolute; inset: 2.25rem; border: 1px solid rgba(255, 255, 255, .7); pointer-events: none; z-index: 2; }

/* ---------- Página de contenido ---------- */
.page-body { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.page-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 6.5rem); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 2rem); font-size: .86rem; }
.toc__title { font: 600 .7rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--warm); margin-bottom: 1rem; }
.toc ol { list-style: none; margin: 0 0 2rem; padding: 0; border-left: 1px solid var(--line-strong); }
.toc ol a { display: block; padding: .42rem 0 .42rem 1.1rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; transition: color .3s ease; }
.toc ol a:hover { color: var(--ink); }
.toc ol a.is-active { color: var(--ink); border-left-color: var(--brown); }
.toc-card { background: var(--brown); color: #E9D9D2; padding: 1.5rem; }
.toc-card p { font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; margin-bottom: 1.1rem; color: var(--ivory); }
.toc-card .btn { width: 100%; min-height: 46px; padding: 0 1rem; font-size: .78rem; gap: .5rem; white-space: nowrap; background: var(--ivory); color: var(--brown); }
.toc-card .btn:hover { background: #fff; }
.toc__mobile { display: none; }
@media (max-width: 980px) {
  .page-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc__desktop, .toc-card { display: none; }
  .toc__mobile { display: block; border: 1px solid var(--line-strong); padding: 1rem 1.2rem; background: var(--bg-card); }
  .toc__mobile ol { margin: 1rem 0 0; }
}
.toc__mobile summary { cursor: pointer; font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--warm); }

.article { max-width: 44rem; }
.article > .lead { padding-bottom: 2.75rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line-strong); }
.article > .lead p:first-child { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.55; color: var(--ink); }
.block { padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; margin-bottom: 0; }
.block h2 { margin-bottom: .8em; }
.article-figure { margin: 0 0 3rem; }
.article-figure .media { aspect-ratio: 4 / 3; }

.list { list-style: none; margin: 0 0 1.4em; padding: 0; }
.list li { position: relative; padding: .55rem 0 .55rem 1.4rem; line-height: 1.55; }
.list li::before { content: ""; position: absolute; left: .15rem; top: calc(.55rem + .68em); width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.list a { color: var(--ink); }
.list--cols { columns: 2; column-gap: 2.5rem; }
.list--cols li { break-inside: avoid; }
@media (max-width: 640px) { .list--cols { columns: 1; } }

/* Tarjetas dentro del artículo (una de cada tres en marrón, como en Stitch) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 1rem; }
.tile { background: var(--bg-card); padding: 1.9rem 1.8rem 1.7rem; border: 1px solid var(--line); }
.tile h3 { font-size: 1.28rem; margin-bottom: .6rem; }
.tile p { font-size: .95rem; margin-bottom: .6rem; }
.tile p:last-child { margin-bottom: 0; }
.tile .list { font-size: .92rem; }
.tile .text-link { margin-top: .5rem; }
.tile:nth-child(3n+2) { background: var(--brown); border-color: var(--brown); color: #D9C7C0; }
.tile:nth-child(3n+2) h3 { color: var(--ivory); }
.tile:nth-child(3n+2) a { color: var(--ivory); }
.tile:nth-child(3n+2) .list li::before { background: var(--nude); }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } }

.chips { list-style: none; margin: 1.5rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a, .chips span {
  display: inline-block; padding: .55rem 1.05rem; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .86rem; color: var(--ink); text-decoration: none; background: var(--bg-card); line-height: 1.3;
  transition: border-color .4s ease, background-color .4s ease;
}
.chips a:hover { border-color: var(--brown); background: var(--bg-soft); }

/* ---------- Preguntas frecuentes ---------- */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.5rem 0; font-family: var(--serif); font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--warm); transition: transform .4s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__a { padding: 0 3rem 1.5rem 0; color: var(--text); }
.faq .faq__a p:last-child { margin: 0; }
.faq h3 { font: inherit; color: inherit; margin: 0; }
.faq-wrap { max-width: 46rem; margin-inline: auto; }

/* ---------- Tarjetas con foto ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem); list-style: none; margin: 0; padding: 0; }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); height: 100%; }
.card .img-box { aspect-ratio: 4 / 5; margin-bottom: 1.3rem; }
.card .img-box img { transition: transform 1.4s var(--ease); object-position: 50% 35%; }
.card:hover .img-box img { transform: scale(1.04); }
.card__title { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); line-height: 1.25; margin-bottom: .45rem; }
.card__desc { font-size: .92rem; color: var(--muted); line-height: 1.6; margin: 0 0 1rem; }
.card__go { margin-top: auto; font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--warm); }
.card__go::after { content: " →"; letter-spacing: 0; transition: margin .4s ease; }
.card:hover .card__go::after { margin-left: .3rem; }
@media (max-width: 1000px) { .cards, .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards, .cards--4 { grid-template-columns: 1fr; } .card .img-box { aspect-ratio: 4 / 3.6; } }

/* Galería de problemas (foto con nombre encima) */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.gallery a { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; text-decoration: none; background: var(--beige); }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.4s var(--ease); }
.gallery a:hover img { transform: scale(1.05); }
.gallery a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 18, 14, 0) 45%, rgba(30, 18, 14, .62) 100%); }
.gallery__label { position: absolute; left: 1.3rem; right: 1.3rem; bottom: 1.2rem; z-index: 2; color: #FFF8F6; }
.gallery__name { display: block; font-family: var(--serif); font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.2; }
.gallery__desc { display: block; font-size: .78rem; line-height: 1.45; opacity: .85; margin-top: .35rem; }
.gallery .img-note { display: none; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .gallery__desc { display: none; } }

/* Lista editorial con numeración (tecnologías) */
.num-list { list-style: none; margin: 2rem 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; counter-reset: n; }
.num-list li { counter-increment: n; }
.num-list a { display: block; text-decoration: none; color: var(--ink); }
.num-list a::before { content: "0" counter(n); display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); line-height: 1; margin-bottom: .45rem; }
.num-list span { font: 600 .74rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text); transition: color .3s ease; }
.num-list a:hover span { color: var(--warm); }

/* ---------- Bloque de tratamientos de la portada ---------- */
.bento { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.75rem; }
.bento__card { position: relative; overflow: hidden; padding: clamp(2rem, 4vw, 3.25rem); min-height: 470px; display: flex; flex-direction: column; }
.bento__card h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: 1rem; }
.bento__card h3 a { color: inherit; text-decoration: none; }
.bento__card--light { background: var(--bg); }
.bento__card--light .bento__body { position: relative; z-index: 2; max-width: 58%; }
.bento__card--light .bento__img { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; }
.bento__card--light .bento__img img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.bento__card--light .bento__img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(255, 248, 246, 0) 45%); z-index: 1; }
.bento__card--dark { background: var(--brown); color: #CDB9B1; }
.bento__card--dark h3, .bento__card--dark h3 a { color: var(--ivory); }
.bento__links { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.bento__links li { border-top: 1px solid rgba(239, 218, 210, .16); }
.bento__links a { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; color: #EADBD4; text-decoration: none; font-size: .92rem; transition: color .3s ease; }
.bento__links a::after { content: "→"; opacity: .5; transition: opacity .3s ease, transform .3s ease; }
.bento__links a:hover { color: #fff; }
.bento__links a:hover::after { opacity: 1; transform: translateX(3px); }
.bento .list { margin-top: .5rem; }
.bento .text-link { margin-top: auto; align-self: flex-start; color: var(--ink); }
.bento__card--dark .text-link { color: var(--ivory); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento__card { min-height: 0; }
  .bento__card--light .bento__body { max-width: none; }
  .bento__card--light .bento__img { order: 3; position: relative; width: auto; height: 220px; margin: 2rem calc(-1 * clamp(2rem, 4vw, 3.25rem)) calc(-1 * clamp(2rem, 4vw, 3.25rem)); }
  .bento__card--light .bento__img::before { background: linear-gradient(180deg, var(--bg) 0%, rgba(255, 248, 246, 0) 40%); }
}

/* ---------- Frase de filosofía ---------- */
.statement { max-width: 54rem; margin-inline: auto; text-align: center; }
.statement blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.3; color: var(--ink); }
.statement__rule { width: 1px; height: 4.5rem; background: var(--taupe); margin: 2.5rem auto; }
.statement p { color: var(--text); max-width: 36rem; margin-inline: auto; }

/* ---------- Banda final ---------- */
.cta-band { background: var(--blue); padding-block: clamp(4.5rem, 9vw, 7rem); text-align: center; }
.cta-band__inner { max-width: 44rem; margin-inline: auto; }
.cta-band h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.cta-band p { color: var(--text); }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn--light { background: var(--brown); color: var(--ivory); }
.cta-band .btn--light:hover { background: #47291f; color: #fff; }
.cta-band .btn--line-light { color: var(--ink); border-color: var(--taupe); }
.cta-band .btn--line-light:hover { border-color: var(--brown); color: var(--brown); }

/* Tarjeta final de la portada: marrón + foto */
.cta-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--brown); border-radius: 6px; overflow: hidden; }
.cta-card__text { padding: clamp(2.5rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; color: #D9C7C0; }
.cta-card h2 { color: var(--ivory); }
.cta-card .media { min-height: 420px; border-radius: 0; }
.cta-card .media img { position: absolute; inset: 0; }
@media (max-width: 860px) { .cta-card { grid-template-columns: 1fr; } .cta-card .media { min-height: 300px; } }

/* ---------- Pasos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line-strong); padding-top: 1.5rem; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--warm); line-height: 1; margin-bottom: 1rem; }
.steps h3 { font-size: 1.2rem; }
.steps p { font-size: .94rem; color: var(--text); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Equipo: la doctora sola arriba y el resto de a dos ---------- */
.mvv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.mvv > div { background: var(--bg-card); padding: 2.25rem 2rem; border: 1px solid var(--line); }
.mvv > div:nth-child(2) { background: var(--brown); border-color: var(--brown); }
.mvv > div:nth-child(2) h3, .mvv > div:nth-child(2) p { color: var(--ivory); }
.mvv h3 { font: 600 .74rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--warm); margin-bottom: 1.25rem; }
.mvv p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; color: var(--ink); margin: 0; }
.mvv .list { font-size: .92rem; margin: 0; }
.mvv .list li { padding-block: .3rem; }
@media (max-width: 900px) { .mvv { grid-template-columns: 1fr; } }

.lead-person { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; margin-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.lead-person .media { aspect-ratio: 4 / 5; background: #E6DCD0; }
.lead-person h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: .4rem; }
.lead-person__role { font: 600 .74rem/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--warm); margin-bottom: 1.5rem; }
.lead-person blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.55; color: var(--ink); }
@media (max-width: 760px) { .lead-person { grid-template-columns: 1fr; } .lead-person .media { max-width: 26rem; } }

.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.person { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.6rem; align-items: center; background: var(--bg-card); border: 1px solid var(--line); padding: 1rem; }
.person__img { aspect-ratio: 4 / 5; background: #E6DCD0; }
.person__name { font-size: 1.4rem; margin-bottom: .35rem; }
.person__role { font: 600 .7rem/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--warm); margin: 0; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .person { grid-template-columns: 7rem minmax(0, 1fr); gap: 1.1rem; } .person__name { font-size: 1.2rem; } }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { margin: 0; }
.info-list > div { padding: 1.25rem 0; border-bottom: 1px solid var(--line-strong); display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.info-list > div:first-child { border-top: 1px solid var(--line-strong); }
.info-list dt { font: 600 .7rem/1.9 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--warm); }
.info-list dd { margin: 0; line-height: 1.65; color: var(--ink); }
.info-list a { color: var(--ink); }
@media (max-width: 520px) { .info-list > div { grid-template-columns: 1fr; gap: .2rem; } }

.form { background: var(--bg-card); border: 1px solid var(--line); padding: clamp(1.75rem, 4vw, 3rem); }
.form h2 { font-size: 1.9rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.2rem; }
.field label { font: 600 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.field input, .field select, .field textarea {
  font: 400 1rem var(--sans); color: var(--ink); background: var(--bg);
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: .85rem .2rem; min-height: 50px; width: 100%;
  transition: border-color .3s ease;
}
.field textarea { min-height: 120px; resize: vertical; background: var(--bg); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--brown); }
.form__note { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }
.form__status { font-size: .9rem; color: var(--brown); margin-top: .8rem; min-height: 1.4em; }

.map { overflow: hidden; background: var(--beige); aspect-ratio: 16 / 10; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.25) sepia(.1); }

.note { font-size: .86rem; color: var(--muted); border-left: 2px solid var(--nude); padding: .2rem 0 .2rem 1rem; margin-top: 2rem; }

/* ---------- Pie ---------- */
.site-footer { background: var(--bg-soft); color: var(--text); padding-top: clamp(4rem, 8vw, 6rem); font-size: .9rem; border-top: 1px solid var(--line); }
.site-footer a { color: var(--text); text-decoration: none; transition: color .3s ease; }
.site-footer a:hover { color: var(--warm); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--line-strong); }
.footer-grid h2 { font: 600 .7rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: 1.25rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .6rem; line-height: 1.45; }
.footer-brand__name { display: block; font-family: var(--serif); font-size: 1.6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--warm); line-height: 1.25; }
.footer-brand p { margin-top: 1.25rem; max-width: 20rem; }
.footer-brand address { font-style: normal; line-height: 1.75; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-block: 1.75rem 6rem; font: 500 .72rem/1.6 var(--sans); letter-spacing: .08em; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  background: var(--brown); color: var(--ivory); border-radius: 50%; text-decoration: none;
  box-shadow: 0 12px 30px -12px rgba(44, 24, 19, .6); transition: background-color .4s ease, transform .4s ease;
}
.wa-float:hover { background: #47291f; color: #fff; transform: translateY(-2px); }
.wa-float svg { width: 24px; height: 24px; }
.wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Movimiento: suave y lento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__text > *, .hero-full__text > * { animation: rise 1s var(--ease) both; }
  .hero__text > *:nth-child(2), .hero-full__text > *:nth-child(2) { animation-delay: .08s; }
  .hero__text > *:nth-child(3), .hero-full__text > *:nth-child(3) { animation-delay: .16s; }
  .hero__text > *:nth-child(4), .hero-full__text > *:nth-child(4) { animation-delay: .24s; }
  .hero__figure, .hero-full__media { animation: fade 1.6s ease .1s both; }
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; } }

/* ---------- Error 404 ---------- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--section); }
.error-page .btn-row { justify-content: center; }

@media print {
  .site-header, .site-footer, .wa-float, .cta-band, .toc { display: none !important; }
  body { background: #fff; }
}

a[href^="tel:"], .site-footer a[href*="wa.me"], .info-list a[href*="wa.me"] { white-space: nowrap; }

/* ---------- Tamaño de fotos más contenido ---------- */
.hero__figure { max-width: 440px; justify-self: end; width: 100%; }
.hero__figure .media { aspect-ratio: 4 / 4.8; }
.hero-full { min-height: clamp(460px, 58vh, 580px); }
.card .img-box { aspect-ratio: 4 / 3; }
.cards { gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 1.75rem); }
.gallery a { aspect-ratio: 4 / 4.6; }
.section--white .split > .media { max-width: 420px; justify-self: center; width: 100%; }
.framed { max-width: 440px; justify-self: center; width: 100%; padding: 1rem; }
.framed .media { aspect-ratio: 4 / 4.4; }
.framed::after { inset: 1.9rem; }
.article-figure { max-width: 36rem; }
.lead-person { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.cta-card .media { min-height: 360px; }
.bento__card { min-height: 420px; }
@media (max-width: 900px) {
  .hero__figure { justify-self: start; max-width: 380px; }
  .hero__figure .media { aspect-ratio: 4 / 4.2; }
}
@media (max-width: 860px) { .hero-full__media { aspect-ratio: 16 / 10; } .lead-person { grid-template-columns: 1fr; } .lead-person .media { max-width: 300px; } }
@media (max-width: 560px) { .card .img-box { aspect-ratio: 16 / 10; } .gallery a { aspect-ratio: 4 / 4.4; } }

.tile h3 a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .5s ease; }
.tile h3 a:hover { background-size: 100% 1px; }
