/* ========== BASE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #f9fafb;
  background: #050816;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.95);
  outline-offset: 3px;
}

/* ========== TOP PARENT BAR ========== */
.parent-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.96),
    rgba(0, 0, 0, 0.92)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.parent-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.parent-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.parent-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.parent-logo-text {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.92;
}

.parent-tagline {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.8);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .parent-tagline {
    display: none;
  }
}

/* ========== BACKGROUND LAYER ========== */
.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #050816;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03) brightness(0.82);
  transform: scale(1.02);
}

/* KEEP YOUR OVERLAY (your exact hue layer) */
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(255, 255, 255, 0.08),
      transparent 55%
    ),
    radial-gradient(
      circle at 85% 0%,
      rgba(92, 148, 255, 0.55),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(26, 49, 177, 0.7), rgba(6, 11, 64, 0.8));
  mix-blend-mode: normal;
  pointer-events: none;
}

/* Optional: global blue wash over everything (safe, no blend-modes) */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(59, 130, 246, 0.18),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.45));
}

@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }

  .bg-layer {
    background: radial-gradient(
      circle at 50% 0%,
      rgba(59, 130, 246, 0.22),
      rgba(5, 8, 22, 1)
    );
  }
}

#revistas {
  text-align: center;
}

/* ========== LAYOUT ========== */
.r110-shell {
  display: grid;
  /* Main section grows (1fr), Aside stays exactly 280px */
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start; /* Crucial: stops the sidebar from stretching to the footer */
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 80px;
}

@media (max-width: 1220px) {
  .r110-shell {
    grid-template-columns: 1fr;
  }

  .mon-rail {
    display: none;
  }
}

/* ========== SIDE ADS (DESKTOP) ========== */

/* Feedback when hovering over an ad */
.mon-card {
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.mon-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5); /* Blue glow */
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.mon-card:hover .mon-label {
  color: #3b82f6; /* Change label text to blue on hover */
  background: rgba(59, 130, 246, 0.1);
}

/* Ensure images have transition for the JS fade */
.mon-card img {
  transition: opacity 0.5s ease-in-out;
}

.mon-rail {
  margin-top: 0; /* Ensure no top margin */
  padding-top: 0; /* Ensure no top padding */
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 22px; /* Match the padding-top of .r110-shell */
}

.mon-card {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mon-label {
  padding: 10px 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.3);
  flex: 0 0 auto;
}

.mon-card a {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  text-decoration: none;
}

.mon-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;

  transition: opacity 0.4s ease-in-out;
}

/* Inline ads for mobile/tablet (NOT in first view) */
.mon-inline {
  display: none;
  margin: 14px 0;
}

@media (max-width: 1100px) {
  .mon-inline {
    display: block;
  }
}

/* Hide inline ads in the initial viewport on mobile:
		   We keep them in DOM, but we push them down so first view is logo + buttons. */
@media (max-width: 640px) {
  .mon-inline {
    margin-top: 22px;
  }

  /* Hard hide the first inline ad until user scrolls:
			   It will appear after the magazines section instead. */
  .mon-inline.first {
    display: none;
  }
}

/* ========== MAIN HERO PANEL ========== */
.panel {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(15, 23, 42, 0.74)
  );
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 18px 16px 20px;
}

/* Make first view (brand) feel like a hero on mobile */
@media (max-width: 640px) {
  .panel {
    padding-top: 16px;
  }

  .hero-view {
    min-height: calc(100vh - 64px);
    /* approx parent bar height */
    display: flex;
    justify-content: center;
    padding-bottom: 6px;
  }
}

.hero-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 4px 8px 10px;
}

.hero-view img {
  max-width: 300px;
  width: 100%;
  height: auto;
}

.hero-view p {
  margin: 0;
  max-width: 620px;
  color: rgba(226, 232, 240, 0.86);
  font-size: 14px;
}

/* ========== NAV BUTTONS ========== */
.actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  text-decoration: none;

  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  color: rgba(249, 250, 251, 0.98);
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.14);

  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: rgba(2, 6, 23, 0.58);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chip.primary {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.95),
    rgba(99, 102, 241, 0.95)
  );
  border-color: rgba(147, 197, 253, 0.26);
  box-shadow:
    0 18px 40px rgba(59, 130, 246, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Optional "scroll hint" link */
.scroll-hint {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  text-decoration: none;

  padding-bottom: 2px;
}

@media (min-width: 641px) {
  .scroll-hint {
    display: none;
  }
}

/* ========== MAGAZINES ========== */
.section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section h2 {
  margin: 0 0 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(219, 234, 254, 0.95);
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .mag-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mag {
  text-decoration: none;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.28);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.mag:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}

.mag img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.mag .meta {
  padding: 10px 10px 12px;
  text-align: left;
}

.mag .title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: rgba(249, 250, 251, 0.96);
  letter-spacing: 0.02em;
}

.mag .hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.78);
}

/* Force the second banner to match the first one's constraints */
.after-mags {
  margin: 0px 20px;
  min-height: fit-content !important;
}

/* ========== NEWS CTA ========== */
.cta {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(147, 197, 253, 0.2);
  background:
    radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.22),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.78);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.cta img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  flex: 0 0 auto;
}

.cta h3 {
  margin: 0;
  font-size: 16px;
}

.cta p {
  margin: 2px 0 0;
  color: rgba(226, 232, 240, 0.85);
  font-size: 13px;
}

.cta a {
  margin-left: auto;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.95),
    rgba(14, 165, 233, 0.95)
  );
  box-shadow: 0 18px 36px rgba(34, 197, 94, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cta {
    flex-direction: column;
    text-align: center;
  }

  .cta a {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

/* ========== SOCIAL ========== */
.section.social {
  text-align: center;
  margin-left: auto;
}
/* .section.social .title {
  text-align: center;
  margin-left: auto;
} */
.socials {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.socials a {
  text-decoration: none;
  padding: 10px 44px;
  border-radius: 10px;

  /* 1. Subtle Blue Border */
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(2, 6, 23, 0.45);

  /* 2. Initial Soft Glow */
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(59, 130, 246, 0.05);
  /* This creates the "Neon" effect */
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(59, 130, 246, 0.3),
    inset 0 0 8px rgba(59, 130, 246, 0.2);

  font-weight: 700;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.92);
  letter-spacing: 0.05em;

  transition: all 0.2s ease-in-out;
}

.socials a:hover {
  transform: translateY(-3px);

  /* 3. Intense Glow on Hover */
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);

  /* This creates the "Neon" effect */
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(59, 130, 246, 0.3),
    inset 0 0 8px rgba(59, 130, 246, 0.2);

  color: #fff;
}

/* ========== FOOTER ========== */
.footer {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 0 16px 28px;
  text-align: center;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.85);
}

.footer a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 1220px) {
  /* The container needs to be a flexbox to use the order property */
  .r110-shell {
    display: flex;
    flex-direction: column;
  }

  /* Force the Main panel to position #1 (top) */
  .panel {
    order: 1;
  }

  /* Force the ads to position #2 and #3 (below the content) */
  .mon-rail {
    order: 2;
  }
}
@media (max-width: 1220px) {
  /* Hides the side banner containers completely on mobile and tablet */
  .mon-rail {
    display: none;
  }
}
@media (max-width: 640px) {
  .actions {
    flex-direction: column;
  }
  .hero-view {
    min-height: 85dvh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .hero-box {
    border: 1.5px solid rgba(255, 255, 255, 0.2);

    /* Soften the inner glow */
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(50px);

    /* Give it some depth */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    border-radius: 24px;
    padding: 40px 24px;
    max-width: 380px;
  }
}
/* Arrow Styling */
.scroll-arrow {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  animation: bounce 2s infinite; /* Triggers the bounce below */
}

/* The Bounce Effect */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}

@media (max-width: 1024px) {
  .r110-shell {
    /* On tablets and phones, go back to a single column */
    grid-template-columns: 1fr;
  }

  .mon-rail {
    display: none; /* Keeps side ads hidden on mobile as you had before */
  }
}

/* DIALOG */

/* 1) Remove the old gradient backdrop… */
/* ========== SUBSCRIBE DIALOG ========== */

.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

#email-dialog {
  width: min(92vw, 440px);
  max-width: 440px;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.96),
    rgba(2, 6, 23, 0.94)
  );
  color: #f9fafb;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.08);
  overflow: hidden;
}

#email-dialog::backdrop,
dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#email-dialog form,
#email-dialog .subscribe-success {
  padding: 26px 22px 22px;
}

#email-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: rgba(249, 250, 251, 0.98);
}

#email-dialog .subscribe-copy,
#email-dialog .subscribe-success p {
  margin: 0;
  color: rgba(226, 232, 240, 0.84);
  font-size: 14px;
  line-height: 1.5;
}

.subscribe-field {
  margin-top: 18px;
}

.subscribe-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f9fafb;
  font: inherit;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.18);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.subscribe-input::placeholder {
  color: rgba(226, 232, 240, 0.52);
}

.subscribe-input:hover {
  background: rgba(255, 255, 255, 0.075);
}

.subscribe-input:focus {
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(255, 255, 255, 0.09);
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.subscribe-error {
  margin-top: 10px;
  font-size: 13px;
  color: #fca5a5;
  text-align: left;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

#email-dialog .chip,
#email-dialog button.chip {
  appearance: none;
  cursor: pointer;
}

.subscribe-success {
  text-align: center;
}

.subscribe-success h2 {
  margin-bottom: 10px;
}

.subscribe-success .chip {
  margin-top: 18px;
}

dialog:not([open]) {
  display: none;
}

@media (max-width: 640px) {
  #email-dialog {
    width: min(94vw, 420px);
    border-radius: 18px;
  }

  #email-dialog form,
  #email-dialog .subscribe-success {
    padding: 22px 18px 18px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .chip {
    width: 100%;
  }
}
body.dialog-open {
  overflow: hidden;
}
