/* ============================================================
   WINDMASTER — Archive (Etiquetas, Categorías)
   Template: archive.php (Hello Elementor)
   Body classes: .tag .category .archive
============================================================ */

/* ── Centrado ──────────────────────────────────────────────── */
#content.site-main:not(.wm-noticias-main):not(.wm-single-main) {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 70px 20px 80px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ── Header (título de etiqueta/categoría) ─────────────────── */
body.tag .page-header,
body.category .page-header,
body.archive .page-header {
  margin-bottom: 40px;
}

body.tag .page-header .entry-title,
body.category .page-header .entry-title,
body.archive .page-header .entry-title {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--wm-text-white) !important;
  margin: 0 0 8px !important;
}

body.tag .page-header .entry-title::before,
body.category .page-header .entry-title::before {
  content: attr(data-prefix);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--wm-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Eyebrow manual vía CSS */
body.tag .page-header::before {
  content: "Etiqueta";
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--wm-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

body.category .page-header::before {
  content: "Categoría";
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--wm-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── Grid de posts ─────────────────────────────────────────── */
body.tag .page-content,
body.category .page-content,
body.archive .page-content {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
  gap: 24px !important;
}

/* ── Cards ─────────────────────────────────────────────────── */
body.tag .page-content article.post,
body.category .page-content article.post,
body.archive .page-content article.post {
  background: var(--wm-bg-secondary) !important;
  border: 1px solid var(--wm-border-subtle) !important;
  border-radius: var(--wm-radius-xl) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: var(--wm-shadow-sm) !important;
  transition: var(--wm-transition-normal) !important;
}

body.tag .page-content article.post:hover,
body.category .page-content article.post:hover,
body.archive .page-content article.post:hover {
  border-color: rgba(0, 200, 255, 0.3) !important;
  transform: translateY(-6px) scale(1.01) !important;
  box-shadow: var(--wm-shadow-xl) !important;
}

/* ── Imagen ────────────────────────────────────────────────── */
body.tag .page-content article.post > a,
body.category .page-content article.post > a,
body.archive .page-content article.post > a {
  display: block;
  overflow: hidden;
}

body.tag .page-content article.post .wp-post-image,
body.category .page-content article.post .wp-post-image,
body.archive .page-content article.post .wp-post-image {
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.6s ease !important;
  max-height: none !important;
}

body.tag .page-content article.post:hover .wp-post-image,
body.category .page-content article.post:hover .wp-post-image,
body.archive .page-content article.post:hover .wp-post-image {
  transform: scale(1.08) !important;
}

/* ── Título ────────────────────────────────────────────────── */
body.tag .page-content .entry-title,
body.category .page-content .entry-title,
body.archive .page-content .entry-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  padding: 20px 20px 10px !important;
}

body.tag .page-content .entry-title a,
body.category .page-content .entry-title a,
body.archive .page-content .entry-title a {
  color: var(--wm-text-main) !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}

body.tag .page-content .entry-title a:hover,
body.category .page-content .entry-title a:hover,
body.archive .page-content .entry-title a:hover {
  color: var(--wm-accent) !important;
}

/* ── Extracto ──────────────────────────────────────────────── */
body.tag .page-content article p,
body.category .page-content article p,
body.archive .page-content article p {
  font-size: 14px !important;
  color: var(--wm-text-dim) !important;
  line-height: 1.65 !important;
  margin: 0 !important;
  padding: 0 20px 20px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ── Paginación ────────────────────────────────────────────── */
body.tag nav.pagination,
body.category nav.pagination,
body.archive nav.pagination {
  display: flex !important;
  justify-content: space-between !important;
  margin-top: 40px !important;
  padding-top: 24px !important;
  border-top: 1px solid var(--wm-border-subtle) !important;
}

body.tag nav.pagination a,
body.category nav.pagination a,
body.archive nav.pagination a {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--wm-accent) !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
  body.tag #content.site-main,
  body.category #content.site-main,
  body.archive #content.site-main {
    padding: 50px 16px 60px !important;
  }

  body.tag .page-content,
  body.category .page-content,
  body.archive .page-content {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}
