@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;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: 'Plus Jakarta Sans', sans-serif;
    --rb-font-title: '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;
}

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;
    gap: 4px;
    padding: 10px 14px;
    border: 2px solid var(--rb-border);
    border-radius: 16px;
    cursor: pointer;
    min-width: 96px;
    transition: all 0.2s;
    background: #fff;
}
.rb-type-card i { font-size: 1.4rem; color: #6b7280; }
.rb-type-card span { color: #6b7280; font-size: 0.75rem; font-weight: 600; }
.rb-type-card.selected { border-color: var(--rb-dark); background: #f3f4f6; }
.rb-type-card.selected i { color: var(--rb-dark); }
.rb-type-card.selected span { color: var(--rb-dark); }

.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: 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;
    }
}

@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); }


