/* === Estilos de campos de filtro === */

.dist-field-wrapper {
  margin-bottom: 1rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Merriweather Sans", Helvetica, Arial, Lucida, sans-serif;
}

.dist-label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #333;
}

/* Envoltorio para select con flecha */
.dist-select-wrapper {
  position: relative;
  width: 100%;
  display: inline-block;
}

/* Estilo base del select */
.dist-select-wrapper select.dist-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 0.75rem; /* más espacio a la derecha */
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.5;
  height: auto;
  color: #333;
  box-sizing: border-box;
  font-family: "Merriweather Sans", Helvetica, Arial, Lucida, sans-serif;
}

/* La flecha, mejor centrada */
.dist-select-wrapper .dist-select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  pointer-events: none;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #333;
}

.dist-select {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  line-height: 1.4;
  color: #333;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  appearance: none;
  width: 100%;
}

.dist-select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Estilo para las opciones del <select> */
.dist-select-wrapper select.dist-select option {
  display: block;
  padding: 4px 2px;
  min-height: 24px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  line-height: 22.4px;
  color: #000;
  text-align: start;
  box-sizing: content-box;
  user-select: auto;
  white-space-collapse: collapse;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#distribuidores-map {
  padding: 1rem;
  background: #f9f9f9;
  border: 1px solid #ddd;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px
}

#distribuidores-contenedor {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  width:100%
}

#distribuidores-filtros {
  flex: 1 1 280px;
  max-width: 100%;
}



#svg-container {
  flex: 2 1 600px;
  max-width: 100%;
  overflow: hidden;
  max-height: 400px; /* Limita la altura visible */
}

#svg-container svg {
  width: 100%;
  height: auto;
  max-height: 100%; /* Escala el contenido al contenedor */
}

/* Lista de distribuidores */
.distribuidores-lista {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
}

/* Ítem individual */
.distribuidor-item {
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.distribuidor-item:hover {
  box-shadow: 0 6px 12px rgba(0, 75, 149, 0.15);
  transform: translateY(-2px);
}

.distribuidor-item h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: "Merriweather Sans", Helvetica, Arial, sans-serif;
}

.distribuidor-item p {
  margin: 0.3rem 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.7;
  font-family: "Merriweather Sans", Helvetica, Arial, sans-serif;
}

.distribuidor-item a {
  color: #004B95;
  text-decoration: none;
  font-weight: 500;
}

.distribuidor-item a:hover {
  text-decoration: none;
}

/* PAGINACIÓN */
.paginacion-distribuidores {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  font-family: "Merriweather Sans", Helvetica, Arial, sans-serif;
}

.paginacion-distribuidores button {
  padding: 0.5rem 1rem;
  background-color: #004B95;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: "Merriweather Sans", Helvetica, Arial, sans-serif;
}

.paginacion-distribuidores button:hover {
  background-color: #00366e;
}

.paginacion-distribuidores button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

/* Mobile-friendly */
@media (max-width: 600px) {
  .distribuidor-item {
    padding: 1rem;
  }

  .distribuidor-item h3 {
    font-size: 1.1rem;
  }

  .paginacion-distribuidores {
    gap: 0.3rem;
  }

  .paginacion-distribuidores button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}


/* Provincias (paths, polygons, etc) */
svg path,
svg polygon,
svg rect,
svg circle {
  cursor: pointer;
  transition: fill 0.3s ease;
  fill: #ccc; /* color base */
  stroke: #999;
  stroke-width: 1;
}

/* Hover sobre provincias */
svg path:hover,
svg polygon:hover,
svg rect:hover,
svg circle:hover {
  fill: #94ABCE !important;
}

/* Provincia seleccionada */
svg .selected {
  fill: #004B95 !important;
  stroke: #004B95 !important;
  stroke-width: 2 !important;
}

.dist-select:focus {
  background-color: #ffffff;
  border: 1px solid #205493;
  box-shadow: 0 0 0 2px #205493;
  color: #000000;
  outline: 0;
}

 .dist-message {  
  margin: 0.3rem 0;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.7;
  font-family: "Merriweather Sans", Helvetica, Arial, Lucida, sans-serif;
 }

 /* Mostrar en dos columnas a partir de 768px (desktop) */
@media (min-width: 768px) {
  .distribuidores-lista {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .distribuidor-item {
    margin-bottom: 0; /* Eliminás el margin extra si estás usando grid */
  }
}

hr.hr-sutil {
  border: none;
  height: 3px;
  background-color: #004B95;
  width: 60px;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.distribuidor-item-contacto p {
  color: #004B95;
  text-decoration: none;
}

.distribuidor-item-contacto svg.dist-icon path {
  width: 1em;
  height: 1em;
  margin-right: 0.35em;
  color: #004B95 !important; /* Esto funcionará por el fill="currentColor" */
  fill: #004B95 !important; /* Esto funcionará por el fill="currentColor" */
  stroke: #004B95 !important; /* Esto funcionará por el fill="currentColor" */
  display: inline-block;
  
}

.dist-icon {
  width: 1em;
  height: 1em;
  vertical-align: text-top; /* o text-bottom, probá cuál queda mejor */
  margin-right: 0.4em;
  color: #004B95;
  display: inline-block;
  position: relative;
  top: 0.15em; /* ajustá este valor para subir o bajar el icono */
}