@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #f5f5f5;
  padding-bottom: 60px; /* Adicionado para evitar sobreposição do footer */
}

header {
  height: 300px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

main {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: 20px;
  box-sizing: border-box;
  background-color: #153524;
  justify-content: center;
  min-height: calc(100vh - 380px); /* Ajustado para considerar header e footer */
  gap: 20px;
}

.noticias-area {
  flex: 3;
  max-width: 1000px;
  width: 100%;
  background-color: #fff;
  color: #000;
  padding: 20px;
  border-radius: 12px;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 700px;
}

.noticias-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.noticias-topo h2 {
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.noticias-topo h2 span {
  color: #999;
  font-weight: normal;
}

.noticias-topo .paginacao button {
  background: #e0e0e0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 100%;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.noticias-topo .paginacao button:hover {
  background: #ccc;
}

.noticias-topo .paginacao span {
  font-weight: bold;
  margin: 0 10px;
  color: #fff;
}

.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  justify-items: center;
}

.noticia {
  background: #fff;
  color: #000;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.3s;
  max-width: 250px;
  width: 100%;
}

.noticia img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  height: 120px;
}

.noticia h3 {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.noticia p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.noticia .tag {
  background: #d3d3d3;
  color: #333;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-block;
  width: fit-content;
}

.noticia .meta {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: #444;
  margin-top: 5px;
}

.noticia .meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.noticia a {
  margin-top: auto;
  text-align: center;
  padding: 10px;
  background: #3399ff;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: 0.2s;
}

.noticia a:hover {
  background: #0077cc;
}

.player-box {
  flex: 1;
  min-width: 280px;
  max-width: 320px;
  background: #fff;
  padding: 20px;
  color: #000;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: fit-content;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#player {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

footer {
  background: #ffbb33;
  padding: 15px;
  text-align: center;
  font-size: 14px;
  color: #000;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 999;
}

/* Responsividade */
@media (max-width: 1024px) {
  main {
    flex-direction: column;
    align-items: center;
  }
  .player-box {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
  }
}

@media (max-width: 600px) {
  .noticias-topo {
    flex-direction: column;
    gap: 10px;
  }
  .noticia {
    max-width: 100%;
  }
  #player {
    flex-direction: column;
    align-items: flex-start;
  }
}