/* =========================================================
   🔹 HEADER GERAL (VERSÃO HÍBRIDA)
   ========================================================= */

.site-header {
    background: #9cd8da;
    box-shadow: none; 
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1200;
    padding: 0;
    border: none;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

/* CONTAINER FLEX (Logo à esquerda, Controles à direita) */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 50px;
    border: none;
    margin: 0 auto;
    max-width: 1300px;
    width: 100%;
    box-sizing: border-box;
}

/* LOGO (Header Principal) */
.brand {
    display: flex;
    align-items: center;
    margin-left: 0;
    border: none;
    text-decoration: none;
}

.brand .logo-image {
    height: 40px;
    width: auto;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.brand:hover .logo-image {
    transform: scale(1.05);
}

/* CONTROLES (Wrapper para Login Desktop + Hambúrguer) */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* MENU HAMBÚRGUER */
.menu-toggle {
    background: none;
    border: none;
    font-size: 1.9rem;
    color: #d43350;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    position: static;
    transform: none;
    top: auto;
    right: auto;
}

.menu-toggle:hover {
    color: #d43350;
    transform: scale(1.1);
}

/* LÓGICA DE EXIBIÇÃO DO LOGIN (Mobile-First) */
.desktop-login { display: none; } /* Desktop login escondido no mobile */
.desktop-login span { display: none; }
.mobile-login { display: flex; } /* Mobile login visível por padrão (dentro do menu) */

/* MENU LATERAL (O Menu que abre) */
.navbar-collapse {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 90%;
    height: 100vh;
    background: #ffffff;
    padding: 1.5rem 1.8rem 4rem 1.8rem;
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.12);
    transition: left 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border: none;
    z-index: 1250;
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.navbar-collapse.show { left: 0; }

/* Logo DENTRO do menu lateral */
.navbar-logo-image {
    height: 35px;
    width: auto;
    margin-bottom: 2rem;
    display: block;
}

/* Itens de Menu (Home, CashBox, Blog) */
.main-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: none;
}

.main-nav .nav-link {
    color: #d43350;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: block;
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.main-nav .nav-link.active { background: #bae4e5; color: #000000; }
.main-nav .nav-link:hover { background: rgba(212, 51, 80, 0.1); color: #000000; }

/* Ações (Login Mobile e Redes Sociais dentro do menu) */
.actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    width: 100%;
    margin-bottom: 0;
}

/* Estilo geral para ambos os botões LOGIN */
.btn-login {
    background: #d43350;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Roboto', sans-serif;
}

.btn-login:hover {
    background: #d43350;
    transform: scale(1.05);
}

/* ÍCONES SOCIAIS */
.socials {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-left: auto;
}

.socials a { text-decoration: none; }

.socials i {
    background: #d43350;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.socials a:hover i {
    background: #d43350;
    transform: scale(1.1);
}

/* =========================================================
   RESPONSIVIDADE HEADER
   ========================================================= */

/* Transição para Desktop (Maior que 900px) */
@media (min-width: 901px) {
    /* Mostra o botão de login do desktop e seu texto */
    .desktop-login { display: inline-flex; align-items: center; gap: 8px; }
    .desktop-login span { display: inline; }

    /* REMOVIDO: Regra que escondia o .mobile-login no desktop */
    /* .mobile-login { display: none; } */
}

/* Ajustes para Telas Médias e Pequenas (Menor ou igual a 900px) */
@media (max-width: 900px) {
    .header-container { padding: 10px 20px; }
    .brand .logo-image { height: 35px; }
    .menu-toggle { font-size: 1.7rem; }
    .header-controls { gap: 10px; }
    .navbar-logo-image { height: 30px; }
}

/* Ajuste para Telas Muito Pequenas (Menor ou igual a 360px) */
@media (max-width: 360px) {
    .navbar-collapse { width: 100%; max-width: 100%; }
    .actions { flex-direction: column; align-items: flex-start; }
    .socials { margin-left: 0; margin-top: 10px; }
}