/* CSXXI – Ediciones de la revista */

/* ---------- Página de una edición: ancho completo, sin barra lateral ni banner ---------- */
.csx-edition .single-post-feat-bg-outer,
.csx-edition #sidebar,
.csx-edition .single-wrap > .cell.large-4,
.csx-edition .post-navigation,
.csx-edition .single-post-box-related,
.csx-edition .single-tag-wrap {
  display: none !important;
}
.csx-edition .single-wrap > .cell.large-auto {
  flex: 1 1 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.csx-edition .single-post-wrap {
  margin-top: 24px;
}

/* ---------- Portada + acciones ---------- */
.csx-ed-hero {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin: 8px 0 32px;
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0f7fd 0%, #e3f0fb 100%);
}
.csx-ed-hero__cover {
  display: block;
  line-height: 0;
}
.csx-ed-hero__img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(10, 85, 148, .28), 0 2px 6px rgba(0, 0, 0, .12);
  margin: 0 !important;
}
.csx-ed-hero__kicker {
  margin: 0 0 6px;
  font: 700 12px/1.2 Roboto, Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--csx-teal, #00798a);
}
.csx-ed-hero__num {
  margin: 0;
  font: 800 clamp(28px, 4vw, 42px)/1.1 Roboto, Arial, sans-serif;
  color: var(--csx-blue-dark, #0a5594);
}
.csx-ed-hero__date {
  margin: 4px 0 14px;
  font: 500 18px/1.3 Roboto, Arial, sans-serif;
  color: #374151;
}
.csx-ed-hero__text {
  margin: 0 0 20px;
  max-width: 46ch;
  font-size: 16px !important;
  line-height: 1.55 !important;
  color: #374151;
}
.csx-ed-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Botones */
.csx-ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--csx-blue, #0077c8);
  background: #fff;
  color: var(--csx-blue-dark, #0a5594) !important;
  font: 600 15px/1 Roboto, Arial, sans-serif;
  text-decoration: none !important;
  transition: background .15s, color .15s, transform .15s;
}
.csx-ed-btn small {
  font-weight: 400;
  opacity: .75;
}
.csx-ed-btn:hover,
.csx-ed-btn:focus-visible {
  background: #e6f1fb;
  transform: translateY(-1px);
}
.csx-ed-btn--primary {
  background: var(--csx-blue, #0077c8);
  color: #fff !important;
}
.csx-ed-btn--primary:hover,
.csx-ed-btn--primary:focus-visible {
  background: var(--csx-blue-dark, #0a5594);
}
.csx-ed-btn--ghost {
  border-color: transparent;
  background: transparent;
}
.csx-ed-btn__icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Lector ---------- */
.csx-ed-reader {
  scroll-margin-top: 90px;
  margin: 0 0 28px;
}
.csx-ed-reader ._df_book {
  min-height: 560px;
  border-radius: 12px;
  overflow: hidden;
}
.csx-ed-reader__issuu {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
}
.csx-ed-reader__hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px !important;
  color: #6b7280;
}

/* ---------- Navegación entre ediciones ---------- */
.csx-ed-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 36px;
  padding: 14px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.csx-ed-nav a {
  text-decoration: none !important;
  color: var(--csx-blue-dark, #0a5594) !important;
}
.csx-ed-nav__prev span,
.csx-ed-nav__next span {
  display: block;
  font-size: 12px;
  color: #6b7280;
}
.csx-ed-nav__prev strong,
.csx-ed-nav__next strong {
  font-size: 17px;
}
.csx-ed-nav__next {
  text-align: right;
}
.csx-ed-nav__all {
  padding: 10px 16px;
  border-radius: 999px;
  background: #f3f4f6;
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Estante / grilla de portadas ---------- */
.csx-ed-shelf__title {
  margin: 0 0 16px;
  font: 700 22px/1.2 Roboto, Arial, sans-serif;
}
.csx-ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 28px 20px;
  margin: 0 0 32px;
}
.csx-ed-grid--shelf {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.csx-ed-grid > .csx-ad,
.csx-ed-grid > .csx-feed-ad {
  grid-column: 1 / -1;
}
.csx-ed-card {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
}
.csx-ed-card__cover {
  display: block;
  line-height: 0;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
  transition: transform .2s, box-shadow .2s;
  background: #e5e7eb;
}
.csx-ed-card__img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: 0 !important;
}
.csx-ed-card__img--empty {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  box-sizing: border-box;
  line-height: 1.2;
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #0a5594 0%, #0077c8 60%, #00798a 100%);
}
.csx-ed-card__brand {
  font: 600 10px/1.25 Roboto, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .85;
}
.csx-ed-card__big {
  font: 800 26px/1 Roboto, Arial, sans-serif;
}
.csx-ed-card__tag {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #0a5594;
  font: 700 10px/1.2 Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.csx-ed-card:hover .csx-ed-card__cover,
.csx-ed-card:focus-visible .csx-ed-card__cover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(10, 85, 148, .25);
}
.csx-ed-card__num {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--csx-blue-dark, #0a5594);
}
.csx-ed-card__date {
  display: block;
  font-size: 13px;
  color: #6b7280;
}

/* ---------- Archivo ---------- */
.csx-ed-archive .csx-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 20px;
}
.csx-ed-archive__head {
  margin-bottom: 24px;
}
.csx-ed-archive__title {
  margin: 0 0 8px;
  font: 800 clamp(28px, 4vw, 40px)/1.1 Roboto, Arial, sans-serif;
  color: #111827;
}
.csx-ed-archive__intro {
  max-width: 70ch;
  margin: 0 0 16px;
  color: #374151;
}
.csx-ed-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.csx-ed-years__chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}
.csx-ed-years__chip.is-active,
.csx-ed-years__chip:hover {
  background: var(--csx-blue, #0077c8);
  border-color: var(--csx-blue, #0077c8);
  color: #fff !important;
}
.csx-ed-hero--latest {
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
}
.csx-ed-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 32px;
}
.csx-ed-pagination .page-numbers {
  min-width: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  text-align: center;
  text-decoration: none !important;
}
.csx-ed-pagination .page-numbers.current {
  background: var(--csx-blue, #0077c8);
  border-color: var(--csx-blue, #0077c8);
  color: #fff;
}

/* ---------- Celular ---------- */
@media (max-width: 900px) {
  .csx-ed-grid--shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .csx-ed-hero,
  .csx-ed-hero--latest {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    text-align: center;
  }
  .csx-ed-hero__cover {
    max-width: 480px;
    margin: 0 auto;
  }
  .csx-ed-hero__text {
    margin-left: auto;
    margin-right: auto;
  }
  .csx-ed-hero__actions {
    justify-content: center;
  }
  .csx-ed-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .csx-ed-btn--ghost {
    flex: 0 1 auto;
  }
  .csx-ed-reader ._df_book {
    min-height: 460px;
  }
  .csx-ed-reader__issuu {
    height: 480px;
  }
  .csx-ed-nav {
    grid-template-columns: 1fr 1fr;
  }
  .csx-ed-nav__all {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
  }
  .csx-ed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
  }
  .csx-ed-archive .csx-wrap {
    padding: 20px 14px 10px;
  }
}

/* ---------- Prioridad sobre los estilos de texto de las notas (.single-entry) ---------- */
.single-entry .csx-ed-hero .csx-ed-hero__num {
  font-size: clamp(28px, 4vw, 42px) !important;
  line-height: 1.1 !important;
  color: var(--csx-blue-dark, #0a5594) !important;
}
.single-entry .csx-ed-hero .csx-ed-hero__text {
  color: #374151 !important;
}
html body .single-entry a.csx-ed-btn {
  color: var(--csx-blue-dark, #0a5594) !important;
  text-decoration: none !important;
}
html body .single-entry a.csx-ed-btn.csx-ed-btn--primary {
  color: #fff !important;
}
html body .single-entry .csx-ed-nav a {
  color: var(--csx-blue-dark, #0a5594) !important;
  text-decoration: none !important;
}
html body .single-entry a.csx-ed-card {
  color: inherit !important;
  text-decoration: none !important;
}
.single-entry .csx-ed-shelf__title {
  font-size: 22px !important;
}
