/* ==========================================================================
   CUMMOTORS — shape.css (v2)
   Forma Cummins.com. Aplica a: hero, contacto, imagen de "respaldo" y modal.
   NO aplica a: mapa ni tarjetas de sucursales.
   La forma exacta (vértice redondeado arriba-izq, puntas abajo-der) la dibuja
   assets/js/shape.js; este CSS es el fallback si el JS no carga.
   Cargar DESPUÉS de premium.css.
   ========================================================================== */
:root {
  /* medidas de Cummins.com (tarjeta 716x566) - fallback sin JS */
  --shape-k: 1;
  --shape-r: calc(48px * var(--shape-k));
  --shape-tlx: calc(96px * var(--shape-k));
  --shape-tly: calc(72px * var(--shape-k));
  --shape-brx: calc(136px * var(--shape-k));
  --shape-bry: calc(96px * var(--shape-k));
}

.hero__frame,
.contact__box,
.about__img,
.wa-modal__panel {
  border-radius: 0 var(--shape-r) 0 var(--shape-r);
  clip-path: polygon(
    var(--shape-tlx) 0, 100% 0,
    100% calc(100% - var(--shape-bry)), calc(100% - var(--shape-brx)) 100%,
    0 100%, 0 var(--shape-tly)
  );
  box-shadow: none !important;
  overflow: hidden;
}

/* ---------- HERO: tarjeta blanca, como Cummins.com ---------- */
.hero__inner {
  display: flex !important;
  align-items: center;
  min-height: 100%;
}
.hero__frame {
  background: #fff !important;
  max-width: min(720px, 100%);
  padding: clamp(28px, 4.5vw, 64px) !important;
  margin-inline: 0;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
}
.hero__frame .eyebrow { color: var(--c-red, #DA291C) !important; }
.hero__frame .display,
.hero__frame h1 { color: #111 !important; text-shadow: none !important; }
.hero__frame .hero__sub { color: #111 !important; font-weight: 600; }
.hero__frame .hero__desc { color: #4a4a4a !important; }
.hero__frame .btn--ghost {
  color: #111 !important;
  border-color: #111 !important;
  background: transparent !important;
}
.hero__frame .btn--ghost:hover { background: #111 !important; color: #fff !important; }

@media (max-width: 640px) {
  :root { --shape-k: .5; }
  .hero__frame { padding: 26px 22px !important; }
  .hero__actions { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   FIX MOBILE: evita el "zoom"/desfasaje al hacer scroll
   (causa típica: algún elemento más ancho que la pantalla -> el navegador
   achica/agranda la página y se corre todo)
   ========================================================================== */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
main, .hero, .section, .site-footer { max-width: 100vw; overflow-x: clip; }
img, svg, video { max-width: 100%; }

@media (max-width: 900px) {
  /* Animaciones de entrada solo vertical (sin desplazamiento lateral) */
  .reveal { transform: translate3d(0, 22px, 0) !important; }
  .reveal.in { transform: none !important; }
  /* Sin parallax en celular */
  .hero__bg { transform: none !important; }
  .hero__bg img, .hero__art { max-width: none; }
  .map-box, #map { max-width: 100%; touch-action: pan-y; }
}

/* Refuerzo mobile: la grilla y las fotos de sucursales nunca pueden ser más
   anchas que la pantalla (si una foto/columna desborda, iOS achica la página
   y los fondos quedan a medias, como en la captura). */
.branch-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.branch, .branch__body, .branch__photo, .section .container { min-width: 0; max-width: 100%; }
.branch__photo img { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   ALINEACIÓN: todo el contenido sigue el mismo ancho que el logo y el menú
   (desktop). En mobile/tablet no cambia nada.
   Para ajustar el ancho general: --wrap-max y --wrap-pad
   ========================================================================== */
:root { --wrap-max: 1200px; --wrap-pad: 20px; }
@media (min-width: 1025px) {
  .container,
  .hero__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--wrap-max) !important;
    margin-inline: auto !important;
    padding-inline: var(--wrap-pad) !important;
  }
  .hero__frame { margin-inline: 0 !important; }
}

/* ==========================================================================
   LOGO: más grande en el header + adaptado al footer
   Ajustá los tamaños con --logo-h (header) y --logo-h-foot (footer)
   ========================================================================== */
:root { --logo-h: 78px; --logo-h-scrolled: 62px; --logo-h-foot: 72px; }

.site-header .brand img {
  height: var(--logo-h) !important;
  width: auto !important;
  max-width: none;
  transition: height .25s ease;
}
.site-header .header-inner { min-height: calc(var(--logo-h) + 24px); height: auto !important; }
.site-header.is-scrolled .brand img { height: var(--logo-h-scrolled) !important; }
.site-header.is-scrolled .header-inner { min-height: calc(var(--logo-h-scrolled) + 20px); }

/* Footer: el logo es de fondo claro, así que va sobre una placa blanca con
   la forma de la marca. (Si cargás `logoLight` en config.js, la placa se
   quita sola y se usa esa versión.) */
.site-footer .brand img {
  height: var(--logo-h-foot) !important;
  width: auto !important;
  max-width: 100%;
  display: block;
}
.site-footer .brand:not(.brand--light) {
  display: inline-block;
  background: #fff;
  padding: 14px 22px;
  border-radius: 0 18px 0 18px;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
}

@media (max-width: 640px) {
  :root { --logo-h: 70px; --logo-h-scrolled: 62px; --logo-h-foot: 88px; }
  .site-header .header-inner { min-height: calc(var(--logo-h) + 16px); }
  .site-header.is-scrolled .header-inner { min-height: calc(var(--logo-h-scrolled) + 14px); }
  .site-footer .brand:not(.brand--light) { padding: 12px 16px; }
}

/* ==========================================================================
   FIX FOOTER LOGO: el footer original aplicaba un filtro que volvía el logo
   blanco (invisible sobre la placa blanca) y la placa se estiraba a todo el
   ancho de la columna. Se anula el filtro y la placa se ajusta al logo.
   ========================================================================== */
.site-footer .brand,
.site-footer .footer-brand > .brand {
  display: inline-flex !important;
  align-items: center;
  align-self: flex-start;
  width: fit-content !important;
  max-width: 100%;
  height: auto !important;
  filter: none !important;
}
.site-footer .brand img {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  height: var(--logo-h-foot) !important;
  width: auto !important;
}
.site-footer .brand .wordmark { filter: none !important; }

/* ==========================================================================
   FOOTER: logo en BLANCO sobre fondo negro (sin placa)
   ========================================================================== */
.site-footer .brand,
.site-footer .brand:not(.brand--light) {
  background: none !important;
  clip-path: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.site-footer .brand img {
  filter: brightness(0) invert(1) !important;   /* todo el logo en blanco */
}
