/* ============================================================
   NAVBAR
   ============================================================ */

#nav {
   position: relative;
   z-index: 1000;
   background: #fff;
}

#nav .container {
   display: flex;
   justify-content: space-between;
   align-items: center;
}

/* Botón hamburguesa */

.sidebar-toggle {
   border: none;
   background: transparent;
   font-size: 1.5rem;
   color: var(--primary);
   cursor: pointer;
   padding: 10px;
}

.sidebar-toggle:hover {
   opacity: .7;
}


/* ============================================================
   MENÚ LATERAL
   ============================================================ */

.sidebar-menu {
   position: fixed;
   top: 0;
   left: 0;

   width: 320px;
   max-width: 85vw;
   height: 100vh;

   background: #fff;

   z-index: 2000;

   transform: translateX(-100%);
   transition: transform .35s ease;

   box-shadow: 5px 0 25px rgba(0,0,0,.15);

   display: flex;
   flex-direction: column;
}


/* Menú abierto */

.sidebar-menu.active {
   transform: translateX(0);
}


/* ============================================================
   CABECERA
   ============================================================ */

.sidebar-header {
   display: flex;
   align-items: center;
   justify-content: space-between;

   padding: 25px 25px;

   border-bottom: 1px solid #eee;
}

.sidebar-header img {
   width: 75px;
   height: 75px;
   object-fit: cover;
}


/* Botón cerrar */

.sidebar-close {
   width: 42px;
   height: 42px;

   border: none;
   border-radius: 50%;

   background: transparent;

   font-size: 1.3rem;

   cursor: pointer;

   transition: .2s;
}

.sidebar-close:hover {
   background: #f2f2f2;
}


/* ============================================================
   ENLACES
   ============================================================ */

.sidebar-nav {
   list-style: none;

   padding: 20px 15px;
   margin: 0;

   flex: 1;
}

.sidebar-nav li {
   margin-bottom: 5px;
}

.sidebar-nav a {
   display: flex;
   align-items: center;
   gap: 15px;

   padding: 14px 15px;

   text-decoration: none;

   color: #333;

   font-family: 'Poppins', sans-serif;
   font-size: 15px;
   font-weight: 500;

   border-radius: 8px;

   transition: all .2s ease;
}

.sidebar-nav a i {
   width: 22px;

   color: var(--primary);

   font-size: 16px;

   text-align: center;
}

.sidebar-nav a:hover {
   background: rgba(0,0,0,.05);
   color: var(--primary);

   padding-left: 20px;
}


/* ============================================================
   REDES SOCIALES
   ============================================================ */

.sidebar-social {
   display: flex;
   justify-content: center;
   gap: 12px;

   padding: 20px;

   border-top: 1px solid #eee;
}

.sidebar-social a {
   width: 40px;
   height: 40px;

   display: flex;
   align-items: center;
   justify-content: center;

   border-radius: 50%;

   color: var(--primary);

   text-decoration: none;

   transition: .2s;
}

.sidebar-social a:hover {
   background: var(--primary);
   color: #fff;
}


/* ============================================================
   FONDO OSCURO
   ============================================================ */

.sidebar-overlay {
   position: fixed;

   inset: 0;

   background: rgba(0,0,0,.5);

   z-index: 1500;

   opacity: 0;
   visibility: hidden;

   transition: all .35s ease;
}

.sidebar-overlay.active {
   opacity: 1;
   visibility: visible;
}


/* ============================================================
   MÓVIL
   ============================================================ */

@media (max-width: 576px) {

   .sidebar-menu {
      width: 280px;
   }

   .sidebar-header {
      padding: 20px;
   }

}
