/* =========================
   RESET GENERAL
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.20), transparent 34%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 30%),
    radial-gradient(circle at bottom, rgba(37, 99, 235, 0.10), transparent 36%),
    #050B1A;
  color: #F8FAFC;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   VARIABLES FACTOR 24
========================= */

:root {
  --bg-dark: #050B1A;
  --bg-secondary: #0B132B;
  --bg-card: #111827;

  --purple-main: #7C3AED;
  --purple-secondary: #9333EA;
  --blue-electric: #2563EB;
  --cyan-accent: #06B6D4;
  --turquoise-glow: #22D3EE;

  --text-main: #F8FAFC;
  --text-muted: #CBD5E1;
  --text-soft: #64748B;

  --border-soft: #1E293B;

  --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.28);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --container: 1180px;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 11, 26, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.logo span {
  color: var(--turquoise-glow);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.42);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links a {
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--turquoise-glow);
}

.btn-header {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(124, 58, 237, 0.46);
  color: var(--text-main);
  font-weight: 700;
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.18);
  transition: all 0.25s ease;
}

.btn-header:hover {
  background: linear-gradient(135deg, var(--purple-main), var(--cyan-accent));
  border-color: transparent;
  color: #F8FAFC;
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.7rem;
  cursor: pointer;
}

/* =========================
   BOTONES
========================= */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-main), var(--blue-electric), var(--cyan-accent));
  color: #F8FAFC;
  box-shadow:
    0 14px 45px rgba(124, 58, 237, 0.30),
    0 0 26px rgba(6, 182, 212, 0.16);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 60px rgba(124, 58, 237, 0.40),
    0 0 36px rgba(34, 211, 238, 0.22);
}

.btn-secondary {
  background: rgba(17, 24, 39, 0.68);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover {
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.08);
}

/* =========================
   HERO INDEX
========================= */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 92px 24px 72px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  color: var(--turquoise-glow);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.9rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  max-width: 820px;
}

.hero-description {
  margin-top: 26px;
  max-width: 650px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(11, 19, 43, 0.96));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: rotate(1.5deg);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero-card:hover {
  transform: rotate(0deg) translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
}

.hero-card-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(5, 11, 26, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(34, 211, 238, 0.30);
  font-size: 0.8rem;
  color: var(--turquoise-glow);
  font-weight: 800;
}

.hero-card-image {
  height: 280px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.38), rgba(6, 182, 212, 0.22)),
    url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.hero-card-body {
  padding: 26px;
}

.article-meta {
  color: var(--turquoise-glow);
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-card-body h2 {
  font-size: 1.55rem;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}

.hero-card-body p {
  color: var(--text-muted);
}

/* =========================
   SECCIONES GENERALES
========================= */

.categories-section,
.latest-section,
.community-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 54px 24px;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h2,
.section-header-row h2,
.editorial-content h2,
.community-card h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.section-header-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.link-more {
  color: var(--turquoise-glow);
  font-weight: 800;
}

/* =========================
   CATEGORÍAS
========================= */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.86), rgba(11, 19, 43, 0.86));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: all 0.25s ease;
  min-height: 240px;
}

.category-card:hover {
  transform: translateY(-6px);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.18), rgba(37, 99, 235, 0.12));
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 20px 55px rgba(6, 182, 212, 0.10);
}

.category-card span {
  color: var(--turquoise-glow);
  font-weight: 900;
  font-size: 0.9rem;
}

.category-card h3 {
  margin-top: 42px;
  margin-bottom: 12px;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================
   ARTÍCULOS / PUBLICACIONES
========================= */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: all 0.25s ease;
}

.article-card:hover {
  transform: translateY(-7px);
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(124, 58, 237, 0.16);
}

.article-image {
  height: 210px;
  background-size: cover;
  background-position: center;
}

.article-image-1 {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(6, 182, 212, 0.16)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.article-image-2 {
  background:
    linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(34, 211, 238, 0.14)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.article-image-3 {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.18)),
    url("https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.article-content {
  padding: 24px;
}

.article-content h3 {
  font-size: 1.35rem;
  line-height: 1.16;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.article-content p {
  color: var(--text-muted);
}

.article-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.88rem;
}

/* =========================
   BLOQUE EDITORIAL
========================= */

.editorial-block {
  max-width: var(--container);
  margin: 54px auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: center;
}

.editorial-content {
  padding: 40px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(37, 99, 235, 0.08)),
    rgba(17, 24, 39, 0.84);
  border: 1px solid var(--border-soft);
}

.editorial-content p:last-child {
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.editorial-stats {
  display: grid;
  gap: 16px;
}

.editorial-stats div {
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(11, 19, 43, 0.96));
  border: 1px solid var(--border-soft);
}

.editorial-stats strong {
  display: block;
  font-size: 3rem;
  line-height: 1;
  color: var(--turquoise-glow);
  letter-spacing: -0.08em;
  text-shadow: 0 0 22px rgba(34, 211, 238, 0.26);
}

.editorial-stats span {
  color: var(--text-muted);
}

/* =========================
   COMUNIDAD
========================= */

.community-card {
  padding: 42px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(147, 51, 234, 0.26), transparent 36%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.14), transparent 32%),
    linear-gradient(135deg, #111827, #0B132B);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  box-shadow: var(--shadow-card);
}

.community-card p {
  max-width: 720px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* =========================
   PÁGINA REVISTAS
========================= */

.magazine-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 92px 24px 34px;
}

.magazine-hero h1 {
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  max-width: 900px;
}

.magazine-hero p {
  margin-top: 24px;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.magazine-card {
  display: block;
  color: inherit;
}

.magazine-card .article-footer span:last-child {
  color: var(--turquoise-glow);
  font-weight: 800;
}

/* Portadas genéricas para revistas futuras */

.magazine-cover-1 {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.36), rgba(34, 211, 238, 0.20)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.magazine-cover-2 {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(147, 51, 234, 0.22)),
    url("https://images.unsplash.com/photo-1518709268805-4e9042af2176?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.magazine-cover-3 {
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.30), rgba(124, 58, 237, 0.24)),
    url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.magazine-cover-4 {
  background:
    linear-gradient(135deg, rgba(147, 51, 234, 0.36), rgba(37, 99, 235, 0.24)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

/* =========================
   TARJETA CON PORTADA COMPLETA
   EN REVISTAS.HTML
========================= */

.magazine-cover-card {
  position: relative;
  display: block;
  height: 620px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #050B1A;
  border: 1px solid var(--border-soft);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.38),
    0 0 36px rgba(124, 58, 237, 0.14);
  transition: all 0.35s ease;
}

.magazine-cover-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 46px rgba(34, 211, 238, 0.18);
}

.magazine-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #050B1A;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.magazine-cover-card:hover img {
  transform: scale(1.02);
  filter: brightness(0.45) saturate(1.15);
}

.magazine-cover-overlay {
  position: absolute;
  inset: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(
      180deg,
      rgba(5, 11, 26, 0.04) 0%,
      rgba(5, 11, 26, 0.28) 38%,
      rgba(5, 11, 26, 0.94) 100%
    );
  opacity: 0;
  transform: translateY(22px);
  transition: all 0.35s ease;
}

.magazine-cover-card:hover .magazine-cover-overlay {
  opacity: 1;
  transform: translateY(0);
}

.magazine-cover-overlay h3 {
  font-size: 1.7rem;
  line-height: 1.08;
  letter-spacing: -0.05em;
  margin-bottom: 12px;
  color: var(--text-main);
}

.magazine-cover-overlay p {
  color: var(--text-muted);
}

.magazine-cover-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.magazine-cover-footer span:last-child {
  color: var(--turquoise-glow);
  font-weight: 800;
}

/* =========================
   PÁGINA INTERNA DE REVISTA
========================= */

.issue-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 90px 24px 58px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 46px;
  align-items: center;
}

.issue-hero-content h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.issue-hero-content > p {
  margin-top: 26px;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.issue-meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.issue-meta span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.issue-cover {
  min-height: 430px;
  border-radius: var(--radius-xl);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.42), rgba(37, 99, 235, 0.28)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1000&q=80");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow:
    var(--shadow-card),
    0 0 46px rgba(124, 58, 237, 0.24);
  overflow: hidden;
  position: relative;
}

.issue-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(5, 11, 26, 0.82));
}

.issue-cover > * {
  position: relative;
  z-index: 1;
}

.issue-cover-label {
  width: fit-content;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(5, 11, 26, 0.70);
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: var(--turquoise-glow);
  font-weight: 900;
  font-size: 0.78rem;
  margin-bottom: 18px;
}

.issue-cover h2 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.issue-cover p {
  color: var(--text-muted);
  margin-top: 14px;
}

/* Portada real de agricultura en página interna */

.issue-cover-agriculture {
  min-height: auto;
  padding: 0;
  background: #050B1A;
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow:
    var(--shadow-card),
    0 0 46px rgba(124, 58, 237, 0.24);
}

.issue-cover-agriculture::before {
  display: none;
}

.issue-cover-agriculture img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-xl);
}

/* =========================
   LAYOUT REVISTA CON SIDEBAR
========================= */

.issue-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px 24px 80px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: start;
}

.issue-sidebar {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(11, 19, 43, 0.92));
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.sidebar-title {
  color: var(--turquoise-glow);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.issue-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issue-sidebar a {
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: all 0.25s ease;
}

.issue-sidebar a:hover {
  color: var(--text-main);
  background: rgba(124, 58, 237, 0.16);
  box-shadow: inset 3px 0 0 var(--turquoise-glow);
}

.issue-content {
  min-width: 0;
}

.issue-section {
  padding: 42px;
  margin-bottom: 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.90), rgba(11, 19, 43, 0.82));
  border: 1px solid var(--border-soft);
  scroll-margin-top: 110px;
}

.issue-section h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 22px;
}

.issue-section p {
  color: var(--text-muted);
  font-size: 1.04rem;
  margin-bottom: 18px;
}

.quote-card {
  margin-top: 30px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 36%),
    rgba(124, 58, 237, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.26);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-soft);
}

.footer-logo {
  color: var(--text-main);
  display: inline-block;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--turquoise-glow);
}

/* =========================
   ANIMACIONES
========================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE GENERAL
========================= */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
  }

  .hero-card {
    transform: none;
  }

  .categories-grid,
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editorial-block {
    grid-template-columns: 1fr;
  }

  .community-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .issue-hero {
    grid-template-columns: 1fr;
  }

  .issue-layout {
    grid-template-columns: 1fr;
  }

  .issue-sidebar {
    position: relative;
    top: 0;
  }

  .issue-sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .magazine-cover-card {
    height: 640px;
  }
}

@media (max-width: 760px) {
  .navbar {
    position: relative;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 24px;
    right: 24px;
    padding: 22px;
    background: #0B132B;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    flex-direction: column;
    align-items: flex-start;
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .btn-header {
    display: none;
  }

  .hero {
    padding: 52px 20px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 15vw, 4.5rem);
  }

  .categories-section,
  .latest-section,
  .community-section {
    padding: 42px 20px;
  }

  .categories-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .section-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .editorial-block {
    padding: 32px 20px;
    margin: 24px auto;
  }

  .editorial-content,
  .community-card {
    padding: 28px;
  }

  .magazine-hero {
    padding: 62px 20px 28px;
  }

  .magazine-cover-card {
    height: 560px;
  }

  .magazine-cover-overlay {
    opacity: 1;
    transform: none;
    padding: 24px;
    background:
      linear-gradient(
        180deg,
        rgba(5, 11, 26, 0.04) 0%,
        rgba(5, 11, 26, 0.34) 35%,
        rgba(5, 11, 26, 0.96) 100%
      );
  }

  .magazine-cover-overlay h3 {
    font-size: 1.35rem;
  }

  .issue-hero {
    padding: 62px 20px 36px;
  }

  .issue-cover {
    min-height: 360px;
  }

  .issue-cover-agriculture {
    min-height: auto;
  }

  .issue-layout {
    padding: 24px 20px 60px;
  }

  .issue-sidebar nav {
    grid-template-columns: 1fr;
  }

  .issue-section {
    padding: 28px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   AJUSTE FINAL REVISTAS.HTML
   Tarjetas mismas medidas
========================= */

.articles-grid {
  align-items: stretch;
}

.magazine-cover-card {
  height: 620px;
  min-height: 620px;
  display: block;
}

.magazine-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.articles-grid .article-card {
  height: 620px;
  display: flex;
  flex-direction: column;
}

.articles-grid .article-card .article-image {
  height: 210px;
  flex-shrink: 0;
}

.articles-grid .article-card .article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.articles-grid .article-card .article-footer {
  margin-top: auto;
}

/* =========================
   AJUSTE FINAL REVISTA DETALLE
   Nav izquierda + bloque contenido centrado
========================= */

.issue-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 40px 32px 90px;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.issue-sidebar {
  width: 280px;
  position: sticky;
  top: 96px;
  justify-self: start;
}

.issue-content {
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.issue-section {
  width: 100%;
}

.issue-section,
.issue-section h2,
.issue-section p,
.issue-section .article-meta {
  text-align: left;
}

/* =========================
   RESPONSIVE AJUSTES FINALES
========================= */

@media (max-width: 980px) {
  .magazine-cover-card,
  .articles-grid .article-card {
    height: 640px;
    min-height: 640px;
  }

  .issue-layout {
    width: min(100% - 40px, 1180px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 0 80px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .issue-sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }

  .issue-content {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .magazine-cover-card {
    height: auto;
    min-height: 0;
  }

  .magazine-cover-card img {
    height: auto;
  }

  .articles-grid .article-card {
    height: auto;
    min-height: 520px;
  }

  .issue-layout {
    width: min(100% - 32px, 1180px);
    padding: 24px 0 60px;
  }

  .issue-section {
    padding: 28px;
  }
}

/* =========================
   REVISTAS.HTML - AGRICULTURA COMO TARJETA NORMAL
========================= */

.magazine-cover-agriculture-card {
  background:
    linear-gradient(135deg, rgba(5, 11, 26, 0.08), rgba(5, 11, 26, 0.08)),
    url("../assets/img/factor24-agricultura.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* Todas las tarjetas de revistas iguales */
.articles-grid .article-card {
  height: 620px;
  display: flex;
  flex-direction: column;
}

/* Imagen superior igual para todas */
.articles-grid .article-card .article-image {
  height: 230px;
  flex-shrink: 0;
}

/* Contenido ocupa el resto */
.articles-grid .article-card .article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Footer siempre abajo */
.articles-grid .article-card .article-footer {
  margin-top: auto;
}

/* El link de leer edición */
.magazine-card .article-footer span:last-child {
  color: var(--turquoise-glow);
  font-weight: 800;
}

/* =========================
   REVISTA DINÁMICA
========================= */

.magazine-loading,
.magazine-error {
  width: min(1180px, calc(100% - 48px));
  min-height: 60vh;
  margin: 0 auto;
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.magazine-loading h1,
.magazine-error h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  max-width: 900px;
  margin-bottom: 22px;
}

.magazine-loading p,
.magazine-error p {
  max-width: 680px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.magazine-error .btn-primary {
  width: fit-content;
  margin-top: 28px;
}

/* Portada dinámica dentro de revista.html */
.issue-cover-dynamic {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #050B1A;
}

.issue-cover-dynamic img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius-xl);
}

/* =========================
   REVISTAS DINÁMICAS PUBLICADAS
========================= */

.magazines-state {
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(11, 19, 43, 0.86));
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.magazines-state p {
  color: var(--text-muted);
}

.magazines-empty,
.magazines-state {
  color: var(--text-muted);
}

.magazines-error-state {
  border-color: rgba(239, 68, 68, 0.35);
  background:
    linear-gradient(180deg, rgba(127, 29, 29, 0.18), rgba(11, 19, 43, 0.86));
}

#magazinesEmpty {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* Grid de revistas dinámicas */

.magazines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

/* Tarjeta completa */

.magazine-published-card {
  height: 620px;
  display: flex;
  flex-direction: column;

  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;

  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: all 0.25s ease;
}

.magazine-published-card:hover {
  transform: translateY(-7px);
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(124, 58, 237, 0.16);
}

/* Caja de portada */

.magazine-published-cover {
  height: 310px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(5, 11, 26, 0.96), rgba(11, 19, 43, 0.96));

  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}

/* Imagen de portada: se ve completa y proporcionada */

.magazine-published-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 0;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.magazine-published-card:hover .magazine-published-cover img {
  transform: scale(1.035);
  filter: brightness(0.92) saturate(1.08);
}

/* Contenido de tarjeta */

.magazine-published-content {
  flex: 1;
  padding: 24px;

  display: flex;
  flex-direction: column;
}

.magazine-published-content h3 {
  font-size: 1.35rem;
  line-height: 1.16;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  color: var(--text-main);
}

.magazine-published-content p {
  color: var(--text-muted);
}

.magazine-published-content .article-footer {
  margin-top: auto;
}

.magazine-published-content .article-footer span:last-child {
  color: var(--turquoise-glow);
  font-weight: 800;
}

/* Responsive */

@media (max-width: 980px) {
  .magazines-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .magazine-published-card {
    height: 640px;
  }

  .magazine-published-cover {
    height: 330px;
  }
}

@media (max-width: 760px) {
  .magazines-grid {
    grid-template-columns: 1fr;
  }

  .magazine-published-card {
    height: auto;
    min-height: 560px;
  }

  .magazine-published-cover {
    height: 360px;
  }
}

/* =====================================================
   REVISTAS PUBLICADAS - PORTADA COMPLETA + OVERLAY
   FACTOR 24
===================================================== */

/* Estados de carga / error / vacío */

.magazines-state {
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(11, 19, 43, 0.86));
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.magazines-state p {
  color: var(--text-muted);
}

.magazines-error-state {
  border-color: rgba(239, 68, 68, 0.35);
  background:
    linear-gradient(180deg, rgba(127, 29, 29, 0.18), rgba(11, 19, 43, 0.86));
}

#magazinesEmpty {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* Grid principal */

.magazines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
}

/* Tarjeta de revista */

.magazine-published-card {
  position: relative;
  display: block;

  height: 620px;
  min-height: 620px;

  border-radius: var(--radius-xl);
  overflow: hidden;

  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 34%),
    linear-gradient(135deg, #050B1A, #0B132B);

  border: 1px solid var(--border-soft);

  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.38),
    0 0 36px rgba(124, 58, 237, 0.12);

  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.magazine-published-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.50),
    0 0 48px rgba(34, 211, 238, 0.16);
}

/* Caja de portada */

.magazine-published-cover {
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;

  background: #050B1A;
  overflow: hidden;
}

/* Imagen de portada */

.magazine-published-cover img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center top;

  display: block;

  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

/* Oscurecer portada al hover / touch */

.magazine-published-card:hover .magazine-published-cover img,
.magazine-published-card.show-info .magazine-published-cover img {
  transform: scale(1.04);
  filter: brightness(0.38) saturate(1.10);
}

/* Overlay de información */

.magazine-published-content {
  position: absolute;
  inset: 0;
  z-index: 2;

  padding: 30px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  background:
    linear-gradient(
      180deg,
      rgba(5, 11, 26, 0.00) 0%,
      rgba(5, 11, 26, 0.18) 28%,
      rgba(5, 11, 26, 0.72) 62%,
      rgba(5, 11, 26, 0.97) 100%
    );

  opacity: 0;
  transform: translateY(26px);

  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
}

.magazine-published-card:hover .magazine-published-content,
.magazine-published-card.show-info .magazine-published-content {
  opacity: 1;
  transform: translateY(0);
}

/* Texto overlay */

.magazine-published-content .article-meta {
  color: var(--turquoise-glow);
  font-size: 0.84rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.magazine-published-content h3 {
  color: var(--text-main);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}

.magazine-published-content p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 100%;
}

/* Footer overlay */

.magazine-published-content .article-footer {
  margin-top: 24px;
  padding-top: 18px;

  border-top: 1px solid rgba(203, 213, 225, 0.18);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  color: var(--text-soft);
  font-size: 0.88rem;
}

.magazine-published-content .article-footer span:last-child {
  color: var(--turquoise-glow);
  font-weight: 900;
}

/* Si una imagen no carga, que no se vea rota tan feo */

.magazine-published-cover img[src=""],
.magazine-published-cover img:not([src]) {
  display: none;
}

/* Responsive tablet */

@media (max-width: 980px) {
  .magazines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .magazine-published-card {
    height: 640px;
    min-height: 640px;
  }
}

/* Responsive celular */

@media (max-width: 760px) {
  .magazines-grid {
    grid-template-columns: 1fr;
  }

  .magazine-published-card {
    height: 580px;
    min-height: 580px;
  }

  .magazine-published-content {
    padding: 24px;
  }

  .magazine-published-content h3 {
    font-size: 1.35rem;
  }
}

/* =====================================================
   INDEX DINÁMICO - ÚLTIMA REVISTA Y PUBLICACIONES
===================================================== */

/* Tarjeta destacada como enlace */

.featured-magazine-card {
  display: block;
  color: inherit;
}

/* Portada en artículo destacado */

.featured-cover {
  height: 280px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 36%),
    linear-gradient(135deg, #050B1A, #0B132B);

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--text-muted);
  font-weight: 800;

  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.featured-magazine-card:hover .featured-cover img {
  transform: scale(1.04);
  filter: brightness(0.82) saturate(1.1);
}

/* =====================================================
   INDEX DINÁMICO - ÚLTIMA REVISTA Y PUBLICACIONES
===================================================== */

.featured-magazine-card {
  display: block;
  color: inherit;
}

.featured-cover {
  height: 280px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 36%),
    linear-gradient(135deg, #050B1A, #0B132B);

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--text-muted);
  font-weight: 800;

  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.featured-magazine-card:hover .featured-cover img {
  transform: scale(1.04);
  filter: brightness(0.82) saturate(1.1);
}

.recent-magazine-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  height: 100%;
  min-height: 520px;
}

.recent-magazine-cover {
  height: 230px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 36%),
    linear-gradient(135deg, #050B1A, #0B132B);

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.recent-magazine-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.recent-magazine-card:hover .recent-magazine-cover img {
  transform: scale(1.04);
  filter: brightness(0.9) saturate(1.1);
}

.recent-magazine-card .article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-magazine-card .article-footer {
  margin-top: auto;
}

.recent-magazine-card .article-footer span:last-child {
  color: var(--turquoise-glow);
  font-weight: 900;
}

.empty-publications-card {
  grid-column: 1 / -1;
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(11, 19, 43, 0.86));
  border: 1px solid var(--border-soft);
}

.empty-publications-card h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}

.empty-publications-card p {
  color: var(--text-muted);
}

@media (max-width: 980px) {
  .recent-magazine-card {
    min-height: 540px;
  }

  .recent-magazine-cover {
    height: 260px;
  }
}

@media (max-width: 760px) {
  .featured-cover {
    height: 320px;
  }

  .recent-magazine-card {
    min-height: auto;
  }

  .recent-magazine-cover {
    height: 320px;
  }
}