:root {
  --accent: #facc15;
  --bg: #0d0d0d;
  --fg: #ffffff;
  --soft: #999;
  --panel: #1a1a1a;
  --error: #ff4d4d;
  --hover: #2a2a2a;
  --tracking-bg: #ffffff;
  --tracking-overlay: rgba(200, 200, 200, 0.8);
  --tracking-close: #333333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at top left, rgba(255, 255, 255, 0.015), transparent 70%);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
}

header {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #1c1c1c;
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo-img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  display: none;
  font-size: 1.5rem;
}

nav {
  display: flex;
  gap: 2rem;
}

.menu-item a {
  color: var(--fg);
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.menu-item a:hover {
  color: var(--accent);
}

.background-modern {
  align-items: center;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 2rem;
  text-align: center;
}

.background-modern h1 {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.btn {
  background-color: var(--accent);
  border: none;
  border-radius: 30px;
  color: #000;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0;
  padding: 0.96rem 2.4rem;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #ffe956;
  transform: scale(1.04);
}

.btn-back {
  background: none;
  border: none;
  color: var(--soft);
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-decoration: underline;
}

.calculadora-section {
  align-items: center;
  border-top: 1px solid #1c1c1c;
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
  padding: 2rem 2rem 5rem;
  text-align: center;
}

.calculadora-section h2 {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

footer {
  background-color: #0d0d0d;
  color: #666;
  font-size: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

.campo {
  appearance: none;
  -webkit-appearance: none;
  background-color: #111;
  border: none;
  border-radius: 10px;
  color: var(--fg);
  font-size: 1rem;
  padding: 0.8rem;
  transition: all 0.3s ease;
  width: 100%;
}

.campo:focus {
  background-color: var(--hover);
  border: 2px solid var(--accent);
  outline: none;
}

select.campo option {
  background: var(--panel);
  color: var(--soft);
}

select.campo:valid {
  color: var(--fg);
}

#direccion {
  color: var(--fg) !important;
}

.error {
  color: var(--error);
  display: block;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  text-align: left;
}

.modal-hidden {
  display: none !important;
}

#popupRegistro > div, #confirmacionModal > div, #preguntaInicial > div, #responsableModal > div, #exitoRegistro > div, #loadingModal, #calculadoraPopup > div, #comoFuncionaPaso1 > div, #comoFuncionaPaso2 > div, #comoFuncionaPaso3 > div, #tarifasModal > div, #errorModal > div {
  animation: fadeInUp 0.4s ease;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: var(--fg);
  max-height: 90vh;
  max-width: 600px;
  overflow-y: auto;
  padding: 2.5rem 2rem;
  position: relative;
  transition: all 0.4s ease;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

#popupRegistro, #confirmacionModal, #preguntaInicial, #responsableModal, #exitoRegistro, #loadingModal, #calculadoraPopup, #comoFuncionaPaso1, #comoFuncionaPaso2, #comoFuncionaPaso3, #tarifasModal, #errorModal {
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  height: 100vh;
  justify-content: center;
  left: 0;
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 1000;
}

#trackingModal {
  align-items: center;
  background: var(--tracking-overlay);
  display: flex;
  height: 100vh;
  justify-content: center;
  left: 0;
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 1000;
}

#trackingModal > div {
  animation: fadeInUp 0.4s ease;
  background: var(--tracking-bg);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  max-width: 600px;
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: all 0.4s ease;
  width: 100%;
}

#preguntaInicial > div h2 {
  font-size: 1.8rem;
}

.data-review {
  margin-bottom: 1.5rem;
}

.data-review h3.section-title {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.data-item {
  align-items: baseline;
  display: flex;
  font-size: 1rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.data-item strong {
  display: inline-block;
  font-weight: 600;
  width: 180px;
}

.data-item span {
  flex: 1;
  text-align: right;
}

#opcionalContainer button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
  text-align: left;
}

#telefonoOpcional {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#telefonoOpcional button {
  background: none;
  border: none;
  color: var(--soft);
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-group {
  align-items: flex-start;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.checkbox-group label {
  line-height: 1.2;
  margin: 0;
}

.checkbox-group input[type="checkbox"] {
  margin: 0;
  min-height: 16px;
  min-width: 16px;
}

#botonEnviar, #botonConfirmar {
  background-color: var(--accent);
  border: none;
  border-radius: 30px;
  color: #000;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  transition: all 0.3s ease;
}

#botonEnviar:disabled, #botonConfirmar:disabled {
  background-color: #444;
  color: #aaa;
  cursor: not-allowed;
}

#botonEnviar:hover:not(:disabled), #botonConfirmar:hover:not(:disabled) {
  background-color: #ffe956;
  transform: scale(1.04);
}

.close-btn {
  background: none;
  border: none;
  color: var(--soft);
  cursor: pointer;
  font-size: 1.5rem;
  position: absolute;
  right: 15px;
  top: 10px;
}

#trackingModal .close-btn {
  color: var(--tracking-close);
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  text-align: left;
}

input, select {
  background: #111;
  border: none;
  border-radius: 10px;
  color: var(--fg);
  font-size: 1rem;
  padding: 0.8rem;
  width: 100%;
}

input:invalid, select:invalid {
  border: 2px solid var(--error);
}

select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23fff" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-position: right 12px center;
  background-repeat: no-repeat;
  -moz-appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  .menu-toggle {
    display: block;
  }
  nav {
    background: var(--panel);
    border-radius: 0 0 0 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    padding: 1rem;
    position: absolute;
    right: 0;
    top: 60px;
    transition: transform 0.3s ease;
    width: 80vw;
    max-width: 300px;
  }
  nav.active {
    display: flex;
  }
  .menu-item {
    margin-bottom: 1rem;
  }
  .background-modern h1, .calculadora-section h2 {
    font-size: 2.5rem;
  }
  .btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
  }
  #popupRegistro > div, #confirmacionModal > div, #preguntaInicial > div, #responsableModal > div, #exitoRegistro > div, #calculadoraPopup > div, #comoFuncionaPaso1 > div, #comoFuncionaPaso2 > div, #comoFuncionaPaso3 > div, #tarifasModal > div, #errorModal > div {
    max-height: 80vh;
    padding: 2rem 1.5rem;
  }
  .data-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .data-item strong {
    margin-bottom: 0.2rem;
    width: auto;
  }
  .data-item span {
    text-align: left;
  }
  .example-section ul {
    padding-left: 0;
  }
  .contacto-section h2 {
    font-size: 2.5rem;
  }
  .office {
    padding: 1rem;
  }
  .logo-img, .modal-logo {
    height: 60px;
    max-height: 60px;
  }
}

#exitoRegistro > div {
  max-width: 700px;
}

#exitoRegistro h2 {
  margin-bottom: 1rem;
}

#exitoRegistro p {
  margin-bottom: 1rem;
}

.example-section {
  margin-top: 2rem;
}

.example-section h3.section-title {
  color: var(--accent);
}

.example-section p {
  margin-bottom: 0.5rem;
}

.example-section ul {
  list-style: none;
  padding: 0;
}

.example-section li {
  margin-bottom: 0.5rem;
}

#webhookResponse {
  background: #222;
  border-radius: 10px;
  margin-top: 1rem;
  padding: 1rem;
}

.codigo-highlight {
  background-color: rgba(var(--accent), 0.1);
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(var(--accent), 0.3);
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0;
  padding: 0.5rem;
  text-align: center;
}

.copy-highlight {
  color: var(--accent);
  font-weight: bold;
}

.loader {
  animation: spin 1s linear infinite;
  border: 4px solid var(--soft);
  border-radius: 50%;
  border-top: 4px solid var(--accent);
  height: 40px;
  width: 40px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-container {
  background: #222;
  border-radius: 10px;
  height: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  width: 100%;
}

.progress-bar {
  background: var(--accent);
  border-radius: 10px;
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  color: var(--soft);
  font-size: 0.8rem;
  position: absolute;
  right: 0;
  top: -1.5rem;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.btn-option {
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: 30px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem;
  padding: 0.8rem 1.5rem;
  transition: background 0.2s;
}

.btn-option:hover {
  background: var(--accent);
  color: #000;
}

#resultado div {
  color: var(--accent);
  font-weight: 600;
  margin-top: 1rem;
  text-align: left;
}

#resultado small {
  color: var(--soft);
  display: block;
  margin-top: 0.5rem;
  text-align: left;
}

.cost {
  color: var(--fg);
  font-size: 1.2em;
  font-weight: bold;
}

.disclaimer {
  color: var(--soft);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 1rem;
  text-align: center;
}

.disclaimer a {
  color: var(--accent);
  text-decoration: none;
}

.disclaimer a:hover {
  text-decoration: underline;
}

#noDisponible {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 1rem;
}

#resultadoTarifa {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

#resultadoTarifa p {
  margin: 0.5rem 0;
}

#resultadoTarifa .note {
  color: var(--soft);
  font-size: 0.9rem;
  font-style: italic;
}

.flex-center {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-around;
}

.phone-prefix {
  color: var(--soft);
  font-size: 1rem;
}

.phone-code {
  width: 80px;
}

.phone-number {
  flex: 1;
}

.unit-select {
  appearance: none;
  background: #111;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23fff" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 12px;
  border-radius: 10px;
  color: var(--fg);
  min-width: 120px;
  padding: 0.5rem;
  width: auto;
}

.tooltip {
  color: var(--soft);
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.3rem;
}

#resultado .alternar-btn {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

#resultado .alternar-btn:hover {
  background: var(--accent);
  color: #000;
}

.tracking-modal-content {
  background: var(--tracking-bg);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.tracking-iframe {
  border: none;
  height: 100%;
  width: 100%;
}

.modal-logo {
  display: block;
  height: auto;
  margin: 0 auto 1.5rem;
  max-height: 140px;
  max-width: 80%;
  width: auto;
  object-fit: contain;
}

.contacto-section {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 4rem 2rem;
  text-align: center;
}

.contacto-section h2 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.office {
  background: var(--panel);
  border-radius: 15px;
  margin-bottom: 2rem;
  padding: 1.5rem;
  text-align: left;
  width: 100%;
  max-width: 600px;
}

.office h3 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.office p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.office .btn {
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .logo-img, .modal-logo {
    height: 80px;
    max-height: 80px;
  }
}
/* Estilos del botón WhatsApp */
.whatsapp-button {
  padding: 0.75rem 1.5rem;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: #333333;
  font-size: 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: inline-block; /* Para centrarlo correctamente */
}

.whatsapp-button:hover {
  background-color: #25D366;
  color: #ffffff;
  border-color: #25D366;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsividad */
@media (max-width: 600px) {
  .whatsapp-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}
.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  margin-bottom: 1.5em;
}
.footer-logo-img {
  height: 48px;
  transition: transform 0.2s;
}
.footer-logo-img:hover {
  transform: scale(1.1);
  cursor: pointer;
}
