/* =========================================================================
   Colochap — hoja de estilos unica
   Reemplaza los estilos inline del sitio anterior. El tema se resuelve con
   custom properties sobre [data-theme], asi el cambio claro/oscuro es una
   sola linea de JS y no un re-render.
   ========================================================================= */

/* ---------- Tokens ------------------------------------------------------ */
:root {
  --red: #cf2c31;
  --red-dark: #b4262b;
  --red-soft: #fbe4e4;
  --red-soft-ink: #b4262b;
  --ink-900: #141416;
  --ink-950: #0f0f11;
  --whatsapp: #25d366;
  --star: #ffb600;

  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-soft: #fafaf9;
  --text: #17181c;
  --text-muted: #6b6d76;
  --border: #e3e2de;
  --logo-color-display: block;
  --logo-white-display: none;

  --container: 1300px;
  --gutter: 28px;
  --header-h: 74px;

  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", var(--font);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0f0f11;
  --surface: #1a1a1d;
  --surface-soft: #161619;
  --text: #f4f4f5;
  --text-muted: #9a9ca3;
  --border: #2a2a2e;
  --red-soft: rgba(207, 44, 49, 0.18);
  --red-soft-ink: #ff8a8e;
  --logo-color-display: none;
  --logo-white-display: block;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background 250ms ease, color 250ms ease;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
/* <picture> es solo un envoltorio sin semantica: con display:contents
   desaparece del layout y la <img> se posiciona igual que antes de agregarlo. */
picture { display: contents; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html, .tcarousel__track { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Utilidades -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.5px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 12px;
  z-index: 100;
  padding: 12px 18px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 160ms ease;
}
.skip-link:focus { top: 0; }

.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon--xs { width: 16px; height: 16px; }
.icon--sm { width: 18px; height: 18px; }
.icon--xl { width: 44px; height: 44px; }

.eyebrow {
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--on-dark { color: var(--red); }
.eyebrow--rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #fff;
}
.eyebrow--rule::before {
  content: "";
  width: 34px; height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.lead { font-size: 19px; font-weight: 500; line-height: 1.6; margin-bottom: 18px; }
.body-text { font-size: 16px; line-height: 1.7; color: var(--text-muted); }

/* Animacion de entrada. Sin JS o con motion reducido, el contenido se ve igual. */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Botones ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: transform 150ms ease, background 200ms ease, opacity 200ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--sm { padding: 11px 20px; font-size: 13.5px; border-radius: var(--radius-sm); }
.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }

.btn--dark { background: var(--text); color: var(--bg); }

.btn--glass {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn--outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 8px;
}

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 2px solid var(--red);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.icon-button--menu { display: none; width: 44px; height: 44px; border: none; }
.icon-button__icon--dark { display: none; }
[data-theme="dark"] .icon-button__icon--light { display: none; }
[data-theme="dark"] .icon-button__icon--dark { display: block; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 250ms ease, border-color 250ms ease;
}
.site-header--over-hero {
  background: transparent;
  border-bottom-color: transparent;
}
.site-header--solid {
  background: var(--surface);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header__logo { flex-shrink: 0; }
.site-header__logo-img { width: 118px; height: 53px; object-fit: contain; object-position: left center; }
.site-header__logo-img--color { display: var(--logo-color-display); }
.site-header__logo-img--white { display: var(--logo-white-display); }
/* Sobre el hero el logo va siempre en blanco, sin importar el tema. */
.site-header--over-hero:not(.site-header--solid) .site-header__logo-img--color { display: none; }
.site-header--over-hero:not(.site-header--solid) .site-header__logo-img--white { display: block; }

.site-nav { display: flex; gap: 2px; }
.site-nav__link {
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
}
.site-nav__link:hover { color: var(--text); }
.site-nav__link.is-active { color: var(--red); background: var(--red-soft); }

.site-header__actions { display: flex; align-items: center; gap: 10px; }

/* Variante transparente sobre el hero */
.site-header--over-hero:not(.site-header--solid) .site-nav__link { color: rgba(255, 255, 255, 0.75); }
.site-header--over-hero:not(.site-header--solid) .site-nav__link:hover { color: #fff; }
.site-header--over-hero:not(.site-header--solid) .site-nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.site-header--over-hero:not(.site-header--solid) .icon-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
.site-header--over-hero:not(.site-header--solid) .icon-button__icon--light { display: block; }
.site-header--over-hero:not(.site-header--solid) .icon-button__icon--dark { display: none; }
[data-theme="dark"] .site-header--over-hero:not(.site-header--solid) .icon-button__icon--light { display: none; }
[data-theme="dark"] .site-header--over-hero:not(.site-header--solid) .icon-button__icon--dark { display: block; }

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px var(--gutter) 24px;
  background: var(--ink-900);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu__link {
  padding: 13px 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-menu__link.is-active { color: var(--red); }
.mobile-menu .btn { margin-top: 16px; }

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink-900);
}
.hero__media { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1200ms ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 22, 0.72) 0%,
    rgba(20, 20, 22, 0.15) 38%,
    rgba(20, 20, 22, 0.35) 68%,
    rgba(20, 20, 22, 0.95) 100%
  );
}
.hero__content {
  position: relative;
  padding-block: calc(var(--header-h) + 46px) 84px;
}
.hero__title {
  max-width: 12ch;
  margin-bottom: 24px;
  font-size: clamp(46px, 9vw, 118px);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}
.hero__lead {
  max-width: 560px;
  margin-bottom: 34px;
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll-hint {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  animation: bob 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* ---------- Bandas y secciones ------------------------------------------ */
.section { padding-block: 96px; }
.section--dark { background: var(--ink-900); color: #fff; margin-top: 60px; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}
.section__title {
  max-width: 16ch;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  color: var(--text);
}
.section__title--on-dark { color: #fff; }
.section__title--center { max-width: none; text-align: center; margin-bottom: 32px; }
.section__lead {
  max-width: 56ch;
  margin-block: 16px 28px;
  font-size: 16px;
  color: var(--text-muted);
}

.page-head {
  padding-block: calc(var(--header-h) + 58px) 64px;
  background: var(--ink-900);
}
.page-head__title {
  font-size: clamp(42px, 8vw, 96px);
  font-weight: 800;
  color: #fff;
}
.page-head__title--narrow { max-width: 16ch; }
.page-head__lead {
  max-width: 56ch;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.stats-band { background: var(--red); }
.stats-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}
.stat { display: flex; align-items: baseline; gap: 12px; }
.stat__value { font-size: 40px; font-weight: 800; color: #fff; }
.stat__label {
  max-width: 130px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.85);
}

.cta-band { background: var(--ink-900); }
.cta-band__inner {
  max-width: 900px;
  margin-inline: auto;
  padding: 110px var(--gutter);
  text-align: center;
}
.cta-band__title {
  margin-bottom: 20px;
  font-size: clamp(36px, 7vw, 84px);
  font-weight: 800;
  color: #fff;
}
.cta-band__text { margin-bottom: 34px; font-size: 17px; color: rgba(255, 255, 255, 0.7); }

/* ---------- Tarjetas de servicio ---------------------------------------- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
/* La tarjeta destacada ocupa dos columnas. En los breakpoints de abajo se
   resetea a `auto`: si no, crea una columna implicita y descuadra el resto. */
.service-cards__item--wide { grid-column: span 2; }

.service-card {
  position: relative;
  display: block;
  height: 100%;
  min-height: 340px;
  overflow: hidden;
  border-radius: 16px;
}
.service-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.service-card:hover .service-card__img { transform: scale(1.04); }
.service-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 22, 0) 30%, rgba(20, 20, 22, 0.85) 100%);
}
.service-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 340px;
  padding: 22px;
}
.service-card__num { font-size: 34px; font-weight: 800; color: rgba(255, 255, 255, 0.55); }
.service-card__name { display: block; margin-bottom: 4px; font-size: 26px; font-weight: 700; color: #fff; }
.service-card__short { display: block; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.8); }

/* ---------- Filas de servicio (pagina Servicios) ------------------------ */
.service-rows { display: flex; flex-direction: column; gap: 80px; }
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.service-row--reverse .service-row__media { order: 2; }
.service-row__media { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; }
.service-row__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.service-row__num {
  display: block;
  margin-bottom: 8px;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--border);
}
.service-row__title { margin-bottom: 16px; font-size: clamp(30px, 4vw, 52px); font-weight: 700; }
.service-row__desc { max-width: 46ch; font-size: 16px; line-height: 1.65; color: var(--text-muted); }

/* ---------- Feature / instalaciones ------------------------------------- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.feature-card { position: relative; min-height: 400px; overflow: hidden; border-radius: 18px; }
.feature-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 22, 0) 40%, rgba(20, 20, 22, 0.9) 100%);
}
.feature-card__body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 30px; }
.feature-card__title { margin-bottom: 8px; font-size: 32px; font-weight: 700; color: #fff; }
.feature-card__text { max-width: 44ch; font-size: 14.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.8); }

.facility-list { display: flex; flex-direction: column; gap: 32px; }
.facility { position: relative; min-height: 460px; overflow: hidden; border-radius: var(--radius-lg); display: flex; }
.facility__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.facility::after { content: ""; position: absolute; inset: 0; }
.facility--left::after {
  background: linear-gradient(90deg, rgba(20, 20, 22, 0.85) 0%, rgba(20, 20, 22, 0.2) 60%, rgba(20, 20, 22, 0) 100%);
}
.facility--right { justify-content: flex-end; }
.facility--right::after {
  background: linear-gradient(270deg, rgba(20, 20, 22, 0.85) 0%, rgba(20, 20, 22, 0.2) 60%, rgba(20, 20, 22, 0) 100%);
}
.facility__body { position: relative; z-index: 1; align-self: center; max-width: 520px; padding: 48px; }
.facility--right .facility__body { text-align: right; }
.facility__title { margin-bottom: 14px; font-size: clamp(30px, 5vw, 58px); font-weight: 700; color: #fff; }
.facility__text { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); }

/* ---------- Showcase (carrusel de home) --------------------------------- */
.showcase {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink-900);
}
.showcase__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 900ms ease;
}
.showcase__slide.is-active { opacity: 1; }
.showcase__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 20, 22, 0.8) 0%, rgba(20, 20, 22, 0.15) 55%, rgba(20, 20, 22, 0) 100%);
}
.showcase__caption {
  position: absolute;
  left: 40px; bottom: 40px;
  max-width: 420px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
  pointer-events: none;
}
.showcase__caption.is-active { opacity: 1; transform: none; }
.showcase__title { margin-bottom: 10px; font-size: clamp(26px, 3.6vw, 46px); font-weight: 700; color: #fff; }
.showcase__text { font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.showcase__dots { position: absolute; right: 28px; bottom: 28px; }

.dots { display: flex; gap: 8px; justify-content: center; }
.dots__dot {
  width: 10px; height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 250ms ease, background 250ms ease;
}
.dots__dot.is-active { width: 30px; background: var(--red); }
.dots__dot--sm { width: 9px; height: 9px; background: var(--border); }
.dots__dot--sm.is-active { width: 9px; background: var(--red); }

/* ---------- Split ------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 52px; align-items: center; }
.split--even { grid-template-columns: 1fr 1fr; gap: 56px; }
.split__title { margin-bottom: 16px; font-size: clamp(30px, 5vw, 58px); font-weight: 700; }
.split__text { max-width: 44ch; margin-bottom: 28px; font-size: 16.5px; line-height: 1.65; color: var(--text-muted); }

.ratio { position: relative; overflow: hidden; border-radius: 18px; }
.ratio--4x3 { aspect-ratio: 4 / 3; }
.ratio img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Antes / despues --------------------------------------------- */
.before-after {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink-900);
  touch-action: pan-y;
  user-select: none;
}
.before-after__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.before-after__clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}
.before-after__tag {
  position: absolute;
  top: 16px;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #fff;
  border-radius: 999px;
  pointer-events: none;
}
.before-after__tag--before { left: 16px; background: rgba(20, 20, 22, 0.78); }
.before-after__tag--after { right: 16px; background: var(--red); }
.before-after__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--ba-pos, 50%);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.before-after__knob {
  position: absolute;
  top: 50%; left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  color: var(--ink-900);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
/* El range real esta encima y transparente: da teclado y lector de pantalla
   sin renunciar al arrastre visual. */
.before-after__range {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
  background: transparent;
}
.before-after__range::-webkit-slider-thumb { appearance: none; width: 56px; height: 100%; }
.before-after__range::-moz-range-thumb { width: 56px; height: 100%; border: 0; }
.before-after__range:focus-visible + .before-after__tag,
.before-after:has(.before-after__range:focus-visible) { outline: 3px solid var(--red); outline-offset: 3px; }

.work-list { display: flex; flex-direction: column; gap: 40px; }
.work { display: flex; flex-direction: column; gap: 14px; }
.work__title { margin-bottom: 6px; font-size: 26px; font-weight: 700; }
.work__desc { max-width: 70ch; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

/* ---------- Galeria ----------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 16px;
  margin-top: 24px;
}
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery__item--col2 { grid-column: span 2; }
.gallery__item--col2row2 { grid-column: span 2; grid-row: span 2; }
.gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 22, 0) 55%, rgba(20, 20, 22, 0.82) 100%);
}
.gallery__caption {
  position: absolute; left: 20px; right: 20px; bottom: 20px;
  font-size: 22px; font-weight: 700; color: #fff;
}

/* ---------- Testimonios ------------------------------------------------- */
.testimonial-band {
  padding-block: 110px;
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.testimonial-band__inner {
  position: relative;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
}
.testimonial-band__mark { margin: 0 auto 20px; color: var(--red); }
.testimonial { display: none; }
.testimonial.is-active { display: block; }
.testimonial__quote {
  margin-bottom: 26px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}
.testimonial__author { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.testimonial-band .dots { margin-top: 26px; }

.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.stars { display: flex; gap: 2px; margin-bottom: 14px; color: var(--star); }
.testimonial-band .stars { justify-content: center; margin-bottom: 18px; }
.testimonial-card__quote { margin-bottom: 16px; font-size: 15px; line-height: 1.6; }
.testimonial-card__author { font-size: 13.5px; font-weight: 700; color: var(--text-muted); }

/* ---------- Capa de envio del presupuesto ------------------------------- */
/* Aparece al enviar el formulario. Con fotos la subida tarda varios segundos
   y sin senal la gente vuelve a apretar el boton: llegaban consultas
   duplicadas. Arranca oculta y solo la muestra el JS, asi que sin JS el
   formulario envia igual y esto no molesta. */
.envio {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  /* Casi opaco: al 92% el boton de WhatsApp y el logo del encabezado se
     traslucian lo suficiente como para distraer del mensaje de espera. */
  background: rgb(15 15 17 / 97%);
}
.envio.is-visible { display: flex; }

.envio__caja { max-width: 340px; text-align: center; }
.envio__logo { width: 190px; height: auto; margin: 0 auto 30px; }

.envio__aro {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto 24px;
  border: 3px solid rgb(255 255 255 / 18%);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: envio-giro 0.9s linear infinite;
}

@keyframes envio-giro { to { transform: rotate(360deg); } }

.envio__titulo {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
.envio__nota {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgb(255 255 255 / 62%);
}

/* Sin animacion, el aro igual tiene que leerse como "esta trabajando": se
   queda quieto y pulsa la opacidad, que no produce movimiento vestibular. */
@media (prefers-reduced-motion: reduce) {
  .envio__aro {
    animation: envio-late 1.4s ease-in-out infinite;
    border-top-color: var(--red);
  }
  @keyframes envio-late { 50% { opacity: 0.35; } }
}

/* El boton deshabilitado tiene que verse deshabilitado. */
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Pagina de gracias ------------------------------------------- */
.gracias { max-width: 620px; margin-inline: auto; text-align: center; }
.gracias__marca { display: block; margin-bottom: 22px; color: var(--red); }
.gracias__lead { margin: 0 0 14px; font-size: 18px; line-height: 1.6; }
.gracias__nota { margin: 0 0 30px; color: var(--text-muted); line-height: 1.6; }
.gracias__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
}
.gracias__pie { margin: 0; font-size: 14px; color: var(--text-muted); }
.gracias__pie a { color: var(--red); }

@media (max-width: 620px) {
  .gracias__acciones > .btn { width: 100%; }
}

/* ---------- Valores / partners ------------------------------------------ */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.value { padding-top: 20px; border-top: 2px solid var(--red); }
.value__title { margin-bottom: 6px; font-size: 22px; font-weight: 700; }
.value__text { font-size: 14px; line-height: 1.55; color: var(--text-muted); }

.partners__title {
  margin-bottom: 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
}
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.partners__item {
  display: grid;
  place-items: center;
  width: 240px; height: 118px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.partners__item img { max-height: 100%; width: auto; object-fit: contain; }

/* ---------- Marquee ----------------------------------------------------- */
.marquee { padding-block: 40px; overflow: hidden; }
.marquee--bordered { border-block: 1px solid var(--border); }
.marquee__title {
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
}
.marquee__viewport { overflow: hidden; }
.marquee__track {
  display: flex;
  width: max-content;
  gap: 44px;
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: grid; place-items: center; width: 190px; height: 86px; }
.marquee__item img { max-height: 100%; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.75; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Contacto ---------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 200ms ease;
}
.contact-card:hover { border-color: var(--red); }
.contact-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px; height: 44px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 10px;
}
.contact-card__value { display: block; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.contact-card__meta { display: block; font-size: 13px; color: var(--text-muted); }
.contact-card__meta--link { color: var(--red); font-weight: 600; }

.hours { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hours__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}
.hours__title { color: var(--text); }
.hours__title .icon { color: var(--red); }
.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 7px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.hours__row dt { font-weight: 600; }
.hours__row dd { color: var(--text-muted); }
.hours__row .is-closed { opacity: 0.7; }

.socials { display: flex; gap: 10px; margin-top: 4px; }
.social {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.social--whatsapp { color: #fff; background: var(--whatsapp); border-color: var(--whatsapp); }

.contact-photo { position: relative; min-height: 440px; overflow: hidden; border-radius: 18px; }
.contact-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Formulario de presupuesto ----------------------------------- */
.quote { scroll-margin-top: calc(var(--header-h) + 20px); }
.quote__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.blueprint {
  padding: 30px;
  color: #fff;
  background-color: var(--ink-900);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: var(--radius-lg);
}
.blueprint__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.blueprint__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9a9ca3;
}
.blueprint__vehicle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
}
.blueprint__stage-wrap { padding-block: 10px; }
.blueprint__stage {
  position: relative;
  width: 100%;
  background-color: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
}

.zone { position: absolute; transform: translate(-50%, -50%); cursor: pointer; }
.zone__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zone__dot {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(20, 20, 22, 0.28);
  border-radius: 50%;
  transition: all 150ms ease;
}
.zone:hover .zone__dot { border-color: var(--red); }
.zone__input:checked + .zone__dot { color: #fff; background: var(--red); border-color: var(--red); }
.zone__input:focus-visible + .zone__dot { outline: 3px solid var(--red); outline-offset: 3px; }

.blueprint__legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.blueprint__legend-item {
  display: flex;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: #8a8b92;
}
.blueprint__legend-item.is-selected { font-weight: 700; color: #fff; }
.blueprint__legend-num { min-width: 16px; font-weight: 800; color: #6c6d74; }
.blueprint__legend-item.is-selected .blueprint__legend-num { color: var(--red); }

.quote__card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.quote__card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.quote__card-title { font-size: 24px; font-weight: 700; }
.quote__count { font-size: 13px; font-weight: 700; color: var(--red); white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chips:empty { display: none; }
.chips__empty { font-size: 13.5px; color: var(--text-muted); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--red-soft-ink);
  background: var(--red-soft);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.chip__x { font-size: 15px; line-height: 1; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.field-grid--two { gap: 14px; margin-bottom: 18px; }
/* Los <input> traen un ancho por defecto (size=20): sin min-width:0 la columna
   del grid no puede encoger y desborda en pantallas chicas. */
.field-grid > *, .quote__grid > * { min-width: 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.field__req { color: var(--red); }
.field__input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.field__input--invalid { border-color: var(--red); }
.field__input--area { resize: vertical; min-height: 96px; line-height: 1.5; }
.field__error { font-size: 12.5px; font-weight: 600; color: var(--red); }
.field__error--on-dark { color: #ff8a8e; margin-top: 12px; }
.field__hint { margin-bottom: 18px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }

/* Honeypot: fuera de la vista pero "rellenable" para un bot. No usa
   display:none ni hidden porque muchos bots los saltean a proposito. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
  border-radius: 12px;
}
.alert--success { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.alert--error { color: #7f1d1d; background: #fef2f2; border-color: #fecaca; }
[data-theme="dark"] .alert--success { color: #6ee7b7; background: rgba(6, 95, 70, 0.2); border-color: rgba(110, 231, 183, 0.3); }
[data-theme="dark"] .alert--error { color: #fca5a5; background: rgba(127, 29, 29, 0.2); border-color: rgba(252, 165, 165, 0.3); }

/* ---------- Footer ------------------------------------------------------ */
.site-footer { padding: 64px var(--gutter) 28px; background: var(--ink-950); }
.site-footer__inner { max-width: var(--container); margin-inline: auto; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer__grid > * { min-width: 0; }
.site-footer__logo { width: 150px; height: 68px; margin-bottom: 18px; object-fit: contain; object-position: left center; }
.site-footer__tagline { max-width: 300px; font-size: 14px; line-height: 1.6; color: #8a8b92; }
.site-footer__heading {
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}
.site-footer__list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #b0b1b7; }
.site-footer__list a { overflow-wrap: anywhere; }
.site-footer__list a:hover { color: #fff; }
.site-footer__legal { padding-top: 22px; font-size: 12.5px; text-align: center; color: #5c5d64; }

/* ---------- FAB WhatsApp ------------------------------------------------ */
.fab-whatsapp {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  color: #fff;
  background: var(--whatsapp);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  transition: transform 180ms ease;
}
.fab-whatsapp:hover { transform: scale(1.06); }
.fab-whatsapp svg { width: 27px; height: 27px; }

/* ---------- 404 --------------------------------------------------------- */
.error-page { padding-block: calc(var(--header-h) + 90px) 120px; }
.error-page__inner { text-align: center; }
.error-page__code { font-size: clamp(80px, 18vw, 190px); font-weight: 800; color: var(--red); }
.error-page__title { margin-bottom: 14px; font-size: clamp(28px, 5vw, 52px); font-weight: 800; }
.error-page__text { margin-bottom: 30px; color: var(--text-muted); }
.error-page__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }


/* ---------- Aseguradoras adheridas -------------------------------------- */
.insurer-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text);
  background: var(--red-soft);
  border-radius: var(--radius);
}
.insurer-note .icon { color: var(--red); flex-shrink: 0; }

.insurer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.insurer-grid > * { min-width: 0; }

.insurer__link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 200ms ease, transform 200ms ease;
}
.insurer__link:hover { border-color: var(--red); transform: translateY(-2px); }

.insurer__logo {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
}
.insurer__logo img { max-height: 76px; width: auto; object-fit: contain; }
/* Sin logo: el nombre hace de marca para que la tarjeta no quede vacia. */
.insurer__wordmark {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  color: var(--ink-900);
}

.insurer__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.insurer__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
}
.insurer__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.insurer__link:hover .insurer__cta { color: var(--red); }

.insurer-foot { margin-top: 32px; font-size: 15px; color: var(--text-muted); }
.insurer-foot .link-underline { font-size: 15px; }

/* La banda de stats: la de aseguradoras ahora es un link. */
.stat--link { text-decoration: none; transition: transform 180ms ease; }
.stat--link:hover { transform: translateY(-2px); }
.stat__more {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.9;
}
.marquee__title a { text-decoration: underline; text-underline-offset: 3px; }
.marquee__title a:hover { color: var(--red); }

/* ---------- Ofertas y productos ----------------------------------------- */
.promo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.promo-grid > * { min-width: 0; }

.promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.promo--featured { color: #fff; background: var(--red); border-color: var(--red); }
.promo--soon { background: var(--surface); }

.promo__tag {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}
.promo__tag--muted { color: var(--red); background: var(--red-soft); }

.promo__value { font-size: clamp(64px, 10vw, 104px); font-weight: 800; line-height: 0.9; }
.promo__unit { font-size: 0.5em; }
.promo--featured .promo__title { font-size: 20px; font-weight: 700; }
.promo__soon-title { font-size: clamp(30px, 5vw, 46px); font-weight: 800; color: var(--text); }
.promo__text { font-size: 15px; line-height: 1.6; }
.promo--featured .promo__text { color: rgba(255, 255, 255, 0.9); }
.promo--soon .promo__text { color: var(--text-muted); }
.promo--featured .btn--primary { margin-top: 8px; color: var(--red); background: #fff; }
.promo--featured .btn--primary:hover { background: rgba(255, 255, 255, 0.9); }
.promo .link-underline { margin-top: auto; }

/* ---------- Redes en el pie --------------------------------------------- */
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer__social-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}
.socials--footer .social {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.socials--footer .social:hover { background: rgba(255, 255, 255, 0.14); }
.socials--footer .social--whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); }


/* ---------- Fotos del presupuesto --------------------------------------- */
.photos { position: relative; gap: 8px; }
.field__optional { font-weight: 400; opacity: 0.8; }

.photos__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}
.photos__drop:hover { border-color: var(--red); background: var(--red-soft); }
.photos__drop .icon { color: var(--red); }
.photos__drop-text { font-size: 14.5px; color: var(--text); }
.photos__drop-hint { font-size: 12px; }
.photos--invalid .photos__drop { border-color: var(--red); }
/* Con el cupo lleno la zona deja de invitar a sumar mas. */
.photos--full .photos__drop { opacity: 0.5; pointer-events: none; }

/* El input real queda accesible por teclado pero fuera de la vista: el
   <label> de arriba es el disparador visible. */
.photos__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}
.photos:focus-within .photos__drop {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-color: var(--red);
}

.photos__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.photos__list:empty { display: none; }

.photos__item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.photos__thumb { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photos__meta {
  display: block;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photos__remove {
  position: absolute;
  top: 6px; right: 6px;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  font-size: 17px;
  line-height: 1;
  color: #fff;
  background: rgba(20, 20, 22, 0.72);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.photos__remove:hover { background: var(--red); }


/* ---------- Carrusel de testimonios ------------------------------------- */
.tcarousel { position: relative; }

.tcarousel__track {
  display: flex;
  gap: 20px;
  /* Sin JS esto ya es una fila con scroll: se llega a todas las tarjetas. */
  overflow-x: auto;
  /* `proximity` y no `mandatory`: con mandatory + alineacion al inicio, la
     ultima tarjeta nunca llega a alinearse y queda inalcanzable. */
  scroll-snap-type: x proximity;
  scroll-padding-left: 0;
  padding-bottom: 6px;
  /* Los items flex no encogen por debajo de su contenido sin esto. */
  min-width: 0;
  scrollbar-width: thin;
}
.tcarousel__track::-webkit-scrollbar { height: 6px; }
.tcarousel__track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.tcarousel__slide {
  flex: 0 0 clamp(280px, 32%, 380px);
  min-width: 0;
  scroll-snap-align: start;
}

.tcarousel .testimonial-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.testimonial-card__quote { flex: 1; }
.testimonial-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.testimonial-card__vehicle {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.testimonial-card__source {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.75;
}
.tcarousel__dots { margin-top: 22px; }
.tcarousel__dots[hidden] { display: none; }


/* ---------- Galeria de videos ------------------------------------------- */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.videos > * { min-width: 0; }

.video-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--ink-900);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.video-card__poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.video-card__poster--empty { background: var(--ink-900); }
.video-card:hover .video-card__poster { transform: scale(1.04); }

.video-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 22, 0.1) 40%, rgba(20, 20, 22, 0.85) 100%);
}
.video-card__play {
  position: absolute;
  top: 50%; left: 50%;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  transition: transform 200ms ease, background 200ms ease;
}
.video-card__play .icon { margin-left: 3px; }
.video-card:hover .video-card__play { transform: scale(1.08); background: #fff; }

.video-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  text-align: left;
}
.video-card__title { font-size: 18px; font-weight: 700; color: #fff; }
.video-card__time {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Lightbox ----------------------------------------------------- */
.lightbox {
  width: min(92vw, 520px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  color: #fff;
  background: transparent;
  border: none;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 10, 12, 0.88); }

.lightbox__inner { position: relative; }

.lightbox__video {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #000;
  border-radius: var(--radius);
}

.lightbox__close {
  position: absolute;
  top: -14px; right: -14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  color: var(--ink-900);
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.lightbox__close:hover { background: var(--red); color: #fff; }

.lightbox__title {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}
.lightbox__title:empty { display: none; }

/* =========================================================================
   Responsive
   Un solo lugar para los breakpoints. Cada grid que colapsa lleva ademas
   min-width:0 en sus hijos (ver nota en .field-grid).
   ========================================================================= */

@media (max-width: 1040px) {
  .site-nav,
  .site-header__cta { display: none; }
  .icon-button--menu { display: inline-flex; }

  .service-cards { grid-template-columns: 1fr 1fr; }
  .service-cards__item--wide { grid-column: auto; }

  .service-row { grid-template-columns: 1fr; gap: 28px; }
  .service-row--reverse .service-row__media { order: 0; }

  .feature-grid,
  .split,
  .split--even,
  .contact-grid,
  .quote__grid,
  .site-footer__grid { grid-template-columns: 1fr; }

  .feature-grid > *,
  .split > *,
  .contact-grid > *,
  .quote__grid > * { min-width: 0; }

  .split { gap: 32px; }
  .site-footer__grid { gap: 32px; }

  .facility__body { padding: 32px; }
  .facility--right .facility__body { text-align: left; }

  .gallery { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; }

  .section { padding-block: 64px; }
  .section--dark { margin-top: 40px; }
  .cta-band__inner { padding-block: 80px; }
  .testimonial-band { padding-block: 80px; }

  .service-cards { grid-template-columns: 1fr; }

  .gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .gallery__item--col2,
  .gallery__item--col2row2 { grid-column: auto; grid-row: auto; }

  .stats-band__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .stat__label { max-width: none; }

  .value-grid,
  .testimonial-grid { grid-template-columns: 1fr; }
  /* Una tarjeta por vista, con la siguiente asomando. */
  .tcarousel__slide { flex-basis: 85%; }
  .tcarousel__track { gap: 14px; }

  .feature-card,
  .facility { min-height: 340px; }
  .facility__body { padding: 24px; }
  .contact-photo { min-height: 300px; }

  /* Con 21/9 la caja queda en ~135px de alto: el caption se sale y los dots
     caen encima del texto. */
  .showcase { aspect-ratio: 4 / 3; }
  .showcase__caption { left: 20px; right: 20px; bottom: 54px; max-width: none; }
  .showcase__dots { right: 20px; bottom: 18px; }

  .before-after__knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }

  .blueprint,
  .quote__card { padding: 18px; }
  .blueprint__legend { grid-template-columns: 1fr; }

  .partners__item { width: 100%; max-width: 280px; }

  .promo { padding: 24px; }
  .videos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .video-card__play { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .video-card__title { font-size: 15px; }
  .lightbox { width: 94vw; }
  .lightbox__close { top: -12px; right: -6px; }
  .insurer-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .site-footer__social { justify-content: center; text-align: center; }

  /* Espacio para que el boton flotante de WhatsApp no tape el copyright. */
  .site-footer { padding-bottom: 96px; }
}

@media (max-width: 380px) {
  .field-grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Impresion --------------------------------------------------- */
@media print {
  .site-header, .fab-whatsapp, .mobile-menu, .marquee, .cta-band { display: none; }
  body { background: #fff; color: #000; }
}

/* Texto del video en el visor. Ancho de lectura y de-enfasis por color, no por
   achicar la letra hasta que no se lea. */
.lightbox__desc {
  max-width: 58ch;
  margin: 8px auto 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .75);
  text-align: center;
}
.lightbox__desc[hidden] { display: none; }

/* ---------- Pop-up de promocion (clase propia: .promo-pop)
   Se llamaba .promo, igual que las tarjetas de ofertas de la Inicio. Al
   estar mas abajo en el archivo y tener la misma especificidad, le pisaba
   el fondo, el padding y el ancho a esas tarjetas: la de 'Proximamente'
   salia roja con texto oscuro, ilegible, en produccion. ----------------------------------------- */
/* <dialog> nativo: trampa de foco y Escape sin codigo propio, igual que el
   visor de videos. El JS solo decide cuando aparece. */
.promo-pop {
  /* El default del <dialog> es max-width: fit-content y margen automatico. */
  width: min(520px, 92vw);
  max-width: none;
  max-height: 86vh;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  background: var(--red);
  box-shadow: 0 24px 60px rgba(15, 15, 17, .35);

  /* Un poco por encima del centro matematico: centrado exacto, el ojo lo lee
     como hundido. Refactoring UI, seccion de modales. */
  margin-top: 9vh;
  margin-bottom: auto;
}

/* Telon con el matiz de la escala de grises y desenfoque, nunca negro puro:
   el negro plano ensucia la UI de atras en vez de silenciarla. */
.promo-pop::backdrop {
  background: hsla(220, 15%, 10%, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.promo-pop--tinta { background: var(--ink-900); }
.promo-pop--claro { background: var(--surface); color: var(--text); }

.promo__cerrar {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  color: inherit;
  background: rgba(0, 0, 0, .28);
  border: none; border-radius: 999px; cursor: pointer;
  transition: background 160ms ease;
}
.promo-pop--claro .promo__cerrar { background: rgba(0, 0, 0, .08); }
.promo__cerrar:hover { background: rgba(0, 0, 0, .45); }
.promo-pop--claro .promo__cerrar:hover { background: rgba(0, 0, 0, .16); }

.promo__cuerpo {
  position: relative; z-index: 1;
  padding: 40px 32px 32px;
  text-align: center;
}

/* La imagen de fondo y su velo. El velo es FIJO y no un control del panel:
   con un deslizador, tarde o temprano queda en 20% y el texto no se lee sobre
   una foto clara. Degradado y no color plano, asi la foto se sigue viendo
   arriba y el texto de abajo mantiene contraste. */
.promo__fondo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover;
  background-position: center;
}
.promo__fondo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 17, .45) 0%, rgba(15, 15, 17, .82) 100%);
}
.promo-pop--claro .promo__fondo ~ .promo__cuerpo { color: #fff; }

.promo__sub {
  margin: 0 0 8px;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  opacity: .85;
}
.promo__titulo {
  margin: 0;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.05;
}
.promo__texto {
  margin: 14px auto 0;
  /* Ancho de lectura: pasando esto el ojo pierde el renglon al volver. */
  max-width: 42ch;
  font-size: 15.5px;
  opacity: .92;
}
/* El boton primario del sitio es rojo, y sobre el pop-up rojo desaparecia.
   Dentro del pop-up se invierte: blanco sobre el fondo de color, que ademas es
   el contraste mas fuerte disponible para la unica accion de la pieza. */
.promo__accion { margin-top: 24px; }
.promo-pop--rojo .btn--primary,
.promo-pop--tinta .btn--primary { background: #fff; color: var(--ink-900); }
.promo-pop--rojo .btn--primary:hover,
.promo-pop--tinta .btn--primary:hover { background: rgba(255, 255, 255, .88); }

/* Con imagen de fondo el pop-up siempre lleva texto claro, incluso en la
   variante "claro": el velo oscuro manda sobre el color elegido. */
.promo__fondo ~ .promo__cuerpo .btn--primary { background: #fff; color: var(--ink-900); }

/* --- Flyer -------------------------------------------------------------- */
/* La imagen manda y conserva su proporcion. El alto se ata a la pantalla, no
   al archivo: un flyer vertical de Instagram (1080x1350) si no se acota se va
   abajo del viewport en un celular. */
.promo-pop--flyer { background: transparent; box-shadow: none; }
.promo-pop--flyer .promo__cerrar { background: rgba(0, 0, 0, .5); color: #fff; }

.promo__flyer { display: block; }
.promo-pop--flyer img {
  display: block;
  width: 100%; height: auto;
  max-height: 74vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

/* El boton va AFUERA de la imagen. El texto dentro de un flyer se muestra al
   31% en un celular de 375px —un cuerpo de 24px queda en 7,5px— y ademas no lo
   lee Google ni un lector de pantalla. Asi la accion siempre es legible. */
.promo-pop--flyer .promo__accion {
  display: block;
  margin: 14px auto 0;
  width: fit-content;
}

@media (prefers-reduced-motion: reduce) {
  .promo-pop, .promo__cerrar { transition: none; }
}
