/* Importação de fonte moderna e limpa (Inter) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Reset Geral */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0f172a; 
    color: #f8fafc; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Responsivo */
.layout {
    display: flex;
    flex-direction: column; 
    min-height: 100vh;
}

/* ========================================================== */
/* 🆕 NAVBAR FIXA NO TOPO (Estrutura Mobile First)            */
/* ========================================================== */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px; 
    background-color: #0f172a; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 996; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-container {
    width: 100%;
    height: 100%;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.15rem; 
    font-weight: 800;   
    letter-spacing: 0.8px; 
}

.nav-logo .text-highlight {
    color: #22c55e; 
}

/* Esconde o bloco de menus e redes do topo no Mobile (vai pra Sidebar) */
.nav-menu-wrapper {
    display: none;
}

/* ========================================================== */
/* REGRAS DAS REDES SOCIAIS NA SIDEBAR (MOBILE)               */
/* ========================================================== */
.nav-socials-mobile {
    margin-top: auto; /* Empurra os ícones para o rodapé da barra lateral */
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-socials-mobile p {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.socials-mobile-grid {
    display: flex;
    gap: 1.25rem;
}

.socials-mobile-grid a {
    color: #94a3b8;
    font-size: 1.25rem;
    padding: 0 !important; /* Reseta estilos padrão de links da sidebar */
    background: transparent !important;
    text-decoration: none;
    transition: color 0.2s;
}

.socials-mobile-grid a:hover {
    color: #ffffff;
}

/* ========================================================== */
/* CONTROLES E ESTILOS DA SIDEBAR (MOBILE FIRST)             */
/* ========================================================== */
.menu-toggle {
    display: block;
    position: fixed;
    top: 0.8rem; 
    right: 1rem;  
    z-index: 997;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.menu-close {
    display: block;
    background: transparent;
    color: #94a3b8;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
}

.menu-close:hover {
    color: #ffffff;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: #0f172a;
    color: #f8fafc;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: -260px; 
    top: 0;
    z-index: 999;
    transition: left 0.25s ease-in-out;
}

.sidebar .logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    margin-bottom: 1.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar .logo a {
    color: inherit;
    text-decoration: none;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 0.25rem 0;
}

.sidebar a {
    color: #94a3b8;
    background-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.sidebar a:hover {
    color: #ffffff;
    background-color: #1e293b;
}

.sidebar a.active {
    color: #ffffff;
    background-color: #2563eb;
}

/* Ativação via JavaScript */
body.menu-active .sidebar { left: 0; }
body.menu-active .sidebar-overlay { display: block; }
body.menu-active { overflow: hidden; }

/* Área de Conteúdo Mobile */
.content {
    flex: 1;
    margin-left: 0;
    padding: 76px 1rem 1.5rem 1rem; 
    background: #0f172a; 
    overflow-y: auto;
}

.footer {
    background: #0f172a;
    text-align: center;
    padding: 1rem;
    color: #475569;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================================== */
/* 💻 REGRAS PARA MÁQUINAS E TELAS GRANDES (PC / DESKTOP)     */
/* ========================================================== */
@media (min-width: 768px) {
    .layout {
        flex-direction: row;
        min-height: calc(100vh - 56px);
    }

    /* Ajusta a Navbar para conviver com a Sidebar sem quebras */
    .main-navbar {
        padding-left: 240px; 
    }

    /* Remove o Logo duplicado da Navbar, já que a Sidebar do PC tem o logo fixo */
    .main-navbar .nav-logo {
        display: none; 
    }

    /* Ativa o container de links e redes no topo */
    .nav-menu-wrapper {
        display: flex;
        align-items: center;
        justify-content: flex-end; /* Joga tudo para o canto direito */
        width: 100%;
        gap: 2rem; 
    }

    .nav-menu {
        display: flex;
        list-style: none;
        gap: 0.5rem;
    }

    .nav-link {
        color: #94a3b8;
        text-decoration: none;
        padding: 6px 12px;
        font-size: 0.85rem; 
        font-weight: 500;
        border-radius: 6px;
        transition: all 0.2s ease-in-out;
    }

    .nav-link:hover {
        color: #ffffff;
        background-color: #1e293b;
    }

    /* Bloco Social Desktop (À direita dos links de texto) */
    .nav-socials-desktop {
        display: flex;
        align-items: center;
        gap: 1rem;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 1.25rem;
    }

    .nav-social-icon {
        color: #64748b;
        font-size: 1.05rem;
        transition: color 0.2s ease, transform 0.2s ease;
        text-decoration: none;
    }

    .nav-social-icon:hover {
        color: #ffffff;
        transform: translateY(-1px);
    }

    /* Oculta os elementos mobile no modo PC */
    .menu-toggle, 
    .menu-close, 
    .sidebar-overlay,
    .nav-socials-mobile {
        display: none !important;
    }

    /* Fixação Inteligente da Sidebar Lateral */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 240px; 
        height: 100vh;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
    }

    .sidebar .logo {
        margin-bottom: 2rem;
        justify-content: flex-start;
    }

    /* Conteúdo Enxuto Centralizado no PC */
    .content {
        margin-left: 240px;
        width: calc(100% - 240px);
        padding: 5rem 2rem 2rem 2rem; 
        flex: 1;
        background: #0f172a;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
}