/* HEADER */
@import url('variaveis.css');

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 5px 100px;
  border-bottom: 1px solid #ddd;

  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.288);
  position: sticky;
  top: 0;

  z-index: 999999;
}

.logo {
  padding-top: 10px;
  width: 60px;
  height: 60px;
}

.navbar {
  display: flex;
  gap: 40px;
}

.navbar a {
  color: var(--corAzul);
  text-decoration: none;
  font-weight: 600;

  border: 1px solid #fff;
}

.navbar a:hover {
  text-decoration: underline 1.5px;
}



/* ---  MODO DESKTOP  --- */
@media (min-width: 851px) {

  /* Topbar normal */
  .topbar {
    padding: 5px 100px;
  }

  /* Navbar horizontal */
  .navbar {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 40px;
    height: auto;
    width: auto;
    box-shadow: none;
    background: none;
  }

  .navbar a {
    padding: 0;
    font-size: 1rem;
  }

  /* Ícone de usuário correto no desktop */
  .user-icon .circle {
      width: 100%;
      height: 100%;

      border: 2px solid var(--corBranco);
      border-radius: 100%;
      background: var(--corBranco);

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

      padding: 0;
  }

  .user-icon .circle:hover {
    transition: 500ms;
    border: 2px solid var(--corAzul);
  }

  .user-icon img {
      width: 40px;
      height: 40px;
      border-radius: 100%;
      object-fit: cover;
  }

  /* O item user-mobile NÃO aparece no desktop */
  .user-mobile {
    display: none !important;
  }

  /* Hamburguer escondido no desktop */
  .hamburger {
    display: none !important;
  }
}

.profile{
  margin-left: 250px;
  border: 3px solid var(--corAzul);
  border-radius: 100%;
}

.profile:hover{
  transition: 500ms;
  border: 3px solid var(--corAzulClaro);
}


/* ---  MODO MOBILE --- */
@media (max-width: 850px) {

  .topbar {
    padding: 8px 18px;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -260px;
    height: 100vh;
    width: 260px;
    background: #fff;

    display: flex;
    flex-direction: column;
    gap: 35px;

    padding-top: 120px;
    transition: .3s ease;
    box-shadow: -1px 0 8px rgba(0,0,0,0.3);
  }

  .navbar.open {
    right: 0;
  }

  /* Texto PERFIL */
  .user-mobile img {
    display: none;
  }

  .user-mobile::before {
    content: "PERFIL";
    font-size: 1.2rem;
    color: var(--corAzul);
  }

  /* Ícone da direita (desktop) some */
  .user-icon {
    display: none;
  }

  /* Navegação mobile */
  .navbar a {
    font-size: 1.15rem;
    padding-left: 28px;
  }

  /* Hamburguer aparece */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: none;
    cursor: pointer;
  }

  .hamburger span {
    width: 26px;
    height: 3px;
    background: var(--corAzul);
    border-radius: 4px;
    transition: 0.3s;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}
