/* ==========================================================================
   Shared site header  -  markup: inline in zakat-religious-giving.html   script: assets/js/site-header.js
   Single source of truth for zakat-religious-giving and /endowments/.
   Self-contained: colours live in the variables below, nothing else is required
   except Font Awesome (caret icons) and the page font (Poppins).
   ========================================================================== */
.headerAllWrap{
  --hh-primary:#622665;
  --hh-primary-15:rgba(94,37,104,.15);
  --hh-gold:#f8b517;
  --hh-gold-soft:#ebc167;
  --hh-cream:#fffbf3;
  --hh-text:#1b1b1b;
  --hh-divider:rgba(0,0,0,.08);
  --hh-shadow-bar:0 4px 28px rgba(0,0,0,.12);
  --hh-shadow-menu:0 14px 30px rgba(94,37,104,.22);
  font-family:'Poppins',sans-serif;
}
.headerAllWrap *,.headerAllWrap *::before,.headerAllWrap *::after{box-sizing:border-box;}
.headerAllWrap ul{margin:0;padding:0;list-style:none;}
.headerAllWrap a{text-decoration:none;}
.headerAllWrap a:focus-visible,.headerAllWrap .menu-Bar:focus-visible{outline:2px solid var(--hh-primary);outline-offset:2px;}

/* ---------- Desktop bar ---------- */
.headerAllWrap .desktop-menu{position:relative;z-index:6;padding:14px 0;background:#fff;box-shadow:var(--hh-shadow-bar);transition:opacity .3s ease,transform .3s ease,top .3s ease;}
.headerAllWrap .desktop-menu>.container{width:calc(100% - 48px);max-width:1440px;}
.headerAllWrap .NavDeskwrap{display:flex;align-items:center;justify-content:space-between;gap:clamp(20px,3vw,48px);}
.headerAllWrap .mainlogo{flex:0 0 auto;width:clamp(150px,14vw,200px);max-width:200px;}
.headerAllWrap .mainlogo a{display:block;line-height:0;}
.headerAllWrap .mainlogo img{display:block;width:100%;height:auto;}

.headerAllWrap .desktop-menu ul.menu{display:flex;flex:1;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:clamp(6px,1.3vw,24px);}
.headerAllWrap .menu>li{position:relative;display:flex;align-items:center;}
.headerAllWrap .menu>li>a{position:relative;display:flex;align-items:center;gap:6px;padding:12px 2px;font-size:clamp(13px,1.05vw,15px);font-weight:600;line-height:1.2;letter-spacing:.005em;white-space:nowrap;color:inherit;transition:color .2s ease;}
.headerAllWrap .menu>li>a i{font-size:12px;transition:transform .25s ease;}
.headerAllWrap .menu>li.dropdown:hover>a i,.headerAllWrap .menu>li.dropdown.is-open>a i{transform:rotate(180deg);}

/* underline indicator */
.headerAllWrap .menu>li:not(.giveNow):not(.giving-home-nav-item)>a::before{content:"";position:absolute;left:2px;right:2px;bottom:4px;height:2px;border-radius:2px;background:var(--hh-primary);transform:scaleX(0);transform-origin:left center;transition:transform .3s ease;}
.headerAllWrap .menu>li:not(.giveNow):not(.giving-home-nav-item):hover>a::before,
.headerAllWrap .menu>li.active>a::before,
.headerAllWrap .menu>li.current>a::before,
.headerAllWrap .menu>li.is-open>a::before{transform:scaleX(1);}
.headerAllWrap .menu>li.active>a,.headerAllWrap .menu>li.current>a{color:var(--hh-primary);}

/* Giving Home (back link) */
.headerAllWrap .giving-home-nav-link{display:flex;align-items:center;gap:8px;white-space:nowrap;}
.headerAllWrap .giving-home-nav-link>span{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;padding:0;line-height:0;color:var(--hh-primary);background:var(--hh-primary-15);border:1px solid var(--hh-primary-15);border-radius:50%;transition:background-color .2s ease,color .2s ease,transform .2s ease;}
.headerAllWrap .giving-home-nav-link>span svg{display:block;}
.headerAllWrap .giving-home-nav-link:hover>span,.headerAllWrap .giving-home-nav-link:focus-visible>span{color:#fff;background:var(--hh-primary);border-color:var(--hh-primary);transform:translateX(-2px);}
.headerAllWrap .giving-home-label{font-style:normal;}
.headerAllWrap .menu>li.giving-home-nav-item{padding-right:clamp(6px,1vw,14px);border-right:1px solid var(--hh-divider);}

/* GIVE NOW */
.headerAllWrap .menu>li.giveNow{margin-left:4px;}
.headerAllWrap .menu>li.giveNow>a{justify-content:center;gap:8px;padding:11px 20px;color:var(--hh-primary);background:var(--hh-gold);font-weight:600;letter-spacing:.02em;text-transform:uppercase;line-height:1;transition:background-color .2s ease;}
.headerAllWrap .menu>li.giveNow:hover>a,.headerAllWrap .menu>li.giveNow.is-open>a{background:#ffc93d;}

/* ---------- Dropdowns ---------- */
.headerAllWrap .dropdown-list{position:absolute;top:100%;left:0;z-index:9;width:max-content;min-width:240px;max-width:320px;padding:6px 0;background:#fff;border:1px solid var(--hh-primary-15);box-shadow:var(--hh-shadow-menu);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .2s ease,transform .2s ease,visibility .2s ease;}
.headerAllWrap li.dropdown:hover>.dropdown-list,
.headerAllWrap li.dropdown:focus-within>.dropdown-list,
.headerAllWrap li.dropdown.is-open>.dropdown-list{opacity:1;visibility:visible;transform:none;}
.headerAllWrap .giveNow>.dropdown-list{left:auto;right:0;min-width:100%;}
.headerAllWrap .dropdown-list li{position:relative;}
.headerAllWrap .dropdown-list li+li{border-top:1px solid var(--hh-divider);}
.headerAllWrap .dropdown-list li a{position:relative;display:block;padding:11px 18px;font-size:14px;font-weight:500;line-height:1.4;color:var(--hh-primary);white-space:normal;transition:background-color .2s ease;}
.headerAllWrap .dropdown-list li a::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--hh-primary);opacity:0;transition:opacity .2s ease;}
.headerAllWrap .dropdown-list li a:hover,.headerAllWrap .dropdown-list li a:focus-visible,.headerAllWrap .dropdown-list li a.active{background:var(--hh-primary-15);}
.headerAllWrap .dropdown-list li a:hover::before,.headerAllWrap .dropdown-list li a:focus-visible::before,.headerAllWrap .dropdown-list li a.active::before{opacity:1;}
.headerAllWrap .dropdown-list li a.active{font-weight:600;}
.headerAllWrap .giveNow .dropdown-list li a{white-space:nowrap;}

/* Endowments flyout */
.headerAllWrap .endowments-flyout>a{display:flex;align-items:center;justify-content:space-between;gap:14px;}
.headerAllWrap .endowments-flyout>a i{font-size:12px;}
.headerAllWrap .endowments-flyout-list{position:absolute;top:-7px;left:calc(100% - 1px);width:max-content;min-width:200px;max-width:250px;padding:6px 0;background:#fff;border:1px solid var(--hh-primary-15);box-shadow:var(--hh-shadow-menu);opacity:0;visibility:hidden;transform:translateX(-8px);transition:opacity .2s ease,transform .2s ease,visibility .2s ease;}
.headerAllWrap .endowments-flyout:hover>.endowments-flyout-list,
.headerAllWrap .endowments-flyout:focus-within>.endowments-flyout-list{opacity:1;visibility:visible;transform:none;}
.headerAllWrap .hh-br{display:none;}

/* ---------- Sticky state ---------- */
.headerAllWrap .fixedHeader{position:fixed;top:0;left:0;z-index:6;width:100%;padding:7px 0;background:var(--hh-cream);border-bottom:1px solid var(--hh-gold-soft);box-shadow:none;animation:hhFadeInDown .5s ease both;}
.headerAllWrap .mobileNavigation.fixedHeader{box-shadow:0 6px 22px rgba(94,37,104,.3);}
@keyframes hhFadeInDown{from{opacity:0;transform:translateY(-100%);}to{opacity:1;transform:none;}}

/* ---------- Mobile bar + sidebar ---------- */
.headerAllWrap .mobileNavigation{display:none;position:relative;z-index:99;padding:10px 0;background:#fff;box-shadow:var(--hh-shadow-bar);}
.headerAllWrap .mobileWrap{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.headerAllWrap .mobileWrap .mainlogo{width:clamp(130px,42vw,180px);}

.headerAllWrap .menu-Bar{position:relative;z-index:22;flex:0 0 30px;display:block;width:30px;height:25px;padding:0;margin:0;border:0;background:none;cursor:pointer;}
.headerAllWrap .menu-Bar span{position:absolute;left:0;display:block;width:30px;height:3px;border-radius:100px;background:var(--hh-primary);transition:.4s all;}
.headerAllWrap .menu-Bar span:nth-child(1){top:0;}
.headerAllWrap .menu-Bar span:nth-child(2){top:11px;transform-origin:left;}
.headerAllWrap .menu-Bar span:nth-child(3){top:22px;}
.headerAllWrap .menu-Bar.open span:nth-child(1){top:11px;transform:rotate(45deg);}
.headerAllWrap .menu-Bar.open span:nth-child(2){width:0;opacity:0;}
.headerAllWrap .menu-Bar.open span:nth-child(3){top:11px;transform:rotate(-45deg);}

.headerAllWrap #sidebar{position:fixed;top:0;left:0;z-index:5;display:none;width:100%;max-height:100vh;max-height:100dvh;padding:68px 0 24px;overflow-y:auto;overscroll-behavior:contain;background:var(--hh-primary);transform:translateY(-105%);visibility:hidden;transition:transform .45s cubic-bezier(.65,.05,.36,1),visibility 0s linear .45s;}
.headerAllWrap #sidebar.opensidebar{transform:none;visibility:visible;transition:transform .45s cubic-bezier(.65,.05,.36,1),visibility 0s;}
.headerAllWrap .accordionmenu{padding:10px 0;}
.headerAllWrap .accordionmenu li{position:relative;}
.headerAllWrap .accordionmenu a,.headerAllWrap .accordionmenu .link{position:relative;display:block;padding:13px 40px 13px 0;font-size:15px;font-weight:500;line-height:1.35;color:#fff;border-bottom:1px solid rgba(255,255,255,.22);cursor:pointer;transition:background-color .2s ease,color .2s ease;}
.headerAllWrap .accordionmenu a.active{color:var(--hh-gold);}
.headerAllWrap .accordionmenu li:last-child>.link{border-bottom:0;}
.headerAllWrap .accordionmenu .link i{position:absolute;top:50%;right:8px;font-size:13px;color:#fff;transform:translateY(-50%);transition:transform .3s ease;}
.headerAllWrap .accordionmenu li.open>.link i{transform:translateY(-50%) rotate(180deg);}
.headerAllWrap .sidebar_submenu{display:none;background:rgba(255,255,255,.1);}
.headerAllWrap .sidebar_submenu a{padding:12px 20px 12px 22px;font-size:14px;font-weight:400;}
.headerAllWrap .sidebar_submenu a:hover{background:rgba(255,255,255,.12);}
.headerAllWrap .mobile-endowments-group details summary{position:relative;padding:12px 40px 12px 22px;font-size:14px;color:#fff;cursor:pointer;list-style:none;border-bottom:1px solid rgba(255,255,255,.22);}
.headerAllWrap .mobile-endowments-group details summary::-webkit-details-marker{display:none;}
.headerAllWrap .mobile-endowments-group details summary.active{color:var(--hh-gold);}
/* round chip + drawn chevron: points down when closed, up when open */
.headerAllWrap .mobile-endowments-group details summary::after{content:"";position:absolute;right:14px;top:50%;width:26px;height:26px;margin-top:-13px;border:1px solid rgba(255,255,255,.35);border-radius:50%;background:rgba(255,255,255,.08);transition:background-color .25s ease,border-color .25s ease;}
.headerAllWrap .mobile-endowments-group details summary::before{content:"";position:absolute;right:23.5px;top:50%;width:7px;height:7px;margin-top:-5px;border-right:2px solid var(--hh-gold);border-bottom:2px solid var(--hh-gold);transform:rotate(45deg);transition:transform .25s ease,margin-top .25s ease;z-index:1;}
.headerAllWrap .mobile-endowments-group details[open] summary::before{margin-top:-2px;transform:rotate(-135deg);}
.headerAllWrap .mobile-endowments-group details[open] summary::after,.headerAllWrap .mobile-endowments-group details summary:hover::after{border-color:var(--hh-gold);background:rgba(255,255,255,.14);}
.headerAllWrap .mobile-endowments-group details ul{background:rgba(0,0,0,.14);}
.headerAllWrap .accordionmenu .sidebar_submenu .mobile-endowments-group details li a{padding-left:38px;}
.headerAllWrap .accordionmenu .giving-home-nav-link{display:flex;align-items:center;gap:10px;}
.headerAllWrap .accordionmenu .giving-home-nav-link>span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;color:var(--hh-gold);border:1px solid rgba(255,255,255,.45);border-radius:50%;line-height:0;}

/* page overlay + scroll lock used by the mobile menu */
.overlayBlack.active{position:fixed;top:0;left:0;z-index:1;width:100%;height:100%;overflow-x:hidden;background:rgba(0,0,0,.6);transition:.3s;}
/* page scroll lock while the mobile menu is open (html + body so it holds on every browser) */
body.overflow-y-hidden{overflow:hidden;}
html:has(body.overflow-y-hidden){overflow:hidden;}
.overlayBlack.active{touch-action:none;}

/* ---------- Responsive ---------- */
@media (min-width:992px) and (max-width:1279.98px){
  /* back link becomes icon-only until there is room for its label */
  .headerAllWrap .giving-home-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
  .headerAllWrap .menu>li>a{font-size:13px;}
  .headerAllWrap .menu>li.giveNow>a{padding:10px 14px;}
}
@media (min-width:992px){
  .headerAllWrap .hh-br{display:inline;}
}
@media (max-width:991.98px){
  .headerAllWrap .desktop-menu{display:none;}
  .headerAllWrap .mobileNavigation{display:block;}
  .headerAllWrap #sidebar{display:block;}
}
@media (max-width:575.98px){
  .headerAllWrap #sidebar{padding-top:62px;}
  .headerAllWrap .accordionmenu a,.headerAllWrap .accordionmenu .link{padding-top:12px;padding-bottom:12px;font-size:14.5px;}
  .headerAllWrap .sidebar_submenu a,.headerAllWrap .mobile-endowments-group details summary{font-size:13.5px;}
}
@media (prefers-reduced-motion:reduce){
  .headerAllWrap *{animation:none!important;transition:none!important;}
}
