﻿/* =====================================================
   🌐 BASE GLOBAL
   ===================================================== */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #faf9f6;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =====================================================
   🎯 VARIÁVEIS TUIC
   ===================================================== */

:root {
    --TUIC-marrom: #5e2b1f;
    --TUIC-verde: #2b7a3f;
    --TUIC-dourado: #c7a150;
    --TUIC-claro: #faf9f6;
}

/* =====================================================
   📐 LAYOUT GLOBAL
===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =====================================================
   🧭 NAVBAR (MENU HÍBRIDO CORRIGIDO)
   ===================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 64px;
    z-index: 1050;
    background: linear-gradient(90deg, #8b4c2b 0%, #3d8044 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible !important; /* 🔑 evita sumiço do menu */
}

/* LOGO */
.navbar-brand {
    color: #fff !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .navbar-brand img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid #f8e3b0;
        background: #fff;
    }


/* 📱 Mobile / App instalado */
@media (max-width: 768px) {
    .navbar-brand img {
        width: 30px;
        height: 30px;
        border-width: 1.5px;
    }
}


/* =====================================================
   🧭 MENU DESKTOP
   ===================================================== */

.navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

    .navbar-nav .nav-item {
        white-space: nowrap;
    }

.navbar .nav-link {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 8px;
    line-height: 1.1;
}
#menuDesktop {
    flex-wrap: nowrap !important;
    overflow: hidden;
}



/* =====================================================
   ☰ BOTÃO OFFCANVAS
   ===================================================== */

.navbar-toggler {
    border: none;
    background: transparent;
    color: #fff;
}

/* =====================================================
   🔀 CONTROLE DE BREAKPOINT (CORREÇÃO DEFINITIVA)
   ===================================================== */

/* 👉 DESKTOP (>= 992px) */
@media (min-width: 992px) {
    .navbar-nav {
        display: flex !important;
    }

    .navbar-toggler {
        display: none !important;
    }
}

/* 👉 MOBILE (< 992px) */
@media (max-width: 991.98px) {
    #menuDesktop {
        display: none !important;
    }

    .navbar-toggler {
        display: block !important;
    }
}

/* =====================================================
   🧾 SUBTÍTULO
   ===================================================== */

.app-subtitle {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: 36px;
    text-align: center;
    font-size: 1rem;
    font-style: italic;
    font-weight: 700;
    background-color: #fff;
    color: var(--TUIC-marrom);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   📄 MAIN
   ===================================================== */

main {
    flex: 1;
    width: 100%;
    padding-top: 145px;
    padding-bottom: 80px;
    overflow-x: hidden;
}


/* =====================================================
   🔻 FOOTER
   ===================================================== */

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    text-align: center;
    background-color: var(--TUIC-claro);
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
    color: var(--TUIC-marrom);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* =====================================================
   🎨 BOTÕES TUIC
   ===================================================== */

.btn-TUIC {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: clamp(1rem, 3vw, 1.1rem);
    border-radius: 30px;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    min-width: 220px;
}

.btn-verde {
    border: 2px solid #2b7a3f;
    color: #2b7a3f;
    background-color: #fff;
}

    .btn-verde:hover {
        background-color: #2b7a3f;
        color: #fff;
    }

/* =====================================================
   📱 RESPONSIVO HOME
   ===================================================== */

@media (max-width: 768px) {
    .inicio-container {
        justify-content: center;
        padding-top: 0;
    }

        .inicio-container img {
            width: 70vw;
            max-width: 240px;
        }

        .inicio-container h1 {
            font-size: 1.4rem;
        }
}

/* ✅ Se a tela for "grande", mas com pouco espaço (zoom alto),
   troca para hamburguer antes de quebrar */


/* =====================================================
   📱 OFFCANVAS TUIC (MOBILE MENU)
   ===================================================== */

.TUIC-offcanvas {
    background: linear-gradient(180deg, #8b4c2b 0%, #3d8044 100%);
    color: #fff;
    border-right: 2px solid rgba(255,255,255,0.15);
}

    /* Cabeçalho do offcanvas */
    .TUIC-offcanvas .offcanvas-header {
        background: rgba(0,0,0,0.12);
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    /* Título */
    .TUIC-offcanvas .offcanvas-title {
        color: #fff;
        font-weight: 800;
    }

        .TUIC-offcanvas .offcanvas-title small {
            display: block;
            font-weight: 500;
            opacity: 0.85;
        }

    /* Botão X branco */
    .TUIC-offcanvas .btn-close {
        filter: invert(1);
        opacity: 0.9;
    }

    /* Links do menu */
    .TUIC-offcanvas .nav-link {
        color: #fff !important;
        font-weight: 600;
        padding: 12px 12px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: 0.2s ease-in-out;
    }

        /* Hover/Toque */
        .TUIC-offcanvas .nav-link:hover,
        .TUIC-offcanvas .nav-link:focus {
            background: rgba(255,255,255,0.14);
        }

    /* Linhas separadoras */
    .TUIC-offcanvas hr {
        border-color: rgba(255,255,255,0.25);
    }

    /* Submenus recolhíveis */
    .TUIC-offcanvas .collapse .nav-link {
        padding-left: 18px;
        font-weight: 500;
        opacity: 0.95;
    }

    /* Ícone de seta (chevron) */
    .TUIC-offcanvas .bi-chevron-down {
        color: rgba(255,255,255,0.9);
    }
    /* =====================================================
   📱 OFFCANVAS — MENU EM COLUNA (UM ABAIXO DO OUTRO)
   ===================================================== */

    .TUIC-offcanvas .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Cada item ocupa 100% da largura */
    .TUIC-offcanvas .nav-item,
    .TUIC-offcanvas .nav-link {
        width: 100% !important;
    }

    /* Remove qualquer layout em linha */
    .TUIC-offcanvas .nav-link {
        justify-content: flex-start !important;
        text-align: left !important;
        white-space: normal !important;
    }

        .TUIC-offcanvas .nav-link.d-flex {
            justify-content: flex-start !important;
            gap: 10px;
        }

    .TUIC-offcanvas .collapse .navbar-nav {
        padding-left: 14px;
    }

    .TUIC-offcanvas .collapse .nav-link {
        font-size: 0.95rem;
        opacity: 0.95;
    }

/* =====================================================
   ✅ DROPDOWNS DO MENU (DESKTOP) - TUIC STYLE
   ===================================================== */

.navbar .dropdown-menu {
    margin-top: 10px !important; /* dá "respiro" pra não ficar colado */
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(20, 20, 20, 0.92); /* fundo escuro elegante */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    min-width: 220px;
    top: 100% !important;
}

    /* itens do dropdown */
    .navbar .dropdown-menu .dropdown-item {
        color: #fff !important;
        font-weight: 600;
        border-radius: 10px;
        padding: 10px 12px;
    }

        /* hover bonito */
        .navbar .dropdown-menu .dropdown-item:hover {
            background: rgba(255,255,255,0.14);
        }

    /* evita quebrar texto */
    .navbar .dropdown-menu .dropdown-item {
        white-space: nowrap;
    }

/* =====================================================
   ✅ CORREÇÃO DEFINITIVA DROPDOWN DESKTOP (não empurra nada)
   ===================================================== */

/* Faz o dropdown "flutuar" e não bagunçar a navbar */
.navbar .dropdown {
    position: relative !important;
}

.navbar .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important; /* abre abaixo com espaço */
    left: 0 !important;
    transform: none !important;
    margin: 0 !important;
    min-width: 220px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 15, 15, 0.95);
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    z-index: 9999 !important; /* fica por cima sempre */
}

    /* Itens do dropdown */
    .navbar .dropdown-menu .dropdown-item {
        color: #fff !important;
        font-weight: 600;
        padding: 10px 12px;
        border-radius: 12px;
    }

        /* Hover elegante */
        .navbar .dropdown-menu .dropdown-item:hover {
            background: rgba(255,255,255,0.14);
        }

/* Desktop menu: nunca quebra linha */
#menuDesktop {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow: visible;
}
    /* Não deixar texto quebrar */
    #menuDesktop .nav-link {
        white-space: nowrap;
    }

/* ✅ GARANTE QUE O DROPDOWN DO BOOTSTRAP FUNCIONE */
.navbar,
.navbar * {
    pointer-events: auto;
}

    /* ✅ Dropdown precisa aparecer acima de tudo */
    .navbar .dropdown-menu {
        z-index: 99999 !important;
    }

/* ✅ Não pode cortar dropdown */
.navbar {
    overflow: visible !important;
}

.navbar-nav {
    overflow: visible !important;
}

/* =====================================================
   ✅ FIX TINYMCE / EDITOR (altura correta)
   ===================================================== */

.editor-container {
    width: 100%;
    min-height: 520px; /* ✅ altura mínima */
    max-height: 70vh; /* ✅ não explode em telas pequenas */
    overflow: auto;
    border-radius: 12px;
}

/* TinyMCE iframe tem que ocupar o container */
.tox-tinymce {
    width: 100% !important;
    min-height: 520px !important;
}

/* Mobile */
@media (max-width: 768px) {
    .editor-container {
        min-height: 60vh;
        max-height: 75vh;
    }

    .tox-tinymce {
        min-height: 60vh !important;
    }
}

/* Botão fixo embaixo */
.botao-fixo {
    position: sticky;
    bottom: 10px;
    padding-top: 10px;
}

/* ✅ Badge estilo APP */
.TUIC-badge {
    position: absolute;
    top: -6px;
    right: -12px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.70rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.20);
}

/* =====================================================
   📱 AJUSTE FINO – COMPACTAÇÃO DO MENU OFFCANVAS
   (não altera desktop nem layout existente)
   ===================================================== */

/* Compacta altura dos itens do menu */
.TUIC-offcanvas .nav-link {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 1.2;
    font-size: 0.95rem;
}

/* Compacta submenus */
.TUIC-offcanvas .collapse .nav-link {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: 0.9rem;
}

/* Reduz espaçamento entre blocos */
.TUIC-offcanvas .navbar-nav > li {
    margin-bottom: 2px;
}

/* Ajusta separadores */
.TUIC-offcanvas hr {
    margin: 8px 0;
}

/* Faz o menu ocupar a altura e subir o botão Sair */
.TUIC-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
}

/* Lista cresce e empurra o Sair para cima */
.TUIC-offcanvas .navbar-nav {
    flex-grow: 1;
}

/* Botão Sair mais compacto */
.TUIC-offcanvas a[href*="/Logout"] {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 0.95rem;
}

/* =====================================================
   🔔 AVISO DE SESSÃO / HOMENAGEM (COMPACTO)
   ===================================================== */

.alert-sessao {
    background-color: #e7f1ff; /* azul claro */
    border: 1px solid #b6d4fe;
    color: #084298;
    padding: 10px 14px; /* 🔽 reduz altura */
    border-radius: 12px;
    font-size: 0.95rem; /* 🔽 texto mais compacto */
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

/* =========================
   🌐 REDES SOCIAIS
========================= */

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* tamanho dos ícones */
.social-icons i {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

/* 🔵 FACEBOOK (cor oficial) */
.social-icons a[href*="facebook"] i {
    color: #1877F2 !important;
}

/* 🌈 INSTAGRAM (gradiente oficial) */
.social-icons a[href*="instagram"] i {
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ✨ efeito hover */
.social-icons i:hover {
    transform: scale(1.2);
}
.sino-wrapper {
    position: relative;
}

/* 🔔 DROPDOWN DO SINO */
.navbar .sino-dropdown {
    position: fixed !important;
    top: 70px !important;
    right: 10px !important;
    left: auto !important;
    width: 300px !important;
    max-width: calc(100vw - 20px) !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    z-index: 999999 !important;
}

    /* 🔥 CABEÇALHO */
    .navbar .sino-dropdown .dropdown-header {
        padding: 10px 14px;
        font-size: 0.95rem;
        color: #5e2b1f;
    }

    /* 🔥 DIVISOR */
    .navbar .sino-dropdown .dropdown-divider {
        margin: 4px 0;
    }

    /* 🔥 ITENS */
    .navbar .sino-dropdown .dropdown-item {
        white-space: normal !important;
        font-size: 14px;
        font-weight: 600;
        padding: 13px 16px;
        color: #5e2b1f !important;
        transition: 0.2s ease;
    }

        /* 🔥 HOVER */
        .navbar .sino-dropdown .dropdown-item:hover {
            background: rgba(82, 43, 31, 0.08);
        }

    /* 🔥 BOTÃO FECHAR */
    .navbar .sino-dropdown .btn-close {
        font-size: 0.7rem;
    }

body.login-page main {
    padding: 0 !important;
    margin: 0 !important;
}

/* =====================================================
   🔔 ATIVAÇÃO OBRIGATÓRIA DAS NOTIFICAÇÕES PUSH
   ===================================================== */

.push-bloqueio {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    background: rgba(250, 249, 246, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.push-bloqueio-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 22px;
    text-align: center;
    border: 1px solid rgba(94, 43, 31, 0.12);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.push-bloqueio-icone {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 16px;
}

.push-bloqueio-card h2 {
    margin: 0 0 12px 0;
    color: #5e2b1f;
    font-size: 1.35rem;
    font-weight: 800;
}

.push-bloqueio-card p {
    margin: 0 0 22px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.push-bloqueio-botao {
    width: 100%;
    border: none;
    border-radius: 25px;
    padding: 13px 20px;
    background: #2b7a3f;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .push-bloqueio-botao:active {
        transform: scale(0.98);
    }

.push-bloqueio-mensagem {
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
    background: #fff3cd;
    color: #664d03;
    font-size: 0.85rem;
    font-weight: 600;
}