/* Las animaciones de entrada no deben ensanchar el documento en celulares. */
html, main { overflow-x: clip; }

/* Mantener las capas y controles de Leaflet dentro del mapa, debajo del header. */
body[data-page="concesionarios"] main {
  isolation: isolate;
}

.leaflet-container {
  isolation: isolate;
  z-index: 0;
}

/* Contactos administrables del footer. */
footer .cms-footer-grid {
  gap: clamp(1.5rem, 3vw, 3rem);
}

.cms-contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-contact-list a,
.cms-contact-list li > span {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,.68);
  text-decoration: none;
  transition: color .25s ease, transform .25s ease;
}

.cms-contact-list a:hover {
  color: #1ef1c6;
  transform: translateX(3px);
}

.cms-contact-list small,
.cms-contact-list b {
  display: block;
  line-height: 1.3;
}

.cms-contact-list small {
  margin-bottom: 3px;
  color: rgba(255,255,255,.32);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cms-contact-list b {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 400;
}

.cms-contact-icon {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(30,241,198,.22);
  color: #1ef1c6;
}

.cms-contact-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* WhatsApp flotante configurable. */
.cms-whatsapp-float {
  position: fixed;
  z-index: 75;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 9px 10px 9px 18px;
  border: 1px solid rgba(37,211,102,.3);
  border-radius: 999px;
  color: #fff;
  background: rgba(7,12,10,.92);
  box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03) inset;
  backdrop-filter: blur(16px);
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px) scale(.96);
  animation: cms-wa-arrive .7s .45s cubic-bezier(.16,1,.3,1) forwards;
}

.cms-whatsapp-float:hover {
  color: #fff;
  border-color: rgba(37,211,102,.75);
  transform: translateY(-3px);
  box-shadow: 0 20px 58px rgba(0,0,0,.55), 0 0 30px rgba(37,211,102,.12);
}

.cms-wa-copy { display: grid; gap: 1px; }
.cms-wa-copy small { color: #25d366; font-size: 8px; letter-spacing: .18em; }
.cms-wa-copy b { max-width: 180px; font-size: 12px; font-weight: 500; line-height: 1.2; }
.cms-wa-icon {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #06170d;
  background: #25d366;
}
.cms-wa-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cms-wa-rings { position: absolute; right: 29px; width: 1px; height: 1px; }
.cms-wa-rings::before,
.cms-wa-rings::after {
  content: "";
  position: absolute;
  inset: -22px;
  border: 1px solid rgba(37,211,102,.35);
  border-radius: 50%;
  animation: cms-wa-ring 2.8s ease-out infinite;
}
.cms-wa-rings::after { animation-delay: 1.4s; }

@keyframes cms-wa-arrive { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes cms-wa-ring { 0% { opacity: .7; transform: scale(.8); } 75%,100% { opacity: 0; transform: scale(1.65); } }

@media (max-width: 1120px) and (min-width: 768px) {
  footer .cms-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1121px) {
  footer .cms-footer-grid { grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(135px, 1fr)); }
}

@media (max-width: 767px) {
  .cms-whatsapp-float { right: 14px; bottom: 14px; min-height: 54px; padding: 7px; }
  .cms-wa-copy { display: none; }
  .cms-wa-icon { width: 40px; height: 40px; }
  .cms-wa-rings { right: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .cms-whatsapp-float { opacity: 1; transform: none; animation: none; }
  .cms-wa-rings { display: none; }
}

/* Acceso telefónico administrable en header y menú móvil. */
.cms-support-link {
  color: #1ef1c6;
  text-decoration: none;
}

.cms-support-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.cms-support-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cms-support-desktop {
  position: absolute;
  z-index: 51;
  right: 1.5rem;
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 0 8px 15px;
  border-left: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .25s ease, transform .25s ease;
}

.cms-support-desktop:hover {
  color: #fff;
  transform: translateY(-1px);
}

.cms-support-mobile-wrap {
  opacity: 0;
  animation: cms-support-mobile-in .45s .18s ease forwards;
}

.cms-support-mobile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(30,241,198,.25);
}

.cms-support-mobile .cms-support-icon {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(30,241,198,.38);
  border-radius: 50%;
  background: rgba(30,241,198,.08);
}

.cms-support-mobile > span:last-child { display: grid; gap: 2px; }
.cms-support-mobile b { font-size: 19px; font-weight: 500; }
.cms-support-mobile small { color: rgba(255,255,255,.45); font-size: 12px; }

@keyframes cms-support-mobile-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .cms-support-desktop { display: flex; }
}

/* En tablets se conserva el menú compacto para evitar superposiciones. */
@media (min-width: 768px) and (max-width: 1023px) {
  nav.fixed .hidden.md\:flex { display: none; }
  nav.fixed [data-testid="button-mobile-menu"] { display: flex; }
  nav.fixed .cms-support-desktop { display: none; }
  .fixed.inset-0.z-40.md\:hidden { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .cms-support-mobile-wrap { opacity: 1; animation: none; }
}
