/* ==========================================================================
   APROVAPDF - GLOBAL STYLES (Shared across all pages)
   Contains:navbar, theme support, reset, base styles
   ========================================================================== */

:root {
    /* Color Palette */
    --primary-blue: #0b1d3a;
    --secondary-blue: #162b4d;
    --accent-orange: #ff6b00;
    --accent-orange-hover: #e05d00;
    --accent-gold: #ffbe1a;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --bg-dark: #0b1430;
    --bg-card: #12203a;
    --bg-light: #ffffff;
    --green-success: #10b981;
    --hero-bg: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    --hero-text: #f8fafc;
    --top-bar-bg: #ffffff;
    --top-bar-text: #1e293b;
    --top-bar-muted: #64748b;

    /* Fonts - Josefin Sans as default font for the entire site */
    --font-heading: 'Josefin Sans', sans-serif;
    --font-body: 'Josefin Sans', sans-serif;

    /* Transitions */
    --transition-fast: 0.25s ease;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 30px -10px rgba(0, 0, 0, 0.25);

    /* Fixed navbar */
    --nav-height: 64px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Theme transition - smooth change between light/dark */
.theme-transition {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Default light theme */
body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 70px;
    padding-top: 48px;
}

@media (min-width: 769px) {
    body {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
}

.text-center { text-align: center; }
.text-green { color: var(--green-success); }
.highlight-gold { color: var(--accent-gold); }
.margin-top-cta { margin-top: 40px; }
.margin-top-sm { margin-top: 20px; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   THEME SUPPORT (data-theme attribute) - Light theme now default
   ========================================================================== */
[data-theme="light"] {
    --bg-light: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-card: #ffffff;
    --primary-blue: #0b1d3a;
    --secondary-blue: #162b4d;
    --accent-orange: #ff6b00;
    --accent-gold: #ffbe1a;
    --hero-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --hero-text: #1e293b;
    --top-bar-bg: #ffffff;
    --top-bar-text: #1e293b;
}

/* ==========================================================================
   GLOBAL TOP BAR (Fixed at top of page)
   ========================================================================== */
.global-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 9999;
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.global-topbar-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
}

/* Logo do menu superior bem no meio da barra: posicionada no centro
   absoluto, com os links (Início / Área do Aluno) e o hambúrguer
   mantidos à direita. */
.global-topbar-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.global-topbar-nav {
    margin-left: auto;
}

.global-topbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-link.active {
    background: rgba(255, 190, 26, 0.2);
    color: var(--accent-gold);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu toggle button */
.nav-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--primary-blue);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

/* Mobile menu dropdown */
.global-topbar-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
}

.global-topbar-mobile a {
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #1e293b;
    display: block;
    text-align: center;
}

.global-topbar-mobile a:hover {
    background: rgba(255, 190, 26, 0.2);
    color: var(--accent-orange);
}

.global-topbar-mobile.active {
    display: flex;
}


/* Navbar logo styling */
.global-topbar-logo {
    display: flex;
    align-items: center;
}

.logo-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* PADRÃO DA LOGO DO TOPO — mesmo corte do rodapé: a logo (500x500)
   ocupa só a faixa central da imagem, então exibir com 36px de altura
   deixava o desenho com ~9px — minúsculo. Com object-fit: cover em
   150x40px, só a faixa do desenho aparece, ~4x maior. */
.logo-img-nav {
    width: 150px;
    height: 40px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==========================================================================
   MOBILE MENU & THEME TOGGLE
   ========================================================================== */
[data-theme="dark"] .global-topbar-mobile {
    background: #12203a;
}

[data-theme="dark"] .global-topbar-mobile a {
    color: #e8eef7;
}

/* ==========================================================================
   RESPONSIVE MOBILE MENU
   ========================================================================== */
@media (max-width: 768px) {
    .nav-mobile-toggle {
        display: inline-flex;
    }

    /* No celular, os links do topo (Início e Área do Aluno) somem da
       barra e ficam só no menu do hambúrguer — que já tem os dois.
       Sem isso, a logo maior (150px) + os dois links não cabiam na
       largura do celular e "Área do Aluno" quebrava em 3 linhas. */
    .global-topbar-nav .nav-link {
        display: none;
    }

    .global-topbar-nav {
        gap: 0;
    }

    .logo-img-nav {
        width: 120px;
        height: 32px;
    }
}

/* Botão flutuante de WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}
.whatsapp-float:hover { background: #1eb35a; color: #fff; }
@media (max-width: 768px) {
    .whatsapp-float { bottom: 86px; }
}

/* Botão flutuante do chat (substitui o flutuante de WhatsApp) */
.chat-float {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ff6b00;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}
.chat-float:hover { background: #e65e00; color: #fff; }
.chat-float { cursor: pointer; border: none; padding: 0; font-family: inherit; }
@media (max-width: 768px) {
    .chat-float { bottom: 86px; }
}

/* Janela flutuante do chat: abre por cima da página, sem sair dela.
   O botão flutuante continua visível enquanto a janela está aberta. */
.chat-widget {
    position: fixed;
    right: 18px;
    bottom: 96px;
    z-index: 9998;
    width: 360px;
    max-width: calc(100vw - 36px);
    height: 560px;
    max-height: calc(100vh - 180px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-widget[hidden] { display: none; }
.chat-widget-topo {
    background: #0b1d3a;
    color: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}
.chat-widget-topo button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
.chat-widget iframe { flex: 1; width: 100%; border: 0; }
@media (max-width: 768px) {
    .chat-widget { right: 12px; left: 12px; width: auto; bottom: 152px; height: 68vh; max-height: none; }
}
