/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PREMIUM CSS — ALEGO / ESTURIÓN
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- THEME TOKENS: ALEGO (DEFAULT) --- */
:root {
  --bg-primary: #FAF8F5;          /* Sophisticated cream */
  --bg-secondary: #F3ECE2;        /* Darker warm cream */
  --text-primary: #1C1917;        /* Very dark stone */
  --text-secondary: #6B6359;      /* Muted warm stone */
  --accent-color: #B19470;        /* Premium gold/bronze */
  --accent-hover: #8D7B68;
  --border-color: #E6DFD5;
  --navbar-bg: rgba(250, 248, 245, 0.9);
  --navbar-text: #1C1917;
  
  --font-display: 'Libre Baskerville', serif;
  --font-body: 'Outfit', sans-serif;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 12px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06), 0 16px 40px rgba(28, 25, 23, 0.10);
  --shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08), 0 30px 70px rgba(28, 25, 23, 0.16);
  --accent-gradient: linear-gradient(135deg, #C9AE84 0%, #B19470 50%, #8D7B68 100%);
  --accent-glow: 0 8px 24px rgba(177, 148, 112, 0.35);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
}

/* --- THEME TOKENS: ESTURIÓN (OVERRIDE) --- */
.theme-esturion {
  --bg-primary: #FDFDFB;          /* Paper white */
  --bg-secondary: #F3F5F7;        /* Cool light slate */
  --text-primary: #0B1723;        /* Ink navy (magazine panel) */
  --text-secondary: #5C6674;      /* Slate grey */
  --accent-color: #932E32;        /* Brick red (magazine spine) */
  --accent-hover: #7A2529;
  --border-color: #E3E7EC;
  --navbar-bg: rgba(253, 253, 251, 0.92);
  --navbar-text: #0B1723;
  --accent-gradient: linear-gradient(135deg, #A83A3F 0%, #932E32 50%, #6E2226 100%);
  --accent-glow: 0 8px 24px rgba(147, 46, 50, 0.22);
  --shadow-sm: 0 1px 2px rgba(11, 23, 35, 0.04), 0 4px 12px rgba(11, 23, 35, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 23, 35, 0.06), 0 16px 40px rgba(11, 23, 35, 0.10);
  --shadow-lg: 0 8px 24px rgba(11, 23, 35, 0.08), 0 30px 70px rgba(11, 23, 35, 0.14);
}

/* --- GENERAL RESET --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Anchor targets land below the fixed navbar */
[id] {
  scroll-margin-top: 96px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
}

/* Subtle layered background depth (radial warmth for ALEGO) */
body.theme-alego {
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(177, 148, 112, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(177, 148, 112, 0.06), transparent 55%);
  background-attachment: fixed;
}

body.theme-esturion {
  background-image:
    radial-gradient(1000px 500px at 90% -5%, rgba(147, 46, 50, 0.04), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(11, 23, 35, 0.03), transparent 60%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* --- LAYOUT UTILITIES --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-wrapper {
  padding-top: 60px;
  padding-bottom: 80px;
  min-height: 70vh;
}

.grid {
  display: grid;
  gap: 32px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main-wrapper { padding-top: 40px; }
}

/* --- HEADER / NAVIGATION --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

nav.nav-scrolled {
  box-shadow: 0 6px 24px rgba(28, 25, 23, 0.10);
  background-color: var(--bg-primary);
}
.theme-esturion nav.nav-scrolled {
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.10);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-link img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navbar-text);
  letter-spacing: 0.5px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -6px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background-image: var(--accent-gradient);
  color: #1C1917 !important;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: var(--accent-glow);
}

.theme-esturion .nav-cta {
  color: #FFFFFF !important;
}

.nav-cta:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(177, 148, 112, 0.45);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navbar-text);
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 8px 24px 18px;
  }
  .nav-menu.nav-open {
    display: flex;
  }
  .nav-menu .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-menu .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
  }
  .nav-menu .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-menu .nav-actions .nav-link { border-bottom: none; padding: 8px 0; }
  .nav-menu .nav-cta { text-align: center; padding: 12px; }
  .hamburger {
    display: block;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-logo-large {
  display: block;
  max-width: 280px;
  margin-bottom: 30px;
}

/* --- CARDS & GRIDS --- */
.card-premium {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card-premium:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-premium:hover .card-image {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: var(--accent-color);
  color: #1C1917;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.theme-esturion .card-badge {
  color: #FFFFFF;
}

.card-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- PREMIUM CONTENT LOCK & PAYWALL --- */
.paywall-overlay {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 48px;
  text-align: center;
  margin: 40px 0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.paywall-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
}

.paywall-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.paywall-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.paywall-text {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.paywall-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, background-color 0.3s ease;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Sheen sweep on primary buttons for a premium, non-flat feel */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-primary:hover::after {
  left: 130%;
}

.btn-primary {
  background-image: var(--accent-gradient);
  color: #1C1917;
  box-shadow: var(--accent-glow);
}

.theme-esturion .btn-primary {
  color: #FFFFFF;
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(177, 148, 112, 0.45);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* --- FOOTER --- */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
  color: var(--text-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-logo {
  height: 38px;
  margin-bottom: 20px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  color: var(--accent-color);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 16px;
}

/* --- PRICING TABLE (SUSCRIPCIÓN) --- */
.pricing-section {
  padding: 60px 0;
}

.pricing-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
  border: 2px solid var(--accent-color);
  box-shadow: var(--accent-glow), var(--shadow-md);
}

.pricing-card.popular::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1px;
  background: var(--accent-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  pointer-events: none;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-color);
  color: #1C1917;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.theme-esturion .pricing-badge {
  color: #FFFFFF;
}

.pricing-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 40px;
  flex-grow: 1;
}

.pricing-features li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-color);
  font-weight: bold;
}

/* --- STRIPE ELEMENTS CHECKOUT --- */
.checkout-wrapper {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 48px;
  box-shadow: var(--shadow-md);
}

.checkout-summary {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.checkout-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 16px;
}

.checkout-price {
  color: var(--accent-color);
}

#payment-form {
  width: 100%;
}

#payment-element {
  margin-bottom: 24px;
}

#payment-message {
  color: #e53e3e;
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
}

/* --- FORMS & GENERAL FIELDS --- */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
}

.alert {
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.alert-danger {
  background-color: rgba(229, 62, 62, 0.12);
  color: #9B2C2C;
  border: 1px solid rgba(229, 62, 62, 0.3);
}

.alert-success {
  background-color: rgba(72, 187, 120, 0.12);
  color: #276749;
  border: 1px solid rgba(72, 187, 120, 0.3);
}

/* --- DASHBOARD / USER PROFILE --- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.profile-sidebar {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  align-self: start;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background-color: var(--accent-color);
  color: #1C1917;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.theme-esturion .profile-avatar {
  color: #FFFFFF;
}

.profile-info {
  text-align: center;
  margin-bottom: 24px;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.profile-menu {
  list-style: none;
}

.profile-menu li {
  margin-bottom: 8px;
}

.profile-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
}

.profile-menu a.active, .profile-menu a:hover {
  background-color: var(--bg-primary);
  color: var(--accent-color);
}

.profile-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table-custom th, .table-custom td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.table-custom th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* --- ARTICLE READ VIEWER --- */
.article-header {
  padding: 120px 0 60px;
  text-align: center;
}

.article-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 20px 0;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-meta span {
  margin: 0 10px;
}

.article-cover {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 60px;
}

.article-body-text {
  max-width: 740px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body-text p {
  margin-bottom: 28px;
}

.article-body-text h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 48px 0 20px;
  font-weight: 700;
}

.article-body-text blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 24px;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin: 32px 0;
}

/* ==========================================================================
   ESTURIÓN EDITORIAL RALLYMAYA-STYLE NEWS GRID
   ========================================================================== */
/* Pleca navy: banda de tinta que rompe la navegación, como los paneles de la revista */
.theme-esturion .edition-bar {
  background: #0B1723;
  border-bottom: 2px solid var(--accent-color);
  padding: 10px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}
.theme-esturion .eb-left, .theme-esturion .eb-right, .theme-esturion .eb-center {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.theme-esturion .eb-left { color: rgba(255,255,255,0.55); text-align: left; }
.theme-esturion .eb-center { color: #FFFFFF; text-align: center; }
.theme-esturion .eb-center:hover { color: #E5A0A3; }
.theme-esturion .eb-right { color: rgba(255,255,255,0.55); text-align: right; }

.theme-esturion .date-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.theme-esturion .date-left { font-size: 10px; letter-spacing: 0.12em; color: var(--text-secondary); }
.theme-esturion .date-right { display: flex; gap: 20px; align-items: center; }
.theme-esturion .date-right a {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-secondary); text-decoration: none; cursor: pointer;
}
.theme-esturion .date-right a:hover { color: var(--accent-color); }

.theme-esturion .hero-rm {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  border-bottom: 1px solid var(--border-color);
  align-items: start;
}
.theme-esturion .hero-main-rm {
  padding: 60px 56px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: min(56vh, 620px);
  min-height: 440px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  justify-content: flex-end;
}
.theme-esturion .hero-main-rm::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(15,23,42,0.05) 0%, rgba(15,23,42,0.78) 100%);
  z-index: 1;
}
.theme-esturion .hero-main-content {
  position: relative;
  z-index: 2;
}
.theme-esturion .hero-kicker-line {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.theme-esturion .kicker-line { width: 30px; height: 2px; background: var(--accent-color); }
.theme-esturion .kicker-text { font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent-color); font-weight: 700; }
.theme-esturion .hero-title-rm { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1.25; color: #FFFFFF; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 20px; }
.theme-esturion .hero-title-rm a { color: #FFFFFF; text-decoration: none; }
.theme-esturion .hero-title-rm a:hover { color: var(--accent-color); }

.theme-esturion .hero-footer-rm {
  display: flex; align-items: center; gap: 28px;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); margin-top: auto;
  position: relative; z-index: 2;
}
.theme-esturion .hero-byline-rm { font-size: 10.5px; color: rgba(255,255,255,0.75); letter-spacing: 0.08em; }
.theme-esturion .hero-byline-rm strong { color: #FFFFFF; font-weight: 600; }
.theme-esturion .hero-cta-rm {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #FFFFFF; background: var(--accent-color); padding: 11px 24px;
  cursor: pointer; font-weight: 700; transition: background 0.2s, color 0.2s;
  border-radius: 4px;
  margin-left: auto;
  text-decoration: none;
}
.theme-esturion .hero-cta-rm:hover { background: #FFFFFF; color: #0F172A; }

.theme-esturion .hero-sidebar-rm {
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  height: min(56vh, 620px);
  min-height: 440px;
  overflow-y: auto;
}
.theme-esturion .sidebar-title-rm {
  padding: 24px 28px 18px; border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 10px;
}
.theme-esturion .sidebar-title-accent { width: 16px; height: 2px; background: var(--accent-color); }
.theme-esturion .sidebar-title-text { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent-color); font-weight: 700; }
.theme-esturion .sidebar-items-rm {
  display: flex;
  flex-direction: column;
}
.theme-esturion .sidebar-item-rm {
  padding: 16px 28px; border-bottom: 1px solid var(--border-color);
  cursor: pointer; transition: background 0.15s; background: var(--bg-primary);
  display: flex; gap: 16px; align-items: flex-start;
  text-decoration: none;
}
.theme-esturion .sidebar-item-rm:hover { background: var(--bg-secondary); }
.theme-esturion .si-thumb-rm { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-color); }
.theme-esturion .si-thumb-rm img { width: 100%; height: 100%; object-fit: cover; }
.theme-esturion .si-info-rm { flex: 1; min-width: 0; }
.theme-esturion .si-cat-rm { font-size: 7.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent-color); margin-bottom: 6px; font-weight: 700; }
.theme-esturion .si-title-rm { font-size: 10px; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.theme-esturion .si-read-rm { font-size: 8.5px; color: var(--text-secondary); letter-spacing: 0.14em; text-transform: uppercase; }

/* Responsive adjustments */
@media (max-width: 992px) {
  .theme-esturion .hero-rm { grid-template-columns: 1fr; }
  .theme-esturion .hero-main-rm { border-right: none; height: auto; min-height: 450px; padding: 40px 24px; }
  .theme-esturion .hero-sidebar-rm { height: auto; min-height: 0; }
}

/* ==========================================================================
   EDITORIAL AD & PROMOTIONAL BANNERS
   ========================================================================== */
.ad-wrap {
  padding: 0 24px;
  margin: 40px auto;
  max-width: 1200px;
  width: 100%;
}
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--border-color);
  background: rgba(28, 25, 23, 0.02);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  min-height: 120px;
  width: 100%;
}
.theme-esturion .ad-slot {
  background: rgba(15, 23, 42, 0.02);
}
.ad-slot .ad-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-color);
  font-weight: 700;
}
.ad-slot .ad-dim {
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.ad-slot:hover {
  border-color: var(--accent-color);
  background: rgba(28, 25, 23, 0.04);
}
.theme-esturion .ad-slot:hover {
  background: rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   DEPTH UTILITIES — dimensional accents to lift the flat design
   ========================================================================== */

/* Gradient gold text (prices, key figures, eyebrows) */
.text-gold {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Magazine cover with realistic spine + drop shadow */
.edition-cover-3d {
  position: relative;
  display: inline-block;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    -1px 0 0 rgba(255,255,255,0.10) inset,
    18px 26px 50px rgba(15,23,42,0.22),
    0 2px 6px rgba(15,23,42,0.15);
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s ease;
}
.edition-cover-3d::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(255,255,255,0.10) 55%, rgba(0,0,0,0.12));
  z-index: 2;
  pointer-events: none;
}
.edition-cover-3d img { display: block; width: 100%; height: auto; }
.edition-cover-3d:hover {
  transform: translateY(-8px) rotateY(-6deg) rotateX(2deg);
  box-shadow:
    -1px 0 0 rgba(255,255,255,0.12) inset,
    30px 40px 70px rgba(15,23,42,0.30);
}

/* Decorative eyebrow with animated accent bar */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-color);
}
.eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  background: var(--accent-gradient);
}

/* Two-column feature split (text + visual) that collapses on tablets/phones */
.split-feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .split-feature { grid-template-columns: 1fr; gap: 40px; }
}

/* Soft elevated panel */
.panel-elevated {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Gradient card badge */
.card-badge {
  background-image: var(--accent-gradient);
  box-shadow: var(--accent-glow);
}

/* Section top hairline gradient */
.section-accent-top {
  position: relative;
}
.section-accent-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0.6;
}

/* Reveal-on-scroll base (progressive enhancement via JS) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   MOBILE RESPONSIVE — prevent horizontal overflow & scale editorial layout
   ========================================================================== */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }

@media (max-width: 768px) {
  .container { padding: 0 18px; }

  /* Scale down oversized inline hero headings */
  .hero { padding: 100px 0 56px !important; }
  .hero-title { font-size: clamp(2.2rem, 11vw, 3rem) !important; line-height: 1.1 !important; letter-spacing: -0.5px !important; }
  .hero-subtitle { font-size: 1.05rem !important; }
  .article-header { padding: 90px 0 40px !important; }
  .article-title { font-size: 1.9rem !important; }
  .article-body-text { font-size: 1.05rem; }

  /* ALEGO nav: compact bar; full menu moves into the hamburger dropdown */
  .nav-container { height: 68px; }
  .logo-link img { height: 38px; }

  /* --- Esturión editorial header --- */
  .theme-esturion .edition-bar { grid-template-columns: 1fr; padding: 8px 16px; }
  .theme-esturion .eb-left,
  .theme-esturion .eb-right { display: none; }
  .theme-esturion .eb-center { text-align: center; }

  .est-masthead { padding: 14px 16px 10px !important; }
  .est-masthead-grid {
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 12px !important;
  }
  .est-mast-logo { order: -1; }
  .est-mast-logo img { height: 40px !important; }
  .est-mast-nav {
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 14px !important;
    row-gap: 8px;
  }

  .est-catbar { justify-content: flex-start !important; gap: 20px !important; padding: 0 16px !important; -webkit-overflow-scrolling: touch; }

  /* Esturión magazine hero (Rally-Maya grid) */
  .theme-esturion .date-bar { padding: 10px 16px; flex-wrap: wrap; gap: 6px; }
  .theme-esturion .date-bar .date-right { gap: 12px; }
  .theme-esturion .hero-main-rm { padding: 32px 20px !important; height: auto !important; min-height: 340px !important; }
  .theme-esturion .hero-title-rm { font-size: 1.45rem !important; }
  .theme-esturion .hero-footer-rm { flex-wrap: wrap; gap: 14px; }
  .theme-esturion .hero-cta-rm { margin-left: 0 !important; }

  /* Ad slots shrink text so the 970x90 label doesn't force width */
  .ad-slot { padding: 18px 12px; }
  .ad-slot .ad-dim { font-size: 8px; }

  /* Checkout / profile two-column layouts already collapse via grid-2 */
  .checkout-wrapper, .paywall-overlay { padding: 28px 20px; }

  /* Footer bottom stacks */
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .est-mast-nav a { font-size: 9px !important; }
  .theme-esturion .hero-title-rm { font-size: 1.3rem !important; }
}

/* ==========================================================================
   ESTURIÓN HOME — category sections + sidebar
   ========================================================================== */
.est-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: start;
}

.est-cat-section { margin-bottom: 48px; }
/* Encabezado de sección como pleca navy con canto rojo */
.est-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; margin-bottom: 8px;
  background: #0B1723;
  border-left: 4px solid var(--accent-color);
  border-radius: 3px;
}
.est-cat-title {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 800;
  color: #FFFFFF; text-transform: uppercase; letter-spacing: 0.03em;
}
.est-cat-more {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); font-weight: 700; white-space: nowrap; text-decoration: none;
}
.est-cat-more:hover { color: #FFFFFF; }

.est-hcard {
  display: grid; grid-template-columns: 128px 1fr; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--border-color); text-decoration: none;
}
.est-hcard:first-of-type { border-top: none; }
.est-hcard .est-thumb {
  width: 128px; height: 90px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-secondary); position: relative; flex-shrink: 0;
}
.est-hcard .est-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.est-hcard:hover .est-thumb img { transform: scale(1.06); }
.est-hcard .est-hkicker { font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-color); font-weight: 700; margin-bottom: 6px; }
.est-hcard .est-htitle {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.35;
  color: var(--text-primary); margin-bottom: 6px; transition: color 0.2s ease;
}
.est-hcard:hover .est-htitle { color: var(--accent-color); }
.est-hcard .est-hexcerpt {
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Sidebar */
.est-aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 28px; }
.est-widget { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.est-widget-title { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-color); font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.est-widget-title::before { content: ''; width: 16px; height: 2px; background: var(--accent-gradient); }
.est-rank-item { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border-color); text-decoration: none; }
.est-rank-item:first-of-type { border-top: none; padding-top: 0; }
.est-rank-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--accent-color); line-height: 1; opacity: 0.6; }
.est-rank-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; transition: color 0.2s ease; }
.est-rank-item:hover .est-rank-title { color: var(--accent-color); }
.est-cat-list a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid var(--border-color); text-decoration: none; font-size: 0.9rem; color: var(--text-primary); font-weight: 500; }
.est-cat-list a:first-child { border-top: none; }
.est-cat-list a:hover { color: var(--accent-color); }
.est-cat-list .est-cat-count { font-size: 0.75rem; color: var(--text-secondary); background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 20px; padding: 2px 10px; }

@media (max-width: 992px) {
  .est-home-grid { grid-template-columns: 1fr; gap: 40px; }
  .est-aside { position: static; }
}
@media (max-width: 480px) {
  .est-hcard { grid-template-columns: 96px 1fr; gap: 14px; }
  .est-hcard .est-thumb { width: 96px; height: 72px; }
  .est-cat-title { font-size: 1.25rem; }
}