.servicio-hero { padding: 80px 0 60px; }
.servicio-hero .hero-grid { max-width: 760px; }
.servicio-hero h1 { font-size: 46px; }

.servicio-intro { background: var(--white); }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.video-card { background: var(--white); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.video-card iframe, .video-card blockquote, .video-card section { max-width: 100% !important; }
@media (max-width: 800px) {
  .video-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}

/* ── Facade de YouTube: miniatura real + play, el iframe pesado solo carga al
   hacer clic — protege LCP/INP (ver comentario en main.js). ── */
.yt-facade {
  position: relative; width: 100%; aspect-ratio: 16/9; cursor: pointer;
  background-size: cover; background-position: center; border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
}
/* Texto + video lado a lado — mismo mecanismo flex que .text-with-client, pero
   el video no se estira a 100%: se le da un ancho fijo para que no domine la
   sección frente al texto. */
.text-with-video { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.text-with-video > .text-with-video-copy { flex: 1 1 320px; }
.text-with-video > .text-with-video-copy .guide-lede { margin-bottom: 0; }
.text-with-video > .yt-facade { flex: 0 0 380px; max-width: 380px; }
@media (max-width: 760px) {
  .text-with-video > .yt-facade { flex-basis: 100%; max-width: 100%; }
}
.yt-facade-play {
  width: 64px; height: 64px; border-radius: 50%; background: rgba(20,33,61,.85);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background .2s ease;
}
.yt-facade:hover .yt-facade-play { background: var(--orange-dark); transform: scale(1.08); }
.yt-facade-play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.servicio-sub { background: var(--bone); }

.servicio-tool { background: var(--white); border-top: 1px solid var(--line); }
.servicio-tool-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.servicio-tool-inner > div:first-child { max-width: 620px; }
.servicio-tool-inner p { color: var(--gray); font-size: 15px; margin-top: 8px; }
.servicio-tool .section-title { margin-bottom: 0; font-size: 28px; }

.sub-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.sub-item {
  background: var(--white);
  padding: 30px 28px;
  transition: background-color 0.15s ease;
}
.sub-item:hover { background: #fdfaf7; }
.sub-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sub-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.sub-item p {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--gray);
  margin-bottom: 14px;
}
.sub-item-link {
  display: inline-flex;
  font-family: var(--font-condensed);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom: 1px solid transparent;
}
.sub-item:hover .sub-item-link { border-bottom-color: var(--orange); }

@media (max-width: 700px) {
  .sub-list { grid-template-columns: 1fr; }
  .servicio-hero h1 { font-size: 34px; }
}

/* ── Guía de servicio: bloques reutilizables ── */
.guide-section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.guide-section:last-of-type { border-bottom: none; }
.guide-section.bg-bone { background: var(--bone); }
.guide-section .eyebrow { margin-bottom: 10px; }
.guide-title { font-size: 30px; margin-bottom: 20px; max-width: 46ch; }
.guide-lede { color: var(--gray); font-size: 15.5px; max-width: 68ch; margin-bottom: 28px; }

/* ── CTA intermedio (refuerzo a mitad de página en guías largas) ── */
.cta-strip-wrap { padding: 40px 0; }
.cta-strip {
  background: var(--navy);
  color: var(--white);
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-strip p { margin: 0; font-size: 16px; max-width: 56ch; }
.cta-strip strong { color: var(--orange-light); }
.cta-strip .btn { flex-shrink: 0; }
@media (max-width: 600px) {
  .cta-strip { flex-direction: column; align-items: flex-start; text-align: left; padding: 24px; }
}

.trigger-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.trigger-item {
  background: var(--white);
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--navy);
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.trigger-item::before {
  content: '';
  width: 8px;
  height: 3px;
  background: var(--orange);
  flex-shrink: 0;
  margin-top: 8px;
}

.step-list { counter-reset: step; margin-top: 8px; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 16px 0 16px 46px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--navy);
}
.step-list li:last-child { border-bottom: 1px solid var(--line); }
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 18px;
  color: var(--orange);
  width: 30px;
}

.info-table-wrap { overflow-x: auto; border: 1px solid var(--line); margin-bottom: 8px; }
table.info-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
table.info-table caption {
  text-align: left; font-family: var(--font-condensed); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px; color: var(--gray); padding: 10px 14px;
  background: var(--bone); caption-side: top;
}
table.info-table th {
  text-align: left; font-family: var(--font-condensed); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--gray); padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--bone);
}
table.info-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--navy); }
table.info-table td.num { font-family: var(--font-condensed); white-space: nowrap; color: var(--orange-dark); font-weight: 700; }
table.info-table tr:last-child td { border-bottom: none; }
.table-note { font-size: 12.5px; color: var(--gray); margin-top: 10px; }

/* Callout de caso real: destaca un hallazgo puntual dentro de una página de caso
   (ej. el circuito más sobrecargado de un diagnóstico) — reusable en cualquier caso-*. */
.caso-callout {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; margin-top: 20px; font-size: 14px; line-height: 1.65; color: var(--gray);
}
.caso-callout strong { display: block; margin-bottom: 6px; color: var(--navy); font-family: var(--font-condensed); }

/* Tarjeta de enlace hacia una página de caso-* desde una página de comuna/servicio —
   el punto de prueba real justo después de mostrar precios. Reusable en cualquier
   página que quiera enlazar a un caso-* relacionado. */
.caso-destacado {
  display: flex; align-items: center; gap: 0; margin-top: 20px;
  background: #fff; color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.caso-destacado:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,33,61,.15); }
.caso-destacado-photo {
  width: 160px; height: 120px; object-fit: cover; flex-shrink: 0;
}
.caso-destacado-body {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 16px 20px; flex: 1; min-width: 0;
}
.caso-destacado-eyebrow {
  display: block; font-family: var(--font-condensed); font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--orange-dark);
}
.caso-destacado-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--navy); }
.caso-destacado-arrow {
  font-size: 20px; flex-shrink: 0; padding-right: 20px; color: var(--orange-dark);
}
@media (max-width: 560px) {
  .caso-destacado-photo { width: 96px; height: 96px; }
  .caso-destacado-arrow { display: none; }
}

/* Dos (o más) tarjetas .caso-destacado lado a lado — cuando una sección menciona
   varios proyectos reales a la vez, en vez de un solo link suelto. */
.caso-destacado-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.caso-destacado-grid .caso-destacado { margin-top: 0; }
@media (max-width: 680px) {
  .caso-destacado-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  table.info-table { min-width: 0; font-size: 12.5px; }
  table.info-table th, table.info-table td { padding: 9px 10px; }
}

.callout-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 28px 0; }
.callout {
  background: var(--navy); color: var(--white); padding: 22px 24px; border-left: 3px solid var(--orange);
}
.callout .k { font-family: var(--font-condensed); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--orange-light); margin-bottom: 6px; }
.callout .v { font-family: var(--font-condensed); font-size: 22px; font-weight: 700; }
.callout p { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 6px; }

.checklist { margin-top: 8px; }
.checklist li {
  padding: 12px 0 12px 26px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--navy);
  position: relative;
}
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border: 2px solid var(--orange);
}

.glossary-list dt { font-family: var(--font-condensed); font-weight: 700; font-size: 14px; color: var(--navy); margin-top: 16px; }
.glossary-list dd { font-size: 14px; color: var(--gray); margin: 4px 0 0; }

.faq-list { margin-top: 8px; }
.faq-item { border-top: 1px solid var(--line); padding: 18px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-family: var(--font-condensed); font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.faq-item p { font-size: 14px; color: var(--gray); margin: 0; max-width: 68ch; }

.authority-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.authority-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-condensed); font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.3px; color: var(--navy); border: 1px solid var(--line-strong, var(--line)); padding: 20px 22px;
  background: var(--white); transition: border-color 0.15s ease, transform 0.15s ease;
}
.authority-links a::after { content: '→'; color: var(--orange); flex-shrink: 0; }
.authority-links a:hover { border-color: var(--orange); color: var(--orange-dark); transform: translateY(-2px); }

@media (max-width: 700px) {
  .trigger-grid { grid-template-columns: 1fr; }
  .callout-row { grid-template-columns: 1fr; }
}

/* ── Foto de cliente destacada (prueba social B2B) ── */
.photo-client { max-width: 480px; margin: 0 0 32px; }
.photo-client img { width: 100%; display: block; border: 1px solid var(--line); aspect-ratio: 4 / 3; object-fit: cover; }
.photo-client figcaption { font-family: var(--font-condensed); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray); margin-top: 8px; }

/* Texto + foto de cliente lado a lado (evita texto angosto flotando en un fondo vacío) */
.text-with-client { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.text-with-client > .guide-lede { flex: 1 1 380px; margin-bottom: 0; }
.text-with-client > .photo-client { flex: 0 0 300px; margin-bottom: 0; }
@media (max-width: 700px) {
  .text-with-client > .photo-client { flex-basis: 100%; max-width: 100%; }
}

/* ── Historia fotográfica de proyecto (fases + carrusel horizontal) ── */
.photo-phase { margin-bottom: 40px; }
.photo-phase:last-child { margin-bottom: 0; }
.photo-phase-title {
  font-family: var(--font-condensed); font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--navy); margin-bottom: 6px; display: flex; align-items: baseline; gap: 10px;
}
.photo-phase-title .n { color: var(--orange); font-size: 16px; }
.photo-phase-desc { font-size: 13.5px; color: var(--gray); margin-bottom: 16px; max-width: 62ch; }

/* Carrusel horizontal tipo "coverflow": fotos curvadas en 3D, la que tiene el mouse
   encima se agranda y queda de frente, las demás se achican y giran hacia atrás.
   El giro/escala en sí lo calcula photo-strip-coverflow.js (necesita saber la posición
   relativa entre fotos, algo que CSS puro no puede resolver para una lista de largo
   variable) — acá solo van las propiedades base y la animación de entrada al hacer scroll. */
.photo-strip {
  display: flex; gap: 16px; overflow-x: auto; padding: 30px 6px 34px 2px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  perspective: 1400px;
}
.photo-strip::-webkit-scrollbar { height: 6px; }
.photo-strip::-webkit-scrollbar-thumb { background: var(--line-strong, var(--line)); }
.photo-strip a {
  flex: 0 0 auto; width: 260px; height: 195px; overflow: hidden; position: relative;
  scroll-snap-align: start; transform-style: preserve-3d; transform-origin: center center;
  backface-visibility: hidden; box-shadow: 0 10px 24px rgba(20, 33, 61, 0.12);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* A propósito: las fotos son visibles desde el primer render, sin depender de que
   ninguna animación termine de correr — son el contenido real del caso, no se pueden
   arriesgar a quedar invisibles si una animación falla en algún navegador. El "toma
   vida" pasa con el hover (photo-strip-coverflow.js calcula el giro/escala de cada
   foto), no con un fade-in al hacer scroll. */
@media (prefers-reduced-motion: reduce) {
  .photo-strip a { transition: none !important; }
}

/* Flechita "hay más fotos": solo aparece si la fila realmente desborda (la agrega/quita
   photo-strip-coverflow.js según scrollWidth vs clientWidth) y se oculta sola al llegar
   al final del scroll — para no dejarla ahí como ruido cuando ya no hay nada más que ver. */
.photo-strip-wrap { position: relative; }
.photo-strip-hint-btn {
  position: absolute; top: 127px; right: 10px; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(20, 33, 61, 0.82); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 6px 16px rgba(20, 33, 61, 0.3);
  opacity: 0; pointer-events: none; z-index: 3;
  transition: opacity 0.3s ease;
  animation: photoHintNudge 1.8s ease-in-out infinite;
}
.photo-strip-hint-btn svg { width: 18px; height: 18px; }
.photo-strip-wrap.has-overflow .photo-strip-hint-btn { opacity: 1; pointer-events: auto; }
.photo-strip-wrap.at-end .photo-strip-hint-btn { opacity: 0; pointer-events: none; }
@keyframes photoHintNudge {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .photo-strip-hint-btn { animation: none; }
}
@media (max-width: 700px) {
  .photo-strip-hint-btn { top: 101px; width: 32px; height: 32px; right: 6px; }
  .photo-strip a { width: 190px; height: 143px; }
}

.photo-strip-dots { display: flex; gap: 7px; justify-content: center; margin-top: 2px; }
.photo-strip-dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(20, 33, 61, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}
.photo-strip-dot.is-active { background: var(--navy); transform: scale(1.35); }
@media (prefers-reduced-motion: reduce) {
  .photo-strip-dot { transition: none; }
}

/* Grilla de 2 fotos de "resultado final" lado a lado — respeta el recorte cuadrado
   real de la foto en vez de forzar un aspect-ratio distinto encima. */
.resultado-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.resultado-grid img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 700px) {
  .resultado-grid { grid-template-columns: 1fr; }
}

/* Cuando una foto de .resultado-grid es zoomeable (envuelta en <a class="js-lightbox">,
   no todo uso de resultado-grid lo es) — zoom en hover + ícono de lupa, sin convertirla
   en carrusel: son pocas fotos fijas, no una fila que necesite scroll. */
.resultado-grid a { display: block; position: relative; overflow: hidden; border-radius: 10px; }
.resultado-grid a img { transition: transform .4s ease; }
.resultado-grid a:hover img { transform: scale(1.06); }
.resultado-grid a::after {
  content: '';
  position: absolute; inset: 0; border-radius: 10px;
  background-color: rgba(20, 33, 61, 0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 32px;
  opacity: 0; transition: opacity .25s ease, background-color .25s ease;
}
.resultado-grid a:hover::after { background-color: rgba(20, 33, 61, .35); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .resultado-grid a img, .resultado-grid a::after { transition: none; }
}

/* ── Trabajos recientes: trabajos puntuales sin página de caso propia (<6 fotos) ── */
.trabajos-recientes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px;
  margin-top: 24px;
}
.trabajo-card { display: block; text-decoration: none; color: inherit; }
.trabajo-card img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block;
  transition: transform .25s ease;
}
.trabajo-card:hover img { transform: scale(1.03); }
.trabajo-card-comuna {
  display: block; font-family: var(--font-condensed); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: var(--orange-dark); margin-top: 10px;
}
.trabajo-card-desc { display: block; font-size: 14px; color: var(--navy); margin-top: 2px; line-height: 1.4; }

/* Tarjeta de "otros proyectos" para el final de una página de caso — la foto
   Y el "Ver proyecto" son el mismo link, nunca solo texto (regla #9 CLAUDE.md). */
.proyecto-relacionado-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
  margin-top: 24px;
}
.proyecto-relacionado-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(20, 33, 61, .06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.proyecto-relacionado-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(20, 33, 61, .14); }
.proyecto-relacionado-card img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.proyecto-relacionado-card:hover img { transform: scale(1.05); }
.proyecto-relacionado-eyebrow {
  display: block; font-family: var(--font-condensed); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: var(--orange-dark);
  margin: 16px 18px 0;
}
.proyecto-relacionado-title {
  display: block; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--navy);
  margin: 4px 18px 0;
}
.proyecto-relacionado-link {
  display: block; font-family: var(--font-condensed); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; color: var(--orange-dark);
  margin: 12px 18px 18px;
}
.proyecto-relacionado-card:hover .proyecto-relacionado-link { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .proyecto-relacionado-card, .proyecto-relacionado-card img { transition: none; }
}

/* Teaser corto (4 fotos) reutiliza el mismo carrusel, sin scroll si caben */
.photo-teaser { display: flex; gap: 14px; flex-wrap: wrap; }
.photo-teaser a { flex: 1 1 220px; max-width: 280px; height: 195px; overflow: hidden; transition: transform 0.2s ease; }
.photo-teaser img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-teaser a:hover { transform: scale(1.04); }
@media (max-width: 700px) {
  .photo-teaser a { flex-basis: 45%; height: 140px; }
}
