/**
 * HEADER BRIDGE - RESPONSIVO E OTIMIZADO
 */

/* Header principal */
.page_header {
    display: block !important;
    background: white !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    position: relative !important;
    z-index: 1000 !important;
}

.header_bottom {
    padding: 8px 0 !important;
}

.header_bottom .container {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.header_bottom .container_inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
}

/* Logo - À ESQUERDA */
.logo_wrapper {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

.q_logo {
    display: flex !important;
    align-items: center !important;
}

.q_logo img {
    display: none !important;
}

.q_logo img.normal,
.q_logo img:first-of-type {
    display: block !important;
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
}

/* LADO ESQUERDO - Logo */
.header_inner_left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
}

/* LADO DIREITO - Menu + Botões */
.header_inner_right {
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
    flex: 1 1 auto !important;
    justify-content: space-between !important;
}

/* Menu - NO CENTRO */
.header_inner_right .main_menu {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
}

.main_menu > ul {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 5px !important;
}

.main_menu > ul > li {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 12px !important;
    list-style: none !important;
}

.main_menu > ul > li > a {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #111827 !important;
    padding: 8px 0 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.main_menu > ul > li > a:hover {
    color: #C4F20A !important;
}

/* REMOVER REDES SOCIAIS */
.header_inner_right .social_icon_widget,
.header_inner_right .widget_social_icon_widget,
.header_inner_right .widget_text,
.header_inner_right .textwidget,
.header_inner_right aside,
.header_inner_right .widget,
.header_bottom .social_icon_widget,
.header_bottom aside.widget,
aside.widget_social_icon_widget,
.header_bottom .widget_social_icon_widget,
.header-widget-area,
.header_top .widget,
.header_top aside,
div[class*="social"],
.social_icon_widget-2,
.widget_social_icon_widget,
.header_inner_right > aside,
.header_inner_right > div.widget,
.q_social_icon_holder,
a[class*="social"],
i[class*="fa-facebook"],
i[class*="fa-twitter"],
i[class*="fa-instagram"],
.header_bottom a[href*="facebook"],
.header_bottom a[href*="twitter"],
.header_bottom a[href*="instagram"],
.header_inner_right a[href*="facebook"],
.header_inner_right a[href*="twitter"],
.header_inner_right a[href*="instagram"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* Container dos botões - À DIREITA */
.header-custom-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Botões - Tamanho Desktop */
.header-btn {
    padding: 14px 32px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border: none !important;
    line-height: 1.2 !important;
}

.header-btn-primary {
    background: linear-gradient(to right, #C4F20A, #A8D108) !important;
    color: #111827 !important;
    border: none !important;
}

.header-btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(196, 242, 10, 0.3) !important;
}

.header-btn-secondary {
    background: white !important;
    color: #111827 !important;
    border: 2px solid #111827 !important;
    padding: 12px 30px !important;
}

.header-btn-secondary:hover {
    background: #111827 !important;
    color: white !important;
}

.header-btn-outline {
    background: white !important;
    color: #FF6B9D !important;
    border: 2px solid #FF6B9D !important;
    padding: 12px 30px !important;
}

.header-btn-outline:hover {
    background: #FF6B9D !important;
    color: white !important;
}

/* Botão de Dashboard para usuário logado */
.header-btn-dashboard {
    background: #4A90E2 !important;
    color: white !important;
    border: 2px solid #4A90E2 !important;
    padding: 12px 30px !important;
}

.header-btn-dashboard:hover {
    background: #357ABD !important;
    border-color: #357ABD !important;
    transform: translateY(-1px) !important;
}

.header-btn-dashboard i {
    margin-right: 6px;
}

/* Botão de logout para usuário logado */
.header-btn-logout {
    background: #FF6B9D !important;
    color: white !important;
    border: 2px solid #FF6B9D !important;
    padding: 12px 30px !important;
}

.header-btn-logout:hover {
    background: #FF5288 !important;
    border-color: #FF5288 !important;
    transform: translateY(-1px) !important;
}

/* Saudação do usuário logado no header desktop */
.header-user-welcome {
    display: inline-flex !important;
    align-items: center !important;
    padding: 14px 24px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    margin-right: 12px !important;
}

.header-user-welcome .welcome-text {
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.header-user-welcome .welcome-text strong {
    color: #FF6B9D !important;
    font-weight: 700 !important;
}

/* Saudação do usuário logado no mobile */
.mobile-user-welcome {
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.mobile-user-welcome .mobile-welcome-text {
    color: #111827;
    font-size: 15px;
    font-weight: 500;
    display: block;
}

.mobile-user-welcome .mobile-welcome-text strong {
    color: #FF6B9D;
    font-weight: 700;
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

/* RESPONSIVIDADE - Telas médias (laptops pequenos) */
@media (max-width: 1400px) {
    .header_inner_right {
        gap: 20px !important;
    }
    
    .main_menu > ul > li {
        padding: 0 8px !important;
    }
    
    .main_menu > ul > li > a {
        font-size: 13px !important;
    }
    
    .header-btn {
        padding: 12px 24px !important;
        font-size: 13px !important;
    }
    
    .header-btn-secondary,
    .header-btn-outline,
    .header-btn-dashboard,
    .header-btn-logout {
        padding: 10px 22px !important;
    }
    
    .header-user-welcome {
        padding: 12px 20px !important;
    }
    
    .header-user-welcome .welcome-text {
        font-size: 13px !important;
    }
}

/* RESPONSIVIDADE - Laptops pequenos */
@media (max-width: 1200px) {
    .header_inner_right {
        gap: 15px !important;
    }
    
    .header-custom-buttons {
        gap: 8px !important;
    }
    
    .header-btn {
        padding: 10px 20px !important;
        font-size: 12px !important;
    }
    
    .header-btn-secondary,
    .header-btn-outline,
    .header-btn-dashboard,
    .header-btn-logout {
        padding: 8px 18px !important;
    }
    
    .header-user-welcome {
        padding: 10px 18px !important;
    }
    
    .header-user-welcome .welcome-text {
        font-size: 12px !important;
    }
}

/* RESPONSIVIDADE - Tablets */
@media (max-width: 1024px) {
    .main_menu > ul > li {
        padding: 0 6px !important;
    }
    
    .header-btn {
        padding: 8px 16px !important;
        font-size: 11px !important;
    }
    
    .header-btn-secondary,
    .header-btn-outline,
    .header-btn-dashboard,
    .header-btn-logout {
        padding: 6px 14px !important;
    }
    
    .header-user-welcome {
        padding: 8px 16px !important;
    }
    
    .header-user-welcome .welcome-text {
        font-size: 11px !important;
    }
}

/* Mobile - HEADER CUSTOMIZADO */
@media (max-width: 1000px) {
    .page_header {
        display: none !important;
    }
    
    .mobile-header-custom {
        display: block !important;
    }
}

/* Desktop - esconder header mobile customizado */
@media (min-width: 1001px) {
    .mobile-header-custom {
        display: none !important;
    }
}

/* Header Mobile Customizado */
.mobile-header-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 12px 20px;
}

.mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-logo img {
    height: 35px;
    width: auto;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #111827;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px; /* PADDING PARA NÃO CORTAR */
    box-sizing: border-box; /* IMPORTANTE */
}

.mobile-menu-sidebar.active {
    right: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #111827;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
}

.mobile-menu-nav {
    margin-top: 50px;
}

.mobile-menu-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-nav li {
    margin-bottom: 5px;
}

.mobile-menu-nav a {
    display: block;
    padding: 12px 15px;
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-nav a:hover {
    background: #f9fafb;
    color: #C4F20A;
}

.mobile-menu-buttons {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Botões Mobile - INTEIROS sem cortar */
.mobile-menu-buttons .header-btn {
    display: block !important;
    width: calc(100% - 0px) !important; /* LARGURA TOTAL menos padding das bordas */
    max-width: 100% !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    padding: 14px 20px !important; /* Padding menor lateral para não cortar */
    font-size: 14px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}

.mobile-menu-buttons .header-btn-secondary,
.mobile-menu-buttons .header-btn-outline {
    padding: 12px 18px !important; /* Ajuste para compensar borda */
}

/* Ajuste do body quando mobile header está ativo */
@media (max-width: 1000px) {
    body {
        padding-top: 60px !important;
    }
    
    .home-moderna-wrapper {
        margin-top: 0 !important;
    }
}

/* Limpar elementos vazios */
.header_inner_left > div:empty,
.header_inner_right > div:empty,
.header_inner_right > aside:empty {
    display: none !important;
}