/* ============================================================
   Coloring Forum v5 — SuperColoring layout fiel
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.sc-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 14px 18px 56px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #222;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.sc-bc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    color: #aaa;
    margin-bottom: 18px;
}
.sc-bc a { color: #666; text-decoration: none; }
.sc-bc a:hover { color: #1a73e8; text-decoration: underline; }
.sc-bc span { color: #ccc; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL — imagem esq + info dir (exacto SC)
   ═══════════════════════════════════════════════════════════ */
.sc-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 32px;
}

/* Coluna da imagem — largura natural, max 520px */
.sc-img-col {
    /* sem background, sem borda — igual SC */
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.sc-main-img {
    display: block;
    max-width: 520px;
    width: 100%;
    height: auto;
    /* sem border-radius, sem shadow — SC não tem */
}

/* Coluna de informação */
.sc-info-col {
    min-width: 0;
}

/* ── H1 ─────────────────────────────────────────────────────── */
.sc-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
    line-height: 1.3;
}

/* ── Botões de acção ────────────────────────────────────────── */
.sc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    max-width: 260px;
}
.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 18px;
    border-radius: 6px;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter .15s;
    width: 100%;
}
.sc-btn:hover { filter: brightness(.9); }

/* Print — azul */
.sc-btn-print { background: #1a73e8; color: #fff; }
/* Download — verde */
.sc-btn-dl    { background: #34a853; color: #fff; }
/* PDF — amarelo/laranja */
.sc-btn-pdf   { background: #fbbc04; color: #222; }

/* ── Contador ───────────────────────────────────────────────── */
.sc-print-count {
    font-size: .8rem;
    color: #aaa;
    margin: 0 0 14px;
}

/* ── Bloco meta (Published by / Source / Permission) ───────── */
.sc-meta {
    font-size: .85rem;
    color: #555;
    line-height: 1.65;
    margin-bottom: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}
.sc-meta p { margin: 0 0 4px; }
.sc-meta-lbl  { font-weight: 600; color: #333; margin-right: 4px; }
.sc-meta-link { color: #1a73e8; text-decoration: none; }
.sc-meta-link:hover { text-decoration: underline; }
.sc-permission {
    font-size: .8rem;
    color: #888;
    margin-top: 8px !important;
    line-height: 1.55;
}

/* ── Tags ───────────────────────────────────────────────────── */
.sc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.sc-tag {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    background: #f1f3f4;
    color: #444;
    font-size: .78rem;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: background .15s;
}
.sc-tag:hover { background: #e8eaed; color: #111; }

/* ═══════════════════════════════════════════════════════════
   MORE LIKE THIS
   ═══════════════════════════════════════════════════════════ */
.sc-related { margin-top: 32px; }

.sc-related-heading {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin: 0 0 14px;
    /* SC usa uma linha separadora simples */
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

.sc-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

/* Card relacionado — sem título visível, só no hover */
.sc-rel-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border-radius: 4px;
    background: #f5f5f5;
}
.sc-rel-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}
.sc-rel-card:hover img { transform: scale(1.06); }

/* Hover overlay com título limpo */
.sc-rel-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px 8px;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
    color: #fff;
    font-size: .72rem;
    line-height: 1.25;
    opacity: 0;
    transition: opacity .2s;
    /* texto cortado numa linha */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-rel-card:hover .sc-rel-hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   PÁGINA DE CATEGORIA (single-forum)
   ═══════════════════════════════════════════════════════════ */
.sc-category-page,
.sc-archive-page { padding-bottom: 48px; }

.sc-category-title,
.sc-archive-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px;
}

/* Grid de imagens — 4 colunas, cards sem título */
.sc-image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.sc-image-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border-radius: 4px;
    background: #f5f5f5;
}
.sc-image-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}
.sc-image-card:hover img { transform: scale(1.06); }

/* Hover overlay — título limpo só no hover */
.sc-image-card-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px 8px;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
    color: #fff;
    font-size: .72rem;
    line-height: 1.25;
    opacity: 0;
    transition: opacity .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-image-card:hover .sc-image-card-hover { opacity: 1; }

/* Paginação */
.sc-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 24px 0;
}
.sc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: .85rem;
    transition: background .12s;
}
.sc-pagination .page-numbers:hover { background: #f0f4ff; color: #1a73e8; }
.sc-pagination .page-numbers.current { background: #1a73e8; color: #fff; border-color: #1a73e8; font-weight: 700; }

/* Descrição SEO da categoria */
.sc-category-desc {
    font-size: .88rem;
    line-height: 1.75;
    color: #666;
    max-width: 720px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

/* ═══════════════════════════════════════════════════════════
   ARQUIVO GERAL (archive-forum) — grid de categorias
   ═══════════════════════════════════════════════════════════ */
.sc-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}
.sc-cat-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: box-shadow .18s, transform .15s;
}
.sc-cat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.10); transform: translateY(-2px); }
.sc-cat-thumb { aspect-ratio: 1/1; overflow: hidden; background: #f5f5f5; }
.sc-cat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.sc-cat-card:hover .sc-cat-thumb img { transform: scale(1.05); }
.sc-cat-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.sc-cat-info { padding: 8px 10px 10px; }
.sc-cat-name { display: block; font-size: .85rem; font-weight: 600; color: #111; line-height: 1.3; }
.sc-cat-count { display: block; font-size: .74rem; color: #aaa; margin-top: 2px; }
.sc-cat-empty { opacity: .5; }
.sc-no-results { color: #888; padding: 32px 0; text-align: center; }

/* ── Shortcode grid de categorias ───────────────────────────── */
.cfsf-card { border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid #e8e8e8; transition: box-shadow .18s, transform .15s; }
.cfsf-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.10); transform: translateY(-2px); }
.cfsf-card a { display: block; text-decoration: none; color: inherit; }
.cfsf-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.cfsf-no-img { aspect-ratio: 1/1; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.cfsf-info { padding: 8px 10px 10px; }
.cfsf-info h3 { margin: 0 0 2px; font-size: .85rem; font-weight: 600; color: #111; line-height: 1.3; }
.cfsf-info span { font-size: .74rem; color: #aaa; }
.cfsf-empty-admin { opacity: .5; }
.cfsf-spinner { display: none; padding: 9px 22px; background: #f0f0f0; border-radius: 20px; font-size: .84rem; color: #555; }
.cfsf-spinner.on { display: inline-block; }
.cfsf-loader { text-align: center; padding: 20px; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
    .sc-layout            { grid-template-columns: 1fr; gap: 20px; }
    .sc-main-img          { max-width: 100%; }
    .sc-actions           { max-width: 100%; flex-direction: row; flex-wrap: wrap; }
    .sc-btn               { width: auto; flex: 1; min-width: 100px; }
    .sc-related-grid      { grid-template-columns: repeat(4, 1fr); }
    .sc-image-grid        { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .sc-wrap              { padding: 10px 12px 40px; }
    .sc-title             { font-size: 1.1rem; }
    .sc-related-grid      { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .sc-image-grid        { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .sc-categories-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sc-actions           { flex-direction: column; }
    .sc-btn               { width: 100%; }
}
