/* Estilos de la pagina de Cobertura (cobertura.html).

   Antes estaban repartidos entre un bloque <style> dentro del HTML y
   "contacto.css", un archivo con 91 clases sin nombre (.inline-style-1 ...
   .inline-style-91) generadas al migrar estilos en linea: solo la mitad se
   usaba y mas de veinte de ellas repetian exactamente la misma regla
   (padding: 5px 0; color: #666). Aqui quedan agrupadas y con nombre segun
   lo que hacen. Tipografia y colores siguen el estandar del sitio
   (ver base.css). */


/* ---------------------------- Mapa ---------------------------- */

#map-container {
  position: relative;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: white;
}

#map {
  height: 600px;
  width: 100%;
  z-index: 1;
}

#map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  color: #555;
  z-index: 0;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 400px;
}

.map-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  max-width: 200px;
}

.map-controls h6 {
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}

.progress {
  height: 8px;
  margin-top: 10px;
}


/* --------------------- Listado de cobertura --------------------- */

.coverage-section {
  padding: 60px 0;
  background-color: #f8f9fa;
}

.coverage-table-wrapper {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.coverage-table {
  width: 100%;
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  border-collapse: collapse;
}

.coverage-table thead {
  background-color: #031f89;
  color: #ffffff;
}

.coverage-table th {
  padding: 18px 15px;
  font-weight: 600;
  text-align: center;
}

.coverage-table td {
  padding: 16px 15px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

/* Fila de municipio: se puede desplegar para ver barrios y conjuntos */
.coverage-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.coverage-row:hover {
  background-color: #f0f8ff;
}

.coverage-row td:first-child {
  font-weight: 600;
  color: #031f89;
}

.coverage-arrow {
  display: inline-block;
  margin-right: 10px;
  color: #e43f3f;
  transition: transform 0.3s;
}

.coverage-row.is-open .coverage-arrow {
  transform: rotate(90deg);
}

.coverage-tech {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background-color: #e8f0ff;
  color: #031f89;
  font-size: 14px;
  font-weight: 600;
}

/* Detalle desplegable */
.coverage-detail {
  display: none;
}

.coverage-detail.is-open {
  display: table-row;
}

.coverage-detail > td {
  padding: 0;
  background-color: #f8f9fa;
}

.coverage-detail-inner {
  padding: 30px;
  border-left: 4px solid #e43f3f;
  text-align: left;
}

.coverage-detail-title {
  font-family: 'Jost', sans-serif;
  font-size: 19.2px;
  font-weight: 700;
  color: #031f89;
  margin-bottom: 20px;
}

.coverage-group-title {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #031f89;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 2px solid #e9ecef;
}

/* Una sola regla para todos los barrios y conjuntos: antes cada <li>
   llevaba su propia clase con la misma declaracion repetida. */
.coverage-list {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 16px 18px;
  height: calc(100% - 16px);
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.coverage-list li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  color: #444;
}

.coverage-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #e43f3f;
  font-weight: 700;
}

.coverage-note {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  color: #666;
}

.coverage-note a {
  color: #e43f3f;
  font-weight: 600;
}


/* ----------------- Acciones (instalacion / factura) ----------------- */

.service-actions {
  padding: 60px 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 32px 24px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  text-align: center;
  background: #ffffff;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.service-card:hover {
  border-color: #031f89;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.service-card-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 16px;
}

.service-card-title {
  font-family: 'Jost', sans-serif;
  font-size: 19.2px;
  font-weight: 700;
  color: #031f89;
  margin-bottom: 8px;
}

/* flex-grow mantiene los botones de las dos tarjetas a la misma altura
   aunque una descripcion ocupe mas lineas que la otra. */
.service-card-text {
  flex-grow: 1;
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}


@media (max-width: 768px) {
  #map {
    height: 450px;
  }

  .map-controls {
    top: auto;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    padding: 10px;
    max-width: 160px;
  }

  .coverage-detail-inner {
    padding: 20px 15px;
  }
}
