/* =========================================================
   CLÍNICA OCES — colores del logo y de clinicaoces.cl
   Colores y tipografía: cámbialos aquí
   ========================================================= */
:root {
  --accent: #2ebace;        /* turquesa del logo: color de acento principal */
  --accent-dark: #1e86a8;   /* azul de clinicaoces.cl (acento sobre fondo claro) */
  --teal: #1ea89b;          /* verde azulado de clinicaoces.cl */
  --night: #0a2630;         /* fondo oscuro principal (azul petróleo) */
  --night-2: #0f3340;       /* tarjetas sobre fondo oscuro */
  --night-3: #1b4553;       /* bordes sobre fondo oscuro */
  --paper: #f2f7f8;         /* fondo claro */
  --ink: #0a2630;
  --muted: #55595e;         /* gris del logo */
  --muted-light: #96b3bb;
  --line: #d9e6ea;
  --radio: 4px;
  --ancho: 1240px;
  --header-h: 84px;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --skew: 4vw;              /* inclinación de los cortes diagonales */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { font-family: var(--font-body); font-size: 1.0625rem; color: var(--ink); background: var(--paper); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
em { font-style: normal; color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
@media (min-width: 701px) { .container { padding: 0 32px; } }

/* ================= Tipografía compartida ================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: currentColor; }
.eyebrow--dark { color: var(--ink); }
.eyebrow--dark::before { background: var(--accent-dark); }

.title {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  text-transform: uppercase; line-height: .92; letter-spacing: -.01em;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}
.title em { color: var(--ink); background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%); padding: 0 .08em; }
.title--light { color: #fff; }
.title--light em { color: var(--accent); background: none; padding: 0; }

/* ================= Botones ================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radio);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .06em;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn--lime { background: var(--accent); color: var(--night); }
.btn--lime:hover { background: #fff; box-shadow: 0 8px 24px rgba(46,186,206,.35); }
.btn--big { padding: 16px 34px; font-size: 1.2rem; }

/* ================= Encabezado ================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: #fff;
  transition: background .3s, box-shadow .3s, height .3s;
}
/* el fondo va en una capa aparte: si backdrop-filter estuviera en .header, el menú móvil (fixed) quedaría atrapado dentro */
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: rgba(10,38,48,.97); box-shadow: 0 1px 0 var(--night-3); transition: opacity .3s; } /* sin desenfoque: es costoso al hacer scroll en celulares */
.header.is-scrolled::before, body.menu-open .header::before { opacity: 1; }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; transition: height .3s; }
.header.is-scrolled .header__inner { height: 68px; }

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { display: block; height: 68px; width: auto; transition: height .3s; }
.header.is-scrolled .logo img { height: 54px; }

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__link {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 11px;
  font-weight: 600; font-size: .95rem;
  white-space: nowrap;
  transition: color .2s;
}
.nav__row { display: flex; align-items: center; }
.has-sub .nav__link { padding-right: 4px; }
.nav__expand { display: grid; place-items: center; width: 22px; height: 36px; margin-right: 4px; transition: color .2s; }
.nav__link:hover,
.has-sub:hover .nav__row > *,
.nav__link[aria-current="page"],
.has-sub.is-section .nav__row > * { color: var(--accent); }
.sub a[aria-current="page"] { color: var(--accent); }
.sub .sub__all a { font-weight: 700; color: #fff; border-bottom: 1px solid var(--night-3); margin-bottom: 4px; }
.nav__cart svg { width: 22px; height: 22px; }
.nav__cart-text { display: none; }
.nav__list .btn { margin-left: 10px; padding: 11px 18px; font-size: 1rem; }

.caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }

.has-sub { position: relative; }
.sub {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 260px;
  background: var(--night-2);
  border: 1px solid var(--night-3);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radio) var(--radio);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* puente para el mouse */
.sub a { display: block; padding: 10px 20px; font-size: .95rem; color: #d7e6ea; transition: color .15s, padding .15s, background .15s; }
.sub a:hover { color: var(--accent); background: rgba(255,255,255,.03); padding-left: 26px; }
.has-sub:hover > .sub,
.has-sub:focus-within > .sub,
.has-sub.open > .sub { opacity: 1; visibility: visible; transform: none; }

.nav-toggle { display: none; width: 46px; height: 46px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border: 1px solid var(--night-3); border-radius: var(--radio); }
.nav-toggle span { width: 22px; height: 2px; background: #fff; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================= Portada / slide ================= */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(600px, 92vh, 820px);
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 75% 40%, #0f4a5b 0%, var(--night) 60%);
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--skew)), 0 100%);
  padding-bottom: var(--skew);
}
/* líneas de pista diagonales */
.hero__lines {
  position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(-62deg, transparent 0 46px, rgba(255,255,255,.035) 46px 48px);
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
          mask-image: linear-gradient(90deg, transparent 20%, #000 75%);
}
/* Logo grande de fondo en el slider, tenue (igual que en el pie de página) */
.hero__word {
  position: absolute; right: 2vw; bottom: 3vw; z-index: -1;
  width: min(52vw, 860px);
  user-select: none; pointer-events: none;
}
.hero__word img {
  display: block; width: 100%; height: auto; opacity: .1;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.slides { position: relative; flex: 1; display: grid; }
.slide {
  grid-area: 1 / 1;
  display: flex; align-items: center;
  padding-top: var(--header-h);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.slide[style*="--photo"]::before { /* foto opcional a la derecha, con un zoom lento */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--night) 30%, rgba(10,38,48,.4) 70%, rgba(10,38,48,.2)), var(--photo) right center/cover no-repeat;
  scale: 1.08;
  transition: scale 1s ease;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }
.slide.is-active[style*="--photo"]::before { scale: 1; transition: scale 7s cubic-bezier(.2,.6,.3,1); }
.slide__content { position: relative; }
.slide__tag {
  display: inline-block;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--night); background: var(--accent);
  padding: 4px 12px; margin-bottom: 22px;
  transform: skewX(-12deg);
}
.slide__title {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  text-transform: uppercase; line-height: .86; letter-spacing: -.015em;
  font-size: clamp(3.6rem, 10vw, 8.5rem);
  margin-bottom: 22px;
}
.slide__text { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #c9dde2; max-width: 520px; margin-bottom: 34px; }

/* Transición del texto: el que sale se desliza hacia un lado y el que entra llega desde el otro,
   en cascada (etiqueta → título → texto → botones). --dir = 1 al avanzar, -1 al retroceder. */
.slide__tag, .slide__title, .slide__text, .slide__actions {
  opacity: 0;
  translate: calc(var(--dir, 1) * 70px) 0;
  transition: opacity .2s ease, translate .3s cubic-bezier(.4,0,.2,1);
}
.slide.is-leaving :is(.slide__tag, .slide__title, .slide__text, .slide__actions) {
  translate: calc(var(--dir, 1) * -70px) 0;
}
.slide.is-active :is(.slide__tag, .slide__title, .slide__text, .slide__actions) {
  opacity: 1;
  translate: 0 0;
  transition: opacity .4s ease, translate .55s cubic-bezier(.16,1,.3,1);
}
.slide.is-active .slide__tag     { transition-delay: .08s; }
.slide.is-active .slide__title   { transition-delay: .12s; }
.slide.is-active .slide__text    { transition-delay: .16s; }
.slide.is-active .slide__actions { transition-delay: .20s; }
.slide.no-anim :is(.slide__tag, .slide__title, .slide__text, .slide__actions) { transition: none !important; }
.page-hero .slide__tag { opacity: 1; translate: none; }

.hero__controls { position: relative; display: flex; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 36px; }
.hero__counter { font-family: var(--font-display); font-size: 1.1rem; color: var(--muted-light); letter-spacing: .08em; white-space: nowrap; }
.hero__counter strong { color: #fff; font-size: 1.6rem; font-weight: 800; }
.hero__bars { flex: 1; display: flex; gap: 6px; max-width: 520px; }
.hero__bars button { flex: 1; height: 18px; position: relative; }
.hero__bars button::before,
.hero__bars button::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%); }
.hero__bars button::before { background: rgba(255,255,255,.18); }
.hero__bars button::after { background: var(--accent); transform: translateY(-50%) scaleX(0); transform-origin: left; }
.hero__bars button.is-done::after { transform: translateY(-50%) scaleX(1); }
.hero__bars button[aria-selected="true"]::after { animation: fill var(--slide-ms, 6000ms) linear forwards; }
.hero.is-paused .hero__bars button[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes fill { to { transform: translateY(-50%) scaleX(1); } }
.hero__arrows { display: flex; gap: 8px; margin-left: auto; }
.hero__arrow {
  width: 52px; height: 52px;
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--radio);
  font-size: 1.3rem;
  transition: background .2s, color .2s, border-color .2s;
}
.hero__arrow:hover { background: var(--accent); color: var(--night); border-color: var(--accent); }

/* ================= Horario ================= */
.hours { position: relative; z-index: 2; margin-top: calc(-1 * var(--skew) / 2 - 28px); }
.hours__inner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(90deg, var(--accent-dark), var(--teal)); color: #fff;
  padding: 18px 28px;
  font-size: 1.1rem; text-align: center;
  transform: skewX(-8deg);
  box-shadow: 0 18px 40px rgba(10,38,48,.18);
  max-width: 1040px;
}
.hours__inner > * { transform: skewX(8deg); }
.hours__inner strong { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; }
.hours__sep { margin: 0 6px; opacity: .45; }
.hours__list { display: flex; gap: 14px 28px; flex-wrap: wrap; justify-content: center; padding-left: 22px; border-left: 2px solid rgba(255,255,255,.35); }
.hours__list dt { font-family: var(--font-display); font-weight: 800; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; line-height: 1.2; }
.hours__list dd { font-weight: 600; line-height: 1.35; }
.hours svg { width: 26px; height: 26px; flex-shrink: 0; stroke-width: 2.2; }

/* ================= Beneficios ================= */
.features { padding: 96px 0 72px; }
.features .title--light { color: var(--ink); }
.features .title--light em { color: var(--ink); background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%); padding: 0 .08em; }
.features .eyebrow { color: var(--ink); }
.features .eyebrow::before { background: var(--accent-dark); }
.features__head { margin-bottom: 44px; }
.features__grid { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature {
  position: relative;
  display: flex; flex-direction: column; gap: 22px;
  padding: 28px 22px 32px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.1; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.feature svg { width: 46px; height: 46px; stroke-width: 1.7; transition: color .25s; }
.feature::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0; background: var(--accent); transition: width .3s; }
.feature:hover { background: var(--night); color: #fff; }
.feature:hover svg { color: var(--accent); }
.feature:hover::after { width: 100%; }

/* ================= Servicios ================= */
.services { padding: 40px 0 120px; }
.services__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px 48px; align-items: end; margin-bottom: 52px; }
.services__head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.services__lead { color: var(--muted); font-size: 1.1rem; max-width: 480px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; overflow: hidden;
  background: var(--night); color: #fff;
  border-radius: var(--radio);
  padding: 32px 26px 30px;
  transition: transform .3s;
}
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--accent); transform: scaleX(.2); transform-origin: left; transition: transform .35s; }
.card:hover { transform: translateY(-6px); }
.card:hover::before { transform: scaleX(1); }
.card__num {
  position: absolute; right: 14px; top: 2px;
  font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 5.5rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--night-3);
  transition: -webkit-text-stroke-color .3s;
}
.card:hover .card__num { -webkit-text-stroke-color: var(--accent); }
.card h3 { position: relative; font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 2rem; text-transform: uppercase; margin: 40px 0 18px; }
.card li {
  position: relative; padding: 9px 0 9px 22px;
  border-top: 1px solid var(--night-3);
  color: #c9dde2; font-size: .98rem;
  scroll-margin-top: 140px;
}
.card li::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; background: var(--accent); }
.card li:target { color: var(--accent); font-weight: 700; }

/* ================= Contacto ================= */
.contact {
  position: relative;
  background: var(--night); color: #fff;
  padding: calc(96px + var(--skew)) 0 110px;
  clip-path: polygon(0 var(--skew), 100% 0, 100% 100%, 0 100%);
  background-image: repeating-linear-gradient(-62deg, transparent 0 46px, rgba(255,255,255,.025) 46px 48px);
}
.contact__head { max-width: 760px; margin-bottom: 52px; }
.contact__lead { color: #c9dde2; margin-top: 18px; font-size: 1.1rem; }

.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.branches__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.branches__tab {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  text-align: left;
  background: var(--night-2); border: 1px solid var(--night-3); border-radius: var(--radio);
  color: #c9dde2;
  transition: background .2s, color .2s, border-color .2s;
}
.branches__tab strong { display: block; font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 1.35rem; line-height: 1; text-transform: uppercase; color: #fff; }
.branches__tab small { display: block; font-size: .85rem; margin-top: 3px; }
.branches__num { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--muted-light); }
.branches__tab:hover { border-color: var(--accent); }
.branches__tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--night); }
.branches__tab[aria-selected="true"] strong { color: var(--night); }
.branches__tab[aria-selected="true"] .branches__num { -webkit-text-stroke-color: var(--night); }
.contact__map[hidden] { display: none; }
.contact__map:not([hidden]) { animation: fade-in .35s ease; }
@keyframes fade-in { from { opacity: .3; } }
.contact__map { background: var(--night-2); border: 1px solid var(--night-3); border-radius: var(--radio); overflow: hidden; }
.contact__map iframe { width: 100%; height: 380px; border: 0; display: block; background: var(--night-2); filter: grayscale(.35) contrast(1.05); }
.contact__info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 22px; border-top: 3px solid var(--accent); }
.contact__info p { font-size: .95rem; color: #c9dde2; }
.contact__label { display: block; font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; }
.field > span { font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-light); }
.form input, .form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--night-2);
  border: 1px solid var(--night-3);
  border-bottom: 2px solid var(--night-3);
  border-radius: var(--radio);
  font: inherit; color: #fff;
  outline: none;
  transition: border-color .2s, background .2s;
}
.form input:focus, .form textarea:focus { border-color: var(--night-3); border-bottom-color: var(--accent); background: #123c4a; }
.form textarea { resize: vertical; min-height: 140px; }
.form ::placeholder { color: #6f8d96; opacity: 1; } /* texto de ejemplo en gris, para que no parezca escrito */

/* Teléfono: selector de país (bandera + código) y número */
@font-face { /* banderas para Windows, que no las trae; solo se descarga si se usa */
  font-family: 'Twemoji Country Flags';
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.8/dist/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF; font-display: swap;
}
.field__error { color: #ff9b80; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.field__error:empty { display: none; }
.form .phone input.is-invalid { border-color: #ff7a59; border-bottom-color: #ff7a59; }
.form__row--auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.phone { display: flex; gap: 8px; }
.phone input { flex: 1; min-width: 0; }
.phone__country {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  background: var(--night-2);
  border: 1px solid var(--night-3); border-bottom: 2px solid var(--night-3);
  border-radius: var(--radio);
  color: #fff; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.phone__country:focus-within { border-bottom-color: var(--accent); background: #123c4a; }
.phone__flag { font-size: 1.35rem; line-height: 1; }
.no-flag-emoji .phone__flag, .no-flag-emoji .phone__country select { font-family: 'Twemoji Country Flags', var(--font-body, sans-serif); }
.phone__caret { width: 7px; height: 7px; border-right: 2px solid var(--muted-light); border-bottom: 2px solid var(--muted-light); transform: rotate(45deg) translateY(-2px); }
/* El select real queda invisible encima, así se abre la lista nativa (cómoda en celular) */
.phone__country select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 16px;
  color: #111; background: #fff;
}
.form .is-invalid { border-bottom-color: #ff7a59; }
.form .btn { justify-self: start; }
.form__msg { min-height: 1.2em; color: var(--accent); font-weight: 600; }
.form__msg.is-error { color: #ff9b80; }

/* ================= Pie de página ================= */
.footer { position: relative; overflow: hidden; background: #061c24; color: #a9c1c8; }
.footer__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 1.1fr 1fr 1.3fr; gap: 40px; padding-top: 72px; padding-bottom: 40px; }
.footer h3 { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 1.6rem; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer h3::after { content: ""; display: block; width: 32px; height: 3px; background: var(--accent); margin-top: 8px; }
.footer p { font-size: .95rem; }
.footer__links li { padding: 4px 0; font-size: .95rem; }
.footer__links a { display: inline-flex; gap: 8px; transition: color .2s, transform .2s; }
.footer__links a::before { content: "→"; color: var(--accent); }
.footer a:hover { color: var(--accent); }
.footer__links a:hover { transform: translateX(3px); }
.footer__contact li { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; font-size: .95rem; }
.footer__branch strong { display: block; color: #fff; font-family: var(--font-display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; }
.footer__branch-hours { padding-top: 0 !important; margin-bottom: 8px; }
.footer__contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 4px; color: var(--accent); }
/* Logo grande de fondo, difuminado (más suave hacia abajo) */
.footer__word { display: flex; justify-content: center; padding: 10px 16px 0; user-select: none; pointer-events: none; }
.footer__word img {
  display: block; width: min(820px, 92%); height: auto;
  opacity: .09;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}
.footer__bottom { position: relative; border-top: 1px solid #12333f; padding: 20px 0; text-align: center; font-size: .88rem; color: #7f9aa3; background: #061c24; }

/* ================= Botón WhatsApp ================= */
.whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: transform .2s;
}
.whatsapp::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: ping 2.4s ease-out 1s 4; } /* late 4 veces y se detiene */
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 32px; height: 32px; stroke: none; }

/* ================= Tablet ================= */
@media (max-width: 1180px) {
  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ================= Menú hamburguesa (tablet y celular) ================= */
@media (max-width: 1140px) {
  :root { --header-h: 72px; }
  /* Logo centrado en la barra; el botón del menú queda a la derecha */
  .header__inner { position: relative; }
  .logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .logo img, .header.is-scrolled .logo img { height: 52px; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--night);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .header.is-scrolled .nav { top: 68px; }
  .nav.open { transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 40px; }
  .nav__list > li { border-bottom: 1px solid var(--night-3); }
  .nav__list > li:last-child { border-bottom: 0; padding-top: 24px; }
  .nav__link {
    flex: 1; padding: 16px 4px;
    font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em;
    white-space: normal;
  }
  .has-sub .nav__link { padding-right: 4px; }
  .nav__expand { width: 52px; height: 52px; margin: 0; border-left: 1px solid var(--night-3); }
  .nav__expand .caret { width: 10px; height: 10px; }
  .has-sub:hover .nav__row > * { color: inherit; }
  .nav__link[aria-current="page"], .has-sub.is-section .nav__row > * { color: var(--accent); }
  .nav__cart { gap: 12px; }
  .nav__cart-text { display: inline; }
  .nav__list .btn { margin: 0; width: 100%; justify-content: center; padding: 16px; font-size: 1.2rem; }
  .sub {
    position: static; min-width: 0; box-shadow: none; border: 0; border-left: 3px solid var(--accent); border-radius: 0;
    background: transparent;
    margin: 0 0 14px 4px; padding: 0;
    opacity: 1; visibility: visible; transform: none;
    display: none;
  }
  .sub::before { display: none; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .has-sub.open .caret { transform: rotate(-135deg); }
  body.menu-open { overflow: hidden; }
  body.menu-open .whatsapp { display: none; }
}

/* ================= Celular ================= */
@media (max-width: 700px) {
  :root { --skew: 8vw; }
  body { font-size: 1rem; }
  .logo img, .header.is-scrolled .logo img { height: 44px; }
  .hero { min-height: 640px; }
  .hero__word { width: 88vw; right: 6vw; bottom: 26vw; }
  .hero__word img { opacity: .07; }
  .slide__title { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero__controls { flex-wrap: wrap; gap: 14px; padding-bottom: 28px; }
  .hero__bars { order: 3; flex-basis: 100%; max-width: none; }
  .hero__arrow { width: 44px; height: 44px; }
  .hours { margin-top: -20px; }
  .hours__inner { flex-direction: column; gap: 4px; padding: 14px 18px; font-size: 1rem; transform: none; }
  .hours__inner > * { transform: none; }
  .hours__inner svg { display: none; }
  .hours__inner strong { display: block; }
  .hours__list { flex-direction: column; gap: 8px; padding: 6px 0 0; border-left: 0; border-top: 2px solid rgba(255,255,255,.3); margin-top: 6px; width: 100%; }
  .features { padding: 64px 0 48px; }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .feature { padding: 22px 16px 24px; font-size: 1.05rem; gap: 16px; }
  .feature svg { width: 38px; height: 38px; }
  .services { padding: 24px 0 88px; }
  .services__head { grid-template-columns: 1fr; margin-bottom: 36px; }
  .cards { grid-template-columns: 1fr; }
  .contact { padding: calc(64px + var(--skew)) 0 80px; }
  .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .contact__map iframe { height: 280px; }
  .branches__tab { padding: 12px; gap: 10px; }
  .branches__num { display: none; }
  .branches__tab strong { font-size: 1.15rem; }
  .branches__tab small { font-size: .8rem; }
  .contact__info { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 22px; }
  .form .btn { justify-self: stretch; justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; }
  .whatsapp { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}

/* =========================================================
   PÁGINAS INTERNAS (categorías y servicios)
   ========================================================= */
.btn--ghost { border: 1px solid rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--dark { background: var(--night); color: #fff; }
.btn--dark:hover { background: #000; }

.slide__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.card h3 a:hover { color: var(--accent); }

/* enlaces dentro de las tarjetas de la portada */
.card li { padding: 0; }
.card li a { display: block; padding: 9px 0 9px 22px; transition: color .2s, padding .2s; }
.card li a:hover { color: var(--accent); padding-left: 28px; }

/* ----- Encabezado de página ----- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 80% 30%, #0f4a5b 0%, var(--night) 60%);
  color: #fff;
  padding: calc(var(--header-h) + 56px) 0 calc(72px + var(--skew));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--skew)), 0 100%);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(-62deg, transparent 0 46px, rgba(255,255,255,.035) 46px 48px);
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 80%);
          mask-image: linear-gradient(90deg, transparent 25%, #000 80%);
}
.page-hero[style*="--photo"]::after { /* foto opcional */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, var(--night) 35%, rgba(10,38,48,.5) 75%, rgba(10,38,48,.3)), var(--photo) right center/cover no-repeat;
}
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted-light); margin-bottom: 26px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.breadcrumb [aria-current] { color: #fff; }
.page-hero__title {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  text-transform: uppercase; line-height: .88; letter-spacing: -.015em;
  font-size: clamp(3rem, 8vw, 6.5rem);
  margin: 18px 0 20px; max-width: 900px;
}
.page-hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #c9dde2; max-width: 620px; margin-bottom: 32px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.page-hero .slide__tag { margin-bottom: 0; }

/* ----- Detalle de un servicio ----- */
.detail { padding: 72px 0 96px; }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.prose h2 { font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.9rem, 3.5vw, 2.6rem); line-height: 1; margin-bottom: 18px; }
.prose h2:not(:first-child) { margin-top: 48px; }
.prose p { color: #3d4a50; font-size: 1.1rem; margin-bottom: 14px; max-width: 680px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks li {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radio);
  padding: 16px 16px 16px 50px;
  font-weight: 600; line-height: 1.35;
}
.checks li::before {
  content: ""; position: absolute; left: 18px; top: 50%;
  width: 14px; height: 8px;
  border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: translateY(-70%) rotate(-45deg);
}

.aside {
  position: sticky; top: 96px;
  background: var(--night); color: #fff;
  border-radius: var(--radio);
  padding: 30px 28px;
  border-top: 4px solid var(--accent);
}
.aside h3 { font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 2rem; line-height: 1; margin-bottom: 18px; }
.aside ul { display: grid; gap: 12px; margin-bottom: 24px; }
.aside li { display: flex; gap: 12px; font-size: .97rem; color: #c9dde2; }
.aside li strong { display: block; color: #fff; font-family: var(--font-display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; }
.aside svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.aside .btn { width: 100%; justify-content: center; margin-top: 10px; }

/* ----- Tarjetas enlazadas (categorías y relacionados) ----- */
.tiles-section { padding: 72px 0 96px; }
.tiles-section--related { padding: 0 0 96px; }
.tiles-section h2 { margin-bottom: 32px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 250px;
  background: var(--night); color: #fff;
  border-radius: var(--radio);
  padding: 28px 26px 26px;
  transition: transform .3s;
}
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--accent); transform: scaleX(.2); transform-origin: left; transition: transform .35s; }
.tile:hover { transform: translateY(-6px); }
.tile:hover::before { transform: scaleX(1); }
.tile__num { position: absolute; right: 14px; top: 0; font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 4.5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--night-3); transition: -webkit-text-stroke-color .3s; }
.tile:hover .tile__num { -webkit-text-stroke-color: var(--accent); }
.tile h3 { position: relative; font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.85rem; line-height: 1; margin: 44px 0 12px; }
.tile p { color: #a9c1c8; font-size: .97rem; flex: 1; }
.tile__more { margin-top: 20px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.tile__more span { display: inline-block; transition: transform .2s; }
.tile:hover .tile__more span { transform: translateX(5px); }

/* ----- Franja final de llamado a la acción ----- */
.cta-band { padding: 0 0 110px; }
.cta-band__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: #fff;
  border-radius: var(--radio);
  padding: 44px 48px;
  background: repeating-linear-gradient(-62deg, transparent 0 46px, rgba(255,255,255,.06) 46px 48px), linear-gradient(90deg, var(--accent-dark), var(--teal));
}
.cta-band h2 { font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: .95; }
.cta-band p { margin-top: 8px; font-weight: 500; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .detail__grid { grid-template-columns: 1fr; gap: 40px; }
  .aside { position: static; }
}
@media (max-width: 700px) {
  .page-hero { padding: calc(var(--header-h) + 36px) 0 calc(56px + var(--skew)); }
  .page-hero__actions .btn { flex: 1; justify-content: center; }
  .detail { padding: 48px 0 72px; }
  .checks { grid-template-columns: 1fr; }
  .tiles-section { padding: 48px 0 72px; }
  .tiles-section--related { padding-bottom: 72px; }
  .tile { min-height: 0; }
  .cta-band { padding-bottom: 80px; }
  .cta-band__inner { padding: 32px 22px; }
  .cta-band__actions, .cta-band__actions .btn { width: 100%; justify-content: center; }
}

/* ----- Nosotros: equipo ----- */
.team { padding: 72px 0 96px; }
.team__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.team__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.team__filter {
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); transition: background .2s, color .2s, border-color .2s;
}
.team__filter:hover { border-color: var(--accent); color: var(--ink); }
.team__filter[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.member[hidden] { display: none; }
.member { border-radius: var(--radio); overflow: hidden; background: var(--night); color: #fff; transition: transform .3s; }
.member:hover { transform: translateY(-6px); }
.member__photo {
  position: relative; aspect-ratio: 5 / 6; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #145a6c 0%, var(--night-2) 62%);
}
/* puntos del logo de fondo */
.member__photo::before, .member__photo::after { content: ""; position: absolute; border-radius: 50%; }
.member__photo::before { width: 34%; aspect-ratio: 1; left: -8%; top: 8%; background: rgba(255,255,255,.05); }
.member__photo::after { width: 12%; aspect-ratio: 1; right: 10%; top: 12%; background: var(--accent); opacity: .55; }
.member__photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.member:hover .member__photo img { transform: scale(1.04); }
.member__info { position: relative; padding: 18px 20px 20px; border-top: 4px solid var(--accent); }
.member__info h3 { font-family: var(--font-display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.55rem; line-height: 1; }
.member__info p { margin-top: 6px; font-family: var(--font-display); font-weight: 800; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.member__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--radio);
  font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.member__btn .arrow { transition: transform .2s; }
.member__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--night); }
.member__btn:hover .arrow { transform: translateX(4px); }
@media (max-width: 1180px) { .team__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) {
  .team { padding: 48px 0 72px; }
  .team__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .member__info { padding: 12px 12px 14px; }
  .member__info h3 { font-size: 1.15rem; }
  .member__info p { font-size: .8rem; letter-spacing: .1em; }
  .member__btn { margin-top: 10px; padding: 8px 6px; font-size: .85rem; letter-spacing: .04em; }
}

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

/* =========================================================
   TIPOGRAFÍA AMABLE (Outfit + Nunito Sans)
   Para volver a la letra anterior (Barlow): borra este bloque completo
   y en los HTML vuelve a cargar Barlow (hay respaldo en /respaldo-tipografia-barlow).
   ========================================================= */
:root {
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Títulos: sin cursiva ni mayúsculas forzadas, peso más suave */
.title, .slide__title, .page-hero__title, .card h3, .tile h3, .member__info h3,
.aside h3, .prose h2, .footer h3, .cta-band h2, .branches__tab strong {
  font-style: normal; text-transform: none; font-weight: 700; letter-spacing: -.02em;
}
.title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.05; }
.slide__title { font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: 1; }
.page-hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; }
.card h3 { font-size: 1.65rem; }
.tile h3 { font-size: 1.5rem; line-height: 1.1; }
.member__info h3 { font-size: 1.3rem; line-height: 1.15; }
.aside h3 { font-size: 1.6rem; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; }
.footer h3 { font-size: 1.3rem; }
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05; }
.branches__tab strong { font-size: 1.2rem; }

/* Números grandes decorativos */
.card__num, .tile__num, .branches__num { font-style: normal; font-weight: 800; }

/* Botones y textos de acción: en minúscula normal */
.btn, .member__btn, .team__filter, .tile__more {
  text-transform: none; letter-spacing: 0; font-weight: 600;
}
.btn { font-size: 1.05rem; }
.btn--big { font-size: 1.15rem; }
.team__filter { font-size: .95rem; }

/* Etiquetas pequeñas: se mantienen en mayúscula, más livianas */
.eyebrow, .slide__tag, .hours__list dt, .contact__label, .field > span,
.footer__branch strong, .aside li strong, .member__info p {
  font-weight: 600; letter-spacing: .1em;
}
.eyebrow { font-size: .9rem; }
.slide__tag { font-size: .85rem; }
.member__info p { font-size: .85rem; }
.hours__inner strong { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.feature { text-transform: none; font-weight: 600; font-size: 1.1rem; line-height: 1.2; }

@media (max-width: 1140px) {
  .nav__link { text-transform: none; font-weight: 600; font-size: 1.3rem; letter-spacing: 0; }
}
@media (max-width: 700px) {
  .slide__title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .member__info h3 { font-size: 1.05rem; }
  .member__info p { font-size: .72rem; letter-spacing: .06em; }
  .member__btn { font-size: .85rem; }
  .feature { font-size: .98rem; }
}
