:root {
    --primary-blue: #1e3a8a;
    --primary-blue:  #223777;
    --accent-blue: #3b82f6;
    --icon-size: 24px;
}

.navbar {
    background-color: var(--primary-blue);
    height: 60px;
    width: 100%;
    position: relative;
    top: -2px;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 3px 7px rgb(0 0 0 / 20%);
    display: flex;
    align-items: center;
    
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* 1. Logo (Tamanho fixo em todas as telas) */
.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    width: 130px; /* Mantém fixo conforme solicitado */
    height: auto;
}

/* 2. Busca (Centro - Desktop) */
.nav-center {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0px 8px;
    transition: background 0.3s;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
}

.search-box input {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 16px;
}

.search-box input::placeholder {
    color: #cbd5e1;
}

/* Agrupamento da Direita */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px; /* Espaçamento padronizado entre itens */
}

/* 3. Links Hinários/Sobre */
.nav-right {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.85;
    transition: 0.3s;
}

.nav-link:hover {
    opacity: 1;
    color: var(--accent-blue);
}

.user-login img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 50%; /* Foca mais no rosto */
    transform: scale(1); /* Zoom adicional */
    transition: all 0.3s ease;
  }
  
  .user-login:hover img {
    transform: scale(1.1); /* Zoom maior no hover */
    border: 2px solid var(--primary-color, #007bff); /* Borda colorida */
  }

/* Padronização de Botões e Ícones (Busca, Hambúrguer, User) */
.search-toggle-mobile,
.menu-toggle,
.user-login,
.search-icon,
.close-search-mobile {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
}

/* Efeito de hover comum para todos os ícones */
.search-toggle-mobile:hover,
.menu-toggle:hover,
.user-login:hover,
.search-icon:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

/* Tamanho padrão dos SVGs */
.nav-actions svg, 
.search-icon svg {
    width: var(--icon-size);
    height: var(--icon-size);
    stroke: currentColor;
}

.close-search-mobile {
    display: none;
    padding-right: 8px;
}


/* Ajuste específico do Hamburguer para alinhar com os ícones */
.menu-toggle {
    /* Voltar depois */
    display: none;
    width: var(--icon-size);
    height: var(--icon-size);
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
}

/* --- RESPONSIVIDADE --- */

@media (max-width: 768px) {
    .nav-center, 
    .nav-right {
        display: none; /* Esconde busca principal e links no mobile */
    }

    .search-toggle-mobile {
        display: flex; /* Mostra ícone busca no mobile */
    }
}

@media (min-width: 769px) {
    .nav-center {
        display: block;
    }

    .nav-right {
        display: flex;
    }

    .search-toggle-mobile {
        display: none; /* Esconde ícone busca no desktop */
    }
}



@media (max-width: 768px) {
    /* Quando a busca está ativa no Mobile */
    .nav-container.search-active .logo,
    .nav-container.search-active .nav-actions {
        display: none !important; /* Esconde todo o resto */
    }

    .nav-container.search-active .nav-center {
        display: block !important;
        flex: 1;
        margin: 0;
    }

    .nav-container.search-active .search-box {
        background: rgba(255, 255, 255, 0.2);
        width: 100%;
    }

    /* Mostra o botão X apenas quando a busca está ativa no mobile */
    .nav-container.search-active .close-search {
        display: none;
    }
}

/* Transição suave */
.logo, .nav-center, .nav-actions {
    transition: all 0.2s ease-in-out;
}



/* Esconde o botão de fechar busca por padrão (desktop) */



@media (max-width: 768px) {
    /* Estado Normal Mobile: Esconde o nav-center */
    .nav-center {
        display: none;
    }

    /* Quando a busca está ATIVA no mobile */
    .nav-container.search-active .logo {
        display: none !important; /* Logo some */
    }

    .nav-container.search-active .nav-center {
        display: block !important; /* Busca aparece */
        flex: 1;
        margin-right: 15px; /* Espaço entre busca e ícones da direita */
    }

    .nav-container.search-active .search-toggle-mobile {
        display: none; /* Esconde a lupa (já que a busca abriu) */
    }

    .nav-container.search-active .close-search-mobile {
        display: none; /* Mostra o botão de fechar (X) */
        align-items: center;
    }

    .nav-container.search-active .search-box {
        width: 100%;
        background: rgba(255, 255, 255, 0.25);
    }
}



#busca-ef:not(:placeholder-shown) + .close-search-mobile {
    display: block;
  }



  /* Menu Lateral Mobile */
.side-menu {
    position: fixed;
    top: 44px;
    left: -120%;
    width: 95%;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: 0.3s;
    z-index: 999;
    padding: 20px;
}

.side-menu.active {
    left: 0;
}

.side-menu a {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}







/* ALEGRIAS */

.alegrias {
    position: relative;
    padding-bottom: 5px;
    overflow: hidden;
    opacity: 0.9;
    /* animation: loading 1s; */
    margin-top: 0px;
    font-size: 0.71em;
    color: #FFF;
    text-align: center;
  }
  
  .alegrias::before, .alegrias::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
      45deg,
      rgba(56, 88, 3, 0.9), rgba(138, 201, 38, 0.9), rgba(138, 201, 38, 0.9), rgba(25, 129, 194, 0.9), rgba(0, 83, 134, 0.9), rgba(106, 76, 147, 0.9), rgba(255, 202, 58, 0.9), rgba(255, 103, 0, 0.9)
    );
    background-size: 400%;
    z-index: -1;
    animation: glow 30s linear infinite;
    width: 100%;
}
  
  .alegrias::after {
    filter: blur(25px);
    transform: translate3d(0, 0, 0);
  }
  @keyframes loading {
    0% {
      width: 0vw;
    }
  
    80% {
        width: 76vw;
    }
  
    100% {
        width: 100vw;
    }
  }
  @keyframes glow {
    0% {
      background-position: 0 0;
    }
  
    50% {
      background-position: 100% 0;
    }
  
    100% {
      background-position: 0 0;
    }
  }