/* =======================================================
   SIDEBAR – MENÚ LATERAL PROFESIONAL COSTOSTOCK
   ======================================================= */

:root {
  --naranjo: #F37021;
  --naranjo-hover: #d85e1c;
  --gris-carbon: #151515;
  --marfil: #F1EFED;
  --blanco: #ffffff;
}

/* Botón hamburguesa */
#menu-toggle {
  font-size: 26px;
  cursor: pointer;
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1200;
  color: var(--blanco);
  background: var(--naranjo);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.15s ease;
}

#menu-toggle:hover {
  background: var(--naranjo-hover);
  transform: scale(1.05);
}

/* Menú lateral */
#sidebar {
  height: 100%;
  width: 270px;
  position: fixed;
  top: 0;
  left: -270px; /* oculto por defecto */
  background-color: var(--marfil);
  color: var(--gris-carbon);
  overflow-y: auto;
  transition: left 0.35s ease-in-out;
  z-index: 1100;
  padding-top: 70px;
  box-shadow: 4px 0 15px rgba(0,0,0,0.15);
  border-right: 2px solid rgba(0,0,0,0.05);
}

/* Títulos del menú */
#sidebar h2 {
  color: var(--naranjo);
  text-align: left;
  padding: 0 25px 10px;
  margin-top: 10px;
  font-size: 20px !important;
  font-weight: 700 !important;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

/* Listas */
#sidebar ul {
  list-style-type: none;
  padding: 10px 0;
}

/* Cada elemento */
#sidebar ul li {
  padding: 6px 0;
}

/* Enlaces del sidebar */
#sidebar ul li a {
  text-decoration: none;
  font-size: 16px !important;
  display: block;
  padding: 12px 25px !important;
  color: var(--gris-carbon) !important;
  border-radius: 6px;
  transition: background 0.25s ease, color 0.25s ease, padding-left 0.2s ease;
}

/* Hover */
#sidebar ul li a:hover {
  background: var(--naranjo);
  color: var(--blanco) !important;
  padding-left: 32px !important;
}

/* Ítems seleccionados (opcional) */
#sidebar ul li a.active {
  background: var(--naranjo);
  color: var(--blanco) !important;
  font-weight: 700;
}

/* ============================================================
   🔒 FORZAR ESTILOS DEL SIDEBAR PARA TODAS LAS PÁGINAS
   ============================================================ */

#sidebar,
#sidebar * {
    font-family: 'Montserrat', sans-serif !important;
    line-height: 1.4 !important;
}

/* Scroll suave para sidebar largo */
#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-thumb {
  background: var(--naranjo);
  border-radius: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}

/* =========================================
   FIX: evitar choque logo / sidebar en mobile
   ========================================= */
@media (max-width: 768px) {

  /* Reservar espacio para el botón hamburguesa */
  header.main-header .header-flex {
    padding-left: 70px;
  }

  /* Logo un poco más chico en mobile */
  .logo-img {
    max-width: 160px;
  }

  /* Ajuste fino del botón hamburguesa */
  #menu-toggle {
    top: 14px;
    left: 14px;
  }
}
