@import url('https://fonts.googleapis.com/css2?family=Futura:wght@400;500;600;700&display=swap');

:root {
  --mr-black: #000000;
  --mrhp-header-height: 68px;
  --mr-ink: #000000;
  --mr-white: #ffffff;
  --mr-gray: #909595;
  --mr-cream: #f4f0e8;
  --mr-soft: #e8e4dc;
  --mr-muted: #909595;
  --mr-gold: #909595;
  --mr-primary-font: 'Bank Gothic', 'Arial Black', sans-serif;
  --mr-secondary-font: 'Futura Medium', 'Arial', sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--mr-cream);
  font-family: var(--mr-secondary-font);
  color: var(--mr-ink);
}

body.page,
body.home {
  background: var(--mr-cream) !important;
}

.mrhp-site {
  /* Restored full-bleed desktop behavior: keeps header offset but allows
     hero and top sections to span the viewport width as before. */
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: var(--mrhp-header-height);
  font-family: var(--mr-secondary-font);
  color: var(--mr-ink);
  background: var(--mr-cream);
  box-sizing: border-box;
}

.entry-content:has(.mrhp-site),
.site-main:has(.mrhp-site),
.page-content:has(.mrhp-site) {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.entry-content .mrhp-site {
  margin-top: 0 !important;
}

/* CRITICAL: Fixed header overlay
   The header is position:fixed with height 68px.
   The page content is rendered beneath it, and each top section
   provides its own internal padding to prevent overlap. */
.mrhp-site > main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* When the WP admin bar is visible, the header moves down.
   We keep main at the top so the hero background stays flush to the viewport. */
.admin-bar .mrhp-site > main {
  margin-top: 0 !important;
}

.page-header,
.entry-header,
.entry-title,
header.page-header,
.site-main > header {
  display: none !important;
}

.mrhp-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--mrhp-header-height);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 48px);
  background: rgba(8, 8, 8, 0.82);
  border-bottom: none;
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}

.admin-bar .mrhp-header {
  top: 32px;
}

.mrhp-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff !important;
  text-decoration: none !important;
}

.mrhp-logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-family: var(--mr-primary-font);
  font-size: 13px;
  font-weight: 700;
}

.mrhp-logo-text {
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.mrhp-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.mrhp-nav a {
  color: #fff !important;
  text-decoration: none !important;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.72;
  transition: 0.25s;
  white-space: nowrap;
}

.mrhp-nav a:hover {
  opacity: 1;
  color: var(--mr-gold) !important;
}

.mrhp-menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 46px;
  height: 46px;
  cursor: pointer;
}

.mrhp-menu-toggle span {
  display: block;
  width: 26px;
  height: 1px;
  background: #fff;
  margin: 8px auto;
}

.mrhp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 850;
  transition: 0.35s ease;
  box-sizing: border-box;
}

.mrhp-btn.primary {
  background: #fff;
  color: #111 !important;
  border: 1px solid #fff;
}

.mrhp-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff !important;
  backdrop-filter: blur(8px);
}

.mrhp-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.mrhp-section {
  /* Avoid huge lateral gaps on very wide viewports by using a fluid
     horizontal padding that clamps between a minimum and a reasonable max. */
  padding: 88px clamp(28px, 3vw, 72px);
  box-sizing: border-box;
}

.mrhp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.mrhp-section-head p {
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #b8aa92;
  font-weight: 800;
  margin: 0;
}

.mrhp-section-head h2 {
  font-family: var(--mr-primary-font);
  font-weight: 700;
  font-size: clamp(38px, 5.5vw, 82px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 18px 0;
  color: #111;
  text-transform: uppercase;
}

.mrhp-footer {
  background: #050505;
  color: #fff;
  padding: 84px clamp(28px, 3vw, 72px) 42px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.8fr;
  gap: 44px;
  box-sizing: border-box;
}

.mrhp-header,
.mrhp-site,
.mrhp-site > main,
.mrhp-site > main > *:first-child,
.mrhp-site > main > section:first-child,
.mrhp-site > main > .mrhp-hero:first-child,
.mrhp-site > main > .mrhp-section:first-child,
.mrhp-hero,
.mrhp-section,
section.mrhp-hero,
section.mrhp-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.mrhp-header + main,
.mrhp-header + .mrhp-hero,
.mrhp-header + .mrhp-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.mrhp-footer h3 {
  font-family: var(--mr-primary-font);
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.mrhp-footer h4 {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--mr-gold);
  margin: 0 0 18px;
}

.mrhp-footer p {
  color: #aaa;
  margin: 0 0 14px;
  line-height: 1.7;
}

.mrhp-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mrhp-footer-links a {
  color: #d5d5d5 !important;
  text-decoration: none !important;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 12px;
}

.mrhp-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mrhp-social a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-size: 11px;
  text-transform: uppercase;
  transition: 0.25s;
}

.mrhp-social a:hover {
  background: #fff;
  color: #111 !important;
}

.mrhp-page-content {
  background: var(--mr-cream);
  padding-top: 0;
  min-height: 60vh;
}

.mrhp-page .mrhp-section {
  padding: 88px 0;
}

.mrhp-history-hero-min {
  padding: 20px 0 32px;
}

.mrhp-history-section,
.mrhp-history-dark {
  padding: 88px 0;
}

@media (max-width: 1100px) {
  :root {
    --mrhp-header-height: 74px;
  }
  .mrhp-header {
    height: 74px;
    padding: 0 22px;
  }

  .admin-bar .mrhp-header {
    top: 46px;
  }

  .mrhp-menu-toggle {
    display: block;
    z-index: 100001;
  }

  .mrhp-nav {
    position: fixed;
    top: 74px;
    left: 0;
    width: 100%;
    background: rgba(8, 8, 8, 0.96);
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px 24px 22px;
    box-sizing: border-box;
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: 0.28s;
  }

  .mrhp-menu-open .mrhp-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mrhp-nav a {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mrhp-section {
    padding: 76px 20px;
  }
}

/* Global image rules to prevent overflow */
img,
picture,
figure {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 640px) {
  :root {
    --mrhp-header-height: 70px;
  }

  .mrhp-header {
    height: 70px;
    padding: 0 16px;
  }

  .mrhp-logo-mark {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .mrhp-logo-text {
    font-size: 12px;
    letter-spacing: 3px;
  }

  .mrhp-nav {
    top: 70px;
  }

  .mrhp-section {
    padding: 58px 20px;
  }
}

.mrhp-social a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

/* Logo oficial Museo Rayo en header */

.mrhp-logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
  max-height: var(--mrhp-header-height);
  overflow: hidden;
}

.mrhp-logo-img {
  width: auto;
  height: 42px;
  max-height: 42px;
  display: block;
  object-fit: contain;

  /* Convierte logo negro a blanco sobre header oscuro */
  filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
  .mrhp-logo-img {
    height: 36px;
    max-height: 36px;
  }
}
