/* Header in the Spenomatic Group design: dark contact bar, white sticky header, purple pill menu with
   chevron dropdowns and circular action buttons. Ported from spenomatic.net (assets/css/components.css). */

.top-bar{background:var(--brand-black);color:#cbd5e1;font-size:.85rem;padding:.55rem 0;border-bottom:1px solid rgba(255,255,255,.1)}
.top-bar-inner{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.top-bar-info{display:flex;gap:1.75rem;align-items:center}
.top-bar-info a,.top-bar-group a{color:#e2e8f0;display:flex;align-items:center;gap:.35rem}
.top-bar-info a:hover,.top-bar-group a:hover{color:#fff;text-decoration:underline}
.top-bar svg{width:1.15em;height:1.15em;flex:none}
.top-bar-center-locations{color:#cbd5e1}

.header-main{position:sticky;top:0;z-index:10000;background:#fff;border-bottom:1px solid #e2e8f0;box-shadow:0 4px 20px rgba(0,0,0,.04)}
.header-container{display:flex;justify-content:space-between;align-items:center;gap:1rem;height:90px}
.logo-brand{display:flex;align-items:center;flex:none;border-radius:12px}
.logo-brand-img{height:58px;width:auto;object-fit:contain}

/* Purple floating pill bar */
.nav-purple-pill-bar{background:var(--brand-blue);border-radius:50px;padding:.35rem .5rem;box-shadow:0 6px 20px rgba(49,39,92,.2)}
.nav-pill-menu{display:flex;align-items:center;gap:.1rem;list-style:none;margin:0;padding:0}
.nav-pill-item{margin:0}
.nav-profile-item{position:relative}
.nav-profile-trigger{display:flex;align-items:center}
.nav-profile-trigger .nav-pill-link{padding-right:.4rem}
.nav-pill-link{display:inline-block;font-family:var(--font);font-weight:700;font-size:.88rem;color:#fff!important;padding:.6rem 1rem;border-radius:50px;transition:background-color .2s ease,color .2s ease;white-space:nowrap}
.nav-pill-link:hover,.nav-pill-item.active .nav-pill-link{background:#1d1d1b;color:#fff!important;box-shadow:inset 0 2px 4px rgba(0,0,0,.2)}

.nav-profile-toggle{width:27px;height:27px;margin-right:.45rem;display:grid;place-items:center;flex:0 0 auto;color:#fff;background:rgba(255,255,255,.11);border:0;border-radius:50%;cursor:pointer;transition:background-color .2s ease,transform .2s ease}
.nav-profile-toggle span{display:block;font-size:1rem;line-height:1;transform:translateY(-2px);transition:transform .2s ease}
.nav-profile-item:hover .nav-profile-toggle,.nav-profile-item:focus-within .nav-profile-toggle,.nav-profile-item.submenu-open .nav-profile-toggle{background:var(--brand-red)}
.nav-profile-item.submenu-open .nav-profile-toggle span{transform:translateY(2px) rotate(180deg)}

.profile-submenu{position:absolute;z-index:10020;top:calc(100% + 14px);left:50%;width:min(340px,92vw);padding:.75rem;display:grid;grid-template-columns:1fr;gap:.25rem;list-style:none;background:#fff;border:1px solid rgba(57,42,130,.12);border-radius:16px;box-shadow:0 22px 55px rgba(30,27,75,.22);opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,-8px);transition:opacity .2s ease,visibility .2s ease,transform .2s ease}
.profile-submenu::before{content:"";position:absolute;left:0;right:0;top:-15px;height:15px}
.profile-submenu::after{content:"";position:absolute;top:-7px;left:50%;width:14px;height:14px;background:#fff;border-left:1px solid rgba(57,42,130,.12);border-top:1px solid rgba(57,42,130,.12);transform:translateX(-50%) rotate(45deg)}
.nav-profile-item:hover .profile-submenu,.nav-profile-item:focus-within .profile-submenu,.nav-profile-item.submenu-open .profile-submenu{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0)}
.profile-submenu li{position:relative;z-index:1}
.profile-submenu-link{min-height:44px;padding:.7rem .8rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;color:var(--brand-blue)!important;border-radius:9px;font-family:var(--font);font-size:.9rem;font-weight:700}
.profile-submenu-link b{color:var(--brand-red);transition:transform .2s ease}
.profile-submenu-link:hover,.profile-submenu-link:focus,.profile-submenu-link.active{color:var(--brand-blue)!important;background:#f1f3f9}
.profile-submenu-link:hover b,.profile-submenu-link:focus b{transform:translateX(3px)}

/* Circular action buttons */
.header-actions{display:flex;align-items:center;gap:.75rem;flex:none}
.search-btn-circle{background:var(--brand-blue);color:#fff!important;width:44px;height:44px;border:0;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s ease,transform .2s ease;box-shadow:0 4px 12px rgba(49,39,92,.2)}
.search-btn-circle:hover{background:var(--brand-red);transform:scale(1.05)}
.search-btn-circle svg{width:1.2em;height:1.2em}
.theme-toggle .i-sun{display:none}
html[data-theme="dark"] .theme-toggle .i-sun{display:block}
html[data-theme="dark"] .theme-toggle .i-moon{display:none}
.mobile-nav-toggle{display:none;background:var(--brand-blue);color:#fff;border:0;width:44px;height:44px;border-radius:50%;cursor:pointer;align-items:center;justify-content:center;font-size:1.4rem;line-height:1;transition:background-color .2s ease}
.mobile-nav-toggle:hover{background:var(--brand-red)}

/* Collapse to the full-screen purple menu when the pill bar no longer fits */
@media(max-width:1120px){
  .top-bar-center-locations{display:none}
  .top-bar-text{display:none}
  .top-bar-info{gap:.65rem}
  .top-bar-info a,.top-bar-group a{background:rgba(255,255,255,.12);width:32px;height:32px;justify-content:center;padding:0;border-radius:50px}
  .top-bar-group{display:none}
  .header-container{height:70px}
  .logo-brand-img{height:42px}
  .mobile-nav-toggle{display:flex}
  .nav-purple-pill-bar{display:none;position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;padding:calc(var(--hh,70px) + var(--tb,0px) + 1.5rem) 1.5rem 2.5rem;border-radius:0;box-shadow:0 10px 30px rgba(0,0,0,.5);z-index:9999;overflow-y:auto;box-sizing:border-box}
  .nav-purple-pill-bar.active{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
  .header-main{z-index:10000}
  .header-container{position:relative;z-index:10001}
  .nav-pill-menu{flex-direction:column;align-items:center;width:100%;gap:1rem}
  .nav-pill-item{width:100%;display:flex;flex-direction:column;align-items:center}
  .nav-pill-link{display:block;text-align:center;padding:1rem 2rem;font-size:1.2rem;width:100%;max-width:320px;border-radius:50px}
  .nav-profile-trigger{width:100%;max-width:320px;justify-content:center;position:relative}
  .nav-profile-trigger .nav-pill-link{padding-left:2.5rem;padding-right:2.5rem}
  .nav-profile-toggle{position:absolute;right:.75rem;width:38px;height:38px;margin:0;background:rgba(255,255,255,.12)}
  .profile-submenu,.nav-profile-item:hover .profile-submenu,.nav-profile-item:focus-within .profile-submenu{position:static;width:100%;max-width:360px;margin-top:.65rem;padding:.65rem;display:none;background:rgba(19,14,48,.48);border-color:rgba(255,255,255,.12);border-radius:14px;box-shadow:none;opacity:1;visibility:visible;pointer-events:auto;transform:none}
  .nav-profile-item.submenu-open .profile-submenu{display:grid}
  .profile-submenu::before,.profile-submenu::after{display:none}
  .profile-submenu-link{min-height:46px;padding:.65rem .8rem;color:#fff!important;background:rgba(255,255,255,.06);font-size:.95rem}
  .profile-submenu-link:hover,.profile-submenu-link:focus,.profile-submenu-link.active{color:#fff!important;background:rgba(227,6,19,.95)}
  body.nav-open{overflow:hidden}
}
@media(max-width:620px){.top-bar-inner{justify-content:center}}

.header-cta{white-space:nowrap}
@media(max-width:1120px){.header-cta{display:none}}

/* keep the logo and the menu button above the full-screen menu so it can be closed */
@media(max-width:1120px){
  .logo-brand,.header-actions{position:relative;z-index:10002}
  body.nav-open .logo-brand{background:#fff;padding:4px 10px}
}

/* Search popup and results */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.search-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:flex-start;justify-content:center;padding:12vh 16px 16px;background:rgba(15,23,42,.62);backdrop-filter:blur(3px);overflow-y:auto}
.search-modal[hidden]{display:none}
.search-modal-card{width:100%;max-width:720px;background:#fff;border-radius:20px;padding:20px;box-shadow:0 30px 70px rgba(15,23,42,.35)}
.search-modal-form{display:flex;align-items:center;gap:10px}
.search-modal-form input{flex:1;min-width:0;font:inherit;padding:13px 18px;border-radius:999px;border:2px solid #e2e8f0;background:#f8fafc;color:#15142e}
.search-modal-close{background:#f1f5f9;border:0;width:42px;height:42px;flex:none;border-radius:50%;font-size:22px;line-height:1;cursor:pointer;color:#15142e}
.search-modal-close:hover{background:var(--brand-red,#d4141c);color:#fff}
.search-modal-hint{margin:12px 4px 0;font-size:13px;color:#64748b}
body.search-open{overflow:hidden}
html[data-theme="dark"] .search-modal-card{background:#1b1a33}
html[data-theme="dark"] .search-modal-form input{background:#12112a;border-color:#2e2d52;color:#f2f2fa}
html[data-theme="dark"] .search-modal-close{background:#2a2950;color:#f2f2fa}
html[data-theme="dark"] .search-modal-hint{color:#a5a6c4}
@media (max-width:620px){.search-modal-form{flex-wrap:wrap}.search-modal-form input{flex:1 1 100%}.search-modal-form .btn{flex:1}}
.search-group{margin:0 0 32px}
.search-group h2{font-size:22px;margin:0 0 12px}
.search-results{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.search-results li{padding:16px 18px;border:1px solid var(--line,#e6e6f0);border-radius:14px;background:var(--white,#fff)}
.search-results h3{font-size:18px;margin:0 0 4px}
.search-results a{text-decoration:none}
.search-results p{margin:0;font-size:15px}
.search-results .search-kind{display:inline-block;margin-bottom:6px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--brand-red,#d4141c)}
html[data-theme="dark"] .search-results li{background:#1b1a33;border-color:#2e2d52}
