body {
  font-family: 'Poppins', sans-serif;
  background: #000;
  color: #fff;
  margin: 0;
}

h1 {
  text-align: center;
  margin: 20px 0;
}

#searchBox {
  display: block;
  width: 90%;
  max-width: 400px;
  margin: 0 auto 30px;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border 0.3s;
}
#searchBox:focus {
  border-color: #e60000;
}

/* Loader spinner */
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #e60000;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* Grids */
.blog-grid, .teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 0 20px 40px;
}

/* Centrar los team-cards siempre */
.teams-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards */
.blog-card, .team-card {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  text-align: center;
}
.blog-card img, .team-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.team-card img {
  width: 80px;
  height: 80px;
  margin-top: 20px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.blog-card h2, .team-card strong {
  font-size: 16px;
  margin: 12px;
  color: #fff;
}

/* Meta */
.news-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: #ccc;
  margin-bottom: 8px;
}
.news-meta img.source-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.blog-card p {
  font-size: 12px;
  margin: 0 12px 12px;
  color: #ccc;
}

.blog-card a {
  font-size: 10px;
}

.blog-card h2 {
  font-size: 13px;
}

/* Botón */
.btn-go {
  display: inline-block;
  margin: 12px;
  padding: 8px 14px;
  background: #e60000;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}
.btn-go:hover {
  background: #b30000;
}

footer {
  background: #111;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #777;
}


/* Noticia destacada */
.blog-card.featured {
  grid-column: span 2; /* ocupa dos columnas en el grid */
  background: #1a1a1a;
  border: 2px solid #e60000;
}

.blog-card.featured img {
  height: 300px; /* más grande que las demás */
  object-fit: cover;
}

.blog-card.featured h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}


.blog-card.featured .news-meta img.source-icon {
  width: 16px;   /* antes estaba en 20px */
  height: 16px;
}

/* ====== Responsive ====== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .blog-card.featured img {
    height: 260px;
  }
  .blog-card.featured h2 {
    font-size: 18px;
  }
}

/* Móviles */
@media (max-width: 640px) {
  /* El grid pasa a 1 columna y la destacada ocupa todo el ancho */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 14px 28px;
  }
  .blog-card.featured {
    grid-column: 1 / -1;   /* asegura 100% del ancho */
    border-width: 1.5px;
  }
  .blog-card.featured img {
    height: 220px;         /* imagen menos alta para móviles */
  }
  .blog-card.featured h2 {
    font-size: 17px;
    line-height: 1.25;
    margin: 10px 12px;
  }
  .blog-card h2 {          /* títulos normales un poco más legibles */
    font-size: 14px;
  }
  .news-meta {             /* texto meta más compacto */
    font-size: 12px;
    gap: 6px;
  }
  .blog-card.featured .news-meta img.source-icon {
    width: 14px;           /* icono más sutil en móvil */
    height: 14px;
  }
  .btn-go {                /* mejor área táctil */
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
  .blog-card.featured img { height: 200px; }
  .blog-card.featured h2 { font-size: 16px; }
}
