/* Layout general */
.row {
  display: flex;
  flex-wrap: wrap;
}
.col-md-6 {
  width: 50%;
  box-sizing: border-box;
}
#main_container_2 {
  padding: 18% 2% 2% 2%;
}

/* Mobile styles */
@media (max-width: 768px) {
  .row {
    flex-direction: column; /* Stack the main columns */
  }
  .col-md-6 {
    width: 100%; /* Main columns take full width */
    max-width: 100%; /* Ensure no max-width limits */
    flex: 0 0 100%; /* Allow full width on mobile */
  }
  .state-btn-row {
    flex-direction: row; /* Keep state buttons in a row */
    flex-wrap: wrap;
    justify-content: space-between; /* Distribute space between buttons */
    align-items: flex-start;
  }
  .state-col {
    width: 48%; /* Two state columns per row */
    margin-bottom: 10px; /* Maintain spacing */
  }
  .state-btn {
    width: 100%; /* Button takes full width of its column */
  }
  .sucursales-list {
    flex-basis: 100%; /* List takes full width below the two state columns */
  }
  .sucursales-list li {
    width: 100%; /* Make list items take full width on mobile */
  }
  #top-image {
    width: 80%; /* Make the logo larger on mobile */
    margin: 0 auto 30px auto; /* Center the image and maintain bottom margin */
    display: block; /* Ensure margin auto works */
  }
}
/* Contenedor general de los estados */
.state-btn-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

/* Cada fila agrupa dos estados y dos listas */
.state-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 15px;
}

/* Cada estado en la parte de arriba */
.state-col {
  width: 48%; 
  margin-bottom: 10px;
  box-sizing: border-box;
}

/* Botón de estado */
.state-btn {
  background-color: #e7e7e7;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  width: 98%;
  padding: 20px 30px;
  transition: background-color 0.3s ease;
  text-align: left;
  position: relative; /* para poder ubicar el pseudo-elemento */
}

/* Flecha por defecto (apuntando a la derecha) */
.state-btn::after {
  content: "❯";               /* flecha triangular apuntando a la derecha */
  font-size: 24px;            /* más grande */
  color: #666;
  position: absolute;         /* posicionado dentro del botón */
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  transition: transform 0.2s ease;
}

/* Si el botón está "abierto", gira flecha 90° (apuntando abajo) */
.state-btn.open::after {
  transform: translateY(-50%) rotate(90deg);
}

/* Hover del botón */
.state-btn:hover {
  background-color: #55608e;
  color: #fff;
  font-weight: bolder;
}

/* Cada <ul> de sucursales ocupa toda la fila y va debajo de las 2 columnas */
.sucursales-list {
  display: none;  /* acordeón cerrado por defecto */
  flex-basis: 95%;
  background-color: #f5f5f5;
  border-radius: 10px;
  margin: 5px 0;
  padding: 10px;
}

.sucursales-list li {
  display: block;
  width: auto; 
  list-style: none;
  background-color: #e7e7e7;
  border-radius: 8px;
  margin: 5px;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}
.sucursales-list li:hover {
  background-color: #55608e;
  color: #fff;
}
.sucursales-list li h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
}
.sucursales-list li p {
  margin: 0;
  font-size: 14px;
}

/* El mapa */
#map {
  width: 100%;
  height: 454px;
}
