


/* ==================================================
Top Header / Top Bar / Header
================================================== */
header {
position: relative;
z-index: 9;
}

.top-bar {
background-color: var(--color-primary);
height: 3rem;
display: flex;
align-items: flex-end;
}

.container.top-bar-container {
    display: flex;
    justify-content: center;
}

.top-bar ul {
display: flex;
justify-content: flex-start;
align-items: flex-end;
width: fit-content;
height: fit-content;
background: var(--color-bg);
margin: 0;
padding: 0;
}

.top-bar ul li {
padding: 0.2rem 1rem;
position: relative;
background-color: var(--color-primary);
}

.top-bar ul li[selected] {
margin: 0 var(--space-sm);
border-radius: 0.5rem 0.5rem 0rem 0rem;
background: var(--color-bg);
box-shadow: 0rem -0.8rem 0rem 0.2rem #0CF;
color: var(--branco-cw, #ffffff);
}
.top-bar ul li[selected]::before {
content: '';
display: block;
position: absolute;
left: -1rem;
bottom: 0;
width: 1rem;
height: 3rem;
background-color: var(--color-primary);
border-radius: 0 0 0.5rem 0;
}
.top-bar ul li[selected]::after {
content: '';
display: block;
position: absolute;
right: -1rem;
bottom: 0;
width: 1rem;
height: 3rem;
background-color: var(--color-primary);
border-radius: 0 0 0 0.5rem;
}
.top-bar ul li a {
color: var(--preto-cw);
font-size: var(--font-size-small);
font-weight: bold;
}
.top-bar ul li[selected] a {
color: var(--color-text);
}

/* ==================================================
Header Navigation
================================================== */



.header-navigation {
    border-radius: 2rem;
    background: rgba(124, 124, 124, 0.05);
    border: 1px solid var(--border-header);
    backdrop-filter: blur(0.75rem);
    -webkit-backdrop-filter: blur(0.75rem);
    height: 6.3rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 3rem;
    z-index: 10000;
    transition: all 0.1s ease;
    position: fixed;
    top: 3rem;
    left: 0;
    right: 0;
}


/* Animação para o efeito de fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.header-navigation.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.header-utility {
display: flex;
flex-direction: row;
justify-content: flex-end;
gap: 3rem;
align-items: center;
}


.logo {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
.header-navigation {
    width: calc(100% - 4rem);
    top: 2rem;
}
.cw-modal-content {
    width: calc(100% - 4rem);
}
}
 /* ------------------------------------------
   Toggle de tema: switcher on/off
------------------------------------------ */
#theme-toggle {
    width:         5.4rem;            /* largura do track */
    height:        2.9rem;            /* altura do track */
    background:    var(--color-bg);
    border-radius: 2rem;            /* borda arredondada = track */
    padding:       0.7rem;          /* espaço interno para o thumb */
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    transition:    background 0.3s ease;
    border: 0.1rem solid
 color-mix(in srgb, var(--color-text) 20%, transparent);
  }
  
  #theme-toggle .switch-thumb {
    width:         1.6rem;          /* diâmetro do thumb */
    height:        1.6rem;
    background:    var(--cinza-cw);
    border: 0.1rem solid var(--color-bg);
    border-radius: 50%;
    display:       flex;
    align-items:   center;
    justify-content: center;
    transition:    all 0.3s ease;
  }

 
  /* Posição do thumb conforme o tema */
  :root[data-theme="dark"]    #theme-toggle .switch-thumb { transform: translateX(0);    }
  [data-theme="light"]         #theme-toggle .switch-thumb { transform: translateX(2.3rem); }
  
  /* Ícones dentro do thumb */
  .switch-thumb svg {
    width:  1rem;
    height: 1rem;
  }

  .switch-thumb .icon-moon {
    fill:   var(--color-primary);
  }

  .switch-thumb .icon-sun {
    fill:   rgb(221, 188, 0);
  }
  
  /* Mostrar só o ícone correto */
  .switch-thumb .icon-sun  { display: none; }
  [data-theme="light"] .switch-thumb .icon-moon { display: none; }
  [data-theme="light"] .switch-thumb .icon-sun  { display: block; }



/* ==================================================
   Acionador Modal Menu
   ================================================== */

/* ícones sobrepostos */
.cw-btn {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cw-btn-icon {
  position: relative;
  display: inline-block;
  width: 24px; height: 24px;
  margin-right: 0.5rem;
}

/* estilo comum para ambos */
.cw-btn-icon .icon {
  position: absolute;
  top: 50%; 
  left: 50%;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translate(-50%, -50%);
}

/* estado inicial: mostra hambúrguer, esconde X */
.cw-btn-icon .icon-close {
  opacity: 0;
  
}
.cw-btn-icon .icon-hamburger {
  opacity: 1;

}

/* quando o botão tiver a classe `is-open`, inverte */
.cw-btn.is-open .icon-hamburger {
  opacity: 0;

}
.cw-btn.is-open .icon-close {
  opacity: 1;

}




/* =============================
   MENU INTERNO DENTRO DO MODAL
============================= */
.menu-interno {
  width: 100%;
}

.menu-interno .menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.menu-interno .menu-list > li > a {
  font-size: 4.8rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: ease 0.3s;
}

.menu-interno .menu-list > li > a:hover {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .menu-interno .menu-list > li > a {
    font-size: 3rem;
  }
}

/* =============================
   SUBMENU
============================= */
.menu-interno .has-submenu {
  position: relative;
}

.menu-interno .has-submenu > a {
  position: relative;
  padding-right: 1.5rem;
}

/* lista do submenu */
.menu-interno .submenu {
  list-style: none;
  margin: 0;
  padding-left: 3.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative; 
}

.menu-interno .submenu::before {
  content: "";
  position: absolute;
  left: 2rem;          
  top: 0;
  bottom: 0;
  width: 1px;          
  background-color: var(--color-text);
}

.menu-interno .submenu li a {
  font-size: 1.8rem;
  text-decoration: none;
  transition: ease 0.3s;
}

.menu-interno .submenu li a:hover {
  opacity: 0.5;
}