/* =========================================================
   TRAUMALIMA — Salud Ortopédica & Traumatología
   Paleta oficial: Azul Zafiro Profundo #1A3C6C · Verde Aqua Claro #AEEADF · Blanco #FFFFFF
   Tipografía: Montserrat
   ========================================================= */

:root {
  --navy: #1A3C6C;
  --aqua: #AEEADF;
  --white: #FFFFFF;

  /* Tonos derivados del mismo matiz */
  --navy-950: #0D2140;
  --navy-800: #16345E;
  --navy-600: #2A5390;
  --teal: #1F9E98;            /* aqua profundo para acentos sobre blanco */
  --teal-600: #188A85;
  --aqua-200: #D3F4EE;
  --aqua-50:  #F1FBF9;

  --ink: #1A3C6C;
  --ink-soft: #3F5878;
  --line: #E3EBF3;
  --bg-soft: #F3F7FB;
  --card: #EFF4F9;

  --wa: #25D366;
  --wa-dark: #1DA851;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(26,60,108,.06);
  --shadow: 0 16px 40px -14px rgba(26,60,108,.22);
  --shadow-lg: 0 24px 60px -18px rgba(26,60,108,.25);

  --container: 1200px;
  --header-h: 92px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--white);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.section { padding: 104px 0; position: relative; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before { content: ""; width: 2px; height: 14px; background: currentColor; }
.eyebrow--center::before, .eyebrow--center::after { width: 60px; height: 1.5px; }
.eyebrow--center::after { content: ""; background: currentColor; }
.h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; color: var(--navy); margin-bottom: 22px; }
.text { font-size: 17px; color: var(--ink-soft); max-width: 540px; }
.text + .text { margin-top: 14px; }
.text strong { color: var(--navy); }
.lead { font-size: 17px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 14.5px; margin-top: 4px; }
.section__head { text-align: center; max-width: 760px; margin: 0 auto 48px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font: 600 15px/1.2 "Montserrat", sans-serif; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--lg { padding: 17px 30px; font-size: 16px; }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 12px 24px -10px rgba(26,60,108,.6); }
.btn--primary:hover { background: var(--navy-600); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 10px 22px -10px rgba(37,211,102,.8); }
.btn--wa:hover { background: var(--wa-dark); }
.btn--ghost { border-color: var(--navy); color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }

/* ---------- Logotipo ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { width: 42px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-size: 25px; font-weight: 400; color: var(--navy); letter-spacing: .01em; }
.brand__name b { font-weight: 800; }
.brand__tag { font-size: 8.6px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); margin-top: 5px; white-space: nowrap; }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); display: flex; align-items: center; transition: background .3s, box-shadow .3s, height .3s; }
.header.is-scrolled { height: 74px; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line), var(--shadow-sm); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link { position: relative; padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--navy); }
.nav__link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--teal); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { font-weight: 700; }
.nav__cta { margin-left: 32px; padding: 12px 20px; font-size: 13.5px; }

.burger { display: none; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--white); box-shadow: var(--shadow-sm); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 16px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, #F4F8FC 0%, #EEF4FA 100%); padding-top: calc(var(--header-h) + 64px); }
.hero__photo {
  position: absolute; top: 76px; right: 0; height: calc(100% - 146px); aspect-ratio: 1000 / 1101; max-width: 55%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.8) 6%, #000 12%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.8) 6%, #000 12%);
}
.hero__photo img { width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.hex-deco { position: absolute; fill: none; stroke: var(--aqua); stroke-width: 22; opacity: .35; pointer-events: none; }
.hex-deco--hero { left: 34%; top: 70px; width: 300px; }

.hero__inner { position: relative; z-index: 2; }
.hero__copy { max-width: 540px; padding-bottom: 76px; }
.hero__title { font-size: clamp(40px, 5.2vw, 64px); font-weight: 800; color: var(--navy); letter-spacing: -.025em; line-height: 1.06; margin-bottom: 26px; }
.hero__title span { display: block; color: var(--teal); }
.hero__lead { font-size: 17.5px; color: var(--ink-soft); max-width: 470px; }
.hero__rule { display: block; width: 28px; height: 2px; background: var(--teal); margin: 26px 0 30px; opacity: .6; }

.trust {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px 16px; transform: translateY(50%); margin-top: -40px;
}
.trust li { display: flex; align-items: center; gap: 16px; padding: 4px 28px; font-size: 14px; color: var(--ink-soft); line-height: 1.35; }
.trust li + li { border-left: 1px solid var(--line); }
.trust svg { width: 44px; height: 44px; color: var(--navy); flex: none; }
.trust b { display: block; color: var(--navy); font-weight: 600; }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding: 110px 0 40px; background: linear-gradient(180deg, #fff 0%, #F7FAFD 100%); }
.about__media { align-self: stretch; min-height: 420px; position: relative; }
.about__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about__media { -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 100%); mask-image: linear-gradient(90deg, #000 70%, transparent 100%); }
.about__copy { padding-right: max(32px, calc((100vw - var(--container)) / 2 + 32px)); padding-top: 40px; padding-bottom: 40px; }
.quote { margin: 30px 0 0; padding-left: 20px; border-left: 4px solid var(--navy); font-size: 19px; font-style: italic; font-weight: 600; color: var(--navy); }

/* ---------- Especialidades ---------- */
.specs { padding-top: 80px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  text-align: center; padding: 30px 22px 26px; border-radius: var(--radius); background: var(--card);
  transition: background .3s, box-shadow .3s, transform .3s var(--ease);
}
.card:hover { background: var(--white); box-shadow: var(--shadow); transform: translateY(-5px); }
.card__icon { width: 54px; height: 54px; color: var(--navy); margin: 0 auto 16px; transition: color .3s; }
.card:hover .card__icon { color: var(--teal); }
.card h3 { font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 8px; letter-spacing: -.01em; }
.card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Equipo ---------- */
.team { position: relative; background: linear-gradient(180deg, #EEF4FA 0%, #F4F8FC 100%); min-height: 440px; display: flex; align-items: center; overflow: hidden; }
.team__photo { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.team__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 45%; }
.team__inner { position: relative; z-index: 2; padding-top: 88px; padding-bottom: 88px; }
.team__copy { max-width: 500px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chips li { padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm); }

.director {
  display: flex; gap: 20px; align-items: flex-start; margin-top: 32px; padding: 24px;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  border-left: 4px solid var(--teal);
}
.director__avatar {
  width: 104px; height: 104px; flex: none; border-radius: 50%; display: grid; place-items: center;
  padding: 3px; box-shadow: 0 0 0 3px var(--aqua-200);
  background: var(--white); color: var(--aqua);
  font-weight: 800; font-size: 24px; letter-spacing: .04em;
}
.director__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.director__role { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.director__name { font-size: 20px; font-weight: 700; color: var(--navy); margin: 4px 0 10px; letter-spacing: -.01em; }
.director__specs { display: grid; gap: 6px; }
.director__specs li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.director__specs li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--aqua); transform: rotate(45deg); }

/* ---------- Galería ---------- */
.gallery { background: var(--white); padding-bottom: 64px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 14px; }
.tile { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.tile video { background: var(--navy-950); }
.tile button:hover img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(26,60,108,.06); }
.tile figcaption {
  position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: 999px; pointer-events: none;
  background: rgba(13,33,64,.75); backdrop-filter: blur(6px); color: #fff; font-size: 12.5px; font-weight: 600;
}

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 56px 72px; background: rgba(8,20,40,.92); }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px); border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%; width: 52px; height: 52px; font-size: 34px; line-height: 1; display: grid; place-items: center; transition: background .2s; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 16px; top: 50%; margin-top: -26px; }
.lightbox__nav--next { right: 16px; top: 50%; margin-top: -26px; }

/* ---------- CTA WhatsApp ---------- */
.cta-wrap { position: relative; z-index: 3; margin-top: 0; }
.cta {
  display: flex; align-items: center; gap: 22px; padding: 26px 48px 26px 140px; border-radius: 22px;
  background:
    radial-gradient(500px 200px at 100% 100%, rgba(174,234,223,.18), transparent 60%),
    linear-gradient(100deg, var(--navy-800) 0%, var(--navy) 60%, var(--navy-600) 100%);
  color: #fff; box-shadow: var(--shadow-lg); transition: transform .3s var(--ease), box-shadow .3s;
}
.cta:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -18px rgba(26,60,108,.45); }
.cta__icon { width: 58px; height: 58px; color: var(--wa); flex: none; }
.cta__icon svg { width: 100%; height: 100%; }
.cta__text { display: flex; flex-direction: column; gap: 2px; }
.cta__text small { font-size: 15px; color: rgba(255,255,255,.8); }
.cta__text b { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.cta__text b svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
.cta:hover .cta__text b svg { transform: translateX(5px); }
.cta__num { margin-left: auto; font-size: 18px; font-weight: 700; color: var(--aqua); letter-spacing: .02em; }

/* ---------- Ubicación ---------- */
.location { padding-top: 96px; }
.location__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.location__list { display: grid; gap: 22px; margin-bottom: 30px; }
.location__list li { display: flex; gap: 16px; align-items: flex-start; }
.location__icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--aqua-200); color: var(--navy); }
.location__icon--wa { background: rgba(37,211,102,.14); color: var(--wa-dark); }
.location__icon svg { width: 22px; height: 22px; }
.location__list small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 2px; }
.location__list p { font-size: 16.5px; font-weight: 600; color: var(--navy); line-height: 1.5; }
.location__list p.muted { font-weight: 500; color: var(--ink-soft); font-size: 14.5px; }
.location__list a:hover { color: var(--teal); }
.location__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.location__map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--card); }
.location__map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-top: 40px; background: var(--white); }
.footer__inner { display: flex; align-items: center; gap: 40px; padding-bottom: 32px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-left: auto; font-size: 14px; font-weight: 500; }
.footer__nav a:hover { color: var(--teal); }
.footer__motto { padding-left: 40px; border-left: 1.5px solid var(--navy); font-style: italic; font-weight: 600; font-size: 15px; white-space: nowrap; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 14px 30px -8px rgba(37,211,102,.7); transition: transform .25s var(--ease), background .2s; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wa); z-index: -1; animation: pulse 2.4s ease-out infinite; }
.wa-float:hover { transform: scale(1.06); background: var(--wa-dark); }
.wa-float svg { width: 32px; height: 32px; }
@keyframes pulse { from { transform: scale(1); opacity: .5; } to { transform: scale(1.55); opacity: 0; } }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.trust.reveal { transform: translateY(calc(50% + 22px)); }
.trust.reveal.is-in { transform: translateY(50%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .burger { display: block; }
  .header { height: 74px; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
  :root { --header-h: 74px; }
  .nav {
    position: fixed; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 24px 24px; background: #fff; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all .3s var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .nav__cta { margin: 16px 0 0; padding: 15px; font-size: 15px; }
  .trust li { padding: 4px 18px; gap: 12px; }
  .footer__inner { flex-wrap: wrap; }
  .footer__motto { width: 100%; padding-left: 0; border-left: 0; }
  .footer__nav { margin-left: 0; }
}

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .hero { padding-top: calc(74px + 40px); }
  .hero__photo { position: relative; width: 100%; max-width: 560px; height: auto; aspect-ratio: 1000 / 1101; margin: 0 auto; order: 2; }
  .hero__photo { top: auto; -webkit-mask-image: none; mask-image: none; border-radius: 20px; }
  .hero { display: flex; flex-direction: column; }
  .hero__inner { order: 1; }
  .hero > .container:last-of-type { order: 3; }
  .hex-deco--hero { display: none; }
  .hero__copy { padding-bottom: 32px; }
  .trust { grid-template-columns: 1fr 1fr; row-gap: 20px; transform: none; margin-top: -60px; }
  .trust.reveal, .trust.reveal.is-in { transform: none; }
  .trust li:nth-child(3) { border-left: 0; }
  .hero { padding-bottom: 40px; }

  .about { grid-template-columns: 1fr; gap: 32px; padding: 64px 0 24px; }
  .about__media { min-height: 300px; }
  .about__media { -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
  .about__copy { padding: 0 32px; }
  .cards { grid-template-columns: repeat(2, 1fr); }

  .team { flex-direction: column; align-items: stretch; }
  .team__photo { position: relative; width: 100%; height: 280px; clip-path: none; order: 2; }
  .team__inner { padding-top: 64px; padding-bottom: 40px; }
  .cta-wrap { margin-top: 0; }
  .gallery { padding-bottom: 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; gap: 10px; }
  .cta { padding: 24px 28px; flex-wrap: wrap; }
  .cta__num { margin-left: 80px; }
  .location__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .about__copy { padding: 0 16px; }
  .brand__name { font-size: 21px; }
  .brand__tag { font-size: 7.3px; }
  .brand__mark { width: 34px; }
  .hero__title { font-size: 38px; }
  .hero__copy .btn { width: 100%; }
  .trust { grid-template-columns: 1fr; padding: 12px 6px; row-gap: 0; }
  .trust li { padding: 12px 14px; }
  .trust li + li { border-left: 0; border-top: 1px solid var(--line); }
  .cards { gap: 12px; }
  .card { padding: 22px 12px; }
  .card__icon { width: 44px; height: 44px; }
  .card h3 { font-size: 14.5px; }
  .card p { font-size: 12.5px; }
  .cta { gap: 14px; padding: 22px 20px; flex-direction: column; align-items: flex-start; }
  .cta__icon { width: 46px; height: 46px; }
  .cta__text b { font-size: 17px; }
  .cta__num { margin-left: 0; font-size: 16px; }
  .location__actions .btn { flex: 1; }
  .grid { grid-auto-rows: 140px; gap: 8px; }
  .tile figcaption { font-size: 11px; left: 8px; top: 8px; padding: 4px 9px; }
  .lightbox { padding: 64px 12px; }
  .lightbox__nav--prev, .lightbox__nav--next { top: auto; bottom: 12px; margin: 0; }
  .director { flex-direction: column; gap: 14px; padding: 20px; }
  .director__avatar { width: 96px; height: 96px; }
  .footer__nav { gap: 6px 18px; }
  .wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
}
