/* Radiant Smiles site header, 2026-10-12.
   The header the client approved on the new homepage (template-home-new.php), used on every
   other page. These are the template's own .topbar / .nav / .btn / .burger rules, copied
   unchanged and scoped to #rs-hdr so they cannot leak into the old theme's content, plus a
   small reset against the old theme stylesheet. Markup: includes/rs-site-header.php.
   Linked from header.php with ?v= -- bump it on every edit. */

#rs-hdr{
  --navy:#091e4d; --navy-2:#12306b; --blue:#017bef; --blue-deep:#0062ce; --blue-dark:#005abd;
  --ice:#e8f5fe; --shadow-lg:0 18px 46px rgba(9,30,77,.11); --max:1400px;
  font-family:'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  color:var(--navy); font-size:15px; line-height:1.62; text-align:left;
  -webkit-font-smoothing:antialiased;
}
#rs-hdr *,#rs-hdr *::before,#rs-hdr *::after{box-sizing:border-box}
/* reset against the old theme stylesheet (it styles bare ul, li, a, img and button) */
#rs-hdr ul,#rs-hdr li{list-style:none;margin:0;padding:0;background:none;border:0;float:none;text-indent:0}
#rs-hdr li::before{content:none}
#rs-hdr a{text-decoration:none;text-shadow:none;background-image:none}
#rs-hdr img{max-width:100%;height:auto;display:block;border:0;padding:0;box-shadow:none}
#rs-hdr button{font-family:inherit;text-transform:none;letter-spacing:normal;box-shadow:none;min-width:0}
#rs-hdr .ic{width:22px;height:22px;flex:0 0 auto}

/* ---------- top bar ---------- */
/* 2026-10-14 sticky header (Altamash): the bar stays at the top of the screen while the page scrolls.
   z-index 1000: above the page content -- the old theme's aside#sidebar (the "Get in touch today" form)
   is position:relative;z-index:99 and .read-more-trigger is 100, and at the template's 70 the sidebar
   covered the Patient Info and Locations dropdowns -- and above the chatbot launcher and the mobile
   CALL US bar (.mobi-footer, 999), so the open menu is never under them. Below popups/lightboxes (9999+).
   Sticky keeps the bar in the flow, so nothing below it moves (no CLS). */
#rs-hdr.topbar{background:#fff;border-bottom:1px solid #e9f1fa;position:-webkit-sticky;position:sticky;top:0;z-index:1000;
  box-shadow:0 2px 12px rgba(9,30,77,.07);margin:0;padding:0;width:100%}
/* logged-in users: sit under the WordPress admin bar, which scrolls away below 601px */
body.admin-bar #rs-hdr.topbar{top:32px}
@media screen and (max-width:782px){body.admin-bar #rs-hdr.topbar{top:46px}}
@media screen and (max-width:600px){body.admin-bar #rs-hdr.topbar{top:0}}
/* in-page links land below the bar: 76px tall, 71px from 1150px down, 67px from 820px down */
html{scroll-padding-top:76px}
@media (max-width:1150px){html{scroll-padding-top:71px}}
@media (max-width:820px){html{scroll-padding-top:67px}}
/* sticky only holds inside its parent's box. The theme's style.css sets `body, html {height:100%}`, so
   body was one screen tall and the bar scrolled away after the first screen; and WP Responsive Menu gives
   body.cbp-spmenu-push overflow-x:hidden. Auto height (still at least one screen) and overflow-x:clip
   (same no-sideways-scroll, but no scroll container) let it stick on every page. Browsers without clip
   keep hidden. */
html body{height:auto;min-height:100%}
html body,html body.cbp-spmenu-push{overflow-x:clip}
/* the chatbot's root (.cbb-livebot-root) is position:fixed at z-index 2147483647, the maximum, so no
   header z-index can sit above its launcher; while the menu is open the launcher is hidden instead, so it
   never covers a menu item. It comes back when the menu closes. Its chat icon sets visibility:visible on
   itself, so the children are hidden too and taps pass through to the menu. 2026-10-14. */
body.nav-open .cbb-livebot-root .bot_cbb__btn,body.nav-open .cbb-livebot-root .bot_cbb__btn *{visibility:hidden!important;pointer-events:none!important}
#rs-hdr .topbar-in{max-width:var(--max);margin:0 auto;padding:12px 24px;display:flex;align-items:center;gap:16px}
#rs-hdr .logo{flex:0 0 auto}
#rs-hdr .logo img{height:46px;width:auto}
#rs-hdr .btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:700;
  border-radius:11px;padding:13px 22px;font-size:14.5px;line-height:1.62;border:1.5px solid transparent;cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
#rs-hdr .btn .ic{width:18px;height:18px}
#rs-hdr .btn-p{background:linear-gradient(180deg,#0a72e0,#0056bb);color:#fff;box-shadow:0 8px 18px rgba(0,90,190,.28)}
#rs-hdr .btn-p:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(0,90,190,.34);color:#fff}
#rs-hdr .btn-book{flex:0 0 auto;padding:13px 24px;border-radius:999px;font-size:14.4px;letter-spacing:0;text-transform:none}

/* ---------- nav ---------- */
#rs-hdr .nav{flex:1 1 auto;min-width:0}
#rs-hdr .nav>ul{display:flex;align-items:center;gap:1px;flex-wrap:wrap}
#rs-hdr .nav>ul>li{position:relative}
#rs-hdr .nav>ul>li>a{display:flex;align-items:center;gap:5px;padding:11px 10px;font-size:14.2px;line-height:1.62;
  font-weight:600;color:var(--navy-2);white-space:nowrap;border-bottom:3px solid transparent}
#rs-hdr .nav>ul>li.has-sub>a::after{content:"";width:6px;height:6px;border-right:2px solid #90a4c4;
  border-bottom:2px solid #90a4c4;transform:rotate(45deg) translateY(-2px);margin-left:3px;flex:0 0 auto}
#rs-hdr .nav>ul>li:hover>a{color:var(--blue-deep)}
#rs-hdr .nav>ul>li.is-home>a,
#rs-hdr .nav>ul>li.is-current>a{color:var(--blue-deep);border-bottom-color:var(--blue-deep);font-weight:700}
#rs-hdr .nav .sub-menu{position:absolute;top:100%;left:0;min-width:252px;background:#fff;border:1px solid #e4eefb;
  border-radius:14px;box-shadow:var(--shadow-lg);padding:8px;opacity:0;visibility:hidden;transform:translateY(6px);
  transition:.16s ease;z-index:80;display:block}
#rs-hdr .nav>ul>li:hover .sub-menu,#rs-hdr .nav>ul>li:focus-within .sub-menu,#rs-hdr .nav>ul>li.tap-open>.sub-menu{
  opacity:1;visibility:visible;transform:none}
#rs-hdr .nav .sub-menu a{display:block;padding:9px 13px;border-radius:9px;font-size:13.6px;line-height:1.5;font-weight:500;color:var(--navy-2)}
#rs-hdr .nav .sub-menu a:hover,#rs-hdr .nav .sub-menu a[aria-current="page"]{background:var(--ice);color:var(--blue-deep)}
#rs-hdr .nav-search{flex:0 0 auto;width:42px;height:42px;display:grid;place-items:center;border:0;background:none;
  color:var(--navy-2);cursor:pointer;border-radius:50%;padding:0}
#rs-hdr .nav-search:hover{background:var(--ice);color:var(--blue-deep)}
#rs-hdr .nav-search .ic{width:21px;height:21px}
/* 2026-10-14: phone link in the bar, right of Book Online (the page's clinic number, see rs_site_header_phone()). The number
   shows from 1520px, where the bar widens from 1400px to 1520px to make room; below that the icon alone, which
   keeps the menu on one row from 1366px (between 1151px and about 1340px it already wraps, as it did before this).
   Phones: the icon sits beside the burger. */
#rs-hdr .nav-call{flex:0 0 auto;display:inline-flex;align-items:center;gap:9px;color:var(--blue-deep);font-weight:700;
  font-size:14.6px;line-height:1;white-space:nowrap}
#rs-hdr .nav-call-ic{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:var(--ice);
  transition:background .15s ease,color .15s ease}
#rs-hdr .nav-call .ic{width:20px;height:20px}
#rs-hdr .nav-call:hover{color:var(--blue-deep)}
#rs-hdr .nav-call:hover .nav-call-ic{background:var(--blue-deep);color:#fff}
#rs-hdr .nav-call-num{display:none}
@media (min-width:1520px){
  #rs-hdr .topbar-in{max-width:1520px}
  #rs-hdr .nav-call-num{display:inline}
}
@media (min-width:1151px) and (max-width:1439px){
  #rs-hdr .topbar-in{padding-left:16px;padding-right:16px}
}
@media (max-width:1150px){
  #rs-hdr .nav-call{margin-left:auto}
  #rs-hdr .nav-call ~ .burger{margin-left:0}
}
#rs-hdr .burger{display:none;width:46px;height:46px;border:0;background:none;padding:0;cursor:pointer;
  color:var(--navy);border-radius:12px;flex-direction:column;align-items:center;justify-content:center;
  gap:5px;flex:0 0 auto}
#rs-hdr .burger:hover{background:var(--ice)}
#rs-hdr .burger span{display:block;width:23px;height:2.4px;border-radius:2px;background:currentColor}

/* hamburger from 1150px down, at the top right of the bar (the client's preference) */
@media (max-width:1150px){
  #rs-hdr .nav,#rs-hdr .nav-search,#rs-hdr .btn-book{display:none}
  #rs-hdr .burger{display:flex;margin-left:auto}
  body.nav-open #rs-hdr .nav{display:block;position:absolute;left:0;right:0;top:100%;background:#fff;
    border-top:1px solid #e9f1fa;box-shadow:0 22px 40px rgba(9,30,77,.16);padding:8px 12px 14px;
    max-height:calc(100vh - 71px);max-height:calc(100dvh - 71px);overflow-y:auto;overscroll-behavior:contain;z-index:90}
  /* 2026-10-14: the open menu scrolls inside the screen under the sticky bar (was 78vh) */
  body.admin-bar.nav-open #rs-hdr .nav{max-height:calc(100vh - 103px);max-height:calc(100dvh - 103px)}
  body.nav-open #rs-hdr .nav>ul{flex-direction:column;align-items:stretch;gap:0}
  body.nav-open #rs-hdr .nav>ul>li>a{padding:13px 10px;min-height:48px;border-bottom:1px solid #f1f6fc}
  body.nav-open #rs-hdr .nav>ul>li.has-sub>a::after{margin-left:auto;transform:rotate(45deg) translateY(-2px)}
  body.nav-open #rs-hdr .nav .sub-menu{position:static;opacity:1;visibility:visible;transform:none;
    border:0;box-shadow:none;border-radius:0;min-width:0;padding:2px 0 8px 12px;display:none}
  body.nav-open #rs-hdr .nav>ul>li.tap-open>.sub-menu{display:block}
  body.nav-open #rs-hdr .nav .sub-menu a{padding:10px 12px;min-height:44px;display:flex;align-items:center}
}
@media (max-width:820px){
  #rs-hdr .topbar-in{padding:10px 18px;gap:12px}
  #rs-hdr .logo img{height:40px}
  body.nav-open #rs-hdr .nav{max-height:calc(100vh - 67px);max-height:calc(100dvh - 67px)}
  body.admin-bar.nav-open #rs-hdr .nav{max-height:calc(100vh - 113px);max-height:calc(100dvh - 113px)}
}

/* The old WP Responsive Menu bar ("MENU", top left) is replaced by the burger above. The plugin
   still prints its markup and pads <html> by 42px at <=900px; hide both. */
#wprmenu_bar,.wprm-wrapper,.wprm-overlay,#mg-wprm-wrap{display:none!important}
@media (max-width:900px){ html:root{padding-top:0!important} }