/* ============================================
   RESET E ESTILOS GLOBAIS
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  color: #222;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */

header {
  background-color: #071322;
  color: #fff;
  flex: 0 0 auto;
  position: relative;
  z-index: 100;
}

.header-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.header-main--hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.header-main-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.header-main-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.header-sub {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  background-color: rgba(18, 30, 44, 0.95);
  z-index: 101;
}

.header-sub-left {
  font-size: 0.8rem;
  opacity: 0.85;
  color: #fff;
}

.header-sub-nav {
  display: flex;
  gap: 14px;
  margin-left: auto;
}

.header-sub-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.header-sub-nav a:hover {
  opacity: 1;
}

/* ============================================
   BOTÕES
   ============================================ */

.btn-outline,
.btn-solid {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #00b4ff;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-outline {
  background-color: transparent;
  color: #00b4ff;
}

.btn-outline:hover {
  background-color: rgba(0, 180, 255, 0.1);
}

.btn-solid {
  background-color: #00b4ff;
  color: #071322;
  font-weight: 600;
}

.btn-solid:hover {
  background-color: #0094d0;
}

/* ============================================
   FILTROS
   ============================================ */

#filters {
  max-width: 1200px;
  margin: 10px auto 0;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#filters label {
  font-weight: bold;
  font-size: 0.9rem;
  color: #333;
}

#filters select,
#filters button {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

#filters button {
  background-color: #1a73e8;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

#filters button:hover {
  background-color: #1558b6;
}

/* ============================================
   STATUS
   ============================================ */

#status {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 0 12px;
}

#status-text {
  font-size: 0.95rem;
  color: #666;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

#news-area {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 0 12px 24px;
  flex: 1 1 auto;
}

.layout-grid {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 20px;
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============================================
   NOTÍCIA PRINCIPAL
   ============================================ */

#feature-article {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.feature-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background-color: #eee;
  display: block;
}

.feature-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-meta {
  font-size: 0.85rem;
  color: #777;
}

.feature-title {
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1.3;
}

.feature-summary {
  font-size: 0.95rem;
  color: #333;
}

.feature-link {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
}

.feature-link:hover {
  text-decoration: underline;
}

/* ============================================
   GRID DE NOTÍCIAS
   ============================================ */

#news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.news-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
}

.news-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.news-image {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background-color: #eee;
  display: block;
}

.news-content {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-title {
  font-size: 0.98rem;
  font-weight: bold;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.news-meta {
  font-size: 0.78rem;
  color: #777;
}

.news-summary {
  font-size: 0.86rem;
  color: #333;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.news-link {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
}

.news-link:hover {
  text-decoration: underline;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* AJUSTE AGRESSIVO DE VISIBILIDADE */
  min-height: 1px;
  overflow: visible;
  visibility: visible !important;
  opacity: 1 !important;
}

.widgets-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* AJUSTE AGRESSIVO DE VISIBILIDADE */
  visibility: visible !important;
  opacity: 1 !important;
}

/* CAIXA mainIA */
.mainia-box {
  background-color: #071322;
  color: #fff;
  border-radius: 8px;
  padding: 14px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mainia-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.mainia-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.mainia-badge {
  font-size: 0.65rem;
  padding: 3px 7px;
  border-radius: 999px;
  background-color: #00b4ff;
  color: #071322;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.mainia-text {
  font-size: 0.85rem;
  color: #e5e5e5;
  line-height: 1.4;
  margin: 0;
}

.mainia-button {
  padding: 8px 12px;
  width: 100%;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background-color: #00b4ff;
  color: #071322;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
  margin-top: 4px;
}

.mainia-button:hover {
  background-color: #0094d0;
}

.mainia-note {
  font-size: 0.75rem;
  color: #b0b0b0;
  margin: 4px 0 0 0;
}

/* ============================================
   CAIXAS DE ANÚNCIO
   ============================================ */

.ad-box {
  /* O CSS dos cards de anúncio já é suficiente para exibi-los */
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 14px 12px;
  border: 2px dashed #0099cc;
  text-align: center;
  color: #555;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 153, 204, 0.15);
  gap: 8px;
}

.ad-box-title {
  font-weight: bold;
  color: #333;
  font-size: 0.95rem;
  margin: 0;
}

.ad-box p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #666;
}

/* ============================================
   RODAPÉ
   ============================================ */

footer {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  padding: 12px;
  margin-top: 12px;
  background-color: #f5f5f5;
  flex: 0 0 auto;
  border-top: 1px solid #ddd;
}

footer p {
  margin: 0;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .header-main {
    padding: 16px 12px;
  }

  .header-sub {
    padding: 12px 12px;
  }

  .feature-title {
    font-size: 1.2rem;
  }

  .sidebar {
    /* Removido order: -1 */
  }
}