/* Dr. Flynn Guillermo, Cirujano de Miembro Superior
   Sitio claro, tipografía única muy legible, acento en azul opaco medio-oscuro. */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #1E2A38;
  --ink-soft: #44536A;
  --muted: #6C7A8C;
  --paper: #FFFFFF;
  --paper-alt: #F3F6F9;
  --line: #DEE4EA;
  --blue: #2E4A66;
  --blue-dark: #1F3247;
  --blue-tint: #E9EFF5;
  --focus: #2E4A66;
  --radius: 4px;
  --max: 1120px;
  --font: 'Public Sans', -apple-system, Segoe UI, sans-serif;
}

/* Tema único claro, a propósito: el sitio no debe alternar a oscuro. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 68ch; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 0.75em;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

nav.primary-nav a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--blue-dark);
  border-bottom-color: var(--blue);
}

.nav-more { position: relative; }
.nav-more summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after {
  content: "▾";
  font-size: 0.7rem;
  color: var(--muted);
}
.nav-more[open] summary,
.nav-more:has(a[aria-current="page"]) summary {
  color: var(--blue-dark);
  border-bottom: 2px solid var(--blue);
}
.nav-more .more-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(30, 42, 56, 0.1);
  padding: 8px;
  display: grid;
  min-width: 170px;
  z-index: 50;
}
.nav-more .more-menu a {
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: none;
}
.nav-more .more-menu a:hover { background: var(--blue-tint); color: var(--blue-dark); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 1.1rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1DA851; }

/* Hero */
.hero { padding: 64px 0 52px; border-bottom: 1px solid var(--line); }
.hero p.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 56ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-flex { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-portrait { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 5; }
.hero-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* Page header (non-home) */
.page-hero { padding: 44px 0 36px; border-bottom: 1px solid var(--line); background: var(--paper-alt); }
.byline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.88rem; color: var(--muted); margin-top: 6px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.byline a { color: var(--blue); font-weight: 700; text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.byline .dot { opacity: 0.5; }

/* Grid of zones */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 36px 0;
}
.zone-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.zone-card:hover { border-color: var(--blue); background: var(--blue-tint); }
.zone-card .zone-num {
  font-size: 0.76rem; color: var(--blue); letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700;
}
.zone-card h3 { margin: 10px 0 6px; }
.zone-card p { font-size: 0.92rem; margin: 0; }

/* Imágenes anatómicas de zona (láminas históricas de dominio público) */
.zone-icon, .hero-icon {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: border-color 0.15s ease;
}
.zone-icon { width: 100%; height: 168px; margin-bottom: 16px; }
.hero-icon { width: 420px; max-width: 100%; height: 315px; margin-bottom: 20px; }
.zone-icon img, .hero-icon img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
}
.zone-card:hover .zone-icon { border-color: var(--blue); }

section { padding: 52px 0; }
section.tight { padding: 36px 0; }
section.alt { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 52px; align-items: start; }

.quote-block {
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 22px;
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 500;
}

.card-list { display: grid; gap: 16px; margin: 22px 0; }
.pathology {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--paper);
}
.pathology h3 { margin-bottom: 6px; font-size: 1.02rem; }
.pathology p { margin: 0; font-size: 0.95rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { padding-left: 26px; position: relative; color: var(--ink-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; background: var(--blue); border-radius: 50%;
}

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item h3 { font-size: 1rem; margin-bottom: 6px; color: var(--ink); }
.faq-item p { margin: 0; font-size: 0.95rem; }

.rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.rating .stars { color: #F5A623; font-size: 1.4rem; letter-spacing: 2px; line-height: 1; }
.rating .rating-text { font-size: 0.95rem; color: var(--ink-soft); }

.social-proof { display: flex; gap: 16px; flex-wrap: wrap; }
.proof-link {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 20px; text-decoration: none; color: var(--ink);
  background: var(--paper); font-weight: 700; font-size: 0.92rem;
}
.proof-link:hover { border-color: var(--blue); }
.proof-link .arrow { color: var(--blue); }

.placeholder-note {
  font-size: 0.8rem; color: var(--muted); background: var(--blue-tint);
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 6px 10px; display: inline-block;
}

.tag {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700; color: var(--blue);
  background: var(--blue-tint); padding: 3px 10px; border-radius: 20px; margin-bottom: 10px;
}
.location-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; background: var(--paper); margin-bottom: 20px;
}
.location-card h3 { margin-bottom: 4px; }
.location-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: 0.94rem; }
.location-card dt { color: var(--muted); }
.location-card dd { margin: 0; color: var(--ink-soft); }
.map-embed {
  margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  width: 100%; height: 340px; background: var(--paper-alt);
  color: var(--muted); font-size: 0.85rem;
  overflow: hidden;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 600px) {
  .map-embed { height: 260px; }
}

.coverage-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px;
}
.coverage-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; background: var(--paper);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.coverage-card p { margin-bottom: 14px; }
.coverage-card-whatsapp { background: var(--blue-tint); border-color: var(--blue); }
.coverage-card .btn { margin-top: auto; }
.coverage-card .btn-whatsapp svg { flex-shrink: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.blog-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--paper); }
.blog-card .eyebrow { margin-bottom: 10px; }

.cta-band { background: var(--blue-dark); color: #fff; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { opacity: 0.85; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: #fff; color: var(--blue-dark); }
.cta-band .btn-primary:hover { background: var(--blue-tint); }
.cta-band .btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }

footer.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; background: var(--paper-alt); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-grid h4 { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--blue-dark); }
.footer-legal { border-top: 1px solid var(--line); padding-top: 18px; font-size: 0.78rem; color: var(--muted); }
.footer-legal p { color: var(--muted); font-size: 0.78rem; max-width: none; }

.sticky-cta { display: none; }

@media (max-width: 860px) {
  nav.primary-nav {
    position: fixed; inset: 76px 0 0 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px;
    transform: translateX(100%); transition: transform 0.2s ease; overflow-y: auto;
  }
  nav.primary-nav.open { transform: translateX(0); }
  nav.primary-nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-more { width: 100%; }
  .nav-more summary { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-more .more-menu {
    position: static; transform: none; box-shadow: none; border: none;
    padding: 0 0 0 12px; min-width: 0;
  }
  .nav-more .more-menu a { border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
  .nav-toggle { display: inline-flex; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero-flex { grid-template-columns: 1fr; gap: 28px; }
  .hero-portrait { order: -1; max-width: 220px; aspect-ratio: 1 / 1; margin: 0 auto; }
  .coverage-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sticky-cta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--paper); border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 10px;
  }
  .sticky-cta .btn { flex: 1; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .page-hero { padding: 32px 0 28px; }
  .coverage-card { padding: 24px 20px; }
  .location-card { padding: 20px; }
  .site-header .wrap { gap: 8px; }
  .brand { font-size: 0.95rem; }
  .header-cta .btn { padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
