/* ============================================================
   ESTILO B — JORNAL CIDADÃO
   Tipografia elegante, estilo editorial e layout limpo
   ============================================================ */

/* IMPORTAÇÃO DE FONTES */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;700&family=Source+Sans+Pro:wght@300;400;600&display=swap');

/* ===========================
   BASE
   =========================== */
body {
    font-family: 'Source Sans Pro', Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
    color: #111;
}

a {
    color: #880000;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ===========================
   HEADER
   =========================== */
header {
    background: #ffffff;
    border-bottom: 1px solid #cccccc;
    padding: 25px 0;
    margin-bottom: 25px;
}

header .logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    text-align: center;
    margin: 0;
    letter-spacing: 1px;
}

nav {
    margin-top: 15px;
    text-align: center;
}

nav a {
    margin: 0 12px;
    font-size: 17px;
    color: #333;
}
nav a:hover {
    color: #880000;
}

/* ===========================
   CONTAINER PADRÃO
   =========================== */
main,
.container-box {
    max-width: 1080px;
    margin: auto;
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 0 6px rgba(0,0,0,0.08);
}

/* ============================================================
   HOME — GRID PRINCIPAL
   ============================================================ */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
    margin-bottom: 40px;
}

.home-grid .feature-card:first-child {
    grid-column: 1 / span 2;
    height: 380px;
}

.home-grid .feature-card:nth-child(2),
.home-grid .feature-card:nth-child(3) {
    height: 220px;
}

/* ===========================
   FEATURE CARD
   =========================== */
.feature-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #ddd;
}

.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-overlay {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}

.feature-overlay h2 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 26px;
}

/* ===========================
   LISTA DE MATÉRIAS
   =========================== */
.article {
    border-bottom: 1px solid #e5e5e5;
    padding: 18px 0;
}

/* ===========================
   PAGINAÇÃO
   =========================== */
.pagination {
    text-align: center;
    margin: 25px 0;
}
.pagination a {
    font-size: 18px;
    color: #880000;
}

/* ===========================
   FOOTER
   =========================== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #ccc;
}

/* ============================================================
   ★★★  PÁGINAS INTERNAS NOVAS  ★★★
   create/edit_article, painel, admin, revisão
   ============================================================ */

/* ===========================
   FLASH MESSAGES
   =========================== */
.flash-box {
    max-width: 1080px;
    margin: 20px auto;
}
.flash-success {
    background: #e8ffe8;
    border-left: 4px solid #2b8c2b;
    padding: 12px 16px;
    border-radius: 4px;
    color: #145214;
}
.flash-error {
    background: #ffe8e8;
    border-left: 4px solid #b30000;
    padding: 12px 16px;
    border-radius: 4px;
    color: #8a0000;
}

/* ===========================
   BOTÕES
   =========================== */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 16px;
}
.btn-primary { background:#880000; color:#fff; }
.btn-secondary { background:#fff; border:1px solid #ccc; }
.btn-danger { background:#b00000; color:#fff; }

/* ===========================
   EDITOR DE MATÉRIA
   =========================== */
.editor-shell {
    max-width: 940px;
    margin: 25px auto 60px;
    padding: 25px;
    background:#fff;
    border-radius:6px;
    box-shadow:0 0 4px rgba(0,0,0,0.1);
}

.blocks { display:flex; flex-direction:column; gap:14px; }
.block {
    background:#fff;
    border:1px solid #ddd;
    padding:14px;
    border-radius:4px;
    position:relative;
    box-shadow:0 0 4px rgba(0,0,0,0.04);
}
.block textarea {
    width:100%;
    min-height:100px;
    border:1px solid #ccc;
    padding:10px;
    border-radius:4px;
    font-size:16px;
    font-family:'Source Sans Pro', sans-serif;
}

.block .controls {
    position:absolute;
    top:8px;
    right:8px;
    display:flex;
    gap:5px;
}
.small-btn {
    padding:4px 6px;
    border-radius:4px;
    font-size:13px;
    border:1px solid #ccc;
    background:#f3f3f3;
    cursor:pointer;
}

/* ===========================
   UPLOAD / THUMBNAIL
   =========================== */
.preview-img {
    margin-top:10px;
    max-width:220px;
    border-radius:4px;
    border:1px solid #ccc;
}

/* ===========================
   TERMOS
   =========================== */
.terms {
    margin-top:20px;
    font-size:15px;
    color:#333;
}

/* ============================================================
   DASHBOARD DO USUÁRIO
   ============================================================ */

.dashboard-wrapper {
    max-width:1080px;
    margin:auto;
    padding:25px;
    background:#fff;
    border-radius:6px;
    box-shadow:0 0 4px rgba(0,0,0,0.08);
}

.stats-grid {
    display:flex;
    justify-content:space-between;
    margin-bottom:20px;
}
.stats-card {
    flex:1;
    background:#fafafa;
    border:1px solid #ddd;
    padding:20px;
    margin:5px;
    text-align:center;
    border-radius:6px;
    box-shadow:0 0 4px rgba(0,0,0,0.04);
}
.stats-card strong {
    font-size:38px;
    color:#880000;
    display:block;
}

/* LISTA DAS MATÉRIAS DO USUÁRIO */
.article-user-card {
    display:flex;
    background:#fff;
    padding:12px;
    border:1px solid #ddd;
    border-radius:6px;
    margin-bottom:12px;
    align-items:center;
    gap:14px;
}
.article-user-card img {
    width:130px;
    height:85px;
    border-radius:4px;
    object-fit:cover;
    border:1px solid #ccc;
}
.article-user-card a { font-size:15px; margin-right:8px; }

/* ============================================================
   REVIEW DO ADMIN
   ============================================================ */

.review-card {
    background:#fff;
    padding:16px;
    border-radius:6px;
    box-shadow:0 0 4px rgba(0,0,0,0.1);
    display:flex;
    gap:14px;
    margin-bottom:18px;
}

.review-card img {
    width:160px;
    height:110px;
    object-fit:cover;
    border-radius:4px;
    border:1px solid #ddd;
}

.review-info h3 {
    font-family:'Playfair Display',serif;
    margin:0;
    font-size:22px;
}
.review-actions a {
    color:#880000;
    margin-right:10px;
}
.review-actions a:hover { text-decoration:underline; }

/* ===========================
   RESPONSIVIDADE GERAL
   =========================== */
@media(max-width:950px){
    .home-grid{ grid-template-columns:1fr; }

    .stats-grid { flex-direction:column; }
    .article-user-card { flex-direction:column; text-align:center; }
    .review-card { flex-direction:column; }
}

@media(max-width:600px){
    header .logo h1 { font-size:28px; }
    nav a { margin: 6px; font-size:16px; }
    .review-card img { width:100%; height:200px; }
}
