.hero-photo-background {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  background: #0b1f35;
  transition: opacity 1200ms ease;
}

.hero.hero-showcase-active .hero-photo-background {
  opacity: 1;
}

.hero-marquee-row {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
}

.hero-marquee-row-top { top: 0; }
.hero-marquee-row-bottom { bottom: 0; }

.hero-marquee-track {
  width: max-content;
  height: 100%;
  display: flex;
  will-change: transform;
}

.hero-marquee-set {
  height: 100%;
  display: flex;
  gap: 14px;
  padding-right: 14px;
}

.hero-marquee-photo {
  flex: 0 0 295px;
  width: 295px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #102b48;
}

.hero-marquee-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.06);
}

.hero-marquee-left {
  animation: hero-marquee-left 108s linear infinite;
}

.hero-marquee-right {
  animation: hero-marquee-right 82s linear infinite;
}

.hero:not(.hero-showcase-active) .hero-marquee-track {
  animation-play-state: paused;
}

.hero.hero-showcase-active .hero-marquee-track {
  animation-play-state: running;
}

.hero-background-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 20, 35, 0.88) 0%, rgba(5, 20, 35, 0.67) 48%, rgba(5, 20, 35, 0.52) 100%),
    linear-gradient(180deg, rgba(11, 31, 53, 0.35), rgba(11, 31, 53, 0.55));
}

.hero > .hero-grid {
  z-index: 1;
}

.hero > .hero-layout {
  z-index: 2;
}

@keyframes hero-marquee-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes hero-marquee-right {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.gallery-page-section {
  padding: 118px 0;
  overflow: hidden;
  background: #ffffff;
  color: #0b1f35;
}

.gallery-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 74px;
}

.gallery-intro h2 {
  margin: 0;
  max-width: 760px;
  color: #0b1f35;
  font-size: clamp(2.75rem, 5vw, 4.7rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.gallery-intro > p {
  margin: 0 0 7px;
  color: #607286;
  font-size: 1rem;
  line-height: 1.8;
}

.gallery-list {
  display: grid;
  gap: 100px;
}

.gallery-service {
  display: grid;
  grid-template-columns: 0.36fr 0.64fr;
  gap: 58px;
  align-items: center;
}

.gallery-service:nth-child(even) .gallery-service-copy {
  order: 2;
}

.gallery-service:nth-child(even) .photo-carousel {
  order: 1;
}

.gallery-service-copy {
  position: relative;
  padding-left: 25px;
}

.gallery-service-copy::before {
  content: "";
  position: absolute;
  inset: 2px auto 2px 0;
  width: 3px;
  background: #087ccc;
}

.gallery-service-number {
  display: block;
  margin-bottom: 20px;
  color: #087ccc;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.gallery-service-copy h3 {
  margin: 0;
  color: #0b1f35;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.gallery-service-copy p {
  margin: 22px 0 0;
  color: #607286;
  font-size: 0.95rem;
  line-height: 1.8;
}

.gallery-tags {
  margin-top: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-tags span {
  padding: 7px 10px;
  border: 1px solid #d8e1eb;
  color: #435b71;
  background: #f7f9fc;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-carousel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e1eb;
  background: #071727;
  box-shadow: 0 25px 60px rgba(13, 43, 69, 0.16);
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.carousel-track {
  height: 100%;
  display: flex;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.carousel-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #183651, #071727 72%);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(4, 17, 29, 0.45));
}

.carousel-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(7, 23, 39, 0.72);
  color: white;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
}

.carousel-arrow:hover {
  background: #087ccc;
  transform: translateY(-50%) scale(1.06);
}

.carousel-arrow:focus-visible {
  outline: 3px solid #1ba7eb;
  outline-offset: 3px;
}

.carousel-arrow.prev { left: 18px; }
.carousel-arrow.next { right: 18px; }
.carousel-arrow svg { width: 21px; height: 21px; }

.carousel-status {
  min-height: 68px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: white;
}

.carousel-counter {
  min-width: 58px;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.carousel-progress {
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.carousel-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #1ba7eb;
  transition: width 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-label {
  color: #9dcce8;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-grid {
  grid-template-columns: repeat(5, 1fr);
}

.service-card h3 {
  font-size: 1.05rem;
}

@media (max-width: 1050px) {
  .gallery-service {
    grid-template-columns: 0.42fr 0.58fr;
    gap: 38px;
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .gallery-page-section { padding: 90px 0; }
  .gallery-intro { grid-template-columns: 1fr; gap: 24px; margin-bottom: 60px; }
  .gallery-service { grid-template-columns: 1fr; gap: 30px; }
  .gallery-service:nth-child(even) .gallery-service-copy,
  .gallery-service:nth-child(even) .photo-carousel { order: initial; }
  .gallery-list { gap: 78px; }
}

@media (max-width: 640px) {
  .hero-marquee-photo {
    flex-basis: 205px;
    width: 205px;
  }

  .hero-background-tint {
    background: rgba(5, 20, 35, 0.72);
  }

  .gallery-page-section { padding: 78px 0; }
  .gallery-intro h2 { font-size: clamp(2.45rem, 12vw, 3.6rem); }
  .gallery-service-copy { padding-left: 18px; }
  .carousel-viewport { aspect-ratio: 4 / 5; }
  .carousel-arrow { width: 42px; height: 42px; }
  .carousel-arrow.prev { left: 10px; }
  .carousel-arrow.next { right: 10px; }
  .carousel-status { padding: 0 15px; gap: 12px; }
  .carousel-label { display: none; }
  .service-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-track {
    animation-play-state: paused;
  }

  .carousel-track,
  .carousel-progress span { transition: none; }
}

/* ---- WhatsApp (added) ---- */
.utility-phone{display:inline-flex;align-items:center;gap:7px;color:inherit;font-weight:700;text-decoration:none;margin-left:22px}
.utility-phone svg{width:13px;height:13px;color:#25d366}
.utility-phone:hover{text-decoration:underline}
.button-whatsapp{width:100%;margin-bottom:12px;color:#fff;background:#1f9d55;border-color:#1f9d55}
.button-whatsapp:hover{color:#fff;background:#17834a;border-color:#17834a}
.button-whatsapp svg{width:18px;height:18px}
.whatsapp-float{position:fixed;z-index:60;right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));display:inline-flex;align-items:center;gap:9px;padding:13px 18px;border-radius:999px;background:#1f9d55;color:#fff;font-weight:800;font-size:.85rem;letter-spacing:.02em;text-decoration:none;box-shadow:0 10px 28px rgba(9,30,55,.28);transition:transform .2s ease,background .2s ease}
.whatsapp-float svg{width:22px;height:22px}
.whatsapp-float:hover{background:#17834a;transform:translateY(-2px)}
.whatsapp-float:focus-visible,.button-whatsapp:focus-visible,.utility-phone:focus-visible{outline:3px solid #8fd3ff;outline-offset:3px}
@media (max-width:640px){.whatsapp-float{padding:14px}.whatsapp-float span{display:none}.utility-phone{margin-left:14px}}
@media (prefers-reduced-motion:reduce){.whatsapp-float{transition:none}}
.utility-location,.utility-phone{white-space:nowrap}
@media (max-width:640px){.utility-phone .wa-label{display:none}}

/* separación entre botones blancos de contacto */
.button-light + .button-light { margin-top: 10px; }
