/* Mejoras visuales sobre el build de Next.js (cargado después del CSS principal). */

:root {
  --y-brand: rgb(32 73 59);
  --y-gold: rgb(201 149 58);
  --y-radius: 1rem;
}

html { scroll-behavior: smooth; }
::selection { background: rgb(32 73 59 / .9); color: #fff; }

/* Titulares más equilibrados */
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Foco visible y accesible en toda la web */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--y-gold);
  outline-offset: 3px;
  border-radius: .5rem;
}

/* ── Tarjetas con imagen (servicios y productos) ─────────────── */
article.has-media { overflow: hidden; }

article.has-media > .card-media {
  position: relative;
  margin: -1.75rem -1.75rem 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgb(234 245 239);
}
article.has-media.p-6 > .card-media { margin: -1.5rem -1.5rem 0; }

article.has-media > .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .7s ease;
}
article.has-media:hover > .card-media img { transform: scale(1.06); }

/* Degradado inferior para dar profundidad a la foto */
article.has-media > .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(17 24 39 / .35), transparent 55%);
  pointer-events: none;
}

/* El icono se superpone a la imagen */
article.has-media > .card-media + div,
article.has-media > .card-media + span {
  position: relative;
  z-index: 1;
  margin-top: -1.6rem;
  background: #fff;
  box-shadow: 0 6px 20px rgb(17 24 39 / .14);
  border: 1px solid rgb(32 73 59 / .08);
}
article.has-media.group:hover > .card-media + div { background: var(--y-brand); }

/* ── Imágenes de secciones: zoom suave al pasar el ratón ─────── */
.overflow-hidden.rounded-2xl > img.object-cover {
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.overflow-hidden.rounded-2xl:hover > img.object-cover { transform: scale(1.03); }

/* Botones con transición coherente */
.btn-green, .btn-gold, .btn-outline-green, .btn-outline-white {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn-green:hover, .btn-gold:hover { transform: translateY(-2px); }

/* Respeta la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-up { opacity: 1 !important; transform: none !important; }
}

/* Campo trampa anti-spam del formulario de contacto */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Zonas de servicio en el pie (SEO local) */
.footer-zones {
  margin-top: .75rem;
  max-width: 24rem;
  font-size: .75rem;
  line-height: 1.6;
  color: rgb(255 255 255 / .45);
}
