/* =========================================================
   HEADER + NAV
   ========================================================= */
.site-header { background: var(--c-green-900); color: var(--c-white); position: relative; z-index: 20; }
.site-header__top {
  height: 114px; display: flex; align-items: center; gap: 18px;
  max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter);
}
.site-header__logo img { width: 207px; height: auto; }
.site-header__home { flex: none; }
.site-header__home img { width: 26px; height: 26px; }
.search { display: flex; flex: 0 1 693px; height: 48px; margin-left: 6px; min-width: 0; }
.search input {
  flex: 1; min-width: 0; border: 0; padding: 0 16px; font: inherit;
  background: #d9d9d9; border-radius: 6px 0 0 6px;
}
.search input { text-overflow: ellipsis; }
.search input::placeholder { color: #5a5a5a; opacity: 1; text-overflow: ellipsis; }
.search button {
  width: 57px; border: 0; background: var(--c-lime-500); border-radius: 0 6px 6px 0;
  display: grid; place-items: center;
}
.search button img { width: 24px; height: 24px; }
.site-header__links { display: flex; align-items: center; gap: 22px; margin-left: 4px; font-size: 14px; white-space: nowrap; }
.site-header__links a { display: inline-flex; align-items: center; gap: 7px; transition: color .15s ease; }
.site-header__links a:hover, .site-header__links a:focus-visible { color: var(--c-lime-500); }
.site-header__links img { width: 16px; height: 18px; object-fit: contain; }

.main-nav { border-top: 1px solid var(--c-lime-500); position: relative; }
.main-nav__list {
  height: 65px; display: flex; align-items: center; gap: 48px;
  max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter);
  padding-left: calc(var(--gutter) + 265px); /* alinea con el buscador (x=392 en 1512) */
}
.main-nav__list a { font-size: 16px; text-transform: uppercase; letter-spacing: -0.01em; }
.main-nav__list a:hover { color: var(--c-lime-500); }
.main-nav__list .has-sub::after { content: "↓"; color: var(--c-lime-500); font-size: 12px; margin-left: 4px; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 2px solid var(--c-lime-500);
  background: transparent; color: var(--c-white); border-radius: 8px; font-size: 22px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; height: 550px; color: var(--c-white); overflow: hidden; background: #2f6a17; }
.hero__viewport { height: 100%; overflow: hidden; }
.hero__track { display: flex; height: 100%; transition: transform .8s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.hero__track.is-snap { transition: none; }
/* Cada slide lleva su propia foto. La imagen del Figma mide 1512×730 y el header cubre sus primeros
   180 px, por eso se ancla abajo. El degradado verde ya viene dentro de la imagen: no se añade capa encima. */
.hero__slide {
  flex: 0 0 100%; min-width: 0; height: 100%;
  background: #2f6a17 url("../assets/img/_temp-figma/hero-bg.jpg?v=2") center bottom / cover no-repeat;
}
/* capa de controles: misma caja que el contenido, para que los puntos se alineen con el texto */
.hero .hero__controls { position: absolute; inset: 0; padding-top: 0; pointer-events: none; z-index: 3; }
.hero .hero__controls .hero__dots { pointer-events: auto; }
.hero .arrow { z-index: 3; }
@media (prefers-reduced-motion: reduce) { .hero__track { transition: none; } }
.hero__inner {
  position: relative; height: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; flex-direction: column; justify-content: center; padding-top: 28px;
}
.hero .btn { align-self: flex-start; }
.hero__brand { width: 172px; margin-bottom: 14px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.hero__title { font-size: 30px; font-weight: 800; letter-spacing: -0.05em; text-transform: uppercase; }
.hero__text { font-size: 26px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.0; max-width: 520px; margin: 4px 0 18px; }
.hero__text strong { font-weight: 700; }
.hero__dots { position: absolute; left: var(--gutter); bottom: 105px; display: flex; gap: 4px; }
.hero__dots button { width: 22px; height: 5px; border: 0; padding: 0; background: rgba(255,255,255,.5); }
.hero__dots button[aria-current="true"] { background: var(--c-white); }
.hero .arrow { color: var(--c-white); }
.hero .arrow--prev { left: 50px; }
.hero .arrow--next { right: 50px; }
.whatsapp {
  position: fixed; right: 20px; bottom: 24px; z-index: 30; width: 64px; height: 64px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
}
.whatsapp img { width: 100%; height: 100%; }

/* =========================================================
   SECCIONES BASE
   ========================================================= */
.section { padding-block: 62px 0; }
.section--tight-top { padding-top: 36px; }

/* ---------- Categorías ---------- */
.cat-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--c-white); border: 2px solid var(--c-card-border); border-radius: var(--radius-card);
  overflow: hidden; height: 297px; position: relative;
  transition: box-shadow .2s, border-color .2s;
}
.cat-card .accent { margin-top: 26px; }
.cat-card h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; color: var(--c-green-700); margin-top: 3px; }
.cat-card__icon { width: 100px; height: 83px; object-fit: contain; margin: 8px 0 2px; }
.cat-card p { font-size: 16px; color: var(--c-text-muted); padding-inline: 20px; line-height: 1.12; }
/* la descripción real de cada sector es más larga que el texto de muestra del diseño: se limita a 3 líneas
   para que todas las tarjetas tengan la misma altura y el botón quede alineado */
.carousel .cat-card p { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.36em; }
.cat-card__cta {
  margin-top: auto; width: 100%; height: 55px; display: flex; align-items: center; justify-content: center; gap: 4px;
  border-top: 2px solid var(--c-card-border); font-weight: 600; font-style: italic;
  letter-spacing: -0.02em; color: var(--c-green-700); background: var(--c-white);
  transition: background-color .2s;
}
.cat-card__cta::after { content: "→"; font-style: normal; font-size: 13px; }
.cat-card:hover, .cat-card:focus-within { box-shadow: var(--shadow-card); border-color: transparent; }
.cat-card:hover .cat-card__cta, .cat-card:focus-within .cat-card__cta { background: var(--c-lime-100); border-top-color: transparent; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 59px; margin-top: 50px; }
.service {
  position: relative; background: var(--c-surface); border-radius: var(--radius-card) var(--radius-card) 0 0;
  min-height: 280px; padding: 38px 40px 40px 73px; overflow: hidden;
}
.service::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--c-lime-500); border-radius: 0 0 4px 4px; }
.service--dark::after { background: var(--c-green-700); }
.service__icon { width: 52px; height: 52px; object-fit: contain; margin-bottom: 14px; }
.service .accent { margin: 0 0 6px; width: 36px; }
.service h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.04em; color: var(--c-green-700); }
.service p { font-size: 16px; color: var(--c-text-muted); line-height: 1.12; margin: 2px 0 8px; max-width: 220px; }
.service p strong { color: #555; }

/* ---------- Productos destacados ---------- */
.product-card {
  background: var(--c-white); border: 2px solid #dedede; border-radius: var(--radius-card);
  display: flex; flex-direction: column; height: 469px; overflow: hidden;
  transition: box-shadow .2s;
}
.product-card:hover { box-shadow: var(--shadow-card); }
.product-card__img { height: 242px; width: 100%; object-fit: cover; object-position: center; }
.product-card__body { padding: 22px 34px 0; }
.product-card .accent { margin-bottom: 3px; }
.product-card .product-card__kicker { font-size: 20px; font-weight: 700; letter-spacing: -0.05em; color: var(--c-green-700); }
.product-card .product-card__name { font-size: clamp(24px, 8vw, 34px); overflow-wrap: anywhere; font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: var(--c-lime-500); margin-bottom: 4px; }
.product-card .product-card__name--dark { color: var(--c-green-700); }
.product-card p { font-size: 16px; line-height: 1.12; color: var(--c-text-muted); margin-bottom: 14px; }
.products-cta { display: flex; justify-content: center; margin-top: 8px; }

/* ---------- Video ---------- */
.video { margin-top: 64px; }
.video__frame { position: relative; display: block; border-radius: 0; overflow: hidden; aspect-ratio: 1262 / 463; background: #222; }
.video__frame img { width: 100%; height: 100%; object-fit: cover; }
.video__frame::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.video__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 92px; height: 92px; border-radius: 50%; background: var(--c-white); border: 0;
  display: grid; place-items: center;
}
.video__play::before { content: ""; border-style: solid; border-width: 17px 0 17px 28px; border-color: transparent transparent transparent #333; margin-left: 6px; }
.video__caption { margin-top: 18px; font-size: 18px; color: var(--c-text-muted); letter-spacing: -0.01em; }

/* ---------- Noticias ---------- */
.news { background: var(--c-surface); margin-top: 64px; padding-block: 90px 56px; }
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-top: 56px; }
.news-card__img { width: 100%; aspect-ratio: 380 / 229; object-fit: cover; }
.news-card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-bottom: 8px; border-bottom: 1px solid #c9c9c9; font-size: 14px; color: var(--c-text-muted); }
.news-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.news-card__meta img { width: 14px; height: 16px; object-fit: contain; }
.news-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; color: var(--c-green-700); margin: 12px 0 14px; min-height: 66px; }
.news-card p { font-size: 16px; line-height: 1.12; color: #444; margin-bottom: 10px; }
.news__cta { display: flex; justify-content: center; margin-top: 50px; }
.news__cta .btn { min-width: 290px; font-weight: 400; }

/* ---------- Partners ---------- */
.partners { padding-top: 90px; }
.partners__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 36px 30px; align-items: center; justify-items: center; margin-top: 34px; }
.partners__grid img { max-width: min(160px, 100%); max-height: 64px; width: auto; height: auto; object-fit: contain; }

/* ---------- Testimonios ---------- */
.testimonials { padding-block: 100px 100px; }
.testimonials__layout { display: flex; align-items: flex-start; gap: 0; position: relative; }
.testimonials__intro { flex: 0 0 267px; }
.testimonials__intro h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.07; text-transform: uppercase; color: var(--c-lime-ink); max-width: 270px; }
.testimonials__intro hr { width: 167px; border: 0; border-top: 1px solid #b5b5b5; margin: 26px 0 14px; }
.testimonials__intro p { font-size: 18px; line-height: 1.12; color: #444; max-width: 215px; }
.testimonials__intro p strong { font-weight: 700; }
.testimonials__stage { position: relative; flex: 1; min-width: 0; padding-left: 92px; padding-right: 80px; }
.testimonials__track { display: flex; gap: 76px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-top: 2px; }
.testimonials__track::-webkit-scrollbar { display: none; }
.testimonial { display: flex; gap: 34px; flex: 0 0 auto; scroll-snap-align: start; }
.testimonial img { width: 90px; height: 90px; border-radius: 50%; flex: none; }
.testimonial__body { width: 215px; }
.testimonial h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.04em; color: var(--c-green-700); }
.testimonial .testimonial__role { max-width: 175px; font-size: 22px; font-weight: 700; letter-spacing: -0.04em; line-height: .95; color: var(--c-lime-ink); margin: 8px 0 12px; }
.testimonial p { font-size: 16px; line-height: 1.12; color: #444; }
.testimonials .arrow { top: 120px; transform: none; color: var(--c-green-700); }
.testimonials .arrow--prev { left: 0; }
.testimonials .arrow--next { right: 18px; }
.testimonials .dots { justify-content: flex-start; margin: 34px 0 0 128px; }
.testimonials .dots button { width: 22px; }

/* ---------- Contacto ---------- */
.contact { background: var(--c-surface-2); padding-block: 162px 152px; }
.contact__layout { display: grid; grid-template-columns: 374px 1fr; gap: 0 0; padding-left: 17px; }
.contact__intro h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.1; text-transform: uppercase; color: var(--c-lime-ink); max-width: 260px; }
.contact__intro hr { width: 167px; border: 0; border-top: 1px solid #b5b5b5; margin: 26px 0 14px; }
.contact__intro p { font-size: 18px; line-height: 1.12; color: #444; max-width: 245px; }
.contact__intro p strong { font-weight: 700; }
.contact__form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; width: min(850px, 100%); }
.contact__form .field--full { grid-column: 1 / -1; }
.contact__foot { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.contact__foot small { align-self: flex-start; font-size: 14px; color: #111; }
.contact__foot .btn { min-width: 290px; }

/* ---------- Redes / social ---------- */
.social { padding-block: 62px 83px; }
.social__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; width: min(1240px, 100%); }
.social-card { position: relative; height: 475px; overflow: hidden; background: #1b1b1b; }
.social-card > img { width: 100%; height: 323px; object-fit: cover; }
.social-card__text {
  position: absolute; left: 0; right: 0; bottom: 0; height: 152px; padding: 38px 42px 0;
  background: rgba(31, 74, 31, .92); color: var(--c-white); font-size: 16px; line-height: 1.12;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--c-footer); color: var(--c-white); padding-block: 80px 70px; }
.site-footer__inner { max-width: calc(var(--container-footer) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.footer-grid { display: grid; grid-template-columns: 394px 290px 271px 1fr; row-gap: 40px; }
.footer-brand img { width: 222px; }
.footer-brand p { margin-top: 28px; font-size: 16px; line-height: 1.25; max-width: 270px; letter-spacing: -0.01em; }
.footer-brand p strong { font-weight: 700; }
.footer-social { display: flex; gap: 17px; margin-top: 22px; align-items: center; }
.footer-social img { height: 24px; width: auto; }
.footer-col h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; text-transform: uppercase; color: #9aa78c; margin: 4px 0 12px; }
.footer-col li { margin-bottom: 8px; font-size: 14px; }
.footer-col a::after { content: " →"; opacity: .75; }
.footer-col a.is-lime { color: var(--c-lime-500); font-weight: 600; }
.footer-col a:hover { color: var(--c-lime-500); }
.footer-col + .footer-col .footer-sub { margin-top: 28px; }
.footer-offices { grid-column: 2 / -1; display: grid; grid-template-columns: 290px 271px 1fr; row-gap: 30px; }
.footer-offices__head { grid-column: 1 / -1; }
.office { font-size: 14px; line-height: 1.2; max-width: 190px; }
.office strong:first-child { color: var(--c-lime-500); }
.footer-bar { background: var(--c-footer-bar); color: var(--c-white); }
.footer-bar__inner { height: 72px; display: flex; align-items: center; justify-content: center; gap: 20px; font-size: 16px; }
.footer-bar__inner a { color: var(--c-lime-500); }
.footer-bar__inner span.sep { width: 1px; height: 18px; background: #888; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1450px) {
  .arrow--prev { left: -12px; }
  .arrow--next { right: -12px; }
  .hero .arrow--prev { left: 14px; }
  .hero .arrow--next { right: 14px; }
}
@media (max-width: 1360px) {
  .whatsapp { right: 14px; bottom: 16px; width: 52px; height: 52px; }
  .main-nav__list { padding-left: var(--gutter); }
}

@media (max-width: 1100px) {
  .carousel__track { grid-auto-columns: calc((100% - 23px) / 2); }
  .services, .news__grid, .social__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .partners__grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-offices { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .testimonials__layout { flex-direction: column; gap: 40px; }
  .testimonials__intro { flex-basis: auto; }
  .testimonials__stage { padding-inline: 50px; width: 100%; }
  .testimonials .arrow--prev { left: 0; }
  .contact__layout { grid-template-columns: 1fr; gap: 40px; padding-left: 0; }
}

@media (max-width: 900px) {
  .site-header__top { height: auto; flex-wrap: wrap; padding-block: 14px; gap: 12px; }
  .site-header__home { display: none; }
  .nav-toggle { display: block; }
  .search { order: 5; flex: 1 1 100%; margin: 0; }
  .site-header__links { order: 4; width: 100%; justify-content: space-between; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav__list { height: auto; flex-direction: column; align-items: flex-start; gap: 0; padding-block: 8px; }
  .main-nav__list li { width: 100%; border-bottom: 1px solid rgba(255,255,255,.12); }
  .main-nav__list a { display: block; padding: 14px 0; }
  .hero { height: 460px; }
  .hero__title { font-size: 24px; }
  .hero__text { font-size: 20px; max-width: 70%; }
  .hero__brand { width: 130px; }
  .hero__dots { bottom: 60px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section-head__title { white-space: normal; font-size: 22px; }
  .contact__foot .btn { min-width: 0; max-width: 100%; width: 100%; }
  .section-head__line { display: none; }
  .section-head__sub { font-size: 16px; }
  .carousel__track { grid-auto-columns: 86%; }
  .arrow { display: none; }
  .services, .news__grid, .social__grid, .contact__form { grid-template-columns: 1fr; }
  .partners__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid, .footer-offices { grid-template-columns: 1fr; }
  .testimonial { flex-direction: column; }
  .testimonials__stage { padding-inline: 0; }
  .testimonials .dots { margin-left: 0; }
  .service { padding-inline: 32px; }
  .btn { min-width: 0; width: 100%; }
  .video__play { width: 64px; height: 64px; }
  .footer-bar__inner { flex-direction: column; height: auto; padding-block: 16px; gap: 8px; text-align: center; }
  .footer-bar__inner span.sep { display: none; }
  .hero { height: 520px; }
  .hero__text { max-width: 100%; }
}

/* ---------------------------------------------------------------- mega-menú de Productos
   Única vía a las categorías que ningún sector enlaza (24 de 48 quedan fuera de los
   sectores). En escritorio se abre al pasar el cursor o al tabular; en móvil el menú
   ya es vertical, así que se muestra siempre dentro del desplegable. */
.main-nav__list .has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-green-900);
  border-top: 1px solid var(--c-lime-500);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  padding: 26px 0 30px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 60;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega__inner {
  /* los 7 sectores en una sola fila: en dos filas el panel medía 910px de alto */
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 22px 18px; align-items: start;
}
.mega__head {
  display: block; font-weight: 700; font-size: 15px; text-transform: uppercase;
  color: var(--c-lime-500); padding-bottom: 7px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(136,189,35,.3);
}
.mega__col ul { list-style: none; margin: 0; padding: 0; }
.mega__col li + li { margin-top: 3px; }
.mega__col ul a {
  font-size: 13.5px; text-transform: none; letter-spacing: 0;
  color: rgba(255,255,255,.82); line-height: 1.3; display: block; padding: 2px 0;
}
.mega__col ul a:hover { color: var(--c-lime-500); }

@media (max-width: 1280px) { .mega__inner { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .mega__inner { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  /* el menú ya está desplegado en vertical: el mega pasa a ser una sección más */
  .mega {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: 0; padding: 4px 0 14px;
  }
  .mega__inner { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0; }
  .mega__head { font-size: 13px; }
  .mega__col ul a { font-size: 13px; }
}
@media (max-width: 560px) { .mega__inner { grid-template-columns: 1fr; } }

/* =========================================================
   MENÚ DESPLEGABLE (Nosotros, Servicios): reutiliza las columnas del mega-menú de Productos.
   Panel a ancho completo; el contenido se alinea con su elemento principal (main.js fija --drop-x).
   En móvil se muestra dentro del menú vertical.
   ========================================================= */
.main-nav__list .has-drop { position: static; }
.mega--drop { left: 0; right: 0; width: auto; padding: 26px 0 30px; border-radius: 0; }
.has-drop:hover .mega--drop, .has-drop:focus-within .mega--drop { opacity: 1; visibility: visible; transform: none; }
.mega--drop .mega__inner { grid-template-columns: repeat(var(--cols, 2), 275px); gap: 0 34px; padding: 0; width: fit-content; max-width: 100%; margin-inline: 0; margin-left: var(--drop-x, 0px); justify-content: start; }
.mega--drop .mega__col ul a { font-size: 15px; padding: 5px 0; }
.mega--drop .mega__col ul a.is-soon::after { content: "Próximamente"; margin-left: 8px; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--c-lime-500); border: 1px solid rgba(136, 189, 35, .45); border-radius: 20px; padding: 1px 7px; vertical-align: 1px; }
@media (max-width: 900px) {
  .mega--drop { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: 0; border-radius: 0; padding: 4px 0 14px; }
  .mega--drop .mega__inner { grid-template-columns: 1fr; gap: 14px; width: auto; margin: 0; }
}

/* =========================================================
   MODAL «BUSCAR AGENCIA» (ag-*): pestañas por ciudad con dirección, contacto y mapa.
   Se genera en tools/agencias.py; lo abre [data-agencias-open] (js/main.js).
   Compacto a propósito: cabecera + pestañas + panel deben caber en una pantalla de ~650 px sin scroll.
   ========================================================= */
.ag-modal { width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--c-white); color: var(--c-green-900); box-shadow: 0 30px 80px rgba(0, 20, 5, .45); }
.ag-modal::backdrop { background: rgba(0, 20, 5, .72); }
.ag-box { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.ag-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 28px 14px; background: var(--c-green-900); color: var(--c-white); border-bottom: 3px solid var(--c-lime-500); }
.ag-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.ag-head p { margin-top: 3px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.ag-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--c-lime-500); color: var(--c-green-900); font-size: 24px; line-height: 1; font-weight: 700; cursor: pointer; }
.ag-close:hover { background: var(--c-white); }
.ag-tabs { display: flex; gap: 8px; padding: 12px 28px; overflow-x: auto; border-bottom: 1px solid var(--c-card-border); scrollbar-width: thin; flex: none; }
.ag-tab { flex: none; appearance: none; border: 1px solid var(--c-card-border); background: var(--c-white); color: var(--c-green-700); border-radius: 999px; padding: 6px 16px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.ag-tab:hover { border-color: var(--c-lime-500); }
.ag-tab[aria-selected="true"] { background: var(--c-green-700); border-color: var(--c-green-700); color: var(--c-white); }
.ag-panels { overflow-y: auto; min-height: 0; }
.ag-panel { display: grid; grid-template-columns: minmax(300px, 410px) minmax(0, 1fr); }
.ag-panel[hidden] { display: none; }
.ag-info { display: grid; gap: 14px; align-content: start; padding: 20px 28px 24px; }
.ag-city { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--c-green-700); }
.ag-city::before { content: ""; display: block; width: 40px; height: 4px; margin-bottom: 8px; background: var(--c-lime-500); }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ag-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.3; }
.ag-ico { flex: none; margin-top: 1px; color: var(--c-lime-500); }
.ag-list a, .ag-area a { color: var(--c-green-700); font-weight: 600; overflow-wrap: anywhere; }
.ag-list a:hover, .ag-area a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ag-areas { display: grid; gap: 8px; }
.ag-area { display: grid; gap: 3px; padding: 9px 14px; border: 1px solid var(--c-card-border); border-radius: 12px; font-size: 14px; }
.ag-area h4 { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-green-900); }
.ag-area__sub { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--c-text-muted); }
.ag-area__row { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.ag-go { justify-self: start; min-height: 0; padding-block: 11px; }
.ag-map { min-height: 300px; background: #e9ede6; }
.ag-map iframe { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; }
@media (max-width: 860px) {
  .ag-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  .ag-box { max-height: calc(100dvh - 16px); }
  .ag-head { padding: 14px 18px 12px; }
  .ag-head h2 { font-size: 21px; }
  .ag-head p { display: none; }
  .ag-tabs { padding: 10px 18px; }
  .ag-panel { grid-template-columns: minmax(0, 1fr); }
  .ag-info { padding: 18px 18px 20px; }
  .ag-map, .ag-map iframe { min-height: 180px; }
  .ag-tab { padding: 10px 16px; }
  .ag-close { width: 44px; height: 44px; }
}
@media (max-width: 860px) and (max-height: 760px) {
  .ag-head { padding-block: 10px 8px; }
  .ag-tabs { padding-block: 8px; }
  .ag-info { gap: 8px; padding: 12px 18px 14px; }
  .ag-city { font-size: 21px; }
  .ag-city::before { margin-bottom: 4px; }
  .ag-list { gap: 6px; }
  .ag-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ag-area { padding: 6px 10px; font-size: 13px; }
  .ag-area h4 { font-size: 11.5px; letter-spacing: .03em; }
  .ag-area__row { flex-direction: column; gap: 1px; }
  .ag-map, .ag-map iframe { min-height: 100px; }
}

/* =========================================================
   AJUSTES DE QA RESPONSIVE (24-nov-2026)
   ========================================================= */
/* mega-menús de escritorio: nunca más altos que la pantalla (el de Productos medía 1091 px a 1280x800) */
@media (min-width: 901px) {
  .mega { max-height: calc(100dvh - 190px); overflow-y: auto; overscroll-behavior: contain; }
}
.sub-toggle { display: none; }
@media (max-width: 900px) {
  /* zonas táctiles de al menos 44 px */
  .site-header__links a { min-height: 44px; }
  .footer-col li { margin-bottom: 0; }
  .footer-col a, .office a, .footer-bar__inner a { display: inline-flex; align-items: center; min-height: 44px; }
  .link-more { min-height: 44px; }
  .mega__col ul a, .mega--drop .mega__col ul a { padding: 11px 0; }
  /* acordeón: los submenús del menú móvil van plegados y se abren con el botón ▾ (js/main.js) */
  .main-nav__list li.has-mega { position: relative; }
  .main-nav__list .has-mega > .has-sub { padding-right: 52px; }
  .main-nav__list .has-mega > .has-sub::after { display: none; }
  .sub-toggle { display: grid; place-items: center; position: absolute; right: 0; top: 0; width: 48px; height: 48px; border: 0; background: transparent; color: var(--c-lime-500); font-size: 20px; cursor: pointer; }
  .sub-toggle span { transition: transform .15s ease; }
  .has-mega.is-open > .sub-toggle span { transform: rotate(180deg); }
  .js .main-nav__list .has-mega > .mega { display: none; }
  .js .main-nav__list .has-mega.is-open > .mega { display: block; }
}

/* ---------- mejoras de QA, 2.ª pasada ---------- */
.col-toggle { display: none; }
@media (max-width: 900px) {
  /* Productos: cada sector es un acordeón (botón ▾ junto al título) para que el menú abierto no mida miles de píxeles */
  #mega-productos .mega__col { position: relative; }
  #mega-productos .mega__head { padding: 12px 52px 12px 0; margin-bottom: 0; min-height: 44px; display: flex; align-items: center; }
  .col-toggle { display: grid; place-items: center; position: absolute; right: 0; top: 0; width: 48px; height: 44px; border: 0; background: transparent; color: var(--c-lime-500); font-size: 18px; cursor: pointer; }
  .col-toggle span { transition: transform .15s ease; }
  .mega__col.is-open > .col-toggle span { transform: rotate(180deg); }
  .js #mega-productos .mega__col:not(.is-open) > ul { display: none; }
  .js #mega-productos .mega__col.is-open > ul { padding-bottom: 8px; }
}
/* WhatsApp: se aparta mientras un botón de envío de formulario está a la vista (no lo tapa) */
.whatsapp { transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.whatsapp.is-away { opacity: 0; transform: translateY(10px); visibility: hidden; pointer-events: none; }

/* mega de Productos: «Ver más productos» (sexta línea de cada columna) */
.mega__col ul a.mega__more { color: var(--c-lime-500); font-weight: 700; }
.mega__col ul a.mega__more::after { content: " →"; }
.mega__col ul a.mega__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- pie en móvil: Nosotros, Servicios, Productos y Contactos como acordeón (js/main.js) ---------- */
@media (max-width: 640px) {
  .footer-grid { row-gap: 0; }
  .footer-brand { padding-bottom: 28px; }
  nav.footer-col.f-acc, .footer-offices.f-acc { border-top: 1px solid rgba(255, 255, 255, .16); }
  .footer-grid > .footer-offices.f-acc { border-bottom: 1px solid rgba(255, 255, 255, .16); }
  .f-acc h4 { margin: 0; }
  .f-acc__btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: pointer; }
  .f-acc__btn::after { content: "▾"; font-size: 18px; color: var(--c-lime-500); transition: transform .15s ease; }
  .f-acc.is-open .f-acc__btn::after { transform: rotate(180deg); }
  .f-acc__btn:focus-visible { outline: 2px solid var(--c-lime-500); outline-offset: 2px; }
  .js nav.footer-col.f-acc:not(.is-open) > :not(h4),
  .js .footer-offices.f-acc:not(.is-open) > .office,
  .js .footer-offices.f-acc:not(.is-open) .footer-offices__head ul { display: none; }
  .js nav.footer-col.f-acc.is-open { padding-bottom: 14px; }
  .js .footer-offices.f-acc.is-open { padding-bottom: 14px; row-gap: 18px; }
  .js .footer-offices.f-acc.is-open .footer-offices__head { margin-bottom: -6px; }
}
