/* ===== Embu das Artes Notícias — tema responsivo ===== */
:root {
  --navy: #0e3a6b;
  --navy-dark: #0a2b52;
  --blue: #1a56a0;
  --blue-light: #2e6fc0;
  --red: #c8402e;
  --orange: #d97a2b;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c2b3a;
  --muted: #5b6b7c;
  --line: #e3e8ef;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(14, 58, 107, .08);
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ===== Topbar ===== */
.topbar { background: var(--navy); color: #dbe6f3; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar-left { display: flex; gap: 18px; align-items: center; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar-right > a { color: #dbe6f3; }
.topbar-right > a:hover { color: #fff; }
.topbar-right > span { opacity: .4; }
.topbar-social { display: inline-flex; gap: 10px; margin-left: 8px; }
.topbar-social a { color: #fff; opacity: .85; }
.topbar-social a:hover { opacity: 1; text-decoration: none; }
.topbar-search { margin-left: 6px; color: #fff; display: inline-flex; }

/* ===== Header ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: center; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none !important; position: relative; flex-wrap: wrap; justify-content: center; }
.brand-logo { width: 200px; height: auto; }
.brand-text {
  font-size: 1.9rem; font-weight: 800; letter-spacing: .5px; color: var(--navy);
  text-transform: uppercase; font-stretch: condensed;
}
.brand-text strong { color: var(--navy); }
.brand-text::after { content: " NOTÍCIAS"; color: var(--orange); font-weight: 800; }
.brand-text { color: var(--navy); }
.brand-slogan {
  position: absolute; right: 0; top: 100%; font-size: .8rem; font-style: italic;
  color: var(--muted); text-align: right; line-height: 1.3; width: 240px;
}
.brand { padding-bottom: 26px; }

/* ===== Navegação ===== */
.mainnav { background: var(--blue); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 12px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: #fff; margin: 5px 0; border-radius: 2px; transition: .25s; }
.nav-menu { display: flex; list-style: none; flex: 1; }
.nav-menu a {
  display: block; color: #fff; font-weight: 600; font-size: .95rem;
  padding: 14px 20px; text-decoration: none; border-bottom: 3px solid transparent;
}
.nav-menu a:hover, .nav-menu a.active { background: rgba(255,255,255,.08); border-bottom-color: var(--red); }
.nav-search { color: #fff; padding: 10px 14px; margin-left: auto; }

/* ===== Ticker ===== */
.ticker { background: #fff; border-bottom: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 14px; min-height: 46px; }
.ticker-label {
  background: var(--red); color: #fff; font-weight: 700; font-size: .78rem;
  letter-spacing: .5px; padding: 5px 12px; border-radius: 4px; white-space: nowrap;
}
.ticker-track-wrap { overflow: hidden; flex: 1; }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: ticker 40s linear infinite; }
.ticker-track a { color: var(--text); font-size: .9rem; white-space: nowrap; }
.ticker-track a::before { content: "› "; color: var(--red); font-weight: 700; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ===== Home grid ===== */
main.container { padding-top: 20px; padding-bottom: 40px; }
.destaques {
  display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 26px;
}
.hero-card, .side-card { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.hero-card img, .side-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card a, .side-card a { display: block; height: 100%; color: #fff; text-decoration: none; }
.hero-card { min-height: 420px; display: grid; }
.side-card { min-height: 200px; }
.hero-card img { position: absolute; inset: 0; }
.side-card img { position: absolute; inset: 0; }
.hero-overlay, .side-overlay {
  position: relative; z-index: 2; padding: 22px;
  background: linear-gradient(transparent, rgba(8, 24, 46, .88) 60%);
  align-self: end; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-overlay h1 { font-size: 1.75rem; line-height: 1.25; margin: 8px 0; }
.hero-overlay p { opacity: .92; font-size: .95rem; margin-bottom: 8px; }
.side-overlay h2 { font-size: 1.05rem; line-height: 1.3; margin: 6px 0 4px; }
.hero-overlay time, .side-overlay time { font-size: .78rem; opacity: .85; }

.badge {
  display: inline-block; background: var(--red); color: #fff; font-size: .68rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  padding: 3px 10px; border-radius: 3px; width: fit-content;
}
.badge.cidade { background: #157a4e; }
.badge.esportes { background: #1a56a0; }
.badge.politica { background: #6a3fb5; }
.badge.seguranca { background: #b3261e; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 14px; }
.section-title { font-size: 1.35rem; color: var(--navy); position: relative; padding-bottom: 6px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; background: var(--red); border-radius: 2px; }
.ver-todas { font-size: .88rem; font-weight: 600; }

.home-grid-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }

/* ===== Cards de notícia ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(14,58,107,.14); }
.news-card a { color: inherit; text-decoration: none; display: block; height: 100%; }
.card-img { aspect-ratio: 16/10; overflow: hidden; background: #dfe6ee; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.card-body h3 { font-size: 1rem; line-height: 1.35; color: var(--navy); }
.card-body p { font-size: .84rem; color: var(--muted); }
.card-body time { font-size: .75rem; color: var(--muted); margin-top: auto; }

/* ===== Sidebar ===== */
.widget { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 20px; }
.widget-title { font-size: 1.15rem; color: var(--navy); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.weather-top { display: flex; justify-content: space-between; align-items: center; }
.weather-top h3 { font-size: 1rem; color: var(--text); }
.weather-temp { font-size: 2.4rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.weather-right { text-align: right; font-size: .85rem; color: var(--muted); }
.weather-desc { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.weather::before { content: "☀️"; font-size: 1.6rem; float: left; margin-right: 10px; }

.ranking { list-style: none; counter-reset: rank; }
.ranking li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ranking li:last-child { border-bottom: 0; }
.rank-num { font-size: 1.5rem; font-weight: 800; color: var(--red); min-width: 26px; text-align: center; }
.ranking a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.ranking a:hover .rank-text { color: var(--blue); }
.ranking img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.rank-text { font-size: .84rem; line-height: 1.35; }

.widget-cats ul { list-style: none; }
.widget-cats a {
  display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: .92rem; color: var(--navy);
}
.widget-cats li:last-child a { border-bottom: 0; }
.widget-cats a:hover { color: var(--red); text-decoration: none; }

/* ===== Paginação ===== */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 28px 0 8px; }
.page-btn {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  color: var(--navy); font-weight: 600; text-decoration: none !important; transition: .15s;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.current { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-ellipsis { align-self: end; padding: 6px; color: var(--muted); }

/* ===== Post ===== */
.post, .static-page { max-width: 780px; margin: 0 auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px clamp(18px, 4vw, 40px); }
.post-header { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.post-header h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); color: var(--navy); line-height: 1.25; margin-top: 10px; }
.post-meta { color: var(--muted); font-size: .88rem; margin-top: 8px; }
.post-image { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; }
.post-content { font-size: 1.02rem; }
.post-content p { margin-bottom: 1em; }
.post-content h2, .post-content h3 { color: var(--navy); margin: 1.2em 0 .5em; }
.post-content ul, .post-content ol { margin: 0 0 1em 1.4em; }
.post-content blockquote { border-left: 4px solid var(--red); background: #faf7f5; padding: 12px 18px; border-radius: 0 8px 8px 0; margin-bottom: 1em; color: #4a3f3a; }
.post-share { display: flex; gap: 12px; align-items: center; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .88rem; }
.post-share span { font-weight: 600; color: var(--muted); }
.post-share a { background: var(--bg); padding: 7px 14px; border-radius: 20px; font-weight: 600; }
.related { max-width: 1200px; margin: 30px auto 0; }
.related h2 { color: var(--navy); margin-bottom: 14px; }

/* ===== Páginas estáticas ===== */
.static-page h1 { color: var(--navy); margin-bottom: 16px; }
.page-404 { text-align: center; padding: 60px 0; }
.page-404 h1 { font-size: 4rem; color: var(--red); }
.page-404 .btn { display: inline-block; margin-top: 16px; }

/* ===== Formulário de contato ===== */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--navy); }
.form-field input, .form-field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fbfcfe;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--blue-light); border-color: transparent; }
.btn {
  display: inline-block; background: var(--red); color: #fff !important; font-weight: 700;
  padding: 11px 26px; border-radius: 8px; border: 0; cursor: pointer; text-decoration: none !important;
}
.btn:hover { background: #a83224; }

/* ===== Rodapé ===== */
.site-footer { background: var(--navy-dark); color: #c9d6e6; margin-top: 30px; }
.footer-inner { display: flex; gap: 40px; align-items: flex-start; padding: 36px 16px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 12px; align-items: center; max-width: 320px; }
.footer-logo { background: #fff; border-radius: 10px; padding: 6px; width: 58px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; display: block; }
.footer-brand p { font-size: .8rem; opacity: .8; }
.footer-nav { display: flex; gap: 4px 26px; flex-wrap: wrap; align-items: center; flex: 1; }
.footer-nav a { color: #e2eaf4; font-size: .92rem; }
.footer-meta { margin-left: auto; text-align: right; }
.footer-social { display: flex; gap: 14px; justify-content: flex-end; margin-bottom: 10px; }
.footer-social a { color: #fff; font-size: .88rem; font-weight: 600; }
.footer-links { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; font-size: .8rem; }
.footer-links a { color: #c9d6e6; }
.footer-links span { opacity: .4; }
.footer-copy { font-size: .75rem; opacity: .65; margin-top: 10px; }

/* ===== Busca ===== */
.busca-box { display: flex; gap: 10px; max-width: 560px; margin: 0 auto 24px; }
.busca-box input { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* ===== Responsivo ===== */
@media (max-width: 1024px) {
  .home-grid-wrap { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-slogan { position: static; width: 100%; text-align: center; }
  .brand { padding-bottom: 10px; }
}
@media (max-width: 720px) {
  .topbar { font-size: .75rem; }
  .topbar-left .topbar-date, .topbar-right > a, .topbar-right > span:not(.topbar-social) { display: none; }
  .brand-text { font-size: 1.45rem; }
  .brand-logo { width: 150px; }
  /* Menu hamburguer */
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--blue); box-shadow: 0 8px 16px rgba(0,0,0,.25);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { border-bottom: 1px solid rgba(255,255,255,.12); padding: 13px 20px; }
  .nav-inner { position: relative; }
  .mainnav { position: sticky; }
  /* Home vira coluna única */
  .destaques { grid-template-columns: 1fr; }
  .hero-card { min-height: 300px; }
  .hero-side { display: grid; gap: 12px; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 22px; }
  .footer-meta { margin-left: 0; text-align: left; }
  .footer-social, .footer-links { justify-content: flex-start; }
}
@media (max-width: 380px) {
  .brand-text { font-size: 1.2rem; }
  .ticker-label { font-size: .68rem; }
}
