/* Republica Multifilter – Public Styles */
:root {
    --rmf-primary: #1a1a2e;
    --rmf-accent: #e94560;
    --rmf-accent2: #0f3460;
    --rmf-light: #f8f9fa;
    --rmf-border: #e2e8f0;
    --rmf-text: #2d3748;
    --rmf-muted: #718096;
    --rmf-radius: 14px;
    --rmf-shadow: 0 4px 24px rgba(0,0,0,.08);
    --rmf-transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.rmf-wrap { font-family: inherit; }

/* ── Filters bar ─────────────────────────────────────────────────────────── */
.rmf-filters {
    background: #fff;
    border: 1px solid var(--rmf-border);
    border-radius: var(--rmf-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--rmf-shadow);
}
.rmf-filters-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }

.rmf-filter-group { display: flex; flex-direction: column; gap: 8px; }
.rmf-filter-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rmf-muted); }

.rmf-filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.rmf-opt {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--rmf-border);
    background: var(--rmf-light);
    color: var(--rmf-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--rmf-transition);
    line-height: 1;
}
.rmf-opt:hover { border-color: var(--rmf-accent); color: var(--rmf-accent); }
.rmf-opt.active { background: var(--rmf-accent); border-color: var(--rmf-accent); color: #fff; }

.rmf-filter-actions { margin-left: auto; }
.rmf-btn-reset {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--rmf-border);
    background: #fff;
    color: var(--rmf-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--rmf-transition);
}
.rmf-btn-reset:hover { border-color: var(--rmf-accent); color: var(--rmf-accent); }

/* ── Results bar ─────────────────────────────────────────────────────────── */
.rmf-results-bar { margin-bottom: 16px; }
.rmf-count { font-size: 13px; color: var(--rmf-muted); font-weight: 500; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.rmf-grid {
    display: grid;
    gap: 24px;
    position: relative;
    min-height: 200px;
    transition: opacity var(--rmf-transition);
}
.rmf-grid.rmf-loading-state { opacity: .4; pointer-events: none; }

.rmf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rmf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rmf-cols-4 { grid-template-columns: repeat(4, 1fr); }
.rmf-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Responsive */
@media (max-width: 1024px) {
    .rmf-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .rmf-cols-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .rmf-cols-3, .rmf-cols-4, .rmf-cols-6 { grid-template-columns: repeat(2, 1fr); }
    .rmf-cols-2 { grid-template-columns: 1fr; }
    .rmf-filters-inner { flex-direction: column; }
}
@media (max-width: 480px) {
    .rmf-cols-2, .rmf-cols-3, .rmf-cols-4, .rmf-cols-6 { grid-template-columns: 1fr; }
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.rmf-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}
.rmf-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--rmf-border);
    border-top-color: var(--rmf-accent);
    border-radius: 50%;
    animation: rmf-spin .7s linear infinite;
}
@keyframes rmf-spin { to { transform: rotate(360deg); } }

/* ── No image placeholder ────────────────────────────────────────────────── */
.rmf-no-img {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: var(--rmf-border);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.rmf-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--rmf-muted);
}
.rmf-empty-state .rmf-empty-icon { font-size: 48px; margin-bottom: 12px; }
.rmf-empty-state p { font-size: 15px; }

/* ──────────────────────────────────────────────────────────────────────────
   TEMPLATE: CARDS (default)
   ────────────────────────────────────────────────────────────────────────── */
.rmf-card-default {
    background: #fff;
    border: 1px solid var(--rmf-border);
    border-radius: var(--rmf-radius);
    overflow: hidden;
    box-shadow: var(--rmf-shadow);
    transition: transform var(--rmf-transition), box-shadow var(--rmf-transition);
    display: flex;
    flex-direction: column;
}
.rmf-card-default:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.14);
}
.rmf-card-default .rmf-card-img-wrap { display: block; overflow: hidden; aspect-ratio: 16/10; }
.rmf-card-default .rmf-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rmf-card-default:hover .rmf-card-img-wrap img { transform: scale(1.04); }
.rmf-card-default .rmf-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rmf-card-default .rmf-card-date { font-size: 11px; color: var(--rmf-muted); text-transform: uppercase; letter-spacing: .05em; }
.rmf-card-default .rmf-card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--rmf-primary); }
.rmf-card-default .rmf-card-title a { color: inherit; text-decoration: none; }
.rmf-card-default .rmf-card-title a:hover { color: var(--rmf-accent); }
.rmf-card-default .rmf-card-excerpt { font-size: 13px; color: var(--rmf-muted); line-height: 1.6; margin: 0; }
.rmf-card-default .rmf-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.rmf-card-default .rmf-card-btn {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rmf-accent);
    text-decoration: none;
    transition: gap var(--rmf-transition);
}
.rmf-card-default .rmf-card-btn:hover { color: var(--rmf-primary); }

/* ──────────────────────────────────────────────────────────────────────────
   TEMPLATE: MINIMAL
   ────────────────────────────────────────────────────────────────────────── */
.rmf-card-minimal {
    background: #fff;
    border-radius: var(--rmf-radius);
    overflow: hidden;
    transition: transform var(--rmf-transition);
    cursor: pointer;
}
.rmf-card-minimal:hover { transform: translateY(-3px); }
.rmf-card-minimal .rmf-card-img-wrap { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--rmf-radius); }
.rmf-card-minimal .rmf-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rmf-card-minimal:hover .rmf-card-img-wrap img { transform: scale(1.05); }
.rmf-card-minimal .rmf-card-body { padding: 12px 4px; }
.rmf-card-minimal .rmf-card-title { margin: 8px 0 0; font-size: 15px; font-weight: 700; color: var(--rmf-primary); }
.rmf-card-minimal .rmf-card-title a { color: inherit; text-decoration: none; }
.rmf-card-minimal .rmf-card-title a:hover { color: var(--rmf-accent); }
.rmf-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rmf-chip {
    background: var(--rmf-light);
    border: 1px solid var(--rmf-border);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--rmf-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ──────────────────────────────────────────────────────────────────────────
   TEMPLATE: MAGAZINE
   ────────────────────────────────────────────────────────────────────────── */
.rmf-card-magazine { border-radius: var(--rmf-radius); overflow: hidden; }
.rmf-card-magazine .rmf-card-bg {
    display: block;
    aspect-ratio: 4/5;
    background-size: cover;
    background-position: center;
    background-color: var(--rmf-primary);
    text-decoration: none;
    position: relative;
    border-radius: var(--rmf-radius);
    overflow: hidden;
    transition: transform var(--rmf-transition);
}
.rmf-card-magazine .rmf-card-bg:hover { transform: scale(1.02); }
.rmf-card-magazine .rmf-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px 20px;
    gap: 8px;
}
.rmf-card-magazine .rmf-chip { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.rmf-card-magazine .rmf-card-title { margin: 0; font-size: 18px; font-weight: 800; color: #fff; line-height: 1.25; }
.rmf-card-magazine .rmf-card-excerpt { font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ──────────────────────────────────────────────────────────────────────────
   TEMPLATE: LIST
   ────────────────────────────────────────────────────────────────────────── */
.rmf-template-list .rmf-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
}
.rmf-card-list {
    background: #fff;
    border: 1px solid var(--rmf-border);
    border-radius: var(--rmf-radius);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    gap: 0;
    transition: box-shadow var(--rmf-transition);
    box-shadow: var(--rmf-shadow);
}
.rmf-card-list:hover { box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.rmf-card-list .rmf-card-img-wrap { display: block; width: 200px; flex-shrink: 0; overflow: hidden; }
.rmf-card-list .rmf-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rmf-card-list:hover .rmf-card-img-wrap img { transform: scale(1.04); }
.rmf-card-list .rmf-no-img { width: 200px; flex-shrink: 0; }
.rmf-card-list .rmf-card-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.rmf-card-list .rmf-card-date { font-size: 11px; color: var(--rmf-muted); text-transform: uppercase; letter-spacing: .05em; }
.rmf-card-list .rmf-card-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--rmf-primary); }
.rmf-card-list .rmf-card-title a { color: inherit; text-decoration: none; }
.rmf-card-list .rmf-card-title a:hover { color: var(--rmf-accent); }
.rmf-card-list .rmf-card-excerpt { font-size: 13px; color: var(--rmf-muted); line-height: 1.6; margin: 0; }
.rmf-card-list .rmf-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rmf-list-arrow {
    display: flex; align-items: center; padding: 0 20px;
    font-size: 22px; font-weight: 700; color: var(--rmf-border);
    text-decoration: none; transition: color var(--rmf-transition);
    flex-shrink: 0;
}
.rmf-card-list:hover .rmf-list-arrow { color: var(--rmf-accent); }

/* ── Tags ────────────────────────────────────────────────────────────────── */
.rmf-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--rmf-light);
    border: 1px solid var(--rmf-border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    color: var(--rmf-text);
}
.rmf-tag strong { color: var(--rmf-accent2); }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.rmf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.rmf-page-btn {
    min-width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--rmf-border);
    border-radius: 10px;
    background: #fff;
    color: var(--rmf-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rmf-transition);
    padding: 0 8px;
}
.rmf-page-btn:hover { border-color: var(--rmf-accent); color: var(--rmf-accent); }
.rmf-page-btn.active { background: var(--rmf-accent); border-color: var(--rmf-accent); color: #fff; }
.rmf-page-btn:disabled { opacity: .4; pointer-events: none; }

/* Card entry animation */
.rmf-card { animation: rmf-fadein .35s ease both; }
@keyframes rmf-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
