/* ============================================================
   Página "Presencia en medios" — Editorial Luxury
   Scoped bajo .media-page para no afectar el resto del sitio
   ============================================================ */

.media-page {
  --cream: #f7f1e6;
  --cream-soft: #efe7d6;
  --beige: #d9cdb6;
  --beige-deep: #c9bca2;
  --sage: #7c8a6b;
  --ink: #1c1b18;
  --ink-soft: #6b665c;
  --m-navy: #2c3a6e;
  --m-red: #9c2b2b;
  --m-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --m-serif: "Playfair Display", Georgia, serif;
  --m-sans: "Plus Jakarta Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--m-sans);
}

/* Film-grain physical-paper overlay (fixed, no repaint cost) */
.media-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.media-page .site-header,
.media-page main,
.media-page .site-footer {
  position: relative;
  z-index: 2;
}

/* Header sits on cream */
.media-page .site-header {
  background: var(--cream);
  border-bottom: 1px solid rgba(28, 27, 24, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Mobile menu: keep it above content and clickable */
@media (max-width: 768px) {
  .media-page .nav-links {
    display: none;
    background: var(--cream);
    z-index: 50;
  }
  .media-page .nav-links.open {
    display: flex;
    flex-direction: column;
  }
  .media-page .nav-links a {
    display: block;
    border-radius: 0;
  }
}

.media-page .nav-links {
  gap: 6px;
  align-items: center;
}

.media-page .nav-links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--m-sans);
  font-weight: 500;
  font-size: 13.5px;
  transition: background 200ms ease, color 200ms ease, transform 160ms var(--m-ease);
}

@media (hover: hover) and (pointer: fine) {
  .media-page .nav-links a:hover {
    background: rgba(28, 27, 24, 0.06);
    color: var(--ink);
  }
}

.media-page .nav-links a:active {
  transform: scale(0.96);
}

.media-page .nav-links a.active {
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
}

.m-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Hero ---------- */
.m-hero {
  text-align: center;
  padding: 80px 32px 48px;
}

.m-eyebrow {
  display: inline-block;
  border: 1px solid rgba(28, 27, 24, 0.18);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.m-hero h1 {
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 auto 20px;
  max-width: 760px;
}

.m-hero h1 .serif {
  display: block;
  font-family: var(--m-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 50px);
  color: var(--ink);
}

.m-hero h1 .grotesk {
  display: block;
  font-family: var(--m-sans);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 66px);
  letter-spacing: -0.02em;
}

.m-hero p {
  max-width: 460px;
  margin: 0 auto 28px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

/* Island CTA with nested arrow */
.m-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 8px 8px 26px;
  font-family: var(--m-sans);
  font-size: 14px;
  font-weight: 600;
  transition: transform 200ms var(--m-ease), background 200ms ease;
}

.m-cta .m-cta-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 250ms var(--m-ease);
}

.m-cta:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .m-cta:hover {
    background: #000;
  }
  .m-cta:hover .m-cta-icon {
    transform: translate(3px, -1px);
  }
}

/* ---------- Angled perspective gallery (Z-axis cascade) ---------- */
.m-gallery {
  perspective: 1600px;
  padding: 24px 0 8px;
  overflow: hidden;
}

.m-gallery-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  padding: 20px 32px;
}

.m-frame {
  flex: 0 0 auto;
  width: 158px;
  height: 230px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 50px -24px rgba(28, 27, 24, 0.45);
  transition: transform 600ms var(--m-ease), box-shadow 400ms ease;
  will-change: transform;
}

/* Curve: outer frames rotate toward the viewer */
.m-frame:nth-child(1) { transform: rotateY(34deg) translateZ(-30px) scale(0.9); opacity: 0.85; }
.m-frame:nth-child(2) { transform: rotateY(22deg) translateZ(-10px) scale(0.96); }
.m-frame:nth-child(3) { transform: rotateY(10deg); }
.m-frame:nth-child(4) { transform: rotateY(0deg) scale(1.04); }
.m-frame:nth-child(5) { transform: rotateY(-10deg); }
.m-frame:nth-child(6) { transform: rotateY(-22deg) translateZ(-10px) scale(0.96); }
.m-frame:nth-child(7) { transform: rotateY(-34deg) translateZ(-30px) scale(0.9); opacity: 0.85; }

@media (hover: hover) and (pointer: fine) {
  .m-gallery-row:hover .m-frame {
    transform: rotateY(0deg) scale(0.98);
    opacity: 1;
  }
  .m-frame:hover {
    transform: rotateY(0deg) scale(1.08) !important;
    opacity: 1;
    box-shadow: 0 30px 60px -22px rgba(28, 27, 24, 0.55);
  }
}

/* ---------- Three feature columns ---------- */
.m-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 980px;
  margin: 12px auto 0;
  padding: 8px 32px 80px;
}

.m-feature {
  text-align: center;
  padding: 8px 26px;
  position: relative;
}

.m-feature + .m-feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(28, 27, 24, 0.12);
}

.m-feature h3 {
  font-family: var(--m-sans);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}

.m-feature p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Section heading ---------- */
.m-section {
  padding: 40px 32px 90px;
}

.m-heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.m-heading h2 {
  font-family: var(--m-sans);
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.m-heading h2 .serif {
  font-family: var(--m-serif);
  font-style: italic;
  font-weight: 500;
}

.m-heading p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

/* ---------- Congreso mosaic ---------- */
.m-congress-tagline {
  font-family: var(--m-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--m-red) !important;
  margin-top: 10px;
}

.m-congress {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  grid-auto-flow: dense;
  gap: 14px;
}

.m-congress-photo {
  border-radius: 16px;
  background-size: cover;
  background-position: center 30%;
  box-shadow: 0 20px 44px -26px rgba(28, 27, 24, 0.45);
  transition: transform 450ms var(--m-ease), box-shadow 450ms ease;
  will-change: transform;
}

.m-congress-photo.is-wide { grid-column: span 2; }
.m-congress-photo.is-tall { grid-row: span 2; }

@media (hover: hover) and (pointer: fine) {
  .m-congress-photo:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 28px 54px -24px rgba(28, 27, 24, 0.55);
  }
}

@media (max-width: 860px) {
  .m-congress {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
}

/* ---------- Congreso split blocks ---------- */
.m-split {
  max-width: 1000px;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.m-split:last-child {
  margin-bottom: 0;
}

.m-split.is-reversed .m-split-text {
  order: 2;
}

.m-split.is-reversed .m-split-photos {
  order: 1;
}

.m-split-text .m-kicker {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.m-split-text h3 {
  font-family: var(--m-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 12px;
}

.m-split-text p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: justify;
  hyphens: auto;
}

.m-split-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.m-split-photos .m-congress-photo {
  aspect-ratio: 4 / 3;
}

.m-split-photos .m-congress-photo.is-portrait {
  aspect-ratio: 3 / 4;
}

@media (max-width: 860px) {
  .m-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .m-split.is-reversed .m-split-text {
    order: 1;
  }
  .m-split.is-reversed .m-split-photos {
    order: 2;
  }
}

/* ---------- Asymmetrical bento (Reconocimientos) ---------- */
.m-bento {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-auto-rows: 250px;
  gap: 18px;
}

.m-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 500ms var(--m-ease), box-shadow 500ms ease;
  will-change: transform;
}

.m-card.is-photo {
  background-size: cover;
  background-position: center;
  color: #fff;
}

.m-card.is-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 19, 16, 0.82) 0%, rgba(20, 19, 16, 0.15) 55%, transparent 100%);
}

.m-card.is-solid-navy { background: var(--m-navy); color: #eef1f8; }
.m-card.is-solid-beige { background: var(--beige); color: var(--ink); }
.m-card.is-solid-sage { background: var(--sage); color: #f4f6ef; }

.m-card-tall { grid-row: span 2; }

.m-card-body {
  position: relative;
  z-index: 1;
}

.m-card .m-kicker {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 8px;
  display: block;
}

.m-card h4 {
  font-family: var(--m-sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.m-card p {
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 320px;
}

@media (hover: hover) and (pointer: fine) {
  .m-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 50px -26px rgba(28, 27, 24, 0.5);
  }
}

/* ---------- Scroll reveal ---------- */
.m-reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 800ms var(--m-ease), transform 800ms var(--m-ease), filter 800ms ease;
  will-change: opacity, transform;
}

.m-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .m-features {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 56px;
  }
  .m-feature + .m-feature::before { display: none; }

  .m-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .m-card-tall { grid-row: span 1; }
}

@media (max-width: 600px) {
  .m-frame {
    width: 130px;
    height: 188px;
  }
  .m-gallery-row {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-reveal {
    transform: none;
    filter: none;
    transition: opacity 300ms ease;
  }
  .m-frame,
  .m-card,
  .m-cta { transition: none; }
  .m-frame:hover,
  .m-card:hover,
  .m-cta:hover .m-cta-icon { transform: none !important; }
}
