.gr-revistas {
  --gr-primary: #14a6e0;
  --gr-primary-hover: #103457;
  --gr-text: #0b1622;
  --gr-text-soft: #5f625e;
  --gr-border: rgba(11, 22, 34, 0.14);
  --gr-surface: #ffffff;
  --gr-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
  --gr-radius: 6px;
  /* Names kept for continuity with the rest of this file - the actual
     typefaces now match the Abordo brand system: Comfortaa for display
     text (titles), Playfair Display for small uppercase labels/buttons. */
  --gr-font-serif: "Comfortaa", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gr-font-sans: "Playfair Display", Georgia, "Times New Roman", serif;

  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: var(--gr-font-sans);
  color: var(--gr-text);
}

.gr-revistas *,
.gr-revistas *::before,
.gr-revistas *::after {
  box-sizing: border-box;
}

.gr-revistas-inner {
  transition: opacity 0.2s ease;
}

.gr-revistas-grid {
  display: grid;
  grid-template-columns: repeat(var(--gr-cols-desktop, 3), minmax(0, 1fr));
  gap: 40px 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .gr-revistas-grid {
    grid-template-columns: repeat(var(--gr-cols-tablet, 2), minmax(0, 1fr));
    gap: 32px 24px;
  }
}

@media (max-width: 640px) {
  .gr-revistas-grid {
    grid-template-columns: repeat(var(--gr-cols-mobile, 1), minmax(0, 1fr));
    gap: 28px;
  }
}

.gr-revista-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--gr-border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 100%;
  padding: 24px 20px 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gr-revista-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.1);
  border-color: var(--gr-primary);
}

.gr-revista-cover-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #f1f0ee;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.gr-revista-cover-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Scoped as .gr-revistas img.gr-revista-cover (not just .gr-revista-cover)
   so this reliably beats Elementor's own ".elementor img{height:auto}" base
   rule, which otherwise makes covers only as tall as their own aspect
   ratio instead of filling the card's box (visible as empty gray space
   under the image). */
.gr-revistas img.gr-revista-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gr-revista-card:hover .gr-revista-cover {
  transform: scale(1.06);
}

.gr-revista-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(11, 22, 34, 0.65) 100%);
  pointer-events: none;
}

.gr-revista-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(160deg, #1c1917, #44403c);
  color: #f5f5f4;
  font-family: var(--gr-font-serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.gr-revista-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gr-revista-tag {
  display: block;
  margin: 0 0 6px;
  font-family: var(--gr-font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gr-primary);
}

.gr-revista-title {
  margin: 0 0 8px;
  font-family: var(--gr-font-serif);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.25;
}

.gr-revista-title a {
  color: var(--gr-text);
  text-decoration: none;
}

.gr-revista-title a:hover,
.gr-revista-title a:focus-visible {
  color: var(--gr-primary);
}

.gr-revista-summary {
  margin: 0 0 18px;
  color: var(--gr-text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  flex-grow: 1;
}

.gr-revista-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--gr-border);
  padding-top: 14px;
  margin-top: auto;
}

.gr-revista-pages {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--gr-font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gr-text-soft);
  white-space: nowrap;
}

.gr-revista-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--gr-primary);
  text-decoration: none;
  font-family: var(--gr-font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.gr-revista-cta:hover,
.gr-revista-cta:focus-visible {
  color: var(--gr-primary-hover);
  transform: translateX(3px);
}

.gr-revista-cover-wrap a:focus-visible,
.gr-revista-title a:focus-visible,
.gr-revista-cta:focus-visible {
  outline: 2px solid var(--gr-primary);
  outline-offset: 2px;
}

.gr-empty {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--gr-border);
  border-radius: var(--gr-radius);
  color: var(--gr-text-soft);
}

/* Pagination */
.gr-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.gr-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius);
  color: var(--gr-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--gr-font-sans);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gr-pagination a.page-numbers:hover,
.gr-pagination a.page-numbers:focus-visible {
  background: var(--gr-primary);
  border-color: var(--gr-primary);
  color: #fff;
}

.gr-pagination .page-numbers.current {
  background: var(--gr-primary);
  border-color: var(--gr-primary);
  color: #fff;
}

.gr-pagination .page-numbers.dots {
  border-color: transparent;
}

/* [gr_latest_cover] - single 704x826 (vertical) cover image of the latest magazine. */

.gr-latest-cover-wrapper {
  padding: 0;
}

.gr-latest-cover {
  display: block;
  width: 100%;
  max-width: 704px;
  aspect-ratio: 704 / 826;
  overflow: hidden;
  border-radius: var(--gr-radius);
  box-shadow: var(--gr-shadow);
  background: #f1f0ee;
}

.gr-latest-cover a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Higher specificity than .elementor img{height:auto} - see the note on
   .gr-revistas img.gr-revista-cover above. */
.gr-revistas img.gr-latest-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gr-latest-cover a:hover .gr-latest-cover-img {
  transform: scale(1.04);
}

.gr-latest-cover a:focus-visible {
  outline: 2px solid var(--gr-primary);
  outline-offset: 2px;
}

/* [gr_latest_edition] - "Latest Edition" hero: cover + issue info, two columns. */

.gr-latest-edition-eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: var(--gr-font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #00adee;
}

.gr-latest-edition-heading {
  margin: 0 0 30px;
  font-family: var(--gr-font-serif);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.15;
  color: var(--gr-text);
}

.gr-latest-edition-heading em {
  font-style: italic;
  font-weight: 400;
}

.gr-latest-edition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.gr-latest-edition-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: #f1f0ee;
}

/* Higher specificity than .elementor img{height:auto} - see the note on
   .gr-revistas img.gr-revista-cover above. */
.gr-revistas img.gr-latest-edition-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gr-latest-edition-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: #00adee;
  color: #ffffff;
  font-family: var(--gr-font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
}

.gr-latest-edition-tag {
  display: block;
  margin-bottom: 8px;
  font-family: var(--gr-font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00adee;
}

.gr-latest-edition-title {
  margin: 0 0 10px;
  font-family: var(--gr-font-serif);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--gr-text);
}

.gr-latest-edition-desc {
  margin: 0 0 14px;
  color: var(--gr-text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.gr-latest-edition-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gr-text-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--gr-border);
  padding-top: 16px;
}

.gr-latest-edition-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.gr-btn {
  font-family: var(--gr-font-sans);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gr-btn-primary {
  background: #00adee;
  color: #ffffff;
}

.gr-btn-primary:hover {
  background: #0096ce;
  color: #ffffff;
}

.gr-btn-outline-dark {
  background: transparent;
  border-color: var(--gr-border);
  color: var(--gr-text);
}

.gr-btn-outline-dark:hover {
  border-color: #00adee;
  color: #00adee;
}

@media (max-width: 900px) {
  .gr-latest-edition-grid {
    grid-template-columns: 1fr;
  }
  .gr-latest-edition-cover {
    max-width: 420px;
  }
}
