/* ========== HEADER NAVBAR ========== */
.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);
  gap: 0.5rem;
}

/* Botón de retroceso */
.back-btn {
  background: none;
  border: none;
  font-size: 1.7rem;
  color: #234f9e;
  cursor: pointer;
  margin-right: 0.2rem;
  display: flex;
  align-items: center;
  transition: color 0.3s;
  padding: 0.5rem;
}
.back-btn.clicked {
  color: #e53935;
  animation: backBtnBounce 0.5s cubic-bezier(.77,0,.18,1);
}
@keyframes backBtnBounce {
  0% { transform: translateX(0); }
  40% { transform: translateX(12px); }
  60% { transform: translateX(12px); }
  100% { transform: translateX(0); }
}

/* Botón TAXI */
.taxi-btn {
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--primary);
  cursor: pointer;
  margin-right: 0.2rem;
  display: flex;
  align-items: center;
  transition: color 0.3s;
  padding: 0.5rem;
}
.taxi-btn:hover {
  color: var(--secondary);
}

/* Logo */
.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%;
}

/* Botón de búsqueda */
.search-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: #234f9e;
  cursor: pointer;
  margin-left: 0.2rem;
  display: flex;
  align-items: center;
  transition: color 0.3s;
  padding: 0.5rem;
}
.search-btn:hover {
  color: var(--secondary);
}

/* Botón hamburguesa */
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
}
.sidebar-toggle:hover {
  color: var(--secondary);
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0;
  right: -340px;
  width: 340px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 30000;
  transition: var(--transition);
  padding: 0.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;
}
.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;
}

/* Lista de provincias en la sidebar */
#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 breadcrumbs */
.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;
}

/* ========== PATH BAR (BREADCRUMBS) ========== */
.path-bar {
  --path-bar-height: auto;
  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;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .navbar {
    padding: 0rem;
    gap: 0.2rem;
  }
  .logo {
    font-size: 1.2rem;
    height: 40px;
  }
  .img-logo {
    max-height: 32px;
  }
  .back-btn,
  .taxi-btn,
  .search-btn {
    font-size: 2rem;
    padding: 0.3rem;
  }
  .main-content {
    padding: 0.5rem;
  }
  .path-bar {
    --path-bar-height: 60px;
    position: fixed;
    bottom: 0;
    top: auto;
    width: 100%;
    height: var(--path-bar-height);
    border-top: 1px solid var(--gray-light);
    border-bottom: none;
    box-shadow: var(--shadow-md);
  }
  .path-btn {
    flex-grow: 1;
    justify-content: center;
    text-align: center;
  }
  .path-btn span {
    display: none;
  }
  .path-bar .path-separator {
    display: none;
  }
}

@media (max-width: 375px) {
  .logo {
    font-size: 1rem;
    height: 32px;
  }
  .img-logo {
    max-height: 24px;
  }
  .back-btn,
  .taxi-btn,
  .search-btn {
    font-size: 1.5rem;
    padding: 0.2rem;
  }
  .path-btn span {
    display: none;
  }
  .path-btn {
    padding: 0.25rem 0.5rem;
  }
  #btn-province,
  #btn-terminal {
    padding: 0.25rem;
  }
}

@media (max-width: 320px) {
  .logo {
    font-size: 1.2rem;
  }
  .path-btn span {
    display: none;
  }
}

/* ========== 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);
}