/* LAYOUT PRINCIPAL */
.navbar {
  background-color: var(--background);
  color: var(--text-dark);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2900;
  box-shadow: var(--shadow-md);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--dark);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

.logo {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 48px;
}

.img-logo {
  max-height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.main-content {
  padding: 0.75rem;
  max-width: 1400px;
  margin: 0 auto;
}





/* SIDEBAR */
.sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 30000;
  transition: var(--transition);
  padding: 1.5rem;
  overflow-y: auto;

  border-radius: 10px 0px 0px 10px;
}

.sidebar.active {
  right: 0;
}

.sidebar h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-top: 0.5rem;
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
  position: absolute;
  top: 1rem;
  right: 1rem;
}

#province-list-side {
  list-style: none;
}

#province-list-side li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--light);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

#province-list-side li:hover {
  color: var(--secondary);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* SIDEBAR BREADCRUMBS (COPIA DE .path-bar) */
.sidebar-path-bar {
  background: var(--white);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-light);
  box-shadow: var(--shadow-sm);
  border-radius: 10px;
  margin: 1rem auto;
  transition: all 0.3s ease;
  z-index: 1;
}

.sidebar-path-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-radius: 20px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.sidebar-path-btn:disabled {
  color: var(--secondary);
  cursor: default;
}

.sidebar-path-btn:not(:disabled):hover {
  background: var(--light);
}

.sidebar-path-btn.active {
  background: var(--secondary);
  color: var(--white);
}

.sidebar-path-separator {
  color: var(--gray);
  margin: 0 0.3rem;
}





/* BARRA DE RUTA (BREADCRUMBS) */
.path-bar {
  background: var(--white);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--gray-light);
  position: sticky;
  top: 0px;
  z-index: 2000;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.path-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-radius: 20px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.path-btn:disabled {
  color: var(--secondary);
  cursor: default;
}

.path-btn:not(:disabled):hover {
  background: var(--light);
}

.path-btn.active {
  background: var(--secondary);
  color: var(--white);
}

.path-separator {
  color: var(--gray);
  margin: 0 0.3rem;
}












@media (max-width: 768px) {

  .main-content {
    padding: 0.5rem;
  }

  .navbar {
    padding: 0rem;
  }

  .path-bar {
    position: fixed;
    bottom: 0;
    /* Mueve la barra a la parte inferior */
    top: auto;
    /* Elimina la posición sticky superior */
    width: 100%;
    /* Asegura que ocupe todo el ancho */
    border-top: 1px solid var(--gray-light);
    /* Agrega un borde superior */
    border-bottom: none;
    /* Elimina el borde inferior */
    box-shadow: var(--shadow-md);
    /* Ajusta la sombra para que parezca un menú inferior */
  }

  .path-btn {
    flex-grow: 1;
    /* Asegura que los botones ocupen el espacio disponible */
    justify-content: center;
    /* Centra el contenido de los botones */
    text-align: center;
  }

  .path-btn span {
    display: none;
    /* Oculta el texto en botones si es necesario */
  }

  .path-bar .path-separator {
    display: none;
    /* Oculta los separadores entre botones */
  }

}


@media (max-width: 375px) {
  .logo {
    font-size: 1.2rem;
  }

  .path-btn span {
    display: none;
  }

  .path-btn {
    padding: 0.25rem 0.5rem;
  }

  #btn-province {
    padding: 0.25rem;
  }

  #btn-terminal {
    padding: 0.25rem;
  }

}

@media (max-width: 320px) {
  .logo {
    font-size: 1.2rem;
  }

  .path-btn span {
    display: none;
  }

}

/* NUEVO CÓDIGO - AYUDA EN LA SIDEBAR */
.sidebar-help {
  background: var(--light);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.sidebar-help-btn {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar-help-btn:hover {
  background: var(--secondary);
}