/* Estilos para el componente Sidebar */

.w3-sidebar {
  background-color: var(--background-light);
  border: 4px solid var(--primary-dark);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
  width: 0;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 99999;
  max-width: 85%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

/* Cuando está abierto */
.w3-sidebar.sidebar-open {
  width: 320px !important;
  padding: 0 !important;
}

/* Botón de cierre en la esquina superior */
.w3-sidebar .sidebar-close-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  color: var(--primary-color) !important;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  background: transparent !important;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 !important;
}

.w3-sidebar .sidebar-close-btn:hover {
  color: var(--accent-color) !important;
  transform: rotate(90deg);
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Contenedor del header del sidebar */
.sidebar-header {
  padding: 20px 15px 10px;
  text-align: center;
  border-bottom: 2px dashed var(--primary-dark);
  margin-bottom: 15px;
  background-color: rgba(0, 0, 0, 0.03);
}

/* Logo en el sidebar */
.sidebar-logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.sidebar-logo i {
  font-size: 20px;
  margin-right: 10px;
  color: var(--accent-color);
}

/* Tagline bajo el logo */
.sidebar-tagline {
  font-size: 11px;
  color: var(--text-dark);
  opacity: 0.7;
  font-style: italic;
}

/* Contenedor de enlaces de navegación */
.sidebar-nav-links {
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Ocultar scrollbar para Chrome, Safari y Opera */
.sidebar-nav-links::-webkit-scrollbar {
  display: none;
}

/* Elementos de navegación */
.sidebar-nav-item {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  padding: 12px 12px !important;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 8px;
  color: var(--text-dark) !important;
  display: flex !important;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-nav-item:hover {
  transform: translateX(5px);
  background-color: var(--accent-secondary) !important;
  border-color: var(--primary-dark);
}

/* Iconos en los elementos de navegación */
.sidebar-icon {
  margin-right: 10px;
  font-size: 14px;
  color: var(--accent-color);
  transition: all 0.3s ease;
  width: 20px;
  text-align: center;
}

.sidebar-nav-item:hover .sidebar-icon {
  transform: scale(1.2);
}

/* Separador pixelado antes de las redes sociales */
.pixel-separator {
  height: 3px;
  background: repeating-linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-color) 4px,
    var(--primary-dark) 4px,
    var(--primary-dark) 8px
  );
  margin: 8px 5px;
  border-radius: 2px;
  opacity: 0.7;
}

/* Título de redes sociales integrado en el área de navegación */
.sidebar-social-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  color: var(--text-dark);
  margin: 5px 0 10px;
  text-align: center;
  position: relative;
}

.sidebar-social-title::before,
.sidebar-social-title::after {
  content: '•';
  color: var(--accent-color);
  margin: 0 8px;
  position: relative;
  top: -2px;
}

/* Contenedor de iconos sociales */
.sidebar-social-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 5px;
}

/* Estilos para los iconos de redes sociales */
.sidebar-social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  border-radius: 8px;
  color: var(--text-light) !important;
  transition: all 0.3s ease;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
  font-size: 16px;
  transform-origin: center;
}

.sidebar-social-icon:hover {
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Colores específicos para cada red social */
.sidebar-social-icon.instagram { background-color: #E1306C; }
.sidebar-social-icon.facebook { background-color: #1877F2; }
.sidebar-social-icon.linkedin { background-color: #0A66C2; }
.sidebar-social-icon.whatsapp { background-color: #25D366; }

/* Footer del sidebar */
.sidebar-footer {
  padding: 8px;
  text-align: center;
  font-size: 9px;
  color: var(--text-dark);
  opacity: 0.7;
  background-color: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  line-height: 1.3;
}

.sidebar-footer p {
  margin: 0;
}

/* Animación al abrir el sidebar */
@keyframes sidebarOpen {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.w3-sidebar.w3-animate-left {
  animation: sidebarOpen 0.4s forwards;
}

/* Esquinas pixeladas para el sidebar */
.pixel-corners {
  --pixel-size: 4px;
  --pixel-color: var(--primary-dark);
  
  /* Esquina superior derecha */
  &::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: var(--pixel-size);
    height: var(--pixel-size);
    background-color: transparent;
    box-shadow: 
      calc(-1 * var(--pixel-size)) 0 0 0 var(--pixel-color),
      0 var(--pixel-size) 0 0 var(--pixel-color);
  }
  
  /* Esquina inferior izquierda */
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: var(--pixel-size);
    height: var(--pixel-size);
    background-color: transparent;
    box-shadow: 
      var(--pixel-size) 0 0 0 var(--pixel-color),
      0 calc(-1 * var(--pixel-size)) 0 0 var(--pixel-color);
  }
} 