/* Variáveis para consistência de cores e facilidade de manutenção */
:root {
  --sidebar-bg: #090a0e;
  --sidebar-text: #ffffff;
  --sidebar-accent: #33a0e8;
  --sidebar-accent-hover: #33a0e8;
  --sidebar-accent-gradient: linear-gradient(to left, #3379e8, #3d78d7);
  --sidebar-width-collapsed: 60px;
  --sidebar-width-expanded: 250px;
  --transition-speed: 0.3s;
}

/* Estilização básica da sidebar */
.sidebar {
  background-color: var(--sidebar-bg);
  width: var(--sidebar-width-collapsed);
  height: 100%;
  border-right: 1px solid var(--sidebar-accent);
  overflow: hidden;
  overflow-y: auto;
  transition: width var(--transition-speed) ease;
  z-index: 1000;
  position: absolute;
  top: 70px;
  left: 0;
  scrollbar-width: none; /* Para Firefox */
}


/* Esconde a scrollbar em navegadores WebKit */
.sidebar::-webkit-scrollbar {
  display: none;
}

/* Expande a sidebar ao passar o mouse */
.sidebar:hover {
  width: var(--sidebar-width-expanded);
}

/* Para quando a sidebar está fixada no topo da página */
.sidebar.fixed {
  position: fixed;
  top: 0;
}

/* Divisor horizontal estilizado */
.sidebar-divider {
  border: 0;
  height: 1px;
  background: rgba(51, 160, 232, 0.8);
  margin: 10px auto;
  width: 80%;
}

/* Lista principal da sidebar */
.sidebar-menu {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

/* Item da sidebar */
.sidebar-item {
  transition: background-color 0.1s ease;
}

.sidebar-item.active {
  background: var(--sidebar-accent-gradient);
}

.sidebar-item:hover {
  background: var(--sidebar-accent-gradient);
}

/* Botão da sidebar */
.sidebar-button a {
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 18px;
  padding: 16px 10%;
  display: flex;
  align-items: center;
  position: relative;
}

/* Ícone da sidebar */
.sidebar-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
}

.sidebar-icon i {
  font-size: 20px;
}

/* Título da sidebar - visível apenas quando expandido */
.sidebar-title {
  margin-left: 15px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.sidebar:hover .sidebar-title {
  opacity: 1;
}

/* Seta indicadora de submenu */
.sidebar-arrow {
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.sidebar:hover .sidebar-arrow {
  opacity: 1;
}

.sidebar-item.active .sidebar-arrow i {
  transform: rotate(180deg);
}

/* Container do submenu */
.sidebar-submenu {
  background-color: rgba(9, 14, 10, 0.8);
  max-height: 0;
  overflow: hidden;
  list-style-type: none;
  padding: 0;
  margin: 0;
  transition: max-height var(--transition-speed) ease;
}

/* Item do submenu */
.submenu-item {
  display: block;
  padding: 10px 10px 10px 55px;
  color: var(--sidebar-text);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.submenu-item:hover {
  color: var(--sidebar-accent-hover);
}

/* Quando o item está expandido, mostra o submenu */
.sidebar-item.active .sidebar-submenu {
  max-height: 500px;
}

/* Seção da sidebar com título - aqui está a modificação principal */
.sidebar-section {
  display: none; /* Inicialmente oculto */
  padding: 10px 20px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--sidebar-accent);
  font-weight: 600;
  letter-spacing: 1px;
  transition: opacity var(--transition-speed) ease;
}

/* Mostrar a seção apenas quando a sidebar estiver expandida */
.sidebar:hover .sidebar-section {
  display: block;
  animation: fadeIn var(--transition-speed) ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Animação do hover nos itens */
.sidebar-item:not(.active):hover {
  background: linear-gradient(to right, rgba(51, 121, 232, 0.2), rgba(61, 120, 215, 0.1));
}

.sidebar-item.active:hover {
  background: var(--sidebar-accent-gradient);
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    border-right: none;
  }
  
  .sidebar.mobile-open {
    width: var(--sidebar-width-expanded);
  }
  
  .sidebar-toggle-button {
    display: block;
  }

  /* Garantir que a seção de título seja visível quando no modo mobile */
  .sidebar.mobile-open .sidebar-section {
    display: block;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/*-------------------------------------SEARCH-BOX-----------------------------------------------------*/
  
  .search-box {
    position: relative;
    margin: 15px auto;
    background-color: #1c2437;
    height: 40px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    width: 40px;
    transition: width 0.3s;
    overflow: hidden;
  }
  
  .search-box form {
    display: flex;
    width: 100%;
    position: relative;
  }
  
  @media (max-width: 768px) {
    /* Force search box to be expanded when sidebar is open on mobile */
    .sidebar.open .search-box {
      width: 80% !important; /* Use !important to override other rules */
      margin-left: auto !important;
      margin-right: auto !important;
    }
    
    /* Force search text field to be visible when sidebar is open on mobile */
    .sidebar.open .search-txt {
      width: calc(100% - 50px) !important; /* Use !important to override hover rules */
    }
    
    /* Override hover rules that might be interfering */
    .sidebar.open:not(:hover) .search-box {
      width: 80% !important;
    }
    
    .sidebar.open:not(:hover) .search-txt {
      width: calc(100% - 50px) !important;
    }
    
    /* Make sure hover doesn't interfere with the open state */
    .sidebar:hover:not(.open) .search-box {
      width: 40px;
    }
    
    /* Disable hover effect for search box on mobile completely */
    .sidebar:hover .search-box {
      width: 40px;
    }
    
    /* Only show expanded search when sidebar is explicitly open */
    .sidebar:hover:not(.open) .search-txt {
      width: 0;
    }
  }
  
  
  
  
  /*-----------------------------------------------------------------------------------------*/

  .sidebar:hover .search-box {
    width: 80%;
  }
  
  
  
  .search-btn {
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
  }
  
  
  .search-txt {
    border: none;
    background: none;
    outline: none;
    padding: 0 15px;
    color: white;
    font-size: 16px;
    line-height: 40px;
    width: 0;
    transition: width 0.4s;
  }
  
  .sidebar:hover .search-txt {
    width: calc(100% - 50px);
  }
  
  /* Ajuste para manter o ícone centralizado quando a sidebar é pequena */
  .sidebar:not(:hover) .search-box {
    margin-left: 10px;
    width: 40px;
  }
  
  /* Ajuste para a barra de pesquisa ocupar o espaço adequado quando a sidebar está expandida */
  .sidebar:hover .search-box {
    margin-left: auto;
    margin-right: auto;
  }










































  /* ---------------------------------- política---------------------------------- */
  .policy-section {
    display: None;
  }
  .sidebar:hover .policy-section{
      margin: 20px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      transition: ease-in 0.2s;
  }

  .policy-btn {
      width: 100%;
      padding: 12px 15px;
      background: rgba(38, 54, 78, 0.4);
      border: none;
      border-radius: 12px;
      color: white;
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      cursor: pointer;
      transition: all 0.3s ease;
      text-align: left;
      backdrop-filter: blur(10px);
      white-space: nowrap;
  }

  .policy-btn:hover {
  background: linear-gradient(#4493c7, #6ec6f8);
  box-shadow: 0px 0px 3px rgba(78, 163, 219, 0.9);
      transform: translateX(3px);
  }

  .policy-btn i {
      margin-right: 10px;
      font-size: 14px;
      width: 16px;
      text-align: center;
  }

  /* Modal Styles */
  .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.7);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      backdrop-filter: blur(5px);
  }

  .modal-overlay.active {
      display: flex;
  }

  .modal-content {
      background: #090a0e;
      border-radius: 20px;
      width: 90%;
      max-width: 600px;
      max-height: 80vh;
      overflow-y: auto;
      box-shadow: 0 20px 40px rgba(0,0,0,0.3);
      animation: modalSlideIn 0.3s ease;
  }

  @keyframes modalSlideIn {
      from {
          opacity: 0;
          transform: translateY(-50px) scale(0.9);
      }
      to {
          opacity: 1;
          transform: translateY(0) scale(1);
      }
  }

  .modal-header {
      padding: 25px 30px 20px;
      border-bottom: 2px solid #33a0e8;
      display: flex;
      justify-content: space-between;
      align-items: center;
  }

  .modal-title {
      font-size: 24px;
      font-weight: 700;
      color: #ffffffce;
      margin: 0;
  }

  .modal-close {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #999;
      transition: color 0.3s ease;
      padding: 5px;
  }

  .modal-close:hover {
      color: #333;
  }

  .modal-body {
      padding: 30px;
      color: #ffffffbb;
      line-height: 1.6;
  }

  .modal-body h3 {
      color: #498acc;
      margin: 0px 0 15px 0;
      font-size: 18px;
  }

  .modal-body details {
      margin: 15px 0;
      border-radius: 8px;
      overflow: hidden;
  }

  .modal-body summary {
      padding: 15px 20px;
      background: rgba(38, 54, 78, 0.4);
      cursor: pointer;
      font-weight: 600;
      transition: background 0.3s ease;
  }

  .modal-body summary:hover {
  background: linear-gradient(#4493c7, #6ec6f8);
  box-shadow: 0px 0px 3px rgba(78, 163, 219, 0.9);
  }

  .modal-body dl {
      padding: 20px;
      margin: 0;
      background: rgba(0, 0, 0, 0.4);
  }

  .modal-body dt {
      font-weight: 600;
      color: #498acc;
      margin: 15px 0 5px 0;
  }

  .modal-body dd {
      margin: 0 0 10px 20px;
      color: #ffffffbb;
  }

  .main-content {
      margin-left: 280px;
      padding: 20px;
      flex: 1;
  }

  /* Scrollbar customizada */
  .sidebar::-webkit-scrollbar {
      width: 6px;
  }

  .sidebar::-webkit-scrollbar-track {
      background: rgba(255,255,255,0.1);
  }

  .sidebar::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.3);
      border-radius: 3px;
  }

  .policy-content::-webkit-scrollbar {
      width: 4px;
  }

  .policy-content::-webkit-scrollbar-track {
      background: rgba(255,255,255,0.1);
  }

  .policy-content::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.3);
      border-radius: 2px;
  }


  /*-----------------------------------------------------------------------------*/
  .social-links{
    display: flex;
    justify-content: space-between;
    color: #FFF;
    opacity: 0;
    padding: 12px 10%;
    list-style: none;
  }

  .social-links li{
    font-size: 24px;
  }

  .social-links li:hover{
        background: linear-gradient(45deg, #4493c7, #6ec6f8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .sidebar:hover .social-links {
    opacity: 1;
  } 


  .footer-text{
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 16px 10%;
    font-size: 12px;
    align-items: center;
    text-align: center;
    opacity: 0;
  }

  .sidebar:hover .footer-text{
    opacity: 1;
  }