/* =============================================================
   ARCHIVO DE NOTICIAS — noticias.css
   Estilos para noticias.html: controles de búsqueda/filtro,
   layout de la página y estados de carga.
   Usa las variables de color globales de styles.css.
   ============================================================= */

.archive-main {
  max-width: 1100px;
  margin: 100px auto 60px;
  padding: 0 20px;
}

.archive-header {
  margin-bottom: 32px;
  text-align: center;
}

.archive-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.archive-back:hover { color: var(--text-primary); }

.archive-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.archive-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Controls bar ── */
.news-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.news-search-wrap {
  flex: 1 1 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.news-search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.news-search {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary, var(--bg-card));
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.news-search:focus          { border-color: var(--accent-primary, #00d2ff); }
.news-search::placeholder   { color: var(--text-muted); }

.news-filter-select {
  flex: 0 1 auto;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary, var(--bg-card));
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  min-width: 160px;
}
.news-filter-select:focus { border-color: var(--accent-primary, #00d2ff); }

/* Light mode overrides (select background) */
[data-theme="light"] .news-search,
[data-theme="light"] .news-filter-select {
  background: #fff;
  color: #1a1a2e;
}

/* ── Status / loading states ── */
.archive-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 50px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.archive-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-primary, #00d2ff);
  border-radius: 50%;
  animation: archiveSpin 0.8s linear infinite;
}
@keyframes archiveSpin { to { transform: rotate(360deg); } }

.archive-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.archive-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* Archive grid fills all columns naturally (overrides news-grid defaults) */
.archive-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .news-controls {
    padding: 14px;
    gap: 10px;
  }
  .news-filter-select {
    min-width: 100%;
    width: 100%;
  }
  .archive-main {
    margin-top: 80px;
  }
}
