/* ---------- Tokens ---------- */
:root {
  --navy: #16305c;
  --navy-dark: #0d1f3d;
  --navy-light: #1f4a8c;
  --ink: #14171c;
  --steel: #6b7280;
  --steel-light: #cfd3d9;
  --silver-1: #eef0f3;
  --silver-2: #c7ccd3;
  --paper: #ffffff;
  --bg: #f7f8fa;
  --line: #e3e6ea;
  --accent: #2e5aa8;

  --font-display: "Barlow Condensed", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(13, 31, 61, 0.06), 0 1px 1px rgba(13, 31, 61, 0.04);
  --shadow-md: 0 8px 24px rgba(13, 31, 61, 0.10);
  --shadow-lg: 0 20px 50px rgba(13, 31, 61, 0.16);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button { touch-action: manipulation; font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; color: var(--navy-dark); }
p { margin: 0; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon svg, svg { fill: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-light); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-whatsapp { background: #17a34a; color: #fff; padding: 10px 18px; font-size: 0.9rem; }
.btn-whatsapp:hover { background: #128a3e; }
.btn-whatsapp .icon { width: 18px; height: 18px; fill: #fff; stroke: none; }
.btn-block { width: 100%; }

/* ---------- CTA principal del hero: brillo + pulso para llamar la atención ---------- */
.btn-cta-glow {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: ctaGlowPulse 2.6s ease-in-out infinite;
}
.btn-cta-glow svg { width: 18px; height: 18px; fill: #ffd166; stroke: none; flex: none; }
.btn-cta-glow::after {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 45%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: ctaShineSweep 2.8s ease-in-out infinite;
  pointer-events: none;
}
.btn-cta-glow:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 30px rgba(13, 31, 61, 0.4); }
.btn-cta-glow:active { transform: scale(0.97); }
@keyframes ctaGlowPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(13, 31, 61, 0.35), 0 0 0 0 rgba(122, 197, 255, 0.5); }
  50% { box-shadow: 0 10px 26px rgba(13, 31, 61, 0.45), 0 0 0 10px rgba(122, 197, 255, 0); }
}
@keyframes ctaShineSweep {
  0%, 15% { left: -75%; }
  55%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-cta-glow, .btn-cta-glow::after { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left));
}
.brand { flex: none; }
.brand-logo { height: 100px; width: auto; display: block; transition: height 0.2s ease; }
.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 6px 2px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav a:hover::after { transform: scaleX(1); }

.nav-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-install svg { width: 15px; height: 15px; stroke-width: 2.2; flex: none; }
.nav-install:hover { background: var(--navy); color: #fff; }
.nav-install:active { transform: scale(0.96); }
.nav-install:disabled {
  cursor: default; opacity: 0.65;
  border-color: var(--steel-light); color: var(--steel);
}
.nav-install:disabled:hover { background: transparent; color: var(--steel); }

.install-tip {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  width: min(360px, calc(100vw - 32px));
  background: var(--navy-dark);
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 16px 40px 16px 18px;
  z-index: 260;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.install-tip.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.install-tip p { font-size: 0.86rem; line-height: 1.5; color: rgba(255,255,255,0.9); margin: 0; }
.install-tip-close {
  position: absolute; top: 8px; right: 10px;
  width: 26px; height: 26px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.12); color: #fff;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.install-tip-close:hover { background: rgba(255,255,255,0.22); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: #fff;
  padding: 96px 0 80px;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--steel-light);
  margin-bottom: 14px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 20px;
}
.hero-rotator {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 16px;
}
.hero-rotator-word {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  color: #9fd8ff;
  transition: opacity 0.26s ease, transform 0.26s ease;
}
.hero-rotator-word.is-swapping { opacity: 0; transform: translateY(6px); }
.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.08rem;
  max-width: 620px;
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 52px; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.hero .btn-outline:hover { background: #fff; color: var(--navy-dark); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.hero-stats span { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--silver-1); }
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  max-width: 640px;
  margin-bottom: 16px;
}
.section-lead {
  color: var(--steel);
  max-width: 620px;
  font-size: 1.02rem;
  margin-bottom: 48px;
}

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 24px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--silver-2); }
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  margin-bottom: 18px;
}
.service-icon svg { width: 26px; height: 26px; stroke: #fff; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.service-card p { color: var(--steel); font-size: 0.94rem; }

/* ---------- Section CTA / banner ---------- */
.section-cta { margin-top: 44px; text-align: center; }

.cta-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); padding: 64px 0; }
.cta-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: #fff; }
.cta-banner-inner h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 8px; }
.cta-banner-inner p { color: rgba(255,255,255,0.8); }
.cta-banner-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-outline-light:hover { background: #fff; color: var(--navy-dark); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-copy p { color: var(--steel); margin-bottom: 16px; font-size: 1rem; }
.about-features { display: grid; gap: 18px; margin-top: 28px; }
.about-features li { display: flex; align-items: flex-start; gap: 14px; }
.feature-icon {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.2; }
.about-features strong { display: block; font-size: 1rem; color: var(--ink); }
.about-features span { color: var(--steel); font-size: 0.9rem; }

.hours-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}
.hours-card h3 { font-size: 1.2rem; margin-bottom: 20px; }
.hours-card ul { display: grid; gap: 12px; margin-bottom: 26px; }
.hours-card li {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.hours-card li span { color: var(--steel); }
.hours-card li strong { color: var(--ink); }

/* ---------- Promo (afiche/flyer) ---------- */
.promo-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.promo-media { max-width: 380px; margin: 0 auto; }
.promo-media a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.promo-media img { width: 100%; height: auto; display: block; transition: transform 0.3s ease; }
.promo-media a:hover img { transform: scale(1.02); }
.promo-copy p { color: var(--steel); margin-bottom: 16px; font-size: 1rem; }
.promo-copy .btn { margin-top: 8px; }
@media (max-width: 860px) {
  .promo-grid { grid-template-columns: 1fr; }
  .promo-media { order: -1; }
}

/* ---------- Process steps ---------- */
.process-grid { grid-template-columns: repeat(4, 1fr); }
.process-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--silver-1); color: var(--navy);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  margin-bottom: 16px;
}
.process-grid h3 { font-size: 1.1rem; margin-bottom: 8px; }
.process-grid p { color: var(--steel); font-size: 0.92rem; }
@media (min-width: 960px) {
  .process-grid .card { position: relative; }
  .process-grid .card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50px;
    left: 100%;
    width: 24px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--silver-2) 0 6px, transparent 6px 10px);
  }
}

/* ---------- Carousel (reusable: galería, testimonios) ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 4px;
  padding: 4px 4px 8px;
  margin: -4px -4px -8px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: center; flex: 0 0 82%; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); cursor: pointer; z-index: 5;
  -webkit-tap-highlight-color: transparent;
}
.carousel-arrow svg { width: 20px; height: 20px; stroke-width: 2.4; }
.carousel-arrow.prev { left: -6px; }
.carousel-arrow.next { right: -6px; }
.carousel-arrow:hover { background: var(--navy); color: #fff; }
.carousel-arrow[disabled] { opacity: 0.35; pointer-events: none; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 999px; border: none;
  background: var(--silver-2); padding: 0; cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.carousel-dots button.is-active { background: var(--navy); width: 22px; }

/* ---------- Gallery ---------- */
.gallery-grid { grid-template-columns: repeat(3, 1fr); }
.gallery-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--silver-1) 0%, var(--silver-2) 100%);
  border: 1px dashed var(--steel-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--navy);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
}
.gallery-placeholder svg { width: 40px; height: 40px; }
.gallery-placeholder span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.gallery-note { text-align: center; color: var(--steel); margin-top: 40px; font-size: 0.95rem; }

@media (min-width: 700px) {
  .carousel-track { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; padding: 0; margin: 0; }
  .carousel-track > * { flex: none; }
  .carousel-arrow, .carousel-dots { display: none; }
}

/* ---------- Fotos de proyectos reales (servicios, galería) ---------- */
.project-group { margin-bottom: 48px; }
.project-group:last-child { margin-bottom: 0; }
.project-group-title {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--navy-dark); margin-bottom: 16px;
}
.project-group-title span { font-family: var(--font-body); font-weight: 500; font-size: 0.82rem; color: var(--steel); }
.photo-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 8px;
  margin: -4px -4px -8px;
  scrollbar-width: none;
}
.photo-track::-webkit-scrollbar { display: none; }
.photo-track > * { scroll-snap-align: center; flex: 0 0 min(400px, 78vw); }
.photo-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  background: var(--silver-1);
  border: 1px solid var(--line);
}
.photo-item img, .photo-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item.is-video::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 100%);
  pointer-events: none;
}

/* ---------- Showcase: slider grande de proyectos (galería) ---------- */
.showcase {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--navy-dark);
}
.showcase-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.showcase-track::-webkit-scrollbar { display: none; }
.showcase-track > * { flex: 0 0 100%; scroll-snap-align: center; }
.showcase-slide {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--navy-dark);
}
.showcase-slide img, .showcase-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 56px 24px 20px;
  background: linear-gradient(180deg, rgba(3,10,26,0) 0%, rgba(3,10,26,0.82) 75%);
  color: #fff;
  pointer-events: none;
}
/* En la diapositiva con video, el reproductor ya tiene sus propios controles
   abajo — subimos el texto arriba para que no se encimen. */
.showcase-slide.has-video .showcase-caption {
  top: 0; bottom: auto;
  padding: 18px 24px 64px;
  background: linear-gradient(180deg, rgba(3,10,26,0.82) 0%, rgba(3,10,26,0) 100%);
}
.showcase-caption .cat {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 700; color: #9fd8ff; margin-bottom: 4px;
}
.showcase-caption .desc { font-size: 1rem; font-weight: 600; }
.showcase-counter {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  background: rgba(3, 10, 26, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; padding: 5px 13px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.showcase-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 999px;
  background: rgba(3, 10, 26, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.showcase-arrow svg { width: 20px; height: 20px; stroke-width: 2.4; }
.showcase-arrow.prev { left: 14px; }
.showcase-arrow.next { right: 14px; }
.showcase-arrow:hover { background: rgba(3, 10, 26, 0.8); }
.showcase-arrow:active { transform: translateY(-50%) scale(0.92); }
.showcase-arrow[disabled] { opacity: 0.3; pointer-events: none; }
.showcase-thumbs {
  display: flex; gap: 8px; margin-top: 14px;
  overflow-x: auto; scrollbar-width: none; padding: 2px;
}
.showcase-thumbs::-webkit-scrollbar { display: none; }
.showcase-thumbs button {
  flex: 0 0 64px; height: 46px; border-radius: 8px; overflow: hidden;
  padding: 0; border: 2px solid transparent; cursor: pointer;
  background: var(--silver-1); position: relative;
  -webkit-tap-highlight-color: transparent;
}
.showcase-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.55; transition: opacity 0.15s ease; }
.showcase-thumbs button.is-active { border-color: var(--navy); }
.showcase-thumbs button.is-active img { opacity: 1; }
.showcase-thumbs button:hover img { opacity: 0.85; }
@media (max-width: 640px) {
  .showcase-slide { aspect-ratio: 4 / 3; }
  .showcase-caption { padding: 44px 16px 16px; }
  .showcase-arrow { width: 40px; height: 40px; }
  .showcase-thumbs button { flex-basis: 52px; height: 38px; }
}

/* ---------- Testimonials ---------- */
.testimonials-empty {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
  background: var(--paper);
  border: 1px dashed var(--steel-light);
  border-radius: var(--radius);
  color: var(--steel);
}
.testimonials-empty svg { width: 40px; height: 40px; margin: 0 auto 16px; color: var(--accent); animation: testimonialPulse 2.6s ease-in-out infinite; }
@keyframes testimonialPulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.12); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .testimonials-empty svg { animation: none; } }

.testimonial-cta {
  max-width: 520px; margin: 40px auto 0; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 32px; box-shadow: var(--shadow-sm);
}
.testimonial-cta h3 { font-size: 1.15rem; margin-bottom: 10px; }
.testimonial-cta p { color: var(--steel); font-size: 0.92rem; margin-bottom: 22px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-list { display: grid; gap: 20px; margin: 32px 0; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; }
.contact-icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--silver-1);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-list strong { display: block; font-size: 0.95rem; }
.contact-list span { color: var(--steel); font-size: 0.92rem; }
.contact-list a:hover { color: var(--navy); text-decoration: underline; }

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-links a svg { width: 20px; height: 20px; fill: #fff; stroke: none; }
.social-links a:hover { background: var(--navy-light); transform: translateY(-2px); }

.social-links--on-dark a { background: rgba(255,255,255,0.12); }
.social-links--on-dark a:hover { background: rgba(255,255,255,0.26); }

.footer-brand .social-links { margin-top: 18px; }

.hero-social { display: flex; align-items: center; gap: 14px; margin: -8px 0 40px; }
.hero-social-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 16px;
}
.contact-form h3 { font-size: 1.2rem; margin-bottom: 4px; }
.contact-form label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--navy-light);
  outline-offset: 1px;
  background: #fff;
}
.form-note { font-size: 0.8rem; color: var(--steel); text-align: center; }
.form-note a { color: var(--navy); text-decoration: underline; }
.form-note a:hover { color: var(--navy-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.82); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 60px 24px 40px;
}
.footer-logo { height: 60px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.6); max-width: 320px; }
.footer-links h4, .footer-contact h4 {
  color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { font-size: 0.9rem; color: rgba(255,255,255,0.72); }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact p { font-size: 0.9rem; color: rgba(255,255,255,0.72); margin-bottom: 8px; }
.footer-map {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  filter: grayscale(0.3) contrast(1.05);
}
.footer-map iframe { display: block; width: 100%; height: 130px; }

/* ---------- Contact map ---------- */
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.contact-map iframe { display: block; width: 100%; height: 380px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; }
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-bottom-links a { font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.footer-bottom-links a:hover { color: #fff; }
.footer-bottom-links .admin-link { color: rgba(255,255,255,0.4); }
.footer-bottom-links .admin-link:hover { color: rgba(255,255,255,0.75); }

/* ---------- Contenido legal (políticas) ---------- */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-updated { color: var(--steel); font-size: 0.9rem; margin-bottom: 32px; }
.legal-toc {
  background: var(--silver-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 40px;
}
.legal-toc p { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 20px; list-style: decimal; display: block; }
.legal-toc li { margin-bottom: 6px; color: var(--steel); }
.legal-toc a { color: var(--navy); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 14px;
  scroll-margin-top: 100px;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content h3 { font-size: 1.05rem; margin-top: 22px; margin-bottom: 8px; color: var(--navy); }
.legal-content p { color: var(--steel); line-height: 1.7; margin-bottom: 14px; }
.legal-content ul, .legal-content ol {
  display: block;
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--steel);
  line-height: 1.7;
}
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 8px; }
.legal-content strong { color: var(--ink); }
.legal-content a { color: var(--navy); text-decoration: underline; }
.legal-content a:hover { color: var(--navy-light); }

/* ---------- WhatsApp: pestaña colgante fija al borde derecho ---------- */
/* Importante: nunca animar con translateX ni con scale centrado, porque al
   estar anclada con right:0 eso separa la pestaña del borde y deja un hueco
   en blanco. Toda animación se hace variando el ancho (width) con
   transform-origin a la derecha, así el lado derecho siempre queda pegado. */
.whatsapp-tab {
  position: fixed;
  right: 0;
  top: 64%;
  transform: translateY(-50%);
  transform-origin: right center;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  border-radius: 999px 0 0 999px;
  background: #17a34a;
  color: #fff;
  isolation: isolate;
  box-shadow: -6px 8px 20px rgba(0,0,0,0.25);
  animation: waTabWiggle 3.6s ease-in-out infinite;
  transition: width 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.whatsapp-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  animation: waTabPulse 2.6s ease-out infinite;
}
.whatsapp-tab svg { width: 24px; height: 24px; fill: #fff; stroke: none; margin-left: -4px; flex: none; }
.whatsapp-tab:hover { animation-play-state: paused; width: 58px; box-shadow: -9px 10px 24px rgba(0,0,0,0.32); }
.whatsapp-tab:active { animation-play-state: paused; width: 46px; }
@keyframes waTabPulse {
  0% { box-shadow: 0 0 0 0 rgba(23, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(23, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 163, 74, 0); }
}
@keyframes waTabWiggle {
  0%, 82%, 100% { width: 50px; }
  88% { width: 58px; }
  94% { width: 53px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-tab, .whatsapp-tab::before { animation: none; }
}
@media (max-width: 480px) {
  .whatsapp-tab { width: 44px; height: 44px; top: 60%; }
  .whatsapp-tab svg { width: 21px; height: 21px; }
}

/* ---------- Chatbot ---------- */
.chatbot-toggle {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  width: 58px; height: 58px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy-light) 0%, var(--navy) 100%);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(13, 31, 61, 0.35), inset 0 0 0 1px rgba(255,255,255,0.12);
  z-index: 210;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.chatbot-toggle::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 999px;
  background: conic-gradient(from 0deg, var(--navy-light), #7fd1e8, #9fd8ff, var(--accent), var(--navy-light));
  filter: blur(13px);
  animation: chatbotHalo 6s ease-in-out infinite;
}
.chatbot-toggle::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(159, 216, 255, 0.35);
  animation: chatbotRing 2.4s ease-out infinite;
}
@keyframes chatbotHalo {
  0% { transform: rotate(0deg) scale(0.92); opacity: 0.5; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.85; }
  100% { transform: rotate(360deg) scale(0.92); opacity: 0.5; }
}
@keyframes chatbotRing {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
.chatbot-toggle:hover { transform: scale(1.08); }
.chatbot-toggle:active { transform: scale(0.94); }
.chatbot-toggle svg { position: absolute; width: 26px; height: 26px; stroke: #fff; stroke-width: 1.8; transition: opacity 0.15s ease, transform 0.15s ease; }
.chatbot-icon-close { opacity: 0; transform: scale(0.6) rotate(-45deg); }
.chatbot-toggle[aria-expanded="true"] .chatbot-icon-open { opacity: 0; transform: scale(0.6) rotate(45deg); }
.chatbot-toggle[aria-expanded="true"] .chatbot-icon-close { opacity: 1; transform: scale(1) rotate(0deg); }
.chatbot-toggle[aria-expanded="true"]::before, .chatbot-toggle[aria-expanded="true"]::after { animation-play-state: paused; opacity: 0.35; }
.chatbot-badge {
  position: absolute; top: -3px; right: -3px;
  width: 14px; height: 14px; border-radius: 999px;
  background: #17a34a; border: 2px solid #fff;
  z-index: 1;
}

.chatbot-window {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(90px, calc(90px + env(safe-area-inset-bottom)));
  width: 380px;
  max-width: calc(100vw - 40px);
  height: min(560px, 70vh);
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 205;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chatbot-window.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chatbot-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  flex: none;
}
.chatbot-avatar { width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 4px; flex: none; }
.chatbot-header-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.chatbot-header-text strong { font-family: var(--font-display); font-size: 1.02rem; }
.chatbot-header-text span { font-size: 0.76rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 6px; }
.chatbot-header-text span::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.25); }
.chatbot-close {
  flex: none; width: 32px; height: 32px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.12); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.chatbot-close svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.2; }
.chatbot-close:hover { background: rgba(255,255,255,0.22); }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}
.chat-msg { display: flex; }
.chat-msg-bubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user .chat-msg-bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.bot .chat-msg-bubble { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.error .chat-msg-bubble { background: #fdecea; color: #7a1f14; border: 1px solid #f3c6bf; }
.chat-msg-bubble a { color: inherit; text-decoration: underline; }

.chat-typing { display: flex; gap: 4px; align-items: center; padding: 4px 2px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 999px; background: var(--steel-light); animation: chatTyping 1.1s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chatbot-quick { display: flex; gap: 8px; padding: 0 16px 12px; flex-wrap: wrap; flex: none; background: var(--bg); }
.chatbot-chip {
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 7px 13px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.chatbot-chip:hover { background: var(--silver-1); }

.chatbot-form {
  flex: none;
  display: flex; align-items: flex-end; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chatbot-form textarea {
  flex: 1; resize: none; max-height: 90px;
  font-family: var(--font-body); font-size: 0.9rem; line-height: 1.4;
  padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.chatbot-form textarea:focus { outline: 2px solid var(--navy-light); outline-offset: 1px; background: #fff; }
.chatbot-send {
  flex: none; width: 40px; height: 40px; border-radius: 999px; border: none;
  background: var(--navy); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.chatbot-send svg { width: 18px; height: 18px; fill: #fff; stroke: none; }
.chatbot-send:hover { background: var(--navy-light); }
.chatbot-send:active { transform: scale(0.92); }
.chatbot-send:disabled { opacity: 0.5; cursor: default; transform: none; }

@media (max-width: 640px) {
  .chatbot-window {
    right: 12px; left: 12px; bottom: max(16px, env(safe-area-inset-bottom));
    width: auto; max-width: none;
    height: min(78vh, 640px);
  }
  /* En móvil la ventana ya tiene su propio botón de cerrar en el encabezado;
     ocultamos el flotante mientras está abierta para que no quede encima del
     campo de texto. */
  .chatbot-toggle[aria-expanded="true"] { opacity: 0; transform: scale(0.6); pointer-events: none; }

  /* iOS hace zoom automático al enfocar un campo con font-size menor a 16px;
     forzamos 16px en todos los formularios para que la pantalla se mantenga fija. */
  .contact-form input,
  .contact-form textarea,
  .qq-form input,
  .qq-form textarea,
  .chatbot-form textarea {
    font-size: 16px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hours-card { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .brand-logo { height: 90px; }
}

.nav-panel-extra { display: none; }

@media (max-width: 760px) {
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px max(24px, env(safe-area-inset-right)) 20px max(24px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  .nav a:last-child { border-bottom: none; }
  .nav-install { margin-top: 14px; justify-content: center; padding: 12px 14px; min-height: 44px; font-size: 0.9rem; }
  .nav-toggle { display: flex; }
  .nav { border-radius: 0 0 20px 20px; }

  .nav-panel-extra {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: 16px;
    padding: 18px 2px 4px;
    border-top: 1px dashed var(--line);
  }
  .nav-quote-btn {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 14px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--navy) 100%);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(13, 31, 61, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav-quote-btn::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    z-index: -1;
    animation: qqPulse 2.8s ease-out infinite;
  }
  .nav-quote-btn svg { width: 18px; height: 18px; fill: #ffd166; stroke: none; flex: none; }
  .nav-quote-btn:active { transform: scale(0.97); }

  .nav-social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
  }
  .nav-social-row span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--steel);
  }
  .nav-social-row .social-links a { width: 40px; height: 40px; }
  .nav-social-row .social-links a svg { width: 18px; height: 18px; }

  .header-inner { padding-top: 14px; padding-bottom: 14px; }
  .brand-logo { height: 88px; }
  .services-grid, .gallery-grid, .process-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding-top: 44px; }
  .hero { padding: 56px 0 48px; min-height: 520px; }
  .page-hero { padding: 56px 0 40px; }
  .section { padding: 56px 0; }
  .hero-cta, .cta-banner-actions { justify-content: center; }
}

/* ---------- Small phones (symmetric, touch-first) ---------- */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .header-inner { padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .brand-logo { height: 80px; }
  .hero, .page-hero { text-align: center; }
  .hero-inner, .page-hero-inner { max-width: none; }
  .hero-sub, .page-hero p { margin-left: auto; margin-right: auto; }
  .hero-cta, .cta-banner-actions { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .cta-banner-actions .btn { width: 100%; text-align: center; }
  .hero-stats { justify-content: center; text-align: center; gap: 24px; }
  .hero-stats li { align-items: center; }
  .section-title, .section-lead, .section-eyebrow { text-align: center; margin-left: auto; margin-right: auto; }
  .btn { min-height: 44px; }
  .contact-form { padding: 22px; }
  .cta-banner-inner { text-align: center; justify-content: center; }
  .footer-bottom-inner { justify-content: center; text-align: center; }
  .preloader-logo { width: 128px; height: 128px; }
  .preloader-percent { font-size: 2.1rem; }
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Nav active state ---------- */
.nav a.is-active { color: var(--navy); }
.nav a.is-active::after { transform: scaleX(1); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}
.preloader::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(46, 90, 168, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(22, 48, 92, 0.06) 0%, transparent 50%);
  animation: preloaderGlow 6s ease-in-out infinite;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo {
  position: relative;
  width: 168px; height: 168px;
  display: block;
  animation: preloaderPulse 1.8s ease-in-out infinite;
}
.preloader-progress { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.preloader-percent {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--navy);
  -webkit-text-fill-color: transparent;
}
.preloader-bar { position: relative; width: 220px; height: 6px; background: var(--silver-1); border-radius: 999px; overflow: hidden; }
.preloader-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f4a8c 0%, #2e5aa8 35%, #5b8fd9 68%, #9fd8ff 100%);
  box-shadow: 0 0 14px rgba(159, 216, 255, 0.6);
  transition: width 0.25s ease-out;
  position: relative;
  overflow: hidden;
}
.preloader-bar-fill::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: preloaderShimmer 1.3s ease-in-out infinite;
}
.preloader-text { position: relative; color: var(--steel); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
@keyframes preloaderShimmer { 0% { transform: translateX(-70px); } 100% { transform: translateX(280px); } }
@keyframes preloaderPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: 0.85; } }
@keyframes preloaderGlow { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(2%, -2%) rotate(6deg); } }
body.is-loading { overflow: hidden; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-1 { transition-delay: 0.08s; }
.reveal-2 { transition-delay: 0.16s; }
.reveal-3 { transition-delay: 0.24s; }
.reveal-4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .preloader, .hero-slide { transition: none; }
  .preloader::before, .preloader-logo, .preloader-bar-fill::after { animation: none; }
  .chatbot-toggle::before, .chatbot-toggle::after { animation: none; opacity: 0.5; }
}

/* ---------- Hero slider (home) ---------- */
.hero { min-height: 640px; display: flex; align-items: center; }
.hero-slider { position: absolute; inset: 0; z-index: 0; background: var(--navy-dark); }
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(190deg, rgba(8,17,34,0.6) 0%, rgba(8,17,34,0.72) 55%, rgba(8,17,34,0.92) 100%);
}
.hero-dots { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 44px; }
.hero-dot { width: 30px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.3); border: none; padding: 0; cursor: pointer; transition: background 0.25s ease, width 0.25s ease; }
.hero-dot.is-active { background: #fff; width: 46px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { position: relative; overflow: hidden; color: #fff; padding: 88px 0 64px; }
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-media .hero-overlay { background: linear-gradient(190deg, rgba(8,17,34,0.68) 0%, rgba(8,17,34,0.88) 100%); }
.page-hero-inner { position: relative; z-index: 1; max-width: 700px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 580px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,0.85); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Admin ---------- */
.admin-shell {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
.admin-login-card {
  width: 100%; max-width: 380px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  padding: 42px 32px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.admin-login-card .brand-logo { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 12px; background: #fff; padding: 8px; }
.admin-login-card h1 { color: #fff; font-size: 1.35rem; margin-bottom: 6px; }
.admin-login-card p.sub { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin-bottom: 30px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); transition: background 0.15s ease, transform 0.15s ease; }
.pin-dot.filled { background: #fff; border-color: #fff; transform: scale(1.1); }
.pin-dots.shake { animation: pinShake 0.4s ease; }
@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-key {
  padding: 16px 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: var(--font-body);
}
.pin-key:hover { background: rgba(255,255,255,0.15); }
.pin-key:active { transform: scale(0.94); }
.pin-key.ghost { background: transparent; border-color: transparent; color: rgba(255,255,255,0.5); font-size: 0.82rem; }
.admin-error { min-height: 20px; color: #ff9b9b; font-size: 0.82rem; margin-top: 16px; }
.admin-hint { margin-top: 24px; font-size: 0.74rem; color: rgba(255,255,255,0.4); line-height: 1.5; }

.admin-dash { min-height: 100vh; background: var(--bg); }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.admin-topbar-left { display: flex; align-items: center; gap: 14px; }
.admin-topbar .brand-logo { height: 36px; }
.admin-badge {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: #fff3cd; color: #8a6100; padding: 4px 10px; border-radius: 999px; font-weight: 700;
}
.logout-btn {
  background: none; border: 1px solid var(--line); padding: 9px 18px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--ink);
  font-family: var(--font-body);
}
.logout-btn:hover { background: var(--silver-1); }
.admin-main { padding: 32px 24px 64px; max-width: 1180px; margin: 0 auto; }
.admin-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.admin-notice {
  background: #fff8e6; border: 1px solid #f2dfa3; color: #7a5c00;
  border-radius: 10px; padding: 12px 16px; font-size: 0.86rem; flex: 1 1 380px; margin: 0;
}
.admin-refresh { display: flex; align-items: center; gap: 12px; flex: none; }
.admin-updated { font-size: 0.78rem; color: var(--steel); white-space: nowrap; }
.btn-refresh {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 0.85rem; font-weight: 600; color: var(--navy);
  cursor: pointer; font-family: var(--font-body); white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-refresh svg { width: 16px; height: 16px; stroke-width: 2.2; }
.btn-refresh:hover { background: var(--silver-1); border-color: var(--silver-2); }
.btn-refresh:active { transform: scale(0.96); }
.btn-refresh.is-loading svg { animation: adminSpin 0.7s linear infinite; }
.btn-refresh:disabled { opacity: 0.6; cursor: default; }
@keyframes adminSpin { to { transform: rotate(360deg); } }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.admin-stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.admin-stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
}
.admin-stat-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.admin-stat-card .label { font-size: 0.8rem; color: var(--steel); margin-bottom: 8px; }
.admin-stat-card .value { font-family: var(--font-display); font-size: 1.85rem; color: var(--navy-dark); }
.admin-stat-card .delta { font-size: 0.78rem; color: #1a9d5c; margin-top: 6px; }
.admin-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.admin-grid > div { min-width: 0; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.admin-panel h3 { font-size: 1.02rem; margin-bottom: 18px; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.chart-bars span {
  flex: 1; min-width: 0; background: linear-gradient(180deg, var(--navy-light), var(--navy));
  border-radius: 6px 6px 0 0; position: relative; cursor: default;
  transition: opacity 0.15s ease;
}
.chart-bars span:hover { opacity: 0.85; }
.chart-labels { display: flex; gap: 8px; margin-top: 8px; }
.chart-labels span {
  flex: 1; min-width: 0; text-align: center; font-size: 0.68rem; color: var(--steel);
  white-space: nowrap; overflow: visible;
}
.admin-list { display: grid; gap: 13px; min-width: 0; }
.admin-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); font-size: 0.88rem; min-width: 0; }
.admin-list li > span:first-child { min-width: 0; overflow-wrap: break-word; }
.admin-list li > span:last-child { flex: none; color: var(--steel); white-space: nowrap; }
.admin-list .admin-sub { color: var(--steel); font-size: 0.8rem; }
.admin-empty { color: var(--steel); font-size: 0.85rem; }

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-topbar { padding: 12px 16px; }
  .admin-topbar .brand-logo { height: 30px; }
  .admin-main { padding: 24px 16px 48px; }
  .admin-refresh { width: 100%; justify-content: space-between; }
}
@media (max-width: 520px) {
  .admin-stats { grid-template-columns: 1fr; }
  .pin-pad { gap: 10px; }
}

/* ---------- Cotización exprés (quick quote) ---------- */
.qq-fab {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 220;
  display: flex; align-items: center; gap: 9px;
  padding: 14px 20px 14px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--navy) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(13, 31, 61, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  isolation: isolate;
}
.qq-fab::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  z-index: -1;
  box-shadow: 0 0 0 0 rgba(46, 90, 168, 0.55);
  animation: qqPulse 2.8s ease-out infinite;
}
@keyframes qqPulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 90, 168, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(46, 90, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 90, 168, 0); }
}
.qq-fab svg { width: 20px; height: 20px; fill: #ffd166; stroke: none; flex: none; }
.qq-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(13, 31, 61, 0.4); }
.qq-fab:active { transform: scale(0.96); }
@media (max-width: 480px) {
  .qq-fab span { display: none; }
  .qq-fab { padding: 14px; }
}

.qq-overlay {
  position: fixed; inset: 0;
  z-index: 10000;
  background: rgba(13, 19, 33, 0.6);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.qq-overlay.is-open { opacity: 1; pointer-events: auto; }

.qq-modal {
  width: 100%; max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 26px 26px 22px;
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  position: relative;
}
.qq-overlay.is-open .qq-modal { transform: translateY(0) scale(1); opacity: 1; }

.qq-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--bg);
  color: var(--steel);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.qq-close svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; }
.qq-close:hover { background: var(--silver-1); color: var(--navy); }

.qq-progress {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background: transparent;
}
.qq-progress::after {
  content: "";
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--navy-light));
  transition: width 0.4s ease;
}
.qq-modal.is-sending .qq-progress::after { width: 92%; transition: width 5s cubic-bezier(0.1, 0.6, 0.2, 1); }
.qq-modal.is-done .qq-progress::after { width: 100%; transition: width 0.25s ease; }

.qq-eyebrow { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.qq-title { font-size: 1.25rem; margin-bottom: 4px; }
.qq-subtitle { font-size: 0.86rem; color: var(--steel); margin-bottom: 18px; }

.qq-view { display: none; }
.qq-view.is-active { display: block; }

/* skeleton (loading illusion) */
.qq-skel-line {
  height: 14px; border-radius: 6px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--line) 25%, var(--silver-1) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: qqShimmer 1.3s ease-in-out infinite;
}
@keyframes qqShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.qq-skel-field { height: 44px; border-radius: 10px; margin-bottom: 18px; background: linear-gradient(90deg, var(--line) 25%, var(--silver-1) 50%, var(--line) 75%); background-size: 200% 100%; animation: qqShimmer 1.3s ease-in-out infinite; }
.qq-skel-caption { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--steel); margin-top: 4px; }
.qq-skel-caption .qq-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); animation: qqDot 1.1s ease-in-out infinite; }
.qq-skel-caption .qq-dot:nth-child(2) { animation-delay: 0.15s; }
.qq-skel-caption .qq-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes qqDot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.1); } }

/* form */
.qq-form { display: grid; gap: 14px; }
.qq-form label { display: grid; gap: 6px; font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.qq-form input,
.qq-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.qq-form input:focus,
.qq-form textarea:focus { outline: 2px solid var(--navy-light); outline-offset: 1px; background: #fff; }

.qq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qq-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.qq-chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.qq-chip:hover { border-color: var(--navy-light); }

.qq-submit { position: relative; }
.qq-submit-spinner {
  display: none;
  width: 17px; height: 17px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: qqSpin 0.7s linear infinite;
}
@keyframes qqSpin { to { transform: rotate(360deg); } }
.qq-submit.is-loading .qq-submit-label { display: none; }
.qq-submit.is-loading .qq-submit-spinner { display: inline-block; }
.qq-submit.is-loading { display: flex; align-items: center; justify-content: center; gap: 10px; cursor: default; }
.qq-error-text { font-size: 0.82rem; color: #c0392b; min-height: 1em; margin: -4px 0 0; }

/* success / error views */
.qq-result { text-align: center; padding: 12px 4px 4px; }
.qq-result-icon {
  width: 66px; height: 66px; margin: 0 auto 16px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.qq-result-icon svg { width: 32px; height: 32px; }
.qq-view[data-view="success"] .qq-result-icon { background: rgba(23, 163, 74, 0.12); }
.qq-view[data-view="success"] .qq-result-icon svg { stroke: #17a34a; fill: none; stroke-width: 2.6; }
.qq-view[data-view="success"] .qq-result-icon path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: qqCheck 0.5s 0.15s ease forwards; }
@keyframes qqCheck { to { stroke-dashoffset: 0; } }
.qq-view[data-view="error"] .qq-result-icon { background: rgba(192, 57, 43, 0.1); }
.qq-view[data-view="error"] .qq-result-icon svg { stroke: #c0392b; fill: none; stroke-width: 2.4; }
.qq-result h3 { font-size: 1.15rem; margin-bottom: 8px; }
.qq-result p { font-size: 0.9rem; color: var(--steel); margin-bottom: 20px; }
.qq-result-actions { display: grid; gap: 10px; }

