:root {
    --primary: #002fa5;
    --primary-dark: #001f7a;
    --primary-light: #1a47c0;
    --accent: #e8002d;
    --bg: #f4f6fb;
    --white: #fff;
    --text: #1a1a2e;
    --muted: #6b7280;
    --border: #e2e8f0;
    --card-shadow: 0 2px 12px rgba(0,47,165,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* HEADER */
header { background: var(--primary); color: #fff; }
.top-bar { background: var(--primary-dark); padding: 6px 0; font-size: .78rem; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top-bar a { color: rgba(255,255,255,.8); margin-left: 16px; }
.top-bar a:hover { color: #fff; }
.top-bar-info { display: flex; align-items: center; gap: 0; overflow-x: auto; flex-wrap: nowrap; }
.top-info-item { color: rgba(255,255,255,.85); white-space: nowrap; padding: 0 14px; border-right: 1px solid rgba(255,255,255,.15); font-size: .78rem; }
.top-info-item:first-child { padding-left: 0; }
.header-main { padding: 14px 0; }
.header-main .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo img { height: 52px; }
.search-form { display: flex; flex: 1; max-width: 420px; }
.search-form input { flex: 1; padding: 9px 14px; border: none; border-radius: 6px 0 0 6px; font-size: .95rem; outline: none; }
.search-form button { background: var(--accent); color: #fff; border: none; padding: 9px 16px; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 1rem; }

/* NAV */
nav { background: var(--primary-light); }
nav .container { display: flex; gap: 2px; overflow-x: auto; }
nav a { color: rgba(255,255,255,.9); padding: 11px 16px; font-size: .9rem; font-weight: 500; white-space: nowrap; transition: background .2s; }
nav a:hover, nav a.active { background: rgba(255,255,255,.15); color: #fff; }

/* CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* BREAKING NEWS */
.breaking { background: var(--accent); color: #fff; padding: 8px 0; font-size: .88rem; overflow: hidden; }
.breaking .container { display: flex; align-items: center; gap: 0; }
.breaking-label { background: #fff; color: var(--accent); font-weight: 700; padding: 4px 12px; border-radius: 3px; white-space: nowrap; font-size: .8rem; flex-shrink: 0; margin-right: 14px; }
.breaking-track { overflow: hidden; flex: 1; position: relative; }
.breaking-text { display: inline-block; white-space: nowrap; animation: marquee 35s linear infinite; padding-left: 100%; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* MAIN LAYOUT */
.main-content { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding: 28px 0; }
@media(max-width:900px) { .main-content { grid-template-columns: 1fr; } }

/* SECTION TITLE */
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 16px; }

/* NEWS GRID */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
@media(max-width:700px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px) { .news-grid { grid-template-columns: 1fr; } }

/* CARD */
.card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,47,165,.14); }
.card img { width: 100%; height: 170px; object-fit: cover; }
.card .card-body { padding: 14px; }
.card .cat { font-size: .72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.card h3 { font-size: .95rem; margin: 6px 0 8px; line-height: 1.35; }
.card h3:hover { color: var(--primary); }
.card .meta { font-size: .75rem; color: var(--muted); display: flex; gap: 10px; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-box { background: var(--white); border-radius: 10px; padding: 18px; box-shadow: var(--card-shadow); }

/* ANÚNCIOS */
.ad-sidebar { width: 280px; height: 290px; background: var(--white); border-radius: 10px; box-shadow: var(--card-shadow); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-sidebar-inner { width: 280px; height: 290px; }
.ad-sidebar img { width: 280px; height: 290px; object-fit: cover; display: block; }

.ad-home { width: 820px; height: 150px; background: var(--white); border-radius: 10px; box-shadow: var(--card-shadow); overflow: hidden; display: flex; align-items: center; justify-content: center; margin: 18px 0 24px; }
.ad-home img { width: 820px; height: 150px; object-fit: cover; display: block; }

.ad-noticia { width: 550px; height: 100px; background: transparent; border-radius: 0; box-shadow: none; overflow: visible; display: flex; align-items: center; justify-content: center; margin: 0 auto 50px; }
.ad-noticia img { width: 550px; height: 100px; object-fit: cover; display: block; border-radius: 0; }





@media(max-width:900px){
  .ad-sidebar{ width:100%; height:auto; min-height:140px; }
  .ad-home, .ad-noticia{ width:100%; height:auto; }
  .ad-noticia img{ width:100%; height:auto; }
}


.sidebar-box .section-title { font-size: 1rem; }
.most-read-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.most-read-item:last-child { border-bottom: none; }
.most-read-item .num { font-size: 1.4rem; font-weight: 800; color: var(--primary); opacity: .3; min-width: 28px; }
.most-read-item h4 { font-size: .88rem; line-height: 1.3; }
.most-read-item h4:hover { color: var(--primary); }

/* NOTICIA SINGLE */
.noticia-header { margin-bottom: 20px; }
.noticia-body-bg{
  background:var(--white);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 2px 12px rgba(0,47,165,.07);
  padding-bottom:24px;
}

.noticia-body-bg .cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.noticia-title-media { display: flex; flex-direction: column; gap: 10px; }
.noticia-body-bg h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 8px; }
.noticia-body-bg .meta { font-size: .82rem; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

.noticia-body-bg .noticia-img{margin-bottom:40px;border-radius:0;width:100%;display:block;height:auto;}

.noticia-body { font-size: 1.05rem; line-height: 1.8; margin-bottom: 24px; }

.noticia-body p { margin-bottom: 16px; }


.noticia-body h2, .noticia-body h3 { margin: 24px 0 12px; color: var(--primary); }

/* COMMENTS */
.comments { margin-top: 36px; }
.comment-item { background: var(--white); border-radius: 8px; padding: 14px; margin-bottom: 12px; box-shadow: var(--card-shadow); }
.comment-item .author { font-weight: 700; font-size: .9rem; }
.comment-item .date { font-size: .78rem; color: var(--muted); }
.comment-item p { margin-top: 8px; font-size: .92rem; }
.comment-form { background: var(--white); border-radius: 10px; padding: 20px; box-shadow: var(--card-shadow); margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-size: .95rem; font-family: inherit; outline: none; transition: border .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 100px; }

/* BUTTONS */
.btn { display: inline-block; padding: 9px 20px; border-radius: 6px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: background .2s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--accent); color: #fff; }
.btn-danger:hover { background: #b5001f; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d1d5db; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }

/* PAGINATION */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination a, .pagination span { padding: 7px 13px; border-radius: 6px; font-size: .9rem; background: var(--white); box-shadow: var(--card-shadow); }
.pagination a:hover { background: var(--primary); color: #fff; }
.pagination .current { background: var(--primary); color: #fff; }

/* FOOTER */
footer { background: var(--primary-dark); color: rgba(255,255,255,.8); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 36px 0 24px; }
@media(max-width:700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; border-bottom: 2px solid var(--accent); padding-bottom: 6px; display: inline-block; }
.footer-col a { display: block; color: rgba(255,255,255,.7); font-size: .88rem; margin-bottom: 7px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 14px 0; text-align: center; font-size: .82rem; }

/* ALERT */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: .9rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* NO IMAGE PLACEHOLDER */
.no-img { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.4); font-size: 2rem; }

/* BLOG POST */
.blog-post { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); margin-bottom: 24px; }
.blog-post-img-wrap { display: block; width: 100%; height: 450px; overflow: hidden; }
.blog-post-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.blog-post-img-wrap:hover .blog-post-img { transform: scale(1.02); }
.blog-post-body { padding: 22px 24px 20px; }
.blog-post-meta { display: flex; align-items: center; gap: 14px; font-size: .8rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.blog-cat { background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 3px; text-transform: uppercase; }
.blog-post-title { font-size: 1.35rem; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.blog-post-title a:hover { color: var(--primary); }
.blog-read-more { font-size: .88rem; font-weight: 700; color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 1px; display: inline-block; }
.blog-read-more:hover { color: var(--primary-dark); border-color: var(--primary-dark); }
.views-admin { background: var(--primary); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: .72rem; }

/* CROP PREVIEW (admin) */
.crop-preview { width: 100%; height: 180px; overflow: hidden; border-radius: 6px; border: 1px solid var(--border); margin-top: 8px; position: relative; }
.crop-preview img { width: 100%; height: 100%; object-fit: cover; }
