/* ──────────────────────────────────────────────
   GhanaChild — Community (Music · Sports · Church)
   Builds on dashboard.css + education.css (filters, discussion cards, replies)
   ────────────────────────────────────────────── */
.cm-header-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Landing cards */
.cm-section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.cm-section-card {
    display: flex; flex-direction: column; gap: 0.5rem;
    background: var(--off-white, #FAFAF7); border-radius: 12px; padding: 1.5rem;
    border-top: 4px solid var(--gold, #DAA520); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none; color: var(--charcoal, #1A1A1A); transition: transform .15s, box-shadow .15s;
}
.cm-section-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10); }
.cm-section-icon { font-size: 2.2rem; }
.cm-section-name { font-family: var(--serif, Georgia, serif); font-size: 1.4rem; font-weight: 700; color: var(--terracotta, #C1693C); }
.cm-section-tagline { color: var(--muted, #6B5E52); line-height: 1.5; font-size: 0.95rem; flex: 1; }
.cm-section-count { font-size: 0.8rem; font-weight: 600; color: var(--charcoal, #1A1A1A); }
.cm-lock { font-size: 0.9rem; }

/* Genre filter + rules */
.cm-genre-filter { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.cm-genre-filter label { font-weight: 600; font-size: 0.9rem; }
.cm-genre-filter select { padding: 0.5rem 0.75rem; border: 1px solid rgba(0,0,0,.12); border-radius: 6px; background: var(--off-white, #FAFAF7); font-size: 0.95rem; }
.cm-rules { margin-top: 1rem; background: rgba(218, 165, 32, 0.08); border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.9rem; }
.cm-rules summary { cursor: pointer; font-weight: 600; }
.cm-rules ul { margin: 0.6rem 0 0.4rem 1.1rem; line-height: 1.6; }
.cm-rules-foot { color: var(--muted, #6B5E52); font-size: 0.85rem; margin: 0.3rem 0 0; }

/* Post list */
.cm-post-list { list-style: none; margin: 0; padding: 0; }
.cm-post-row { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.cm-post-row:last-child { border-bottom: 0; }
.cm-post-row > a { display: grid; gap: 0.25rem; padding: 1rem 0.25rem; text-decoration: none; color: inherit; }
.cm-post-row > a:hover .cm-post-title { color: var(--terracotta, #C1693C); }
.cm-post-title { font-weight: 700; font-size: 1.05rem; color: var(--charcoal, #1A1A1A); }
.cm-post-excerpt { color: var(--muted, #6B5E52); font-size: 0.92rem; line-height: 1.5; }
.cm-post-meta { font-size: 0.82rem; color: var(--muted, #6B5E52); display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.cm-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.cm-media-flag { font-size: 0.9rem; }
.cm-consent a { color: var(--terracotta, #C1693C); }
.cm-post-row.is-hidden, .reply-item.is-hidden { opacity: 0.55; }
.cm-avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; }
.cm-avatar-emoji { font-size: 1.05em; }

.cm-badge { background: var(--cream, #F5EFE6); color: var(--terracotta, #C1693C); padding: 0.1rem 0.55rem; border-radius: 10px; font-size: 0.72rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cm-badge-genre { background: rgba(0, 107, 63, 0.10); color: #006B3F; }
.cm-badge-hidden { background: #fde8e0; color: #c95a3a; }

.cm-empty { text-align: center; padding: 2rem 0; color: var(--muted, #6B5E52); }
.cm-empty-icon { font-size: 3rem; }
.cm-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; font-size: 0.9rem; }
.cm-pager a { color: var(--terracotta, #C1693C); font-weight: 600; }

/* Single post */
.cm-breadcrumb { font-size: 0.85rem; color: var(--muted, #6B5E52); margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cm-breadcrumb a { color: var(--terracotta, #C1693C); text-decoration: none; }
.cm-post-h1 { font-family: var(--serif, Georgia, serif); color: var(--terracotta, #C1693C); font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.25; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.cm-post .cm-post-meta { margin-bottom: 1rem; }
.cm-hidden-note { background: #fde8e0; color: #8a3b22; padding: 0.6rem 0.9rem; border-radius: 6px; font-size: 0.9rem; }
.cm-media { margin: 1rem 0 1.25rem; }
.cm-media img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 10px; display: block; }
.cm-media-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; display: block; }

.cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.cm-inline-form { display: inline; margin: 0; }
.cm-link-btn { background: none; border: 0; padding: 0.2rem 0; color: var(--muted, #6B5E52); font-size: 0.85rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.cm-link-btn:hover { color: var(--terracotta, #C1693C); text-decoration: underline; }
.cm-danger:hover { color: #c95a3a; }
.cm-report { display: inline-block; }
.cm-report summary { list-style: none; display: inline; }
.cm-report summary::-webkit-details-marker { display: none; }
.cm-report[open] form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.cm-report select { padding: 0.4rem 0.6rem; border: 1px solid rgba(0,0,0,.12); border-radius: 6px; font-size: 0.85rem; max-width: 100%; }

/* Forms */
.cm-form .form-group { margin-bottom: 1.1rem; }
.cm-form label { font-weight: 600; display: block; margin-bottom: 0.3rem; }
.cm-form .cm-sub-label { font-weight: 500; font-size: 0.85rem; }
.cm-form input[type="text"], .cm-form input[type="url"], .cm-form select, .cm-form textarea {
    width: 100%; padding: 0.8rem 1rem; border: 1px solid rgba(0, 0, 0, 0.10); border-radius: 6px;
    font-size: 1rem; font-family: var(--sans, inherit); background: var(--off-white, #FAFAF7); box-sizing: border-box;
}
.cm-form textarea { resize: vertical; min-height: 180px; line-height: 1.6; }
.cm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cm-media-box { background: var(--cream, #F5EFE6); padding: 1rem; border-radius: 8px; }
.cm-req { color: #c95a3a; }
.cm-consent { display: flex !important; gap: 0.6rem; align-items: flex-start; font-weight: 400 !important; font-size: 0.9rem; line-height: 1.5;
    background: rgba(218, 165, 32, 0.08); padding: 0.75rem 1rem; border-radius: 8px; margin: 0.5rem 0 1rem; }
.cm-consent input { margin-top: 0.25rem; flex-shrink: 0; width: 1.1rem; height: 1.1rem; }
.cm-form-actions { margin-top: 0.5rem; }
.cm-guest-cta { text-align: center; }
.cm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cm-flash { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.95rem; }
.cm-flash-ok { background: rgba(0, 107, 63, 0.10); color: #00502F; border-left: 4px solid #006B3F; }
.cm-flash-error { background: #fde8e0; color: #8a3b22; border-left: 4px solid #c95a3a; }

@media (max-width: 600px) {
    .cm-form-row { grid-template-columns: 1fr; }
    .cm-section-card { padding: 1.2rem; }
    .cm-header-actions { width: 100%; }
}
