/* =========================================
   OMMVISHOP - Biblioteca de cluster
   Ruta: /temas/{content_cluster}/
========================================= */

body.tax-content_cluster #content.site-content > .ast-container,
body.taxonomy-content_cluster #content.site-content > .ast-container {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  display: block;
}

body.tax-content_cluster #content.site-content,
body.taxonomy-content_cluster #content.site-content,
.om-cluster-library,
.om-cluster-library-header,
.om-cluster-posts {
  background: #ffffff;
}

.ast-separate-container #primary.om-cluster-library {
  padding: 0 0 26px;
}

@media (min-width: 993px) {
  .ast-separate-container #primary.om-cluster-library {
    margin: 0;
  }
}

.om-cluster-library {
  padding: 0 0 72px;
}

.om-cluster-library-header {
  padding: 40px 0 24px;
}

.om-cluster-library-header .ast-container,
.om-cluster-posts .ast-container {
  display: block !important;
  width: min(100% - 32px, 1280px);
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 0;
}

.om-cluster-pillar-notice {
  margin-bottom: 28px;
}

.om-cluster-library-title {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  text-wrap: balance;
}

.om-cluster-library-desc {
  margin: 16px 0 0;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.65;
  color: #475569;
  text-wrap: balance;
}

.om-cluster-library-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 18px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 800;
}

.om-cluster-posts {
  padding: 0 0 40px;
}

.om-cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 24px;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
}

/* Fix quirúrgico: neutraliza padding de Astra en tarjetas editoriales de biblioteca de clusters */
.tax-content_cluster .om-cluster-grid .om-editorial-card.ast-article-post {
  padding: 0 !important;
}

.om-cluster-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.om-cluster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.om-cluster-card-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background: #eef2f7;
  overflow: hidden;
}

.om-cluster-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.om-cluster-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.om-cluster-card-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.om-cluster-card-title a {
  color: #0f172a;
  text-decoration: none;
}

.om-cluster-card-title a:hover {
  color: #1d4ed8;
}

.om-cluster-excerpt {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.om-cluster-readmore {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.om-cluster-readmore:hover {
  color: #1d4ed8;
}

.om-cluster-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2rem;
}

.om-cluster-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #0875dc;
  border-radius: 0;
  background: #ffffff;
  color: #0875dc;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
}

.om-cluster-pagination .page-numbers:hover,
.om-cluster-pagination .page-numbers.current {
  border-color: #0875dc;
  background: #0875dc;
  color: #ffffff;
  text-decoration: none;
}

.om-cluster-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: #0f172a;
}

.om-cluster-empty {
  padding: 28px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #ffffff;
  color: #475569;
}

@media (max-width: 767px) {
  .ast-separate-container #primary.om-cluster-library,
  .om-cluster-library {
    padding-bottom: 20px;
  }

  .om-cluster-library-header {
    padding: 24px 0 20px;
  }

  .om-cluster-library-header .ast-container,
  .om-cluster-posts .ast-container {
    width: min(100% - 24px, 100%);
  }

  .om-cluster-grid {
    grid-template-columns: 1fr;
  }

  .om-cluster-card {
    max-width: 320px;
  }

  .om-cluster-card-body {
    padding: 18px;
  }

  .om-cluster-card-title {
    font-size: 21px;
  }
}
