/* ============================================
   HEADER DO SITE PÚBLICO (index.php, gamificacao.php)
   Menu do desktop, botões do topo e gaveta do celular (assets/js/site.js abre/fecha).
   Carregar depois de site-light.css.
   ============================================ */

.nav-user-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    padding: 8px 0;
}

.nav-user-status i {
    color: #6366f1;
    font-size: 1rem;
}

/* CTAs do topo no desktop */
.btn-header-cta,
.btn-agendar-demo,
.btn-ticket-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: unset;
    min-height: 50px;
    padding: 0.72rem 1.25rem;
    color: #fff !important;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: opacity 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-agendar-demo {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-agendar-demo:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-ticket-top {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 4px 12px rgba(109,40,217,0.28);
}

.btn-ticket-top:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(109,40,217,0.34);
}

@media (max-width: 1024px) {
    .btn-agendar-demo,
    .btn-ticket-top { display: none !important; }
}

.nav-mobile-actions,
.nav-menu-mobile-only,
.mobile-nav-backdrop {
    display: none;
}

.drawer-cta,
.drawer-secondary {
    text-decoration: none;
}

/* ============================================
   RESPONSIVIDADE DO HEADER - MOBILE
   ============================================ */
@media (max-width: 768px) {

    /* Manter header fixo no scroll */
    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    /* Esconder menu de navegação no mobile */
    .nav-menu {
        display: none !important;
    }

    /* Esconder botão "Começar Agora" no mobile */
    .nav-actions .btn-primary {
        display: none !important;
    }

    .nav-actions-logged .btn-primary {
        display: inline-flex !important;
    }

    .nav-actions-logged .nav-user-status {
        display: none !important;
    }

    /* Manter apenas logo e botão "Entrar" visíveis */
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-actions {
        display: flex;
        gap: 10px;
    }

    /* Esconder toggle mobile (já que não teremos menu) */
    .mobile-toggle {
        display: none !important;
    }

    /* Ajustar tamanho do botão Entrar no mobile */
    .nav-actions .btn-outline {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Ajustar logo no mobile */
    .logo img {
        max-height: 35px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .nav-menu {
        display: none !important;
    }

    .mobile-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .nav-menu .drawer-demo {
        margin: 20px 16px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 13px 16px;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        color: #fff;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.95rem;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(37,99,235,0.3);
        transition: opacity 0.2s;
    }
    .nav-menu .drawer-demo:hover { opacity: 0.88; }
}

@media (min-width: 1025px) {
    .nav-menu li:has(.drawer-suporte) { display: none; }
    .nav-menu li:has(.drawer-demo) { display: none; }
}

@media (max-width: 1024px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

    .navbar {
        gap: 12px;
    }

    .nav-actions {
        display: none !important;
    }

    .nav-mobile-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }

    .nav-mobile-actions .btn {
        padding: 0.6rem 1rem;
        font-size: 0.88rem;
        white-space: nowrap;
        box-shadow: none;
    }

    .nav-mobile-actions .btn-outline {
        background: rgba(255, 255, 255, 0.94);
        border-width: 1.5px;
    }

    .nav-mobile-actions .btn-primary {
        padding-inline: 0.95rem;
    }

    .mobile-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        border: none;
        border-radius: 16px;
        background: linear-gradient(135deg, #7c3aed, #5b21b6);
        color: #fff;
        box-shadow: 0 14px 30px rgba(91, 33, 182, 0.28);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mobile-toggle:hover {
        opacity: 0.96;
        transform: translateY(-1px);
    }

    .logo img {
        max-height: 38px;
        max-width: 165px;
    }

    .nav-menu {
        position: fixed;
        top: 86px;
        left: 16px;
        right: 16px;
        display: flex !important;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 18px 18px 20px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 24px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-12px) scale(0.98);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        z-index: 1002;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-menu li {
        list-style: none;
    }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 4px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        color: #0f172a;
        font-size: 1rem;
        font-weight: 600;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        color: #5b21b6;
    }

    .nav-menu-mobile-only {
        display: block;
    }

    .nav-menu .drawer-demo,
    .nav-menu .drawer-ticket {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        margin: 14px 0 0;
        padding: 14px 16px;
        border-radius: 20px;
        text-decoration: none;
        text-align: center;
    }

    .drawer-cta {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding-left: 20px;
        color: #fff;
    }

    .drawer-demo {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        box-shadow: 0 12px 32px rgba(37, 99, 235, 0.24);
    }

    .drawer-ticket {
        background: linear-gradient(135deg, #8b5cf6, #6d28d9);
        box-shadow: 0 12px 32px rgba(109, 40, 217, 0.22);
    }

    .drawer-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.18);
        flex-shrink: 0;
        font-size: 1rem;
    }

    .drawer-copy {
        display: flex;
        flex-direction: column;
        gap: 1px;
        align-items: flex-start;
        text-align: left;
    }

    .drawer-copy strong {
        font-size: 0.97rem;
        line-height: 1.2;
    }

    .drawer-copy small {
        font-size: 0.76rem;
        opacity: 0.85;
    }

    .drawer-arrow {
        font-size: 0.95rem;
        opacity: 0.85;
        display: none;
    }

    .drawer-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 14px;
        padding: 12px 16px;
        border-radius: 16px;
        background: rgba(99, 102, 241, 0.08);
        border: 1px solid rgba(99, 102, 241, 0.16);
        color: #4c1d95;
        font-weight: 700;
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 1001;
    }

    .mobile-nav-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .hero-actions {
        gap: 10px;
    }

    .hero-actions .btn {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
        min-height: 52px;
        border-radius: 18px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.85rem 0;
    }

    .nav-mobile-actions {
        gap: 8px;
    }

    .nav-mobile-actions .btn {
        padding: 0.55rem 0.95rem;
        font-size: 0.83rem;
    }

    .mobile-toggle {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .nav-menu {
        top: 78px;
        left: 12px;
        right: 12px;
        padding: 16px 16px 18px;
        border-radius: 20px;
    }

    .logo img {
        max-height: 34px;
        max-width: 150px;
    }
}

@media (min-width: 1025px) {
    .nav-menu-mobile-only {
        display: none !important;
    }
}
