@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Montserrat:wght@500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --rb-primary: #fe5000;
    --rb-gold: #c5a880;
    --rb-dark: #0f172a;
    --rb-bg: #f8fafc;
    --rb-surface: #ffffff;
    --rb-border: #e2e8f0;
    --rb-danger: #ef4444;
    --rb-success: #10b981;
    --rb-warning: #f59e0b;
    --rb-gradient: linear-gradient(135deg, #0f172a, #fe5000);
    --rb-font: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --rb-font-title: 'Montserrat', sans-serif;
    --rb-font-imperial: 'Cinzel', serif;
    --rb-radius: 0.75rem;
    --rb-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --rb-shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--rb-font);
    background-color: var(--rb-bg);
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Respiro superior para Banners Hero em todas as abas */
main > .card.rounded-0:first-child, 
main > div > .card.rounded-0:first-child {
    margin-top: 0.5rem !important;
}

/* Margens de respiro aconchegantes globais */
.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 1320px;
    }
}

.rb-main-content-padded {
    padding-left: 3.5rem !important;
    padding-right: 3.5rem !important;
}

@media (max-width: 992px) {
    .rb-main-content-padded {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--rb-font-title) !important;
    color: var(--rb-dark);
    letter-spacing: 0.02em;
}

main { flex: 1; }

a { text-decoration: none; }

/* ============================================================
   FEED - ESTILO INSTAGRAM
   ============================================================ */
.rb-post {
    border: 1px solid var(--rb-border);
    border-radius: 1.25rem;
    overflow: hidden;
    background: var(--rb-surface);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rb-post > .card-body:last-of-type {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rb-post > .card-body:last-of-type > .d-flex:last-child {
    margin-top: auto !important;
}

.rb-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

.rb-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--rb-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.rb-post-body { padding: 0 16px 14px; }

.rb-post-title {
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--rb-dark);
    line-height: 1.35;
}

.rb-post-text {
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-top: 4px;
    white-space: pre-line;
    word-break: break-word;
}

.rb-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #6b7280;
}

.rb-post-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--rb-border);
    margin-top: 10px;
}

.rb-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: none;
    border-radius: 50px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.rb-action-btn:hover { background: #e5e7eb; color: var(--rb-dark); }
.rb-action-btn.liked { color: var(--rb-danger); }
.rb-action-btn.liked i { color: var(--rb-danger); }

.rb-action-btn i { font-size: 1.1rem; }

.rb-img-zoom { cursor: zoom-in; }

/* Galeria de imagens */
.rb-carousel { position: relative; }
.rb-carousel img { width: 100%; }
.carousel-indicators { margin-bottom: 8px; }
.carousel-indicators [data-bs-target] { background-color: #fff; box-shadow: 0 0 4px rgba(0,0,0,0.3); }

/* ============================================================
   TIPO DE PUBLICAÇÃO
   ============================================================ */
.rb-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Botões de Seleção de Tipo de Conteúdo Vibrantes */
.rb-type-card-vibrant {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    min-width: 105px;
    flex: 1;
    background: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.rb-type-card-vibrant .rb-type-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(226, 232, 240, 0.5);
    color: var(--btn-color);
    font-size: 1.3rem;
    transition: all 0.25s ease;
}
.rb-type-card-vibrant .rb-type-label {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}
.rb-type-card-vibrant:hover {
    transform: translateY(-4px);
    border-color: var(--btn-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.rb-type-card-vibrant:hover .rb-type-icon-circle {
    background: var(--btn-color);
    color: #ffffff;
}
.rb-type-card-vibrant.active {
    border-color: var(--btn-color);
    background: #ffffff;
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}
.rb-type-card-vibrant.active .rb-type-icon-circle {
    background: var(--btn-color);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.rb-type-card-vibrant.active .rb-type-label {
    color: #0f172a;
}

.rb-fields { display: none; }
.rb-fields.d-none { display: none !important; }

/* ============================================================
   NAVEGAÇÃO / UTILITÁRIOS
   ============================================================ */
.category-pill {
    white-space: nowrap !important;
    border-radius: 50px !important;
    padding: 8px 20px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease-in-out !important;
    border: 1px solid var(--rb-border) !important;
    background-color: #fff !important;
    color: var(--rb-dark) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.category-pill:hover, .category-pill.active {
    background-color: var(--rb-dark) !important;
    color: #fff !important;
    border-color: var(--rb-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2) !important;
}

.whatsapp-float {
    position: fixed;
    bottom: 82px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1040;
    transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }
@media (min-width: 992px) { .whatsapp-float { bottom: 24px; } }

#map-container {
    height: 450px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--rb-shadow);
    border: 1px solid var(--rb-border);
    z-index: 0;
}

.scrollbar-none::-webkit-scrollbar { display: none !important; }
.scrollbar-none { -ms-overflow-style: none !important; scrollbar-width: none !important; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.rb-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}
.rb-lightbox.open { display: flex; }
.rb-lightbox img {
    max-width: 92vw;
    max-height: 82vh;
    border-radius: 12px;
    object-fit: contain;
}

/* ============================================================
   COMPATIBILIDADE COM PÁGINAS LEGADAS
   ============================================================ */
.premium-card {
    background: #fff;
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}
.mockup-card {
    border-radius: 1.25rem !important;
    border: 1px solid var(--rb-border) !important;
    box-shadow: var(--rb-shadow) !important;
    overflow: hidden !important;
    background: #fff !important;
}
.mockup-card-img-wrapper { width: 100% !important; height: 220px !important; overflow: hidden !important; }
.mockup-card-img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.mockup-card-body { padding: 20px !important; }
.mockup-card-title { font-weight: 800 !important; color: var(--rb-dark) !important; }
.mockup-card-text { color: #6b7280 !important; font-size: 0.875rem !important; }
.mockup-card-footer { display: flex; align-items: center; padding-top: 12px; border-top: 1px solid var(--rb-border); }
.mockup-author-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--rb-dark); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }

.navbar-glass {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rb-border);
}

/* ============================================================
   LAYOUT DESKTOP (PC) — Sem sidebars. Navbar no topo.
   ============================================================ */
.rb-main { max-width: 720px; }

/* Regras antigas de sidebar removidas — layout agora é topbar + conteúdo centralizado */
.rb-nav-link {
    padding: 7px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #4b5563;
    white-space: nowrap;
    transition: all .15s;
}
.rb-nav-link:hover { background: #f3f4f6; color: var(--rb-dark); }
.rb-nav-link.active { background: var(--rb-dark); color: #fff; }

@media (min-width: 768px) {
    .rb-posts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        width: 100%;
        align-items: stretch;
    }
    .rb-posts-grid .rb-post {
        margin-bottom: 0 !important;
    }
}

@media (min-width: 992px) {
    body { background: #f8fafc; }
    .rb-main { max-width: 100% !important; width: 100% !important; padding: 0 !important; }
    .rb-main-wide { max-width: 100% !important; }
    
    .rb-posts-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        width: 100%;
        align-items: stretch;
    }
    
    .rb-posts-grid .rb-post {
        margin-bottom: 0 !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .rb-posts-grid .rb-post:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ============================================================
   KPIs CLICÁVEIS DE OCORRÊNCIAS
   ============================================================ */
.rb-kpi-occ {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 104px;
    padding: 12px 10px;
    border-radius: 16px;
    border: 2px solid var(--rb-border);
    background: #fff;
    text-decoration: none;
    box-shadow: var(--rb-shadow);
    transition: all .15s;
}
.rb-kpi-occ i { font-size: 1.35rem; color: var(--occ-color, #ef4444); }
.rb-kpi-occ-count { font-weight: 800; font-size: 1.05rem; color: var(--rb-dark); line-height: 1.1; }
.rb-kpi-occ-label { font-size: 0.66rem; font-weight: 700; color: #6b7280; text-align: center; line-height: 1.15; }
.rb-kpi-occ:hover {
    transform: translateY(-2px);
    box-shadow: var(--rb-shadow-lg);
    border-color: #cbd5e1;
}
.rb-kpi-occ.active {
    border-color: var(--occ-color, #111827);
    background: color-mix(in srgb, var(--occ-color, #ef4444) 10%, #fff);
    box-shadow: 0 4px 12px -4px var(--occ-color, #ef4444);
}
.rb-kpi-occ.active .rb-kpi-occ-label { color: var(--occ-color, #111827); }
.rb-kpi-occ.active i { transform: scale(1.1); }
/* ============================================================
   PADRÃO DE BOTÕES DE ASSUNTO COM ÍCONE CIRCULAR (STYLE GUIDE)
   ============================================================ */
.rb-feature-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    min-width: 0;
    width: auto;
    max-width: 280px;
    flex: 0 0 auto;
    text-align: left !important;
}

.rb-feature-btn:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.rb-feature-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.rb-feature-btn > div:not(.rb-feature-btn-icon) {
    min-width: 0;
    flex: 1;
    text-align: left !important;
}

.rb-feature-btn-title {
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    color: #f8fafc;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
}

.rb-feature-btn-desc {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.2;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ajuste Responsivo em Telas de Celular/Mobile */
@media (max-width: 768px) {
    body {
        padding-bottom: 85px !important;
    }

    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .rb-main-content-padded {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    /* Melhora respiro de cards e hero banners */
    .card-body {
        padding: 1.2rem !important;
    }

    .display-4, .display-5 {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
    }

    .rb-feature-btn {
        width: 100% !important;
        padding: 12px 14px !important;
        gap: 12px !important;
        border-radius: 14px !important;
    }
    
    .rb-feature-btn-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
    }
    
    .rb-feature-btn-title {
        font-size: 0.8rem !important;
        letter-spacing: 0.3px !important;
    }
    
    .rb-feature-btn-desc {
        font-size: 0.72rem !important;
    }

    /* Ações inferiores dos posts no celular */
    .rb-post .card-footer, .rb-post .border-top {
        padding: 8px 12px !important;
    }

    /* Imagens de capa com proporção natural em celulares */
    .carousel-item img, .rb-img-zoom {
        max-height: 320px !important;
    }
}

/* Centralização de botões em telas de computador */
@media (min-width: 768px) {
    .rb-scroll-x {
        justify-content: center !important;
    }
}
