/* ════════════════════════════════════════════════════════════════
   atividades-estilo.css — Clean Pixel / GeoExplorer System
   ════════════════════════════════════════════════════════════════ */

/* ── Corpo da página (sem painel direito) ────────────────────────── */
.atv-body-pad {
    width: 100%;
    max-width: 1376px;
    margin: 0 auto;
    padding: 0 48px 48px;
    box-sizing: border-box;
}
@media (max-width: 1024px) {
    .atv-body-pad { padding: 0 24px 48px; }
}
@media (max-width: 640px) {
    .atv-body-pad { padding: 0 12px 40px; }
}

/* Sidebar: garante recuo quando sidebar existe (mesmo padrão de texto-estilo.css) */
body:has(#sidebar-duvid) main.texto-layout {
    margin-left: 200px !important;
}
@media (max-width: 900px) {
    body:has(#sidebar-duvid) main.texto-layout {
        margin-left: 0 !important;
    }
}

/* ── Toolbar: busca + filtros ────────────────────────────────────── */
.atv-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.atv-busca-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.atv-busca-icon {
    position: absolute;
    left: 14px;
    color: #9e9e9e;
    font-size: 0.9rem;
}

.atv-busca-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #333;
    background: #f8f9fa;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.atv-busca-input:focus { border-color: #4caf50; background: #fff; }

.atv-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Grid de atividades — 3 colunas ─────────────────────────────── */
.atv-grid,
#container-atividades {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    align-items: stretch;
}

@media (max-width: 900px) {
    .atv-grid,
    #container-atividades { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 560px) {
    .atv-grid,
    #container-atividades { grid-template-columns: 1fr !important; }
}

#container-atividades > div {
    display: contents; /* cada filho vira item direto do grid */
}

/* Estilo dos Cards */
.card-rpg {
    border-top: 3px solid #4CAF50;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding: 14px 16px;
    min-height: auto;
}

/* Garante que os botões fiquem no final sem empurrar o resto */
.card-buttons {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding-top: 8px;
}

.card-rpg h3, .card-rpg .titulo-atividade {
    margin: 0;
    line-height: 1.3;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1b1b;
}

/* ESPAÇAMENTO ENTRE AS TAGS SUPERIORES */
.card-header-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-rpg:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

/* Botões de Filtro — pills */
.btn-filtro {
    background: #fff;
    border: 1.5px solid #ccc;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
    margin: 3px 3px 3px 0;
    white-space: nowrap;
    color: #444;
}

.btn-filtro:hover, .btn-filtro.active {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #fff !important;
}

/* Badge de Nível */
.badge-nivel {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ── Dark Mode ────────────────────────────────────────────────────── */
body.dark-mode .atv-toolbar {
    background: #1a1a1a;
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
}

body.dark-mode .atv-busca-input {
    background: #252525;
    border-color: rgba(255,255,255,.12);
    color: #ddd;
}
body.dark-mode .atv-busca-input:focus {
    background: #2a2a2a;
    border-color: #4caf50;
}
body.dark-mode .atv-busca-icon { color: #666; }

/* ── Contador de resultados ─────────────────────────────────────── */
#contador {
    font-family: 'Montserrat', sans-serif;
    font-size: .75rem;
    color: #aaa;
    margin-top: 4px;
    margin-bottom: 0;
}
body.dark-mode #contador { color: #666; }

body.dark-mode .btn-filtro {
    background: #252525;
    border-color: rgba(255,255,255,.15);
    color: #bbb;
}
body.dark-mode .btn-filtro:hover,
body.dark-mode .btn-filtro.active {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #fff !important;
}

body.dark-mode .card-rpg {
    background: #1a1a1a;
    border-left-color: rgba(255,255,255,.08);
    border-right-color: rgba(255,255,255,.08);
    border-bottom-color: rgba(255,255,255,.08);
}
body.dark-mode .card-rpg h3,
body.dark-mode .card-rpg .titulo-atividade { color: #e0e0e0; }

body.dark-mode .badge-nivel {
    background: #1b3a1b;
    color: #81c784;
}

