/**
 * Regional Livestock Bridge — Mobile Reliability & Light Theme Hotfix V81.0
 * Scope: public pages outside the breed Branch library.
 */
:root{
  color-scheme:only light!important;
  supported-color-schemes:light;
  --rlb-v81-text:#172033;
  --rlb-v81-muted:#334155;
  --rlb-v81-line:#c8d7ee;
  --rlb-v81-soft:#f5f8fd;
  --rlb-v81-blue:#0033a0;
}
html,body{background:#fff;color:var(--rlb-v81-text)}
body,input,select,textarea,button{color-scheme:light}
input,select,textarea{background-color:#fff;color:var(--rlb-v81-text)}
input::placeholder,textarea::placeholder{color:#64748b;opacity:1}

/* Preserve a predictable light presentation even when a phone forces dark mode. */
main,.guide-main,.contact-section,.rlb-knowledge-hub,.content-section,
.guide-section,.guide-panel,.guide-card,.trust-guide-card,.rlb-knowledge-card,
.sg-panel,.sg-card,.sg-stage,.sg-readiness-item,.contact-form-container,
.contact-info-card,#quote .rlb-card,#quote .rlb-step{
  forced-color-adjust:none;
}

/* Mobile hero: content height is driven by its contents, never clipped by a fixed height. */
body.branch-subpage .hero.subpage-hero.hero--multilingual,
body.branch-subpage .hero.subpage-hero{
  position:relative!important;
  display:block!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  padding:0!important;
  background-color:#0033a0!important;
}
body.branch-subpage .hero.subpage-hero .hero-overlay,
body.branch-subpage .hero.hero--multilingual .hero-overlay{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  min-height:420px!important;
  box-sizing:border-box!important;
  padding:82px 20px 42px!important;
  overflow:visible!important;
}
body.branch-subpage .compact-subpage-hero .hero-overlay{min-height:330px!important}

/* Exactly match the homepage pattern: one compact selector centered at the top of the hero. */
body.branch-subpage .rlb-language-selector--hero-top{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:none!important;
  position:absolute!important;
  top:10px!important;
  bottom:auto!important;
  left:0!important;
  right:0!important;
  inset-inline:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0 8px!important;
  transform:none!important;
  justify-content:center!important;
  z-index:40!important;
}
body.branch-subpage .rlb-language-selector--hero-top .rlb-language-selector__links{
  direction:ltr!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  max-width:100%!important;
  gap:4px!important;
  padding:5px!important;
  border:1px solid rgba(255,255,255,.45)!important;
  border-radius:999px!important;
  background:rgba(0,28,97,.88)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.22)!important;
  -webkit-backdrop-filter:blur(7px)!important;
  backdrop-filter:blur(7px)!important;
  pointer-events:auto!important;
}
body.branch-subpage .rlb-language-selector--hero-top .rlb-language-selector__link{
  flex:0 1 auto!important;
  min-width:0!important;
  min-height:31px!important;
  padding:5px 10px!important;
  border:1px solid rgba(255,255,255,.42)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
body.branch-subpage .rlb-language-selector--hero-top .rlb-language-selector__link.is-active,
body.branch-subpage .rlb-language-selector--hero-top .rlb-language-selector__link[aria-current="page"]{
  background:#fff!important;
  border-color:#fff!important;
  color:#0033a0!important;
}

/* Keep every hero action visible and inside the hero on narrow screens. */
body.branch-subpage .related-page-links{width:min(100%,760px)!important;margin-inline:auto!important}
body.branch-subpage .related-page-links .btn{position:static!important;transform:none!important;max-width:100%!important}

/* Stronger contrast for text that was reported as pale on phones. */
.rlb-knowledge-hub .section-header p,.rlb-knowledge-card p,
.breed-content p,.breed-card p,.livestock-card p,.contact-team p,
.contact-info-card p,.contact-form-container p,.guide-lead,.guide-card p,
.guide-section-head p,.trust-guide-card p,.section-description,
body.branch-subpage main .muted,body.branch-subpage main small{
  color:var(--rlb-v81-muted)!important;
}
.rlb-knowledge-card p,.breed-content p,.guide-card p,.guide-lead,
.contact-team p,.contact-info-card p{font-weight:600}

/* Make long authority pages visibly sectional rather than one continuous white block. */
.guide-section,.guide-panel,.sg-panel{
  background:#fff!important;
  border:1.5px solid var(--rlb-v81-line)!important;
  border-radius:16px!important;
  box-shadow:0 8px 24px rgba(0,51,160,.07)!important;
}
.guide-section+.guide-section,.sg-panel+.sg-panel{margin-top:22px!important}
.guide-card,.trust-guide-card,.rlb-knowledge-card,.sg-stage,.sg-readiness-item{
  background:#fff!important;
  border-color:#c8d7ee!important;
}

/* Readiness/status controls: dark, thick, readable text. */
.sg-readiness-item select,.sg-mobile-toc select,.sg-filterbar select,
.sg-form input,.sg-form select,.sg-form textarea,.guide-main select{
  background:#fff!important;
  color:#10213e!important;
  font-weight:800!important;
  opacity:1!important;
}
.sg-readiness-item label,.sg-readiness-item strong,.sg-badge,.sg-status{
  color:#10213e!important;
  font-weight:850!important;
}

/* Forms: prevent inherited widths/positioning from pushing buttons outside cards. */
#quote,#quote *,.contact-form,.contact-form *,.sg-form,.sg-form *{box-sizing:border-box}
#quote .rlb-card,#quote .rlb-step,.contact-form-container,.sg-form{max-width:100%!important;overflow:hidden}
#quote .rlb-nav{
  position:static!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
}
#quote .rlb-nav button,#quote .rlb-nav .btn,#quote #submit_btn,
.contact-form button[type="submit"],.sg-form button[type="submit"]{
  position:static!important;
  left:auto!important;right:auto!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  transform:none!important;
}
#quote input,#quote select,#quote textarea,.contact-form input,.contact-form select,
.contact-form textarea,.sg-form input,.sg-form select,.sg-form textarea{max-width:100%!important}

@media(max-width:760px){
  body.branch-subpage .hero.subpage-hero .hero-overlay,
  body.branch-subpage .hero.hero--multilingual .hero-overlay{
    min-height:0!important;
    padding:68px 14px 28px!important;
    justify-content:flex-start!important;
  }
  body.branch-subpage .compact-subpage-hero .hero-overlay{min-height:0!important}
  body.branch-subpage .hero-title{font-size:clamp(1.75rem,8vw,2.55rem)!important;line-height:1.18!important}
  body.branch-subpage .hero-sub{font-size:.98rem!important;line-height:1.62!important}
  body.branch-subpage .related-page-links{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    width:100%!important;
  }
  body.branch-subpage .related-page-links .btn{width:100%!important;white-space:normal!important}
  .guide-main,.guide-section,.guide-panel,.sg-panel{min-width:0!important}
  .guide-section,.guide-panel,.sg-panel{border-radius:14px!important}
  #quote input,#quote select,#quote textarea,.contact-form input,.contact-form select,
  .contact-form textarea,.sg-form input,.sg-form select,.sg-form textarea{font-size:16px!important}
}
@media(max-width:430px){
  body.branch-subpage .rlb-language-selector--hero-top{top:8px!important;padding-inline:4px!important}
  body.branch-subpage .rlb-language-selector--hero-top .rlb-language-selector__links{gap:2px!important;padding:4px!important}
  body.branch-subpage .rlb-language-selector--hero-top .rlb-language-selector__link{
    min-height:29px!important;padding:4px 6px!important;font-size:9.7px!important
  }
  #quote{padding-inline:8px!important}
  #quote .rlb-step{padding-inline:14px!important}
  #quote .rlb-nav{gap:8px!important}
}
@media print{body.branch-subpage .rlb-language-selector--hero-top{display:none!important}}
