/*
 * Estilos customizados para o portal Apende News
 * Autor: Gemini
 * Versão: 1.0
 */

/* 1. Variáveis Globais e Setup Inicial
-------------------------------------------------- */
:root {
  /* Paleta de Cores Principal - Altere aqui para customizar o tema */
  --primary-color: #0d6efd;    /* Azul primário do Bootstrap, para consistência */
  --secondary-color: #6c757d;  /* Cinza secundário */
  --accent-color: #dc3545;      /* Vermelho para destaques ou alertas */
  
  /* Cores de Fundo e Texto */
  --background-color: #f8f9fa;  /* Fundo geral levemente acinzentado */
  --surface-color: #ffffff;     /* Fundo de cards e seções */
  --text-color: #212529;       /* Cor de texto principal */
  --text-muted-color: #6c757d;  /* Cor de texto secundário */

  /* Fonte */
  --font-family-sans-serif: 'Poppins', sans-serif;
}

body {
  font-family: var(--font-family-sans-serif);
  background-color: var(--background-color);
  color: var(--text-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: #0b5ed7; /* Variação mais escura do primário */
  text-decoration: underline;
}

/* 2. Cabeçalho e Navegação
-------------------------------------------------- */
.navbar {
  background-color: var(--surface-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

/* 3. Layout da Página Principal (Estilo Magazine)
-------------------------------------------------- */

/* Destaque principal */
.featured-article {
  background-color: var(--surface-color);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.featured-article .row {
  min-height: 400px;
}

.featured-article img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-article .col-lg-8 {
  position: relative;
  overflow: hidden;
}

.featured-article .col-lg-4 {
  background-color: var(--surface-color);
}

.featured-article .featured-content {
  position: relative;
  padding: 2rem;
  color: #000;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-article .featured-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
  margin-bottom: 1rem;
}

.featured-article .featured-content p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.featured-article .btn-accent {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

/* Grid de notícias */
.news-card {
  background-color: var(--surface-color);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.news-card .card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.news-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.news-card .card-text {
  color: var(--text-muted-color);
  font-size: 0.9rem;
}

.news-card a.stretched-link {
  text-decoration: none;
}

/* Lista de notícias sem imagem */
.news-list-no-image .list-group-item {
  background-color: var(--surface-color);
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}
.news-list-no-image .list-group-item a {
  font-weight: 600;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}
.news-list-no-image .list-group-item a:hover {
  text-decoration: underline;
}
.news-list-no-image .list-group-item .text-muted {
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.news-list-no-image .badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.news-list-no-image time {
  color: var(--text-muted-color);
}



/* 4. Página do Artigo
-------------------------------------------------- */
.article-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-content h2, .article-content h3 {
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.article-meta {
  color: var(--text-muted-color);
  font-size: 0.9rem;
}

/* Barra Lateral */
.aside-widget {
  background-color: var(--surface-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.aside-widget .widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.aside-widget ul {
  padding-left: 0;
  list-style: none;
}

.aside-widget ul li a {
  text-decoration: none;
}

/* 5. Componentes Gerais e Anúncios
-------------------------------------------------- */
.section-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.ad-placeholder {
  background-color: #e9ecef;
  border: 1px dashed var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted-color);
  border-radius: 0.25rem;
  min-height: 100px; /* Altura mínima para visualização */
  width: 100%;
  margin: 1.5rem 0;
}

/* Se o placeholder estiver vazio, ele não ocupará espaço vertical */
.ad-placeholder:empty {
  display: none;
}


/* 6. Rodapé
-------------------------------------------------- */
.footer {
  background-color: #343a40;
  color: #f8f9fa;
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer a {
  color: #fff;
}

.footer a:hover {
  color: #ccc;
}

/* 7. Responsividade
-------------------------------------------------- */
@media (max-width: 991.98px) {
  .featured-article .row {
    min-height: auto;
  }

  .featured-article .col-lg-8 {
    min-height: 300px;
  }

  .featured-article .featured-content h1 {
    font-size: 2rem;
  }

  .article-content {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .featured-article .row {
    display: flex;
    flex-direction: column-reverse;
  }

  .featured-article .col-lg-8 {
    min-height: 250px;
  }

  .featured-article .featured-content {
    padding: 1.5rem;
  }

  .featured-article .featured-content h1 {
    font-size: 1.5rem;
  }

  .featured-article .featured-content p {
    display: none; /* Oculta descrição em telas pequenas */
  }
}