/* =============================================================
   portal.css  –  Estilos do Portal Público
   Organização:
     1. Variáveis & Reset
     2. Topbar / Navegação superior
     3. Faixa tricolor
     4. Hero compacto
     5. Contadores (Stats)
     6. Abas principais
     7. Seção: Notícias
     8. Seção: Eventos
     9. Seção: Busca (campo genérico)
    10. Seção: Associados
    11. Seção: Regionais
    12. Seção: Vazio (placeholder)
    13. Rodapé
    14. Modal de detalhe (.dm-*)
    15. Carrossel interno do modal
    16. Responsividade (max-width: 576px)
   ============================================================= */


/* ── 1. VARIÁVEIS & RESET ─────────────────────────────────── */
:root {
    --schwarz: #0f0f0f;   /* Preto principal            */
    --rot:     #c0001a;   /* Vermelho                   */
    --gold:    #c8970a;   /* Ouro escuro                */
    --gold-lt: #e8b84b;   /* Ouro claro                 */
    --cream:   #f7f4ef;   /* Fundo suave                */
    --border:  #e0dbd2;   /* Cor de bordas              */
    --text:    #1c1c1c;   /* Texto principal            */
    --muted:   #6b6456;   /* Texto secundário / ícones  */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Barlow', sans-serif;
    background: #fff;
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
}


/* ── 2. TOPBAR / NAVEGAÇÃO SUPERIOR ──────────────────────── */
.topbar {
    background: var(--schwarz);
    border-bottom: 3px solid var(--rot);
    padding: .55rem 0;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Marca / logo textual */
.brand-fraktur {
    font-family: 'UnifrakturMaguntia', cursive;
    font-size: 1.7rem;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    letter-spacing: .02em;
}
.brand-sub {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .65rem;
    letter-spacing: .18em;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    margin-top: 1px;
}

/* Links de navegação no topo */
.topnav {
    display: flex;
    align-items: center;
    gap: .2rem;
    flex-wrap: wrap;
}
.topnav a {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    padding: .3rem .7rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.topnav a:hover             { color: #fff; background: rgba(255,255,255,.08); }
.topnav .btn-admin          { background: var(--rot); color: #fff !important; border-radius: 4px; padding: .3rem .8rem; }
.topnav .btn-admin:hover    { background: #a00015 !important; }


/* ── 3. FAIXA TRICOLOR ───────────────────────────────────── */
.tricolor   { display: flex; height: 5px; }
.tricolor-s { flex: 1; background: var(--schwarz); }
.tricolor-r { flex: 1; background: var(--rot); }
.tricolor-g { flex: 1; background: var(--gold); }


/* ── 4. HERO COMPACTO ────────────────────────────────────── */
.hero {
    background: linear-gradient(100deg, var(--schwarz) 0%, #1a0005 55%, #200008 100%);
    padding: 2.2rem 0 2rem;
    position: relative;
    overflow: hidden;
}
/* Destaque circular decorativo (canto superior direito) */
.hero::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192,0,26,.18) 0%, transparent 70%);
    pointer-events: none;
}
.hero-eyebrow {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-lt);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
/* Linha decorativa antes do eyebrow */
.hero-eyebrow::before {
    content: '';
    display: block;
    width: 24px; height: 1px;
    background: var(--gold);
}
.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: -.01em;
}
.hero-title .accent { color: var(--rot); } /* Destaque na segunda palavra do título */
.hero-sub {
    font-size: .88rem;
    color: rgba(255,255,255,.55);
    margin-bottom: 1.4rem;
    line-height: 1.6;
    max-width: 480px;
}


/* ── 5. CONTADORES (STATS) ───────────────────────────────── */
.stats-row { display: flex; gap: 0; flex-wrap: wrap; margin-top: 0; }
.stat-box {
    padding: .7rem 1.4rem .7rem 0;
    margin-right: 1.4rem;
    border-right: 1px solid rgba(255,255,255,.12);
}
.stat-box:last-child { border-right: none; margin-right: 0; }
.stat-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.stat-lbl {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.4);
    margin-top: .1rem;
}


/* ── 6. ABAS PRINCIPAIS ──────────────────────────────────── */
.main-tabs {
    background: var(--cream);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-tabs .nav-tabs {
    border: none;
    gap: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox: esconde scrollbar */
}
.main-tabs .nav-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.main-tabs .nav-item { flex-shrink: 0; }
.main-tabs .nav-link {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    border: none !important;
    border-radius: 0 !important;
    padding: .65rem 1.2rem;
    position: relative;
    transition: color .15s;
}
/* Sublinhado animado da aba ativa */
.main-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--rot);
    transform: scaleX(0);
    transition: transform .2s;
}
.main-tabs .nav-link:hover          { color: var(--text); background: rgba(0,0,0,.04); }
.main-tabs .nav-link.active         { color: var(--rot) !important; background: transparent !important; }
.main-tabs .nav-link.active::after  { transform: scaleX(1); }

/* Contador de itens na aba */
.tab-badge {
    background: var(--rot);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: .3rem;
    vertical-align: middle;
}

/* Conteúdo das abas */
.tab-pane { padding: 1.5rem 0 2rem; }

/* Rótulo de seção (ex: "Últimas publicações") */
.sec-hl {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--rot);
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sec-hl::before, .sec-hl::after {
    content: '';
    flex: 0 0 16px;
    height: 1px;
    background: var(--rot);
}
/* Título grande da seção */
.sec-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--schwarz);
    margin-bottom: 1rem;
    line-height: 1;
}


/* ── 7. SEÇÃO: NOTÍCIAS ──────────────────────────────────── */
.news-card {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
    transition: box-shadow .18s, transform .18s;
    height: 100%;
}
.news-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); transform: translateY(-2px); }

/* Thumb da notícia */
.news-img    { width: 90px; flex-shrink: 0; object-fit: cover; background: var(--schwarz); }
/* Placeholder quando não há imagem */
.news-img-ph {
    width: 90px; flex-shrink: 0;
    background: linear-gradient(160deg, #1a0005, var(--schwarz));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.15); font-size: 1.4rem;
}
.news-body  { padding: .7rem .85rem; flex: 1; display: flex; flex-direction: column; }
.news-date  { font-size: .65rem; color: var(--muted); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .2rem; }
.news-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .95rem; font-weight: 700; line-height: 1.25; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.news-assoc { font-size: .67rem; color: var(--rot); font-weight: 600; font-family: 'Barlow Condensed', sans-serif; letter-spacing: .05em; text-transform: uppercase; margin-top: .3rem; }


/* ── 8. SEÇÃO: EVENTOS ───────────────────────────────────── */
.ev-row {
    display: flex; align-items: stretch;
    border-radius: 6px; overflow: hidden;
    border: 1px solid var(--border); background: #fff;
    transition: box-shadow .18s, transform .18s;
}
.ev-row:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); transform: translateY(-2px); }

/* Bloco de data (dia/mês) */
.ev-cal {
    background: var(--schwarz); color: #fff; width: 58px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: .5rem .2rem;
}
.ev-day { font-family: 'Barlow Condensed', sans-serif; font-size: 1.7rem; font-weight: 800; line-height: 1; }
.ev-mon { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-lt); margin-top: .1rem; }

/* Thumb do evento */
.ev-img    { width: 80px; max-height: 110px; flex-shrink: 0; object-fit: cover; background: #f0ece4; }
.ev-img-ph { width: 80px; height: 110px; flex-shrink: 0; background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--border); font-size: 1.2rem; }

.ev-body  { padding: .65rem .85rem; flex: 1; }

/* Botão de inscrição no card de evento */
.ev-inscricao-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    margin: 0 .6rem .6rem;
    padding: .35rem .75rem;
    border-radius: 5px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    text-decoration: none;
    background: var(--rot); color: #fff;
    border: none;
    transition: background .15s, transform .12s;
    flex-shrink: 0;
}
.ev-inscricao-btn:hover  { background: #a3001a; color: #fff; transform: translateY(-1px); }
.ev-inscricao-btn:active { background: #a3001a; color: #fff; }
.ev-inscricao-btn i      { font-size: .75rem; }
.ev-tipo  { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-family: 'Barlow Condensed', sans-serif; }
.ev-title {
    font-family: 'Barlow Condensed', sans-serif; font-size: .95rem; font-weight: 700; line-height: 1.2; color: var(--text); margin: .1rem 0 .3rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-meta          { font-size: .7rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem; }
.ev-meta span     { display: flex; align-items: center; gap: .2rem; }


/* ── 9. SEÇÃO: BUSCA ─────────────────────────────────────── */
/* Campo de busca reutilizado nas abas Associados / Regionais / Trajes */
.search-box {
    display: flex; gap: 0;
    border: 1.5px solid var(--border); border-radius: 5px; overflow: hidden;
    background: #fff; transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--rot); }
.search-box input  { border: none; outline: none; padding: .45rem .85rem; font-size: .84rem; flex: 1; font-family: 'Barlow', sans-serif; }
.search-box button {
    background: var(--schwarz); color: #fff; border: none; padding: .45rem 1rem;
    font-size: .8rem; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: .06em; cursor: pointer; transition: background .15s;
}
.search-box button:hover { background: var(--rot); }


/* ── 10. SEÇÃO: ASSOCIADOS ───────────────────────────────── */
.assoc-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .8rem; border-radius: 6px;
    border: 1px solid var(--border); background: #fff;
    transition: box-shadow .15s, border-color .15s;
    overflow: hidden;      /* impede que conteúdo interno estoure o card */
}
.assoc-item:hover { box-shadow: 0 3px 12px rgba(0,0,0,.07); border-color: var(--gold); }

/* Logo do associado */
.assoc-logo    { width: 44px; height: 44px; border-radius: 5px; object-fit: contain; background: var(--cream); padding: 3px; flex-shrink: 0; }
.assoc-logo-ph {
    width: 44px; height: 44px; border-radius: 5px;
    background: linear-gradient(135deg, var(--schwarz), #2a0005);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.3); font-size: 1.1rem; flex-shrink: 0;
}

/* min-width:0 é essencial para que o flex filho possa encolher abaixo do seu conteúdo */
.assoc-item > div { min-width: 0; }

.assoc-nome  {
    font-family: 'Barlow Condensed', sans-serif; font-size: .88rem;
    font-weight: 700; line-height: 1.25; color: var(--text);
    /* quebra em até 2 linhas, sem estourar */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.assoc-sigla { font-size: .65rem; font-weight: 700; letter-spacing: .07em; color: var(--rot); font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assoc-loc   { font-size: .67rem; color: var(--muted); display: flex; align-items: center; gap: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assoc-links a       { font-size: .78rem; color: var(--muted); text-decoration: none; transition: color .15s; }
.assoc-links a:hover { color: var(--rot); }


/* ── 11. SEÇÃO: REGIONAIS ────────────────────────────────── */
#tab-regionais { background: #fff; padding: 1.5rem 0 2rem; }

.reg-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .85rem 1rem; border-radius: 6px;
    border: 1px solid var(--border); background: #fff;
    transition: background .18s, box-shadow .15s;
}
.reg-item:hover { background: #f8f4ee; box-shadow: 0 2px 8px rgba(0,0,0,.07); }

/* Logo da regional */
.reg-logo    { width: 46px; height: 46px; border-radius: 5px; object-fit: contain; background: var(--cream); padding: 3px; flex-shrink: 0; }
.reg-logo-ph {
    width: 46px; height: 46px; border-radius: 5px;
    background: linear-gradient(135deg, var(--schwarz), #2a0005);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.4); font-size: 1.2rem; flex-shrink: 0;
}

.reg-nome  { font-family: 'Barlow Condensed', sans-serif; font-size: .92rem; font-weight: 700; color: var(--text); line-height: 1.2; word-break: break-word; hyphens: auto; }
.reg-sigla { font-size: .65rem; font-weight: 700; letter-spacing: .08em; color: var(--rot); font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.reg-loc   { font-size: .68rem; color: var(--muted); display: flex; align-items: center; gap: .2rem; margin-top: .2rem; }
.reg-badge { background: rgba(192,0,26,.1); border: 1px solid rgba(192,0,26,.25); color: var(--rot); font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; }


/* ── 11b. PAGINAÇÃO DE ASSOCIADOS ───────────────────────── */
.assoc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.assoc-page-btn {
    min-width: 34px; height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .82rem; font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    padding: 0 .5rem;
}
.assoc-page-btn:hover {
    background: var(--cream);
    color: var(--text);
    border-color: var(--gold);
}
.assoc-page-btn.active {
    background: var(--rot);
    color: #fff;
    border-color: var(--rot);
}
.assoc-page-info {
    font-size: .72rem;
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: .04em;
    margin-left: .5rem;
}


/* ── 12. SEÇÃO: VAZIO (placeholder) ─────────────────────── */
.empty    { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty i  { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .35; }
/* Variante para fundos escuros */
.empty-dk   { color: rgba(255,255,255,.3); }
.empty-dk i { opacity: .2; }


/* ── 13. RODAPÉ ──────────────────────────────────────────── */
.site-footer {
    background: var(--schwarz);
    border-top: 4px solid var(--rot);
    color: rgba(255,255,255,.6);
    padding: 1.8rem 0 1rem;
    font-size: .8rem;
}
.footer-brand    { font-family: 'UnifrakturMaguntia', cursive; font-size: 1.35rem; color: #fff; display: block; margin-bottom: .35rem; line-height: 1; }
.footer-item     { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .3rem; line-height: 1.4; }
.footer-item i   { color: var(--gold); font-size: .75rem; flex-shrink: 0; }
.footer-item a   { color: rgba(255,255,255,.6); text-decoration: none; transition: color .15s; }
.footer-item a:hover { color: #fff; }
.footer-divider  { border-color: rgba(255,255,255,.1) !important; margin: .8rem 0; }
.footer-bottom   { font-size: .72rem; color: rgba(255,255,255,.3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.footer-bottom a { color: rgba(255,255,255,.3); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }


/* ── 14. MODAL DE DETALHE (.dm-*) ────────────────────────── */
/* Overlay com backdrop-blur */
.dm-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(8,3,3,.75);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
    padding: 1rem;
    animation: fadeOv .18s ease;
}
.dm-overlay.open { display: flex; }

@keyframes fadeOv { from { opacity: 0; } to { opacity: 1; } }

/* Caixa do modal */
.dm-box {
    background: #fff;
    border-radius: 10px; overflow: hidden;
    width: 100%; max-width: 620px; max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: 0 28px 90px rgba(0,0,0,.6);
    animation: dmUp .22s cubic-bezier(.22,1,.36,1);
    min-height: 400px; /* Garante altura mínima para sempre mostrar conteúdo */
}
@keyframes dmUp { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Cabeçalho escuro do modal */
/* ── Cabeçalho do modal ─────────────────────────────────────────
   Desktop : [logo] [tipo+título·flex:1] [Ver Página] [×fechar]
   Mobile  : [logo] [tipo+título·flex:1]              [×fechar]
             [        botão Ver Página · 100%         ]
   Técnica : flex-wrap. O #dmHeadActions tem width:100% → quebra
             para a próxima linha sozinho. No desktop ele é pequeno
             (width:auto) e cabe na primeira linha antes do fechar.
   display é controlado 100% pelo JS (display:none / flex) —
   nunca CSS :empty, que tem bugs no Safari iOS.
   ─────────────────────────────────────────────────────────────── */
.dm-head {
    background: var(--schwarz); color: #fff;
    padding: .85rem 1.1rem .8rem;
    border-bottom: 3px solid var(--rot);
    display: -webkit-flex; display: flex;
    -webkit-flex-wrap: wrap; flex-wrap: wrap;
    -webkit-align-items: center; align-items: center;
    gap: .5rem .6rem;
    -webkit-flex-shrink: 0; flex-shrink: 0;
}

.dm-head-logo {
    width: 50px; height: 50px; border-radius: 7px;
    object-fit: contain; background: rgba(255,255,255,.1);
    padding: 4px; -webkit-flex-shrink: 0; flex-shrink: 0;
}
.dm-head-logo-ph {
    width: 50px; height: 50px; border-radius: 7px;
    background: rgba(255,255,255,.08);
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    -webkit-justify-content: center; justify-content: center;
    color: rgba(255,255,255,.3); font-size: 1.3rem;
    -webkit-flex-shrink: 0; flex-shrink: 0;
}
.dm-head-texto {
    -webkit-flex: 1 1 0px; flex: 1 1 0px;
    min-width: 0;
}
.dm-tipo  { font-family:'Barlow Condensed',sans-serif; font-size:.6rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; color:var(--gold-lt); margin-bottom:.2rem; }
.dm-titulo{ font-family:'Barlow Condensed',sans-serif; font-size:1.1rem; font-weight:800; line-height:1.15; color:#fff; text-transform:uppercase; word-break:break-word; }

/* Botão fechar — sempre na primeira linha, canto direito */
.dm-close {
    -webkit-flex-shrink: 0; flex-shrink: 0;
    background: rgba(255,255,255,.1); border: none; color: #fff;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    font-size: .95rem;
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    -webkit-justify-content: center; justify-content: center;
    -webkit-transition: background .15s; transition: background .15s;
}
.dm-close:hover  { background: var(--rot); }
.dm-close:active { background: var(--rot); }

/* #dmHeadActions — wrapper do botão "Ver Página"
   Mobile  (<480px): width:100% → quebra para linha própria abaixo do título
   Desktop (≥480px): width:auto → fica inline antes do botão fechar
   display é sempre controlado pelo JS (none / flex), nunca pelo CSS */
#dmHeadActions {
    -webkit-flex-shrink: 0; flex-shrink: 0;
    width: 100%;   /* mobile: ocupa linha inteira → quebra */
}

/* Botão "Ver Página" */
.dm-btn-grupo {
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    -webkit-justify-content: center; justify-content: center;
    gap: .35rem;
    width: 100%;
    padding: .38rem .85rem;
    border-radius: 5px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .75rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    text-decoration: none; white-space: nowrap;
    background: var(--gold); color: var(--schwarz);
    border: none;
    -webkit-transition: background .15s; transition: background .15s;
    box-sizing: border-box;
}
.dm-btn-grupo:hover  { background: var(--gold-lt); color: var(--schwarz); }
.dm-btn-grupo:active { background: var(--gold-lt); color: var(--schwarz); }
.dm-btn-grupo i { font-size: .78rem; }

/* Mobile: fechar alinhado ao topo direito da primeira linha */
.dm-close { margin-left: auto; }

/* Desktop: botão inline, não quebra linha */
@media (min-width: 480px) {
    #dmHeadActions { width: auto; }
    .dm-btn-grupo  { width: auto; }
}

/* Thumbnail de capa (exibida acima do body) */
.dm-thumb  { width: 100%; max-height: 200px; object-fit: cover; flex-shrink: 0; display: block; }

/* Corpo scrollável - sempre visível com altura mínima garantida */
.dm-body   { 
    padding: 1rem 1.2rem; 
    overflow-y: auto; 
    flex: 1; 
    min-height: 150px; /* Garante espaço mínimo para o conteúdo textual */
}

/* Linha de campo (ícone + rótulo + valor) */
.dm-row    { display: flex; gap: .5rem; margin-bottom: .45rem; font-size: .82rem; align-items: baseline; }
.dm-row i  { color: var(--rot); flex-shrink: 0; width: 14px; font-size: .78rem; }
.dm-lbl    { font-family: 'Barlow Condensed', sans-serif; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); width: 76px; flex-shrink: 0; }
.dm-val    { color: var(--text); flex: 1; }
.dm-val a  { color: var(--rot); text-decoration: none; }
.dm-val a:hover { text-decoration: underline; }

/* Sub-título interno (ex: "Histórico", "Descrição") */
.dm-stitle { font-family: 'Barlow Condensed', sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rot); border-bottom: 1px solid var(--border); padding-bottom: .3rem; margin: .9rem 0 .6rem; }

/* Texto de conteúdo longo (mantém quebras de linha) */
.dm-desc   { font-size: .83rem; color: var(--text); line-height: 1.65; white-space: pre-line; }

/* Rodapé do modal (redes sociais) */
.dm-foot   { padding: .75rem 1.2rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.dm-foot-link {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .75rem; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
    color: var(--rot); text-decoration: none;
    display: inline-flex; align-items: center; gap: .25rem;
    transition: color .15s;
}
.dm-foot-link:hover { color: var(--schwarz); }
.dm-social a       { font-size: 1.1rem; color: var(--muted); text-decoration: none; transition: color .15s; margin-left: .6rem; }
.dm-social a:hover { color: var(--rot); }


/* ── 15. CARROSSEL INTERNO DO MODAL ──────────────────────── */

/*
   Estratégia de proporção adaptável:
   - O wrapper (.dm-carousel) não tem height fixa.
   - Cada slide usa position:relative com padding-bottom dinâmico
     (definido via JS como style="padding-bottom: XX%") que representa
     a proporção real da imagem (height/width * 100).
   - A imagem fica em position:absolute preenchendo o slide inteiro
     com object-fit:contain — sem cortes, sem esticamentos.
   - O carrossel inteiro se ajusta à maior imagem do lote via JS.
   - Para garantir espaço para o conteúdo textual, limitamos a altura
     do carrossel dinamicamente no JS, mas a imagem sempre se adapta
     proporcionalmente sem cortes (object-fit: contain).
*/

.dm-carousel {
    position: relative;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
    /* altura definida dinamicamente pelo JS conforme proporção da imagem */
    /* max-height removido para não cortar - o JS controla o tamanho */
    transition: height .28s cubic-bezier(.4, 0, .2, 1);
}

/* Faixa deslizante — flex horizontal, itens lado a lado */
.dm-carousel-track {
    display: flex;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    /* height herdado do slide ativo */
}

/*
   Cada slide ocupa 100% da largura do track.
   O padding-bottom (% da proporção) é definido pelo JS após
   carregar a imagem — isso cria o "caixote" proporcional.
*/
.dm-carousel-slide {
    flex: 0 0 100%;          /* largura fixa = 100% do container */
    position: relative;
    /* padding-bottom: XX% ← injetado pelo JS para cada slide */
    overflow: hidden;
    background: #111;
}

/* A imagem fica dentro do "caixote" proporcional */
.dm-carousel-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;     /* mostra a imagem completa, sem corte */
    display: block;
}

/* Legenda flutuante sobre a imagem */
.dm-carousel-leg {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 3;
    background: linear-gradient(transparent, rgba(0,0,0,.72));
    color: #fff;
    font-size: .73rem;
    padding: 1.2rem .85rem .4rem;
    line-height: 1.35;
    pointer-events: none;
}

/* Botões prev / next */
.dm-carousel-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 4;
    background: rgba(0,0,0,.52);
    color: #fff; border: none; cursor: pointer;
    width: 32px; height: 44px;
    border-radius: 5px; font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, opacity .15s;
    opacity: .75;
}
.dm-carousel-btn:hover  { background: var(--rot); opacity: 1; }
.dm-carousel-btn.prev   { left: 8px; }
.dm-carousel-btn.next   { right: 8px; }

/* Contador "1 / 4" — canto superior direito */
.dm-carousel-counter {
    position: absolute;
    top: 8px; right: 10px;
    z-index: 4;
    font-size: .67rem; font-weight: 600;
    color: rgba(255,255,255,.85);
    background: rgba(0,0,0,.5);
    padding: 2px 7px; border-radius: 10px;
    pointer-events: none;
}

/* Bolinhas de paginação */
.dm-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: .5rem 0 .3rem;
    background: #0a0a0a;
    flex-shrink: 0;
}
.dm-carousel-dot {
    width: 7px; height: 7px;
    border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.25);
    padding: 0;
    transition: background .2s, transform .2s;
}
.dm-carousel-dot.active {
    background: var(--rot);
    transform: scale(1.35);
}


/* ── 15b. DOCUMENTOS ANEXADOS NO MODAL DE EVENTO ─────────── */
.dm-docs-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: .4rem;
}

.dm-doc-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .7rem;
    border-radius: 6px;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.07);
    color: var(--text);
    text-decoration: none;
    font-size: .84rem;
    transition: background .15s, border-color .15s;
}
.dm-doc-item:hover {
    background: rgba(192,0,26,.06);
    border-color: rgba(192,0,26,.2);
    color: var(--rot);
}
.dm-doc-item > .bi:first-child {
    font-size: 1.1rem;
    color: var(--rot);
    flex-shrink: 0;
}
.dm-doc-item > span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dm-doc-ext {
    font-size: .72rem;
    opacity: .4;
    flex-shrink: 0;
}


/* ── 16. RESPONSIVIDADE ──────────────────────────────────── */
@media (max-width: 576px) {
    .brand-fraktur   { font-size: 1.3rem; }
    .stat-box        { padding: .5rem .9rem .5rem 0; margin-right: .9rem; }
    .stat-num        { font-size: 1.5rem; }
    /* Thumb do evento some em mobile (economiza espaço) */
    .ev-img, .ev-img-ph { display: none; }
}
