/* ==========================================================
   MUSEO RAYO · GALERÍA PREMIUM CORREGIDA
   Shortcode: [mrhp_galeria]
   ========================================================== */

:root {
  --mrg-black: #000000;
  --mrg-white: #ffffff;
  --mrg-gray: #909595;
  --mrg-soft: #f4f0e8;
  --mrg-line: rgba(0, 0, 0, .11);
  --mrg-line-dark: rgba(255, 255, 255, .16);
  --mrg-title: 'Bank Gothic', 'Arial Black', sans-serif;
  --mrg-body: 'Futura Medium', Arial, sans-serif;
  --mrg-ease: 280ms ease;
}

.mrg-page,
.mrg-page * {
  box-sizing: border-box;
}

.mrg-page {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--mrg-soft);
  color: var(--mrg-black);
  font-family: var(--mrg-body);
}

.mrg-wrap {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.mrg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.74);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  line-height: 1;
  text-transform: uppercase;
}

.mrg-kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.mrg-kicker-dark {
  color: var(--mrg-gray);
}

/* HERO FULL WIDTH */
.mrg-hero {
  position: relative;
  width: 100%;
  min-height: clamp(520px, 60vh, 720px);
  background:
    radial-gradient(circle at 76% 18%, rgba(144,149,149,.28), transparent 30%),
    linear-gradient(135deg, var(--mrg-black) 0%, #151515 57%, var(--mrg-soft) 57.2%, var(--mrg-soft) 100%);
}

.mrg-hero::before,
.mrg-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transform: rotate(45deg);
}

.mrg-hero::before {
  width: 380px;
  height: 380px;
  right: 9%;
  top: 105px;
  border: 1px solid rgba(255,255,255,.16);
}

.mrg-hero::after {
  width: 190px;
  height: 190px;
  right: 31%;
  bottom: 80px;
  border: 22px solid rgba(144,149,149,.14);
}

.mrg-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(430px, .60fr);
  gap: 72px;
  align-items: center;
  min-height: 680px;
  padding: 138px 0 92px;
}

.mrg-hero-copy {
  color: var(--mrg-white);
  max-width: 860px;
}

.mrg-hero-copy h1 {
  font-size: clamp(46px, 5.4vw, 82px);
  margin-top: 22px;
  max-width: 720px;
  line-height: .92;
}

.mrg-intro h2,
.mrg-section-head h2,
.mrg-cta-box h2 {
  font-family: var(--mrg-title);
  font-weight: 900;
  letter-spacing: .025em;
  line-height: .96;
  margin: 0;
  text-transform: uppercase;
}

.mrg-hero-copy p {
  color: rgba(255,255,255,.82);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.85;
  margin: 28px 0 0;
  max-width: 720px;
}

.mrg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.mrg-btn {
  align-items: center;
  border: 1px solid currentColor;
  display: inline-flex;
  font-family: var(--mrg-title);
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: .13em;
  min-height: 52px;
  padding: 15px 28px;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: transform var(--mrg-ease), background var(--mrg-ease), color var(--mrg-ease), border-color var(--mrg-ease);
}

.mrg-btn:hover {
  transform: translateY(-3px);
}

.mrg-btn-light {
  background: var(--mrg-white);
  border-color: var(--mrg-white);
  color: var(--mrg-black) !important;
}

.mrg-btn-light:hover {
  background: transparent;
  color: var(--mrg-white) !important;
}

.mrg-btn-line {
  background: transparent;
  color: var(--mrg-white) !important;
}

.mrg-btn-dark {
  background: var(--mrg-black);
  border-color: var(--mrg-black);
  color: var(--mrg-white) !important;
}

.mrg-btn-dark:hover {
  background: var(--mrg-gray);
  border-color: var(--mrg-gray);
}

.mrg-hero-card {
  min-height: 420px;
  max-width: 430px;
  justify-self: end;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(0,0,0,.12);
  color: var(--mrg-black);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 48px 56px;
  position: relative;
  box-shadow: 0 28px 70px rgba(0,0,0,.22);
}

.mrg-hero-card::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -86px;
  top: -86px;
  border: 28px solid rgba(144,149,149,.25);
  transform: rotate(45deg);
}

.mrg-hero-card span {
  color: var(--mrg-gray);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.mrg-hero-card strong {
  display: block;
  font-family: var(--mrg-title);
  font-size: clamp(52px, 4vw, 68px);
  line-height: .95;
  letter-spacing: -0.05em;
  margin: 16px 0 18px;
  position: relative;
  z-index: 1;
}

.mrg-hero-card p {
  color: rgba(0,0,0,.70);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* SECTIONS */
.mrg-section,
.mrg-intro {
  width: 100%;
}

.mrg-intro {
  background: var(--mrg-white);
  border-bottom: 1px solid var(--mrg-line);
  padding: 92px 0;
}

.mrg-intro-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.mrg-intro h2,
.mrg-section-head h2,
.mrg-cta-box h2 {
  color: var(--mrg-black);
  font-size: clamp(34px, 5vw, 70px);
  margin-top: 22px;
}

.mrg-intro p,
.mrg-section-head p,
.mrg-cta-box p {
  color: rgba(0,0,0,.72);
  font-size: 16px;
  line-height: 1.85;
  margin: 0;
}

.mrg-section {
  padding: clamp(48px, 8vw, 104px) 0;
}

.mrg-section-head {
  max-width: 790px;
  margin-bottom: 44px;
}

.mrg-section-head p,
.mrg-cta-box p {
  margin-top: 22px;
}

/* FILTER MENU */
.mrg-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.mrg-filter button {
  background: transparent;
  border: 1px solid rgba(0,0,0,.16);
  color: var(--mrg-black);
  cursor: pointer;
  font-family: var(--mrg-title);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  min-height: 44px;
  padding: 12px 18px;
  text-transform: uppercase;
  transition: background var(--mrg-ease), color var(--mrg-ease), transform var(--mrg-ease), border-color var(--mrg-ease);
}

.mrg-filter button:hover,
.mrg-filter button.active {
  background: var(--mrg-black);
  border-color: var(--mrg-black);
  color: var(--mrg-white);
  transform: translateY(-2px);
}

/* MASONRY */
.mrg-masonry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 230px;
  gap: 18px;
  grid-auto-flow: dense;
}

.mrg-media {
  background: var(--mrg-black);
  border: 1px solid rgba(0,0,0,.08);
  cursor: zoom-in;
  display: block;
  min-height: 230px;
  overflow: hidden;
  position: relative;
  transition: transform var(--mrg-ease), box-shadow var(--mrg-ease), opacity var(--mrg-ease);
}

.mrg-media:hover {
  box-shadow: 0 28px 70px rgba(0,0,0,.18);
  transform: translateY(-6px);
}

.mrg-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease, filter 520ms ease;
  width: 100%;
}

.mrg-media:hover img {
  filter: grayscale(.18) contrast(1.04);
  transform: scale(1.06);
}

.mrg-large {
  grid-column: span 2;
  grid-row: span 2;
}

.mrg-wide {
  grid-column: span 2;
}

.mrg-tall {
  grid-row: span 2;
}

.mrg-media-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.78) 100%);
  color: var(--mrg-white);
}

.mrg-media-caption span,
.mrg-video-copy span {
  color: rgba(255,255,255,.72);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.mrg-media-caption h3,
.mrg-video-copy h3 {
  color: var(--mrg-white);
  font-family: var(--mrg-title);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.08;
  margin: 0;
  text-transform: uppercase;
}

/* VIDEOS */
.mrg-video-section {
  background: var(--mrg-black);
  color: var(--mrg-white);
  position: relative;
}

.mrg-video-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 72px 72px;
}

.mrg-video-section > .mrg-wrap {
  position: relative;
  z-index: 1;
}

.mrg-section-head-light h2,
.mrg-section-head-light p {
  color: var(--mrg-white);
}

.mrg-section-head-light p {
  color: rgba(255,255,255,.74);
}

.mrg-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.mrg-video-card {
  background: rgba(255,255,255,.045);
  border: 1px solid var(--mrg-line-dark);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--mrg-ease), background var(--mrg-ease), border-color var(--mrg-ease);
}

.mrg-video-card:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.34);
  transform: translateY(-6px);
}

.mrg-video-thumb {
  aspect-ratio: 16 / 10;
  background: #111;
  overflow: hidden;
  position: relative;
}

.mrg-video-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  opacity: .76;
  transition: transform 520ms ease, opacity 520ms ease;
  width: 100%;
}

.mrg-video-card:hover .mrg-video-thumb img {
  opacity: .94;
  transform: scale(1.05);
}

.mrg-play {
  align-items: center;
  background: var(--mrg-white);
  border-radius: 50%;
  color: var(--mrg-black);
  display: grid;
  font-size: 18px;
  height: 62px;
  left: 50%;
  place-items: center;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
}

.mrg-video-copy {
  padding: 30px;
}

.mrg-video-copy p {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.75;
  margin: 18px 0 0;
}

/* CTA */
.mrg-cta {
  background: var(--mrg-soft);
}

.mrg-cta-box {
  background: var(--mrg-white);
  border: 1px solid var(--mrg-line);
  box-shadow: 0 26px 90px rgba(0,0,0,.08);
  padding: clamp(38px, 7vw, 82px);
  position: relative;
  text-align: center;
}

.mrg-cta-box::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(0,0,0,.08);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(45deg);
}

.mrg-cta-box > * {
  position: relative;
  z-index: 1;
}

.mrg-cta-box .mrg-kicker {
  justify-content: center;
}

.mrg-cta-box .mrg-kicker::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.mrg-cta-box p {
  max-width: 720px;
  margin: 24px auto 36px;
}

/* MODAL */
.mrg-lightbox {
  align-items: center;
  background: rgba(0,0,0,.90);
  backdrop-filter: blur(16px);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 32px;
  pointer-events: none;
  position: fixed;
  transition: opacity var(--mrg-ease);
  z-index: 999999;
}

.mrg-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.mrg-lightbox-content {
  max-height: 88vh;
  max-width: min(1180px, 94vw);
  position: relative;
  width: 100%;
}

.mrg-lightbox-media img,
.mrg-lightbox-media iframe,
.mrg-lightbox-media video {
  background: #000;
  border: 0;
  display: block;
  height: min(72vh, 760px);
  object-fit: contain;
  width: 100%;
}

.mrg-lightbox-close {
  align-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: grid;
  font-size: 34px;
  height: 50px;
  line-height: 1;
  place-items: center;
  position: absolute;
  right: 0;
  top: -64px;
  width: 50px;
}

.mrg-lightbox-close:hover {
  background: #fff;
  color: #000;
}

/* RESPONSIVE */
@media (max-width: 1040px) {
  .mrg-hero {
    background: var(--mrg-black);
    min-height: auto;
  }

  .mrg-hero-grid,
  .mrg-intro-grid {
    grid-template-columns: 1fr;
  }

  .mrg-hero-grid {
    min-height: auto;
  }

  .mrg-hero-card {
    min-height: 320px;
  }

  .mrg-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mrg-video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mrg-wrap {
    width: calc(100% - 30px);
  }

  .mrg-hero-grid {
    gap: 32px;
    padding: 104px 0 72px;
  }

  .mrg-hero-copy h1 {
    font-size: 42px;
  }

  .mrg-section,
  .mrg-intro {
    padding: 74px 0;
  }

  .mrg-intro h2,
  .mrg-section-head h2,
  .mrg-cta-box h2 {
    font-size: 34px;
  }

  .mrg-filter button,
  .mrg-btn {
    width: 100%;
  }

  .mrg-actions {
    flex-direction: column;
  }

  .mrg-masonry {
    grid-template-columns: 1fr;
    grid-auto-rows: 270px;
  }

  .mrg-large,
  .mrg-wide,
  .mrg-tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .mrg-lightbox {
    padding: 18px;
  }

  .mrg-lightbox-media img,
  .mrg-lightbox-media iframe,
  .mrg-lightbox-media video {
    height: 64vh;
  }
}

/* Flechas premium lightbox galería */

.mrg-lightbox-content {
  position: relative;
}

.mrg-lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 1000001;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(0,0,0,.42);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  transition: .25s ease;
}

.mrg-lightbox-nav::before {
  font-size: 34px;
  line-height: 1;
  font-family: Arial, sans-serif;
}

.mrg-lightbox-prev {
  left: 42px;
}

.mrg-lightbox-next {
  right: 42px;
}

.mrg-lightbox-prev::before {
  content: "‹";
}

.mrg-lightbox-next::before {
  content: "›";
}

.mrg-lightbox-nav:hover {
  background: #fff;
  color: #000;
  transform: translateY(-50%) scale(1.06);
}

@media (max-width: 768px) {
  .mrg-lightbox-nav {
    width: 46px;
    height: 46px;
  }

  .mrg-lightbox-prev {
    left: 14px;
  }

  .mrg-lightbox-next {
    right: 14px;
  }

  .mrg-lightbox-nav::before {
    font-size: 28px;
  }
}


/* FIX móvil galería: fondos a pantalla completa */

@media (max-width: 720px) {

  .mrg-hero,
  .mrg-intro,
  .mrg-section,
  .mrg-video-section,
  .mrg-cta {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .mrg-hero .mrg-wrap,
  .mrg-intro .mrg-wrap,
  .mrg-section .mrg-wrap,
  .mrg-video-section .mrg-wrap,
  .mrg-cta .mrg-wrap {
    width: calc(100% - 30px);
    margin: 0 auto;
  }

  .mrg-hero-grid {
    padding-left: 0;
    padding-right: 0;
  }
}