/**
 * Stylesheet map (quick navigation)
 *  1. Design tokens + global reset (:root … page-gradient)
 *  2. Header + primary navigation (sticky bar, drawer on small screens)
 *  3. Section layouts (about, certifications, medicina familiar splits)
 *  4. Infotips (rich footnotes inlined in prose)
 *  5. Marketing blocks (landing carousel, hero, typography, buttons, cards, FAQ, reveal)
 *  6. Contact (map iframe, WhatsApp chip, footer)
 */

:root {
  /* Brand logos in assets/images/brand/ (transparent in header/favicon; teal & white variants kept for print/email) */
  --logo-teal-light: #86d2c9;
  --logo-teal-mid: #6abfb6;
  --logo-bg-start: #76d1c1;
  --logo-bg-end: #56c1c9;

  /* UI tokens: darker accent for contrast on white (WCAG-friendly links/buttons) */
  --color-bg: #f5faf9;
  --color-surface: #ffffff;
  --color-text: #152326;
  --color-text-muted: #4a5e5c;
  /* Links / small UI: cyan-teal (matches logo hue, readable on white) */
  --color-accent: #1a6f78;
  --color-accent-hover: #145a62;
  --color-accent-soft: #e3f5f3;
  --color-accent-wash: rgba(86, 193, 201, 0.14);

  /* Primary CTA: same family as logo gradient (mint → cyan), dark enough for white label text */
  --btn-primary-gradient: linear-gradient(
    105deg,
    #3bb5a9 0%,
    #32a8b4 45%,
    #2c9bab 100%
  );
  --btn-primary-gradient-hover: linear-gradient(
    105deg,
    #34a396 0%,
    #2b94a3 45%,
    #268a96 100%
  );
  --color-border: #cfe8e4;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;
  --radius-pill: 999px;
  --shadow-soft: 0 12px 40px rgba(26, 34, 40, 0.07);
  --shadow-header: 0 1px 0 rgba(26, 34, 40, 0.06);
  --header-h: calc(4.95rem - 2px);
  --footer-h: clamp(2.65rem, calc(0.82rem + var(--header-h) * 0.34), 3.1rem);
  --space-section: clamp(3.25rem, 10vw, 5.5rem);
  --max-text: 38rem;
  --max-wide: 68rem;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scroll-padding-top: var(--header-h-measured, var(--header-h));
  scroll-padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px) + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  color: var(--color-accent);
  border-radius: var(--radius-md);
  z-index: 300;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 250;
  background: linear-gradient(90deg, var(--logo-bg-start), var(--logo-bg-end));
  pointer-events: none;
  transform-origin: left;
  transition: width 0.1s ease-out;
}

.page-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      125% 85% at 88% -12%,
      rgba(118, 209, 193, 0.22),
      transparent 55%
    ),
    radial-gradient(90% 60% at 5% 100%, rgba(86, 193, 201, 0.12), transparent 52%),
    radial-gradient(70% 45% at 50% 40%, rgba(134, 210, 201, 0.06), transparent 60%);
  z-index: -1;
}

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-header);
}

/*
 * Sin blur en el encabezado en vista móvil: en WebKit/Blink, backdrop-filter en un
 * ancestro convierte el panel del menú (position: fixed) en relativo a esa caja,
 * y el menú queda recortado detrás del contenido.
 */
@media (max-width: 1099px) {
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }
}

.header__row {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: calc(0.55rem - 1px) 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.header__logo {
  display: block;
  height: calc(3.88rem - 2px);
  width: auto;
  max-width: calc(5.9rem - 2px);
  object-fit: contain;
}

.header__brand-text {
  display: block;
  line-height: 1.22;
}

.header__brand-tagline {
  display: block;
  margin-top: 0.12rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
}

.header__brand-tagline--short {
  display: none;
}

@media (max-width: 1099px) {
  .header__row {
    gap: 0.45rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .header__brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.45rem;
    font-size: clamp(0.68rem, 0.42rem + 2.1vw, 1.05rem);
    line-height: 1.18;
  }

  .header__logo {
    height: clamp(2.55rem, 5.5vw + 1.75rem, calc(3.88rem - 2px));
    max-width: clamp(3.6rem, 12vw + 1.9rem, calc(5.9rem - 2px));
    flex-shrink: 0;
  }

  .header__brand-text {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .header__brand-text br {
    display: none;
  }

  .header__brand-tagline {
    display: block;
    font-size: clamp(0.56rem, 0.48rem + 0.85vw, 0.72rem);
    line-height: 1.22;
  }

  .header__brand-tagline--short {
    display: none;
  }

  .header__toggle {
    padding: 0.45rem;
    gap: 0;
  }

  .header__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 420px) {
  .header__brand-tagline--long {
    display: none;
  }

  .header__brand-tagline--short {
    display: block;
  }
}

.header__brand:hover,
.header__brand:focus-visible {
  color: var(--color-accent);
}

.header__brand:hover .header__brand-tagline,
.header__brand:focus-visible .header__brand-tagline {
  color: var(--color-accent);
  opacity: 0.88;
}

.header__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  flex-shrink: 0;
}

.header__toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

body.nav-open {
  overflow: hidden;
  padding-right: calc(100vw - 100%);
}

@media (min-width: 1100px) {
  body.nav-open {
    overflow: visible;
  }
}

.header__toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.1rem;
  height: 0.95rem;
}

.header__toggle-line {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.header__toggle[aria-expanded="true"] .header__toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__toggle[aria-expanded="true"] .header__toggle-line:nth-child(2) {
  opacity: 0;
}

.header__toggle[aria-expanded="true"] .header__toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header__toggle:focus-visible {
  position: static;
}

.header__nav {
  display: none;
}

@media (max-width: 1099px) {
  .header__nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 210;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 12px 40px rgba(26, 34, 40, 0.08);
  }

  .header__nav.is-open {
    display: block;
  }
}

@media (min-width: 1100px) {
  .header__toggle {
    display: none;
  }

  .header__nav {
    display: block !important;
  }

  .header__links {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .header__link {
    font-size: 0.75rem;
    padding: 0.28rem 0.45rem;
    white-space: nowrap;
  }
}

/* Secondary pages: show compact inline nav on all breakpoints (no drawer). */
.header.header--simple .header__nav {
  display: block !important;
  position: static;
  inset: auto;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  margin: 0;
  overflow: visible;
  border: 0;
  box-shadow: none;
}

@media (max-width: 1099px) {
  .header.header--simple .header__row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .header.header--simple .header__nav {
    width: 100%;
  }

  .header.header--simple .header__links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .header.header--simple .header__link {
    font-size: 0.8125rem;
    padding: 0.45rem 0.6rem;
  }
}

.header__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 1100px) {
  .header__links {
    flex-direction: row;
    align-items: center;
    gap: 0.06rem;
  }
}

.header__link {
  display: block;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.header__link:hover,
.header__link:focus-visible {
  color: var(--color-accent);
  background: var(--color-accent-wash);
}

.header__link.is-active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.main {
  flex: 1;
  position: relative;
}

.section {
  padding: var(--space-section) 1.25rem;
}

.section--surface {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--accent-soft {
  background: linear-gradient(180deg, var(--color-accent-soft) 0%, var(--color-surface) 100%);
  border: none;
}

/* Medicina familiar: texto + huecos para imágenes (sustituir placeholders) */
.section__inner--medfam .section__title {
  margin-top: 0;
}

/* Intro: ancho completo del contenedor (el resto de .medfam-prose sigue acotado para lectura en columnas) */
.medfam-intro .section__lead,
.medfam-intro .prose {
  max-width: none;
}

.medfam-prose {
  max-width: var(--max-text);
}

.medfam-split {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  margin-top: 2rem;
}

/* Narrow: reverse splits keep figure-first in the markup for desktop columns; reorder so text
   always sits between the two section images instead of stacking image–image. */
@media (max-width: 767px) {
  .medfam-split--reverse .medfam-prose {
    order: 1;
  }

  .medfam-split--reverse .medfam-media--side {
    order: 2;
  }
}

@media (min-width: 768px) {
  .medfam-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 2rem;
    align-items: center;
  }

  .medfam-split--reverse .medfam-media--side {
    order: -1;
  }
}

.medfam-media {
  margin: 1.75rem 0 0;
  margin-inline: 0;
}

.section__inner--medfam > .medfam-media {
  margin-top: 2rem;
}

.medfam-media--side {
  margin: 0;
}

.medfam-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.medfam-caption {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.medfam-caption strong {
  color: var(--color-text);
  font-weight: 600;
}

.medfam-points {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.58;
}

.medfam-points li {
  margin-bottom: 0.6rem;
}

.medfam-points li:last-child {
  margin-bottom: 0;
}

.medfam-points strong {
  color: var(--color-text);
}

.medfam-note {
  margin: 2rem 0 0;
  max-width: var(--max-text);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.medfam-read-more {
  margin: 0.85rem 0 0;
  max-width: var(--max-text);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.section__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}

/* Sobre mí: texto envuelve la foto (.about__flow + float) en pantallas medianas+ */
.section__inner--about {
  display: grid;
  align-items: start;
  row-gap: 0.5rem;
}

.about__split {
  display: block;
}

.about__flow {
  min-width: 0;
  display: flow-root;
}

.about__split > .section__title {
  margin-top: 0;
}

.about__flow .section__lead,
.about__flow .prose,
.about__flow .about__closing {
  max-width: none;
}

.about__closing {
  width: 100%;
  margin-top: 0;
  padding-top: 0.35rem;
}

.about__closing.prose {
  max-width: none;
}

.about__closing p {
  margin: 0;
  line-height: 1.62;
}

.about__closing p + p {
  margin-top: 1rem;
}

/* Formación / certificaciones: fila completa bajo texto + foto */
.about__certs {
  grid-column: 1 / -1;
  width: 100%;
}

.about__figure {
  margin: 0 0 1.15rem;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--color-accent-soft);
}

@media (min-width: 640px) {
  .about__figure {
    float: right;
    width: min(72%, 33rem);
    margin: 0 0 1rem clamp(1rem, 3vw, 1.75rem);
  }
}

@media (min-width: 1100px) {
  .about__figure {
    width: min(64%, 36rem);
  }
}

.about__figure--portrait {
  aspect-ratio: 4 / 5;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

@media (min-width: 640px) {
  .about__figure--portrait {
    float: right;
    width: min(42%, 14.5rem);
    margin: 0 0 1rem clamp(1rem, 3vw, 1.75rem);
  }
}

@media (min-width: 1100px) {
  .about__figure--portrait {
    width: min(38%, 15.5rem);
  }
}

.about__figure--portrait .hero__portrait-img {
  width: 100%;
  height: 100%;
}

.about__photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* Sobre mí: formación en <details> (cerrado por defecto) */
.certs-disclosure {
  margin-top: 1.35rem;
  max-width: var(--max-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 4px 18px rgba(26, 34, 40, 0.04);
}

.certs-disclosure.about__certs {
  max-width: none;
  margin-top: 1.15rem;
}

.certs-disclosure__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

.certs-disclosure__summary::-webkit-details-marker {
  display: none;
}

.certs-disclosure__summary::marker {
  content: "";
}

.certs-disclosure__summary:focus {
  outline: none;
}

.certs-disclosure__summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.certs-disclosure__summary-text {
  flex: 1;
  min-width: min(100%, 12rem);
}

.certs-disclosure__hint {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.certs-disclosure__panel {
  padding: 0.65rem 1rem 1.05rem;
  border-top: 1px solid var(--color-border);
  --certs-cols: minmax(0, 1.45fr) minmax(0, 1.1fr) minmax(0, 1fr);
}

.certs__legend {
  display: none;
}

@media (min-width: 769px) {
  .certs__legend {
    display: grid;
    grid-template-columns: var(--certs-cols);
    gap: 0.45rem 1.15rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }
}

.certs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.certs__item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.certs__item:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

.certs__line {
  display: grid;
  grid-template-columns: var(--certs-cols);
  gap: 0.45rem 1.15rem;
  align-items: first baseline;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.certs__col--title strong {
  color: var(--color-text);
  font-weight: 600;
}

.certs__col--place {
  min-width: 0;
}

.certs__link {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
}

.certs__link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .certs__line {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding-bottom: 0.2rem;
  }

  .certs__col--inst {
    padding-left: 0;
  }

  .certs__col--place {
    font-size: 0.85rem;
  }
}

/* Inline info tooltip (p. ej. Hospital Clínic): mobile-first; fijo al viewport en pantallas estrechas */
.infotip {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
  white-space: normal;
}

.infotip__trigger {
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px dotted currentColor;
  border-radius: 2px;
  background: transparent;
  cursor: help;
  text-align: inherit;
  vertical-align: baseline;
}

.infotip__trigger:hover,
.infotip__trigger:focus-visible {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.infotip__trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Móvil: panel fijo centrado; ancho acotado para lectura sin ocupar todo el borde a borde */
.infotip__panel {
  position: fixed;
  z-index: 260;
  left: 50%;
  right: auto;
  width: min(calc(100vw - 1.25rem), 26rem);
  max-width: min(calc(100vw - 1.25rem), 26rem);
  transform: translateX(-50%);
  top: 1rem;
  bottom: auto;
  max-height: min(28rem, calc(100vh - 2rem));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
}

/* Escritorio: panel contextual; más ancho que antes para menos scroll vertical, con tope y scroll si el texto es largo */
@media (min-width: 640px) {
  .infotip__panel {
    position: absolute;
    left: 0;
    right: auto;
    width: max-content;
    max-width: min(28rem, calc(100vw - 2rem));
    transform: none;
    top: calc(100% + 0.4rem);
    bottom: auto;
    max-height: min(26rem, 58vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Alinear hacia la derecha si el disparador cae en el borde derecho del contenedor */
  .infotip--align-end .infotip__panel {
    left: auto;
    right: 0;
  }
}

@media (min-width: 640px) {
  .infotip__panel.infotip__panel--above {
    top: auto;
    bottom: calc(100% + 0.4rem);
  }
}

@media (max-width: 639px) {
  .infotip__panel.infotip__panel--above {
    top: 1rem;
    bottom: auto;
  }
}

/* Puente de hover entre disparador y panel (útil en escritorio) */
.infotip__panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 0.45rem;
}

@media (max-width: 639px) {
  .infotip__panel::before {
    display: none;
  }
}

.infotip__panel:not(.infotip__panel--above)::before {
  bottom: 100%;
}

@media (min-width: 640px) {
  .infotip__panel.infotip__panel--above::before {
    top: 100%;
  }
}

/*
 * Escritorio: hover, teclado o foco dentro del panel (enlaces).
 * En pantallas estrechas, el foco dentro de .infotip abre el panel sin depender de :focus-visible (tocar).
 */
.infotip:hover .infotip__panel,
.infotip__trigger:focus-visible + .infotip__panel,
.infotip__panel:focus-within {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 639px) {
  .infotip:focus-within .infotip__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.infotip__title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.infotip__text {
  margin: 0 0 0.65rem;
  color: var(--color-text-muted);
  word-break: break-word;
}

.infotip__links {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--color-text-muted);
}

.infotip__links li {
  margin-bottom: 0.35rem;
}

.infotip__links li:last-child {
  margin-bottom: 0;
}

.infotip__links a {
  color: var(--color-accent);
  font-weight: 500;
  word-break: break-word;
}

.infotip__links a:hover {
  color: var(--color-accent-hover);
}

@media (prefers-reduced-motion: reduce) {
  .infotip__panel {
    transition: none;
  }
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.section__lead {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  max-width: var(--max-text);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Landing (#inicio): headlines, carousel, CTAs */
.landing {
  min-height: calc(100svh - var(--header-h) - var(--footer-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(0.65rem, 2vw, 1.25rem);
  padding-bottom: clamp(0.65rem, 2vw, 1rem);
}

.landing__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.landing__intro {
  max-width: 62rem;
  margin: 0 auto 1.15rem;
  text-align: center;
}

.landing__intro .hero__name {
  margin-bottom: 0.5rem;
}

.landing__intro .hero__brand {
  margin-bottom: 0.35rem;
  max-width: none;
}

.landing__intro .hero__title {
  margin-bottom: 0.75rem;
  color: var(--color-accent);
}

.landing__intro .eyebrow {
  margin-bottom: 0;
  color: var(--color-text);
}

.landing .promo-carousel__viewport {
  margin-top: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.landing .promo-carousel__stage {
  padding: 0;
  background: transparent;
  border: none;
}

.landing .promo-carousel__track {
  height: clamp(14rem, 52dvh, 26rem);
  aspect-ratio: auto;
}

.landing .promo-carousel__frame {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing .promo-carousel__dots {
  position: static;
  margin-top: 0.75rem;
  padding: 0;
  background: transparent;
}

.landing__actions {
  margin-top: 1.15rem;
}

@media (max-width: 719px) {
  .landing.section {
    box-sizing: border-box;
    min-height: calc(
      100svh - var(--header-h-measured, var(--header-h)) - var(--footer-h-measured, var(--footer-h)) -
        env(safe-area-inset-bottom, 0px)
    );
    justify-content: stretch;
    padding: 0.55rem 0.5rem 0;
  }

  .landing__inner {
    flex: 1;
    min-height: 0;
    justify-content: space-between;
    align-items: stretch;
    padding-top: 0.45rem;
    padding-bottom: 0.55rem;
  }

  .landing__intro {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .landing__intro .hero__name {
    margin-bottom: 0.35rem;
  }

  .landing__intro .hero__brand {
    margin-bottom: 0.25rem;
  }

  .landing__intro .hero__title {
    margin-bottom: 0.45rem;
  }

  .landing .promo-carousel__viewport {
    flex: 0 0 auto;
    width: calc(100% + 1rem - 6px);
    max-width: none;
    margin-left: calc(-0.5rem + 3px);
    margin-right: calc(-0.5rem + 3px);
  }

  .landing .promo-carousel__track {
    height: 13.5rem;
  }

  .landing .promo-carousel__dots {
    display: none;
  }

  .promo-carousel__slide--desktop-only {
    display: none !important;
  }

  .landing__actions {
    margin-top: 0;
    flex-shrink: 0;
  }
}

.promo-carousel__viewport {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.promo-carousel__stage {
  position: relative;
  padding: clamp(0.55rem, 1.75vw, 0.9rem);
  background: linear-gradient(
    155deg,
    var(--color-accent-soft) 0%,
    var(--color-surface) 48%,
    var(--color-accent-wash) 100%
  );
  border-bottom: 1px solid var(--color-border);
}

.promo-carousel__track {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  aspect-ratio: 1200 / 700;
}

.promo-carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

.promo-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.promo-carousel__frame {
  margin: 0;
  height: 100%;
  padding: clamp(0.45rem, 1.25vw, 0.7rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 4px 18px rgba(26, 34, 40, 0.06);
}

.promo-carousel__frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.promo-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-accent);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transform: translateY(-50%);
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.promo-carousel__arrow:hover,
.promo-carousel__arrow:focus-visible {
  color: var(--color-accent-hover);
  background: var(--color-surface);
  border-color: var(--logo-teal-mid);
  outline: none;
}

.promo-carousel__arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.promo-carousel__arrow--prev {
  left: clamp(0.3rem, 1.2vw, 0.65rem);
}

.promo-carousel__arrow--next {
  right: clamp(0.3rem, 1.2vw, 0.65rem);
}

.promo-carousel__arrow-icon {
  display: flex;
  line-height: 0;
}

.promo-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 1rem;
  background: var(--color-surface);
}

.promo-carousel__dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.promo-carousel__dot:hover,
.promo-carousel__dot:focus-visible {
  background: var(--logo-teal-mid);
  outline: none;
}

.promo-carousel__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.15);
}

.hero {
  padding-top: calc(var(--space-section) * 0.85);
  padding-bottom: var(--space-section);
}

.hero__inner {
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}

.hero__portrait {
  margin: 0 auto;
  width: min(11.5rem, 46vw);
  aspect-ratio: 4 / 5;
}

.hero__profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: center;
  margin: 0 auto 1.75rem;
  max-width: 42rem;
  text-align: center;
}

@media (min-width: 640px) {
  .hero__profile {
    grid-template-columns: minmax(7.5rem, 10.5rem) minmax(0, 1fr);
    gap: 1.15rem 1.65rem;
    text-align: left;
  }

  .hero__portrait {
    margin: 0;
    width: 100%;
  }
}

.hero__portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  -webkit-mask-image: radial-gradient(
    ellipse 72% 76% at 50% 46%,
    #000 38%,
    rgba(0, 0, 0, 0.72) 58%,
    transparent 76%
  );
  mask-image: radial-gradient(
    ellipse 72% 76% at 50% 46%,
    #000 38%,
    rgba(0, 0, 0, 0.72) 58%,
    transparent 76%
  );
}

.hero__name,
.hero__brand,
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-text);
}

.hero__name {
  margin: 0 0 0.55rem;
  font-size: clamp(2rem, 5.8vw, 2.75rem);
  letter-spacing: -0.02em;
}

.hero__name-accent {
  color: var(--color-accent);
}

.hero__brand,
.hero__title {
  font-size: clamp(1.45rem, 3.8vw, 1.85rem);
}

.hero__brand {
  margin: 0 0 0.3rem;
  max-width: 62rem;
}

.hero__title {
  margin: 0 0 0.85rem;
}

.hero__tag {
  margin: 0 0 0.95rem;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.55;
}

.hero__bridge {
  margin: 0 auto 1.1rem;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.58;
  text-align: left;
  color: var(--color-text-muted);
}

.hero__bridge strong {
  color: var(--color-text);
  font-weight: 600;
}

.hero__clarifier {
  margin: 0;
  max-width: none;
  font-size: 0.975rem;
  line-height: 1.62;
  text-align: left;
  color: var(--color-text-muted);
}

@media (max-width: 639px) {
  .hero__bridge,
  .hero__clarifier {
    text-align: center;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.35rem, 1.4vw, 0.75rem);
  width: 100%;
}

.hero__actions .btn {
  flex: 0 1 auto;
  min-width: 0;
  padding: clamp(0.55rem, 1.1vw, 0.85rem) clamp(0.6rem, 1.6vw, 1.35rem);
  font-size: clamp(0.72rem, 1.6vw + 0.42rem, 0.95rem);
  white-space: nowrap;
}

.hero__actions .btn--primary {
  flex-shrink: 0;
}

.hero-btn__icon {
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.hero-btn__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.hero-btn--primary .hero-btn__label--short,
.hero-btn__label--mid,
.hero-btn__label--short {
  display: none;
}

@media (max-width: 820px) {
  .hero-btn--servicios .hero-btn__label--long,
  .hero-btn--medfam .hero-btn__label--long {
    display: none;
  }

  .hero-btn--servicios .hero-btn__label--short {
    display: inline;
  }

  .hero-btn--medfam .hero-btn__label--mid {
    display: inline;
  }
}

@media (max-width: 520px) {
  .hero-btn--primary .hero-btn__label--long {
    display: none;
  }

  .hero-btn--primary .hero-btn__label--short {
    display: inline;
  }

  .hero__actions .btn--ghost .hero-btn__label {
    display: none !important;
  }

  .hero__actions .btn--ghost .hero-btn__icon {
    display: inline-flex;
  }

  .hero__actions .btn--ghost {
    flex: 0 0 auto;
    width: 2.45rem;
    height: 2.45rem;
    padding: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--btn-primary-gradient);
  color: #fff;
  box-shadow: 0 2px 14px rgba(44, 155, 165, 0.35);
}

.btn--primary:hover {
  background: var(--btn-primary-gradient-hover);
  box-shadow: 0 2px 18px rgba(38, 138, 150, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: rgba(26, 111, 120, 0.38);
}

.btn--ghost:hover {
  background: var(--color-accent-wash);
  border-color: var(--color-accent);
}

.prose {
  max-width: var(--max-text);
  color: var(--color-text-muted);
}

.prose--narrow {
  max-width: 32rem;
}

.prose p,
.prose .prose__rich {
  margin: 0 0 1rem;
}

.prose p:last-child,
.prose .prose__rich:last-child {
  margin-bottom: 0;
}

.prose h3 {
  margin: 1.35rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.prose h3:first-child {
  margin-top: 0;
}

/*
 * FAQs: native <details> (no JS) for SEO-visible Q&A paired with FAQPage JSON-LD.
 * Single outer panel (aligned with .section__lead / formación) instead of centered cards.
 */
.faq {
  max-width: var(--max-text);
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 4px 18px rgba(26, 34, 40, 0.04);
  overflow: hidden;
}

.faq__item {
  margin: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: none;
  transition: background-color 0.18s ease;
}

.faq__item:last-child {
  border-bottom: none;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.82rem 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.945rem;
  line-height: 1.42;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::marker {
  content: "";
}

.faq__question:focus {
  outline: none;
}

.faq__question:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

.faq__item[open] {
  background: var(--color-accent-soft);
}

.faq__answer {
  padding: 0 1rem 0.92rem;
  border-top: 1px solid var(--color-border);
}

.faq__answer p {
  margin: 0.72rem 0 0;
  font-size: 0.935rem;
  line-height: 1.62;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .faq__item {
    transition: none;
  }
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

.cards--compact {
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .cards--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

@media (min-width: 960px) {
  .cards--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

.cards--compact .card {
  padding: 0.95rem 0.95rem;
}

.cards--compact .card__title {
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.cards--compact .card__text {
  font-size: 0.875rem;
  line-height: 1.52;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(26, 111, 120, 0.28);
  box-shadow: 0 16px 48px rgba(26, 34, 40, 0.09);
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.card__text {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Servicios: tarjetas con volteo (frente = título + pista; reverso = título + detalle) --- */
.cards--compact .card.card--flip {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.cards--compact .card.card--flip:hover {
  border-color: transparent;
  box-shadow: none;
}

.card__flip {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  perspective: 1100px;
  border-radius: var(--radius-lg);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.card__flip:focus {
  outline: none;
}

.card__flip:focus-visible .card__face {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.card__flip-inner {
  position: relative;
  display: block;
  width: 100%;
  min-height: 7.75rem;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.card__flip[aria-expanded="true"] .card__flip-inner {
  transform: rotateY(180deg);
}

.card__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.card__face--front {
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card__face--back {
  transform: rotateY(180deg);
  align-items: stretch;
  justify-content: stretch;
  padding: 0.65rem 0.75rem;
  overflow: hidden;
}

.card__flip-front-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  text-align: center;
}

.card__flip-front-inner > .card__flip-title-wrap {
  flex: 0 0 auto;
  align-self: stretch;
}

.card__flip-title-wrap .card__title {
  display: block;
  margin: 0;
  text-align: center;
}

.card__flip-front-inner > .card__flip-hint {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.2rem;
}

.card__flip-back-inner {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  width: 100%;
  min-height: 0;
}

.cards--flip .card__title {
  margin: 0;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
}

.cards--flip .card__title--back {
  flex-shrink: 0;
  font-size: clamp(0.8rem, 1.75vw, 0.92rem);
  line-height: 1.15;
  text-align: left;
  padding-bottom: 0.22rem;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(26, 111, 120, 0.18);
}

.cards--flip .card__flip-hint {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.cards--flip .card__face--back .card__text {
  font-size: 0.8125rem;
  line-height: 1.3;
  text-align: left;
  width: 100%;
  hyphens: auto;
  overflow-wrap: break-word;
}

.card__flip:hover .card__face {
  border-color: rgba(26, 111, 120, 0.28);
  box-shadow: 0 16px 48px rgba(26, 34, 40, 0.09);
}

@media (min-width: 640px) {
  .card__flip-inner {
    min-height: 8.375rem;
  }
}

@media (min-width: 960px) {
  .cards--flip.cards--compact .card__flip-inner {
    min-height: 9.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__flip-inner {
    transition-duration: 0.01ms;
  }
}

.contact-layout {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.contact-info-bar {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .contact-info-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
  }
}

.contact-info-bar__address,
.contact-info-bar__hours {
  margin: 0;
}

@media (min-width: 880px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: stretch;
  }
}

.contact-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
}

@media (min-width: 880px) {
  .contact-main {
    height: 100%;
  }
}

.contact-main__address {
  margin: 0;
}

.contact-info-bar .contact-hours__note {
  margin-top: 0.65rem;
}

.contact-main__modalidad {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  width: 100%;
  border-top: 1px solid var(--color-border);
}

.contact-main__modalidad .contact__label {
  margin: 0 0 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-main__modalidad-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.contact-main__modalidad-text + .contact-main__modalidad-text {
  margin-top: 0.75rem;
}

.contact-main__modalidad-text strong {
  font-weight: 600;
  color: var(--color-text);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-hours__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.contact-hours__row {
  display: grid;
  grid-template-columns: minmax(6rem, 8.5rem) 1fr;
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.92rem;
}

.contact-hours__days {
  font-weight: 600;
  color: var(--color-text);
}

.contact-hours__time {
  color: var(--color-text-muted);
}

.contact-hours__note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-form {
  padding: 0.85rem 0.9rem 0.95rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.contact-form__intro {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.contact-form__thanks {
  margin: 0 0 0.55rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text);
  background: var(--color-accent-wash);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
}

.contact-form__error {
  margin: 0 0 0.55rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text);
  background: rgba(180, 40, 40, 0.08);
  border: 1px solid rgba(180, 40, 40, 0.35);
  border-radius: var(--radius-md);
}

.contact-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form__field {
  margin-bottom: 0.45rem;
}

.contact-form__field:last-of-type {
  margin-bottom: 0.55rem;
}

.contact-form__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.28rem;
}

.contact-form__optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.contact-form__input {
  width: 100%;
  max-width: min(100%, 18.5rem);
  font: inherit;
  font-size: 0.865rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
}

.contact-form__textarea {
  width: 100%;
  max-width: none;
  font: inherit;
  font-size: 0.865rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
  min-height: 3.25rem;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-wash);
}

.contact-form__submit {
  width: 100%;
}

.contact-wa,
.contact-mail {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.contact-wa:hover,
.contact-wa:focus-visible,
.contact-mail:hover,
.contact-mail:focus-visible {
  border-color: rgba(26, 111, 120, 0.45);
  background: var(--color-accent-soft);
  color: var(--color-text);
  box-shadow: 0 14px 42px rgba(26, 34, 40, 0.09);
}

.contact-wa:focus-visible,
.contact-mail:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.contact-wa__icon,
.contact-mail__icon {
  flex-shrink: 0;
}

.contact-wa__icon svg,
.contact-mail__icon svg {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.5rem;
}

.contact-wa__icon svg rect,
.contact-mail__icon svg rect {
  fill: var(--color-accent-soft);
}

.contact-wa__icon svg path,
.contact-mail__icon svg path {
  fill: var(--color-accent);
}

.contact-wa__copy,
.contact-mail__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.contact-wa__title,
.contact-mail__title {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.contact-mail__address {
  font-size: clamp(0.82rem, 2.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  word-break: break-word;
  color: var(--color-text);
}

.contact-wa__hint,
.contact-mail__hint {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-text-muted);
  margin-top: 0.1rem;
}

.contact-wa__number {
  font-size: clamp(1.2rem, 3.8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--color-text);
}

.contact-wa__number {
  font-size: clamp(1.2rem, 3.8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--color-text);
}

.contact-map {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  background: var(--color-surface);
}

@media (max-width: 879px) {
  .contact-map {
    flex: 0 0 auto;
  }
}

.contact-map__embed {
  position: relative;
  flex: 1 1 auto;
  min-height: 11.5rem;
  width: 100%;
  min-width: 0;
}

@media (max-width: 879px) {
  .contact-map__embed {
    flex: none;
    height: clamp(11.5rem, 42vw, 15rem);
    min-height: 10.5rem;
  }
}

.contact-map__frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-map__meta {
  flex-shrink: 0;
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.contact__block {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.contact__label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.contact__value {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.contact__hint {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.contact__link {
  color: var(--color-accent);
  text-decoration: none;
}

.contact__link:hover,
.contact__link:focus-visible {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 180;
  box-sizing: border-box;
  min-height: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -1px 0 rgba(26, 34, 40, 0.06);
}

@media (max-width: 1099px) {
  .site-footer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }
}

.site-footer__inner {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.4rem;
  min-height: var(--footer-h);
}

.site-footer__copy {
  margin: 0;
  text-align: left;
  font-size: clamp(0.65rem, 1.65vw + 0.52rem, 0.82rem);
  color: var(--color-text-muted);
  line-height: 1.35;
  min-width: 0;
  justify-self: start;
}

.site-footer__copy-short {
  display: none;
}

.site-footer__social {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  justify-self: end;
}

@media (max-width: 719px) {
  .site-footer {
    padding-left: calc(0.55rem + env(safe-area-inset-left, 0px));
    padding-right: calc(0.55rem + env(safe-area-inset-right, 0px));
  }

  .site-footer__inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 0.25rem;
    row-gap: 0;
    min-height: var(--footer-h);
    padding-bottom: 0;
  }

  .site-footer__copy {
    flex: 0 1 auto;
    min-width: 0;
    text-align: left;
    max-width: none;
    font-size: clamp(0.56rem, 1.35vw + 0.42rem, 0.68rem);
    line-height: 1.15;
    white-space: nowrap;
  }

  .site-footer__copy-long {
    display: none;
  }

  .site-footer__copy-short {
    display: inline;
  }

  .site-footer__social {
    flex-shrink: 0;
    gap: 0.05rem;
    margin-right: -0.05rem;
  }

  .site-footer__icon {
    padding: 0.3rem;
  }

  .footer-wa {
    flex-shrink: 0;
    justify-self: auto;
  }

  .footer-wa__text {
    text-align: left;
  }
}

/** Slim WhatsApp strip in fixed footer (compact sibling of `.contact-wa`). */
.footer-wa {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.28rem 0.62rem 0.28rem 0.45rem;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 3px 12px rgba(26, 34, 40, 0.06);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.footer-wa:hover,
.footer-wa:focus-visible {
  border-color: rgba(26, 111, 120, 0.4);
  background: var(--color-accent-soft);
  box-shadow: 0 6px 18px rgba(26, 34, 40, 0.08);
  color: var(--color-text);
}

.footer-wa:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.footer-wa__icon {
  flex-shrink: 0;
}

.footer-wa__icon svg {
  display: block;
  width: 1.38rem;
  height: 1.38rem;
  border-radius: 0.32rem;
}

.footer-wa__icon svg rect {
  fill: var(--color-accent-soft);
}

.footer-wa__icon svg path {
  fill: var(--color-accent);
}

.footer-wa__text {
  display: flex;
  flex-direction: column;
  gap: 0.03rem;
  min-width: 0;
  line-height: 1.15;
  text-align: left;
}

.footer-wa__label {
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.footer-wa__number {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.site-footer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.site-footer__icon:hover,
.site-footer__icon:focus-visible {
  color: var(--color-accent);
  background: var(--color-accent-wash);
}

.site-footer__icon:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.site-footer__icon svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
}
