/* ===============================
   RESET E LAYOUT PRINCIPAL
================================ */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f5f5f5;
  color: #222;
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: #121212;
  color: #ddd;
}

/* ===============================
   HEADER
================================ */
.header {
  background: #ffffffe8;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  margin-bottom: 20px;
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #FF5722;
}

.logo > a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.logo-img {
  width: 40px;
  height: 40px;
  margin-right: 0.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: #1e40af;
  text-decoration: none;
}

.dark-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: all 0.3s;
}

.dark-btn:hover {
  background-color: #e0e0e0;
}

/* ===============================
   MAIN / COLUNA PRINCIPAL
================================ */
.layout {
  display: block;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}

.main-news {
  width: 100%;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark .main-news {
  background-color: #1e1e1e;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.news-image {
  width: 100%;           /* ocupa toda a largura do container */
  max-height: 500px;     /* altura máxima */
  object-fit: contain;   /* mantém proporção inteira, sem cortar */
  margin: 15px 0;
  border-radius: 5px;
  background-color: #f0f0f0; /* opcional: fundo caso imagem menor */
}

.summary {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 10px 0 18px;
  padding: 12px 14px;
  background: #fff8f4;
  border-left: 4px solid #FF5722;
  border-radius: 6px;
}
body.dark .summary {
  background: #1f1a17;
  border-left-color: #FF5722;
}

.content {
  line-height: 1.6;
}

/* ===============================
   SIDEBAR
================================ */
.sidebar {
  flex: 0 1 300px;
  background-color: #fff;        /* fundo branco padr«ªo */
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark .sidebar {
  background-color: #1e1e1e;    /* fundo escuro no dark mode */
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  margin-bottom: 15px;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s, background-color 0.3s;
}

.sidebar-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}

/* Hover no item da sidebar */
.sidebar-link:hover {
  background-color: #f5f5f5; /* claro */
  color: #FF5722;
}

body.dark .sidebar-link:hover {
  background-color: #2a2a2a; /* escuro */
  color: #FF9800;
}

.sidebar-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: block;
}

.sidebar-img {
  width: 100%;
  border-radius: 6px;
  transition: transform 0.2s;
}

.sidebar-link:hover .sidebar-img {
  transform: scale(1.03);
}

/* Outras notícias no fim */
.other-news { margin-top: 26px; }
.other-news h2 { margin: 0 0 12px; }
.other-news .news-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.other-news .sidebar-item { height: 100%; }
.other-news .sidebar-link { display: flex; flex-direction: column; height: 100%; padding: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.other-news .sidebar-img { width: 100%; height: 160px; object-fit: cover; border-radius: 0; }
.other-news .sidebar-title { padding: 10px 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 48px; }
body.dark .other-news .sidebar-link { background: #1f293700; border-color: #0000006b; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.more-news-wrap { display: flex; justify-content: center; margin-top: 12px; }
.more-news-btn {
  padding: 10px 16px;
  border-radius: 9999px;
  border: 1px solid #FF5722;
  background: #FF5722;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(255,87,34,0.25);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.more-news-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 18px rgba(255,87,34,0.35); }
.more-news-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,152,0,.35); }
body.dark .more-news-btn { box-shadow: 0 6px 14px rgba(255,87,34,0.35); }


/* ===============================
   FOOTER
================================ */
.footer {
  text-align: center;
  padding: 1.5rem;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  font-size: 0.875rem;
  color: #555;
  transition: background-color 0.3s, color 0.3s;
}

body.dark .footer {
  background-color: #1e1e1e;
  border-color: #333;
}

.footer a {
  color: #1e40af;
}

/* ===============================
   DARK MODE
================================ */
body.dark .header {
  background-color: #1e1e1e;
  border-color: #333;
}

body.dark .dark-btn {
  background-color: #333;
  color: #ddd;
  border-color: #555;
}
/* Ad slots removed (manual ads integration for now) */
/* ===============================
   COMPARTILHAR
================================ */
.share-section {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-section span {
  font-weight: bold;
}

.share-btn {
  padding: 6px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.8;
}

.share-btn.twitter { background: #090909; }
.share-btn.facebook { background: #3b5998; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.linkedin { background: #0077b5; }

body.dark .share-section {
  border-color: #333;
}
