/* =======================================================
   CABEÇALHO PADRÃO OFICIAL & GAVETA LATERAL - R.R EDUCAÇÃO
   ======================================================= */

/* Header Base */
.site-header, header {
    height: 80px;
    width: 100%;
    border-bottom: 1px solid #1e293b;
    background-color: rgba(5, 7, 11, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container, header .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Marca e Logotipo Oficial R.R Educação */
.brand-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: transform 0.2s ease !important;
}

.brand-box:hover {
    transform: translateY(-1px) !important;
}

.logo-rs {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    letter-spacing: -2px !important;
    display: flex !important;
    gap: 0px !important;
}

.logo-rs span {
    background: linear-gradient(135deg, #00ffcc 0%, #7000ff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block !important;
    filter: none !important;
}

.logo-rs span.mirrored {
    transform: scaleX(-1) !important;
}

.logo-sub {
    color: #ffffff !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    margin-top: 2px !important;
}

.header-actions {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* Botão de Retorno Unificado */
.btn-voltar {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    background: rgba(0, 255, 204, 0.08) !important;
    color: #00ffcc !important;
    border: 1px solid rgba(0, 255, 204, 0.35) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.btn-voltar:hover {
    background: #00ffcc !important;
    color: #05070b !important;
    box-shadow: 0 0 18px rgba(0, 255, 204, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Rodapé Oficial Padronizado */
.site-footer, footer {
    border-top: 1px solid #1e293b !important;
    background-color: #0b0f19 !important;
    padding: 44px 0 28px !important;
    margin-top: auto !important;
}

.site-footer .container, footer .container {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    width: 100% !important;
}

.footer-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 22px !important;
}

.footer-links {
    display: flex !important;
    gap: 24px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.footer-links a {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.footer-links a::after {
    display: none !important;
}

.footer-links a:hover {
    color: #ffffff !important;
}

.footer-links a.active,
.footer-links a[aria-current="page"] {
    color: #00ffcc !important;
    font-weight: 700 !important;
}

.social-icons {
    display: flex !important;
    gap: 14px !important;
}

.social-icons a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: #111827 !important;
    border: 1px solid #1e293b !important;
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.social-icons a:hover {
    color: #00ffcc !important;
    border-color: #00ffcc !important;
    background: rgba(0, 255, 204, 0.08) !important;
    transform: translateY(-2px) !important;
}

.footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    text-align: center !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    width: 100% !important;
}

.footer-bottom p {
    margin: 0 !important;
}

.footer-update-note {
    color: #475569 !important;
    font-size: 0.75rem !important;
}

.profile-trigger-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100% !important;
    cursor: pointer;
    padding: 0 16px;
    border-left: 1px solid var(--border-subtle, #1f222f);
    background: transparent !important;
}

.profile-trigger-area:hover,
.profile-trigger-area.perfil-ativo {
    background: transparent !important;
}

.profile-text, #texto-usuario-header {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-muted, #9ca3af);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.profile-trigger-area:hover .profile-text,
.profile-trigger-area.perfil-ativo .profile-text {
    color: #00f5d4 !important;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.4);
}

/* Gaveta Lateral (Side Menu) */
.side-menu {
    position: fixed;
    top: 80px;
    right: 0;
    width: 300px;
    height: calc(100vh - 80px);
    background: rgba(14, 17, 27, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-subtle, #1f222f);
    padding: 24px 0;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.7);
    z-index: 999;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    pointer-events: auto !important;
}

.side-menu.menu-ativo {
    transform: translateX(0) !important;
}

.side-menu a,
.side-menu button {
    pointer-events: auto !important;
    cursor: pointer;
    position: relative;
    z-index: 2005;
}

/* AJUSTES OBRIGATÓRIOS PARA CELULAR (Evitar amassar botões e travar o menu) */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
    }

    /* Oculta seletores desnecessários no topo para desapertar o header no mobile */
    .btn-planos,
    nav,
    .lang-selector {
        display: none !important;
    }

    .btn-register {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .profile-trigger-area {
        padding: 0 8px;
        border-left: none;
    }

    /* No celular a gaveta vira um drawer que cobre 82% da tela por cima de tudo */
    .side-menu {
        top: 0;
        height: 100vh;
        width: 82% !important;
        max-width: 320px;
        z-index: 2000;
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85);
    }
}
