/* =========================================================
   REAL.PRO STUDIOS · BRAND CONTRAST SYSTEM · V4
   Explicit dark/light header states + menu/footer dark surfaces.
   ========================================================= */

:root{
  --rp-menu-logo-light:url("../images/brand/realpro-logo-symbol-on-dark.webp") !important;
}

/* ---------- HEADER GEOMETRY ---------- */
html body .site-header[data-header] .header-logo{
  width:clamp(205px,17vw,250px) !important;
  max-width:250px !important;
  max-height:none !important;
  display:flex !important;
  align-items:center !important;
}

html body .site-header[data-header] .header-logo img{
  display:block !important;
  width:100% !important;
  height:auto !important;
  max-width:100% !important;
  max-height:54px !important;
  object-fit:contain !important;
  object-position:left center !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  padding:0 !important;
}

/* ---------- EXPLICIT CONTRAST STATES ---------- */
/* Dark surface = white/brand-red variant. */
html body .site-header[data-header][data-rp-surface="dark"]{
  color:#fff !important;
}

html body .site-header[data-header][data-rp-surface="dark"] .rp-header-statement{
  color:rgba(255,255,255,.94) !important;
}

/* Light surface = original blue/red logo and dark copy. */
html body .site-header[data-header][data-rp-surface="light"]{
  color:#0b1d33 !important;
}

html body .site-header[data-header][data-rp-surface="light"] .rp-header-statement{
  color:#0b1d33 !important;
}

/* Keep menu controls visible on both surfaces. */
html body .site-header[data-header][data-rp-surface="dark"] .menu-toggle{
  border-color:rgba(255,255,255,.45) !important;
}

html body .site-header[data-header][data-rp-surface="light"] .menu-toggle{
  border-color:rgba(1,55,109,.30) !important;
  background:rgba(255,255,255,.90) !important;
}

html body .site-header[data-header][data-rp-surface="light"] .menu-toggle span{
  background:#01376d !important;
}

html body .site-header[data-header][data-rp-surface="dark"] .menu-toggle span{
  background:#fff !important;
}

/* ---------- FULLSCREEN MENU ---------- */
html body .fullscreen-menu .menu-top > img{
  display:block !important;
  width:64px !important;
  height:auto !important;
  max-width:64px !important;
  max-height:64px !important;
  object-fit:contain !important;
  object-position:center !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  padding:0 !important;
}

/* Kill only the erroneous active-link line in fullscreen navigation. */
html body .fullscreen-menu .menu-links a[aria-current="page"]::before,
html body .fullscreen-menu .menu-links a[aria-current="page"]::after,
html body .fullscreen-menu .menu-links a.is-active::before,
html body .fullscreen-menu .menu-links a.is-active::after{
  content:none !important;
  display:none !important;
  inline-size:0 !important;
  block-size:0 !important;
  width:0 !important;
  height:0 !important;
  border:0 !important;
  background:none !important;
  box-shadow:none !important;
  transform:none !important;
}

/* Preserve readable menu copy on the dark overlay. */
html body .fullscreen-menu .menu-links a{
  color:#fff !important;
}

html body .fullscreen-menu .menu-links a:hover,
html body .fullscreen-menu .menu-links a:focus-visible{
  color:#fff !important;
}

/* ---------- FOOTER ---------- */
html body .site-footer.site-footer--premium .brand--footer img{
  display:block !important;
  width:clamp(180px,15vw,220px) !important;
  height:auto !important;
  max-width:220px !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:left center !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  padding:0 !important;
}

/* ---------- LIGHT MODAL ---------- */
html body .rp-form-modal__brand{
  display:block !important;
  width:min(280px,78vw) !important;
  height:auto !important;
  max-height:72px !important;
  object-fit:contain !important;
  object-position:left center !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}

/* ---------- MOBILE ---------- */
@media (max-width:760px){
  html body .site-header[data-header] .header-logo{
    width:54px !important;
    max-width:54px !important;
  }

  html body .site-header[data-header] .header-logo img{
    width:54px !important;
    height:auto !important;
    max-width:54px !important;
    max-height:54px !important;
    object-position:center !important;
  }

  html body .fullscreen-menu .menu-top > img{
    width:58px !important;
    max-width:58px !important;
    max-height:58px !important;
  }

  html body .site-footer.site-footer--premium .brand--footer img{
    width:190px !important;
    max-width:190px !important;
  }
}
