/* =========================================================
   ESTRALIA · CONVERSION CONTACTO
   Mapa + formulario común para páginas comerciales.
   ========================================================= */

:root {
  --ars-bottom-bg: #666666;
  --ars-form-text: #ffffff;
  --ars-form-muted: rgba(255, 255, 255, 0.82);
  --ars-form-border: rgba(255, 255, 255, 0.25);
  --ars-input-bg: #ffffff;
  --ars-input-text: #111111;
  --ars-accent: var(--estralia-blue, rgb(15, 98, 254));
  --ars-accent-hover: var(--estralia-blue-hover, rgb(10, 78, 210));
  --ars-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  --ars-radius: 12px;
}

/* =========================================================
   BLOQUE GENERAL
   ========================================================= */

.ars-bottom {
  position: relative;
  isolation: isolate;

  width: 100%;
  margin-top: 0;
  padding: 24px 20px 20px;

  background: var(--ars-bottom-bg);
}

.ars-bottom::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 50%;

  width: 100vw;
  transform: translateX(-50%);

  background: var(--ars-bottom-bg);
}

.ars-bottom-grid {
  max-width: 1120px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: minmax(330px, 0.98fr) minmax(330px, 0.9fr);
  gap: clamp(24px, 3.4vw, 42px);
  align-items: start;
}

.ars-coverage-wrap,
.ars-form-wrap {
  min-width: 0;
}

.ars-coverage-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* =========================================================
   TEXTO SUPERIOR DEL MAPA
   ========================================================= */

.ars-coverage-copy {
  max-width: 600px;
  margin: 0 0 12px;

  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.ars-coverage-copy h2 {
  margin: 0 0 6px;

  color: #ffffff;
  text-align: center;
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  line-height: 1.2;
  font-weight: 700;
}

.ars-coverage-copy p {
  margin: 0;

  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 1.35vw, 1.15rem);
  line-height: 1.42;
  font-weight: 500;
}

/* =========================================================
   MAPA · ENFOQUE HOME ACTUAL
   ========================================================= */

.ars-coverage {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--ars-radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--ars-shadow);
}

.ars-map-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--ars-radius);
  background: #f2f2f2;
}

.ars-coverage-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 600;

  padding: 6px 10px;

  border-radius: 10px;
  background: rgba(245, 245, 245, 0.55);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  color: rgba(0, 0, 0, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1px;

  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: none;

  pointer-events: none;
}

#coverageMap {
  height: 390px;
  width: 100%;
  background: #f2f2f2;
}

#coverageMap.leaflet-container {
  height: 390px;
  width: 100%;
  background: #f2f2f2;
}

.leaflet-container {
  font-family: var(--font-main, 'Poppins', Arial, sans-serif);
}

.leaflet-control-attribution {
  font-size: 11px !important;
  opacity: 0.7 !important;
}

.leaflet-control-attribution a {
  text-decoration: none !important;
}

/* Marcadores tipo pulso */
.pulse-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.leaflet-div-icon.pulse-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.pulse {
  position: relative;

  width: 10px;
  height: 10px;

  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.pulse::after {
  content: "";

  position: absolute;
  left: 50%;
  top: 50%;

  width: 10px;
  height: 10px;

  border-radius: 999px;
  transform: translate(-50%, -50%) scale(1);

  border: 2px solid rgba(128, 128, 128, 0.55);

  animation: estraliaPulse 2.2s ease-out infinite;
}

@keyframes estraliaPulse {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.2);
  }
}

/* =========================================================
   FORMULARIO
   ========================================================= */

.ars-form-wrap {
  padding: 0 12px;

  color: var(--ars-form-text);
}

.ars-form-wrap h2,
.ars-form-intro {
  display: none;
}

.ars-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.ars-field {
  grid-column: span 6;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ars-full {
  grid-column: span 12;
}

.ars-field label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.96rem;
}

.ars-field input,
.ars-field select,
.ars-field textarea {
  width: 100%;
  min-height: 42px;

  border: 1px solid var(--ars-form-border);
  border-radius: 6px;

  padding: 9px 12px;

  background: var(--ars-input-bg);
  color: var(--ars-input-text);

  font: inherit;
  font-size: 1rem;
}

.ars-field textarea {
  resize: vertical;
  min-height: 112px;
}

.ars-field input:focus,
.ars-field select:focus,
.ars-field textarea:focus {
  outline: 3px solid rgba(255, 255, 255, 0.18);
  outline-offset: 2px;
}

.ars-privacy {
  margin: 10px 0 4px;
  display: grid;
  gap: 7px;
}

.ars-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;

  color: var(--ars-form-muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

.ars-check input {
  margin-top: 4px;
}

.ars-check a {
  color: #d7e8ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.req {
  color: #ffffff;
  font-weight: 700;
  margin-left: 2px;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.g-recaptcha {
  margin-top: 10px;
  min-height: 0;
}

.g-recaptcha:empty {
  display: none;
}

.ars-submit {
  display: block;

  min-height: 40px;
  margin: 12px auto 0;
  padding: 0 22px;

  border: 1px solid var(--ars-accent);
  border-radius: 6px;

  background: var(--ars-accent);
  color: #ffffff;

  font: inherit;
  font-size: 1rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.ars-submit:hover {
  background: var(--ars-accent-hover);
  border-color: var(--ars-accent-hover);
  transform: translateY(-1px);
}

.ars-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.ars-success {
  text-align: center;
  color: #ffffff;
}

.ars-success h3 {
  margin: 0 0 8px;
  color: #ffffff;
}

.ars-success p {
  margin: 0;
  color: var(--ars-form-muted);
}

.no-break {
  white-space: nowrap;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
  .ars-bottom {
    padding: 24px 16px;
  }

  .ars-bottom-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
  }

  .ars-coverage-copy {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  #coverageMap,
  #coverageMap.leaflet-container {
    height: 390px;
  }

  .ars-form-wrap {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .ars-field {
    grid-column: span 12;
  }

  #coverageMap,
  #coverageMap.leaflet-container {
    height: 330px;
  }

  .ars-coverage-badge {
    top: 10px;
    right: 10px;
  }

  .ars-coverage-copy h2 {
    font-size: clamp(1.55rem, 8vw, 1.95rem);
  }

  .ars-coverage-copy p {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse::after {
    animation: none;
  }

  .ars-submit,
  .pulse::after {
    transition-duration: 0.001ms !important;
  }
}