/* public_html/css/home_style.css */
/* Importando a Inter (para textos) e a Rajdhani (para títulos) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    --bg-dark: #050508;
    --panel-bg: rgba(10, 10, 15, 0.65);
    --neon-blue: #00f2ff;
    --neon-gold: #ffaa00;
    --neon-purple: #b026ff;
    --text-main: #ffffff;
    --text-muted: #c4c4cc;
}

/* Configuração Geral (Para PC) */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    min-height: 100vh;
}

/* Esconde o novo menu flutuante no computador */
.fab-container { 
    display: none; 
}

/* =======================================
   NAVBAR & DROPDOWNS (PC)
   ======================================= */
.top-navbar {
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 242, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
}

.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item { position: relative; display: flex; align-items: center; }

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 15px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 15px var(--neon-blue);
    background: rgba(0, 242, 255, 0.05);
}

/* Dropdown Mágico Aprimorado */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-top: 2px solid var(--neon-blue);
    min-width: 220px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    animation: dropFade 0.3s ease forwards;
}

@keyframes dropFade {
    from { opacity: 0; transform: translateY(-15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-item:hover .dropdown-content { display: block; }

.dropdown-content a {
    color: var(--text-muted);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.dropdown-content a:hover {
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.15), transparent);
    color: var(--neon-blue);
    padding-left: 25px;
    border-left: 3px solid var(--neon-blue);
}

/* =======================================
   LAYOUT 3 COLUNAS & PAINÉIS
   ======================================= */
.main-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 30px;
    max-width: 1450px;
    margin: 40px auto;
    padding: 0 20px;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

/* EFEITO NEON CORRENDO + VIDRO */
.glass-panel::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue)); transition: all 0.4s ease;
}
.glass-panel::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg); transition: 0.5s;
}
.glass-panel:hover { 
    border-color: rgba(0, 242, 255, 0.5); 
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.15), 0 0 15px rgba(0, 242, 255, 0.1) inset; 
    transform: translateY(-5px); 
}
.glass-panel:hover::before { left: 100%; transition: all 0.6s ease; }
.glass-panel:hover::after { left: 150%; }

.panel-title {
    color: var(--neon-gold);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    text-align: left;
    font-size: 19px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 170, 0, 0.2);
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
    letter-spacing: 1px;
}

/* =======================================
   PUBLICIDADE & BANNERS
   ======================================= */
.ad-banner {
    width: 100%;
    background: #000;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative; transition: 0.4s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.ad-banner img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.ad-banner:hover { border-color: var(--neon-blue); box-shadow: 0 0 25px rgba(0, 242, 255, 0.3); }
.ad-banner:hover img { transform: scale(1.08); filter: brightness(1.2); }

.banner-sm { height: 120px; margin-bottom: 15px; }
.banner-md { height: 300px; margin-bottom: 15px; }
.banner-lg { height: 100px; margin-bottom: 30px; }

/* =======================================
   CARROSSEL PREMIUM
   ======================================= */
.carousel-container {
    width: 100%; height: 380px;
    border-radius: 16px; overflow: hidden; position: relative;
    border: 1px solid rgba(0, 242, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.15);
    margin-bottom: 30px;
}
.carousel-slide {
    width: 100%; height: 100%; background-size: cover; background-position: center;
    position: absolute; top: 0; left: 0;
    opacity: 0; transition: opacity 1.2s ease-in-out, transform 5s linear;
    transform: scale(1.05);
}
.carousel-slide.active { opacity: 1; transform: scale(1); }


/* ========================================================
   📱 CONFIGURAÇÃO ULTRA-RESPONSIVA PARA CELULARES (ZOOM OUT REAL)
   ======================================================== */
@media screen and (max-width: 1024px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        font-size: 11px !important; /* Encolhe todos os textos proporcionalmente */
    }

    /* Miniaturização inteligente de títulos gerais */
    h1, h2, h3, h5, h6, .panel-title {
        font-size: 13px !important;
        margin: 4px 0 !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Títulos de notícias ligeiramente destacados mas contidos */
    .content-center h4 {
        font-size: 15px !important;
        margin: 4px 0 !important;
    }

    /* Quebra o Grid de 3 colunas em blocos lineares de 100% reais */
    .main-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 6px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .content-center {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .sidebar-left, .sidebar-right {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Encolhe os paddings internos para economizar espaço e reduzir o aspecto gigante */
    .glass-panel, .card-login-compacto {
        width: 100% !important;
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    /* Ajuste de escala para formulários e botões */
    input, button, .btn-acessar-painel, .btn-logout, .btn-criar-conta {
        padding: 6px 10px !important;
        font-size: 11px !important;
        margin-bottom: 6px !important;
        border-radius: 5px !important;
    }

    /* Oculta completamente a barra de navegação superior mobile antiga */
    .mobile-top-nav-bar {
        display: none !important;
    }

    /* 🛑 REMOVE DE VEZ O BOTÃO ANTIGO "ABRIR CHAMADO" */
    .btn-flutuante-chamado, .btn-notificacao, a[href*="chamado"], button:contains("chamado") {
        display: none !important;
    }

    /* ========================================================
        🎯 CONTROLE INTELIGENTE DE EXIBIÇÃO DE ABAS (MOBILE)
       ======================================================== */
    /* 🏠 ABA INÍCIO: Oculta as duas laterais e exibe o centro */
    html.view-content .sidebar-left, html.view-content .sidebar-right { display: none !important; }
    html.view-content .content-center { display: block !important; }

    /* 🔐 ABA LOGIN: Deixa SÓ a área de login limpa, oculta as propagandas abaixo dela */
    html.view-login .content-center, html.view-login .sidebar-left { display: none !important; }
    html.view-login .sidebar-right { display: block !important; }
    html.view-login .sidebar-right .glass-panel:not(.card-login-compacto) { display: none !important; }

    /* 🖼️ ABA PARCEIROS: Move e junta todas as propagandas (esquerda e direita) aqui, esconde o login */
    html.view-banners .content-center { display: none !important; }
    html.view-banners .sidebar-left { display: block !important; }
    html.view-banners .sidebar-right { display: block !important; }
    html.view-banners .sidebar-right .card-login-compacto { display: none !important; }

    /* ========================================================
       ✨ NOVO BOTÃO FLUTUANTE PREMIUM (ALINHADO À DIREITA)
       ======================================================== */
    .fab-container {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px; /* FIXADO COMPLETO NO LADO DIREITO */
        left: auto !important;
        z-index: 99999;
        flex-direction: column-reverse;
        align-items: flex-end; /* Alinha os itens na margem direita */
        gap: 10px;
    }

    .fab-main-btn {
        width: 52px;
        height: 52px;
        background: rgba(5, 5, 8, 0.95) !important;
        border: 2px solid var(--neon-blue) !important;
        border-radius: 50% !important;
        color: var(--neon-blue) !important;
        font-size: 26px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        padding: 0 !important;
        margin: 0 !important;
        outline: none;
    }

    /* Rotação e troca de cor ao abrir (+ vira X) */
    .fab-container.open .fab-main-btn {
        transform: rotate(135deg);
        border-color: var(--neon-gold) !important;
        color: var(--neon-gold) !important;
        box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
    }

    .fab-menu {
        display: flex;
        flex-direction: column;
        gap: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.25s ease-in-out;
        pointer-events: none;
        align-items: flex-end; /* Garante alinhamento à direita */
    }

    .fab-container.open .fab-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Estilização Geral dos Links do Menu Flutuante */
    .fab-item {
        position: relative; /* OBRIGATÓRIO: Permite ancorar submenus relativos */
        background: rgba(5, 5, 8, 0.9) !important;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(0, 242, 255, 0.2) !important;
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 10px 16px !important;
        font-family: 'Rajdhani', sans-serif !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 6px !important;
        text-decoration: none !important;
        white-space: nowrap;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        transition: all 0.2s ease;
        text-align: right;
        display: block !important;
        width: max-content;
    }

    .fab-item:hover, .fab-item.active {
        background: rgba(0, 242, 255, 0.08) !important;
        color: var(--neon-blue) !important;
        border-color: var(--neon-blue) !important;
        text-shadow: 0 0 5px var(--neon-blue);
    }

    /* ========================================================
       🛡️ SUPORTE COMPLETO AOS DROPDOWNS (SERVIÇOS E MAIS) NO MOBILE
       ======================================================== */
    /* Faz a caixa do Dropdown abrir para a ESQUERDA para não cortar na borda direita da tela */
    .fab-item .dropdown-content {
        display: none !important; 
        position: absolute !important;
        bottom: -2px !important; /* Alinha horizontalmente com o item pai */
        right: 106% !important;  /* Empurra o submenu totalmente para a ESQUERDA */
        left: auto !important;
        top: auto !important;
        background: rgba(5, 5, 8, 0.98) !important;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 242, 255, 0.3) !important;
        border-right: 3px solid var(--neon-blue) !important; /* Detalhe estético neon */
        border-top: none !important;
        min-width: 170px !important;
        box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.8) !important;
        border-radius: 6px 0 0 6px !important;
        padding: 4px 0 !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Ativa a abertura do Dropdown ao passar o dedo / hover no Mobile */
    .fab-item:hover .dropdown-content,
    .fab-item:focus-within .dropdown-content {
        display: flex !important;
    }

    /* Customização dos links internos do Dropdown Mobile */
    .fab-item .dropdown-content a {
        display: block !important;
        color: #c4c4cc !important;
        padding: 10px 15px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        text-align: right !important; /* Alinhamento estético limpo */
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        font-family: 'Inter', sans-serif !important;
        text-transform: none !important; /* Preserva capitulação original das categorias */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .fab-item .dropdown-content a:last-child {
        border-bottom: none !important;
    }

    .fab-item .dropdown-content a:hover {
        background: linear-gradient(-90deg, rgba(0, 242, 255, 0.12), transparent) !important;
        color: var(--neon-blue) !important;
    }

    /* Miniaturização do carrossel */
    .carousel-container {
        height: 120px !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
    }

    /* Redimensionamento elegante de logos de publicidade */
    .ad-banner {
        max-width: 100% !important;
        height: auto !important;
    }
    .ad-banner img {
        max-height: 55px !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }
    .titulo-propaganda {
        font-size: 9px !important;
        margin-bottom: 3px !important;
        letter-spacing: 1px !important;
    }

    /* Encolhe o bloco de avatar */
    .avatar-widget-index {
        width: 50px !important;
        height: 50px !important;
        margin: 0 auto 8px auto !important;
    }
    .cp-container {
        padding: 6px !important;
        margin-bottom: 8px !important;
    }

    /* Tabelas responsivas */
    table, .forum-table, .post-table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
    }
}