/* ===== HEADER ===== */
.page-header {
    background: var(--branco);
    padding: 15px 30px;
    border-radius: var(--borda-raio);
    box-shadow: var(--sombra);
    margin: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: sticky;
    top: 0;
    width: calc(100% - 20px);
    z-index: 1000;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

/* Header escondido (ao descer) - REMOVIDO: Header agora fica sempre fixo */
/* .page-header.header-hidden {
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
} */

/* Header transparente (para páginas específicas) */
.page-header.header-transparent {
    background: rgba(5, 5, 5, 0.85);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.page-header.header-transparent .nav-link,
.page-header.header-transparent .logo-main,
.page-header.header-transparent .logo-sub,
.page-header.header-transparent .menu-toggle,
.page-header.header-transparent .header-btn,
.page-header.header-transparent .header-cta {
    color: #ffffff;
}

.page-header.header-transparent .logo-main .highlight {
    color: var(--verde-secundario);
}

.page-header.header-transparent .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.page-header.header-transparent .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

.page-header.header-transparent .header-btn.login-btn {
    border-color: rgba(255, 255, 255, 0.7);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 50px;
    height: 50px;
    /* background: var(--verde-primario); */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--branco);
    font-size: 24px;
    font-weight: 700;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--verde-primario);
    line-height: 1.2;
}

.logo-main .highlight {
    color: var(--verde-secundario);
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--cinza);
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--verde-primario);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(15, 107, 58, 0.1);
    transform: scale(1.05);
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--preto);
    text-shadow: 1px 2px 17px rgb(88, 161, 128);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.nav-link i {
    color: var(--verde-primario);
    font-size: 1rem;
}

.nav-link:hover {
    background: rgba(15, 107, 58, 0.08);
    color: var(--verde-primario);
    transform: translateY(-2px);
}

/* Active link indicator */
.nav-item.selected .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--verde-primario);
    border-radius: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn {
    background: transparent;
    color: var(--verde-primario);
    border: 1px solid var(--verde-primario);
}

.login-btn:hover {
    background: rgba(15, 107, 58, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(15, 107, 58, 0.2);
}

.header-cta {
    background: var(--verde-primario);
    color: var(--branco);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.header-cta:hover {
    background: var(--verde-secundario);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 107, 58, 0.3);
}

/* ===== MENU OVERLAY (MOBILE) ===== */
.menu-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483646;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    overflow: hidden;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -100%;
    width: min(85vw, 320px);
    height: 100dvh;
    min-height: 100vh;
    max-height: 100dvh;
    background: var(--branco);
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2147483647;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-overlay.active .menu-panel {
    right: 0;
}

.menu-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--preto);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-close:hover {
    background: rgba(15, 107, 58, 0.1);
    color: var(--verde-primario);
    transform: rotate(90deg);
}

.menu-links {
    margin-top: 60px;
    list-style: none;
}

.menu-links li {
    margin-bottom: 15px;
}

.menu-links a {
    text-decoration: none;
    font-size: 1.1rem;
    color: var(--preto);
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-links a i {
    width: 24px;
    color: var(--verde-primario);
    font-size: 1.2rem;
}

.menu-links a:hover {
    background: rgba(15, 107, 58, 0.08);
    color: var(--verde-primario);
    transform: translateX(5px);
}

.menu-links .selected a {
    background: rgba(15, 107, 58, 0.08);
    color: var(--verde-primario);
    font-weight: 600;
}

/* Menu divider */
.menu-divider {
    height: 1px;
    background: var(--borda);
    margin: 15px 0;
}



/* ===== MENU MOBILE COM BOTÕES DE AÇÃO ===== */

/* Separador do menu */
.menu-divider {
    height: 1px;
    background: var(--borda);
    margin: 15px 0;
}

/* Container dos botões de ação no mobile */
.mobile-action-buttons {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Estilo dos botões de ação no mobile */
.mobile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    width: 100%;
}

/* Botão Entrar/Registar/Minha Conta */
.mobile-action-btn:not(.whatsapp-btn-mobile):not(.logout-btn-mobile) {
    background: rgba(15, 107, 58, 0.1);
    color: var(--verde-primario);
}

.mobile-action-btn:not(.whatsapp-btn-mobile):not(.logout-btn-mobile):hover {
    background: var(--verde-primario);
    color: var(--branco);
}

/* Botão WhatsApp */
.whatsapp-btn-mobile {
    background: #25D366;
    color: var(--branco);
}

.whatsapp-btn-mobile:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Botão Sair (logout) */
.logout-btn-mobile {
    background: #dc3545;
    color: var(--branco);
}

.logout-btn-mobile:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ===== RESPONSIVIDADE: Esconder header-actions e mostrar botões no menu ===== */

/* Por padrão, os botões de ação no menu mobile ficam escondidos */
.mobile-action-buttons {
    display: none;
}

/* Em telas menores que 350px, esconder header-actions e mostrar botões no menu */
@media (max-width: 350px) {
    .header-actions {
        display: none !important;
    }
    
    .mobile-action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    /* Ajustar o layout do header */
    .header-left {
        flex: 1;
    }
    
    .menu-toggle {
        margin-right: auto;
    }
    
    .page-header {
        padding: 10px 15px;
    }
}

/* ===== RESPONSIVIDADE ===== */

/* Tablet */
@media (max-width: 992px) {
    .page-header {
        padding: 12px 20px;
        margin: 8px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .header-btn, .header-cta {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .logo-main {
        font-size: 1.3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .page-header {
        padding: 12px 15px;
        margin: 5px;
        border-radius: 12px;
    }
    
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-sub {
        font-size: 0.7rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .header-actions {
        margin-left: auto;
        gap: 8px;
    }
    
    .header-btn, .header-cta {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .header-cta span {
        display: none;
    }
    
    .header-cta i {
        margin: 0;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .header-left {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 8px;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .logo-main {
        font-size: 1rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 6px;
        width: auto;
    }
    
    .header-btn, .header-cta {
        width: auto;
        justify-content: center;
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .menu-panel {
        width: 260px;
    }
}

/* Landscape mode (mobile deitado) */
@media (max-width: 768px) and (orientation: landscape) {
    .page-header {
        padding: 8px 15px;
    }
    
    .menu-panel {
        width: 240px;
        padding: 15px;
    }
    
    .menu-links {
        margin-top: 40px;
    }
    
    .menu-links a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Desktop grande */
@media (min-width: 1400px) {
    .page-header {
        max-width: 1400px;
        margin: 10px auto;
    }
}
/* para dispositivos muito pequeno */
@media (max-width: 350px) {
    .header-actions {
        display: none !important;
    }
    
    /* Ajustar o layout para compensar a remoção */
    .header-left {
        flex: 1;
        display: flex;
        flex-direction: row;
    }
    
    .menu-toggle {
        margin-right: auto;
    }
    
    .page-header {
        padding: 10px 15px;
    }
}

