/* =====================================================================
   ALX header «التنفيذي العالمي» — utility bar, main bar, search panel, mobile drawer.
   Markup: includes/navbar.blade.php. Behaviour: js/alx-header.js.
   Ported from the temporary ALX HEADER block (Settings > Customization, 28 Oct 2026).
   Selectors keep the `html #navbar` weight so they win over the inline navbar styles.
   Colours: #1B1A4A navy, #292866 logo navy, #C9A86A gold, #E6E7EF border, #5E6080 secondary text.
   ===================================================================== */

/* ---------- Utility bar ---------- */
.alx-util{background:#1B1A4A;color:#fff;font-size:13px;position:relative;z-index:1101;font-family:inherit}
.alx-util .alx-wrap{max-width:1328px;margin:0 auto;padding:0 24px;height:42px;display:flex;align-items:stretch;justify-content:space-between;gap:16px}
.alx-aud{display:flex;gap:26px;align-items:stretch}
.alx-aud a{color:#B9BADB!important;display:flex;align-items:center;text-decoration:none!important;font-weight:500}
.alx-aud a.on{color:#fff!important;font-weight:700;box-shadow:inset 0 -2px 0 #C9A86A}
.alx-util-l{display:flex;align-items:center;gap:22px}
.alx-util-l a{color:#fff!important;text-decoration:none!important;display:flex;align-items:center;gap:7px}
.alx-util-l a.alx-level{color:#C9A86A!important;font-weight:700}
.alx-util svg{width:14px;height:14px;flex-shrink:0}

/* ---------- Main bar ---------- */
html #navbar.faisal-navbar{background:#fff!important;border-bottom:1px solid #E6E7EF;box-shadow:none!important;transition:box-shadow .25s ease}
html #navbar.faisal-navbar::after{display:none}
/* same 1328px content width as the utility bar */
html #navbar .navbar-main-level>.container-fluid{max-width:1376px;padding-left:24px;padding-right:24px}
/* no vertical padding: the bar is exactly 80px, 64px once scrolled or on mobile (the theme's 8–10px padding made it 75/65) */
html #navbar .navbar-wrapper{min-height:80px;padding-top:0!important;padding-bottom:0!important;display:flex;align-items:center;justify-content:flex-start!important;gap:16px}
html #navbar .navbar-menu-desktop{flex:0 1 auto}
html #navbar .brand-link{display:flex;align-items:center;gap:12px;text-decoration:none!important}
html #navbar .brand-link::after{content:"أكاديمية الفيصل\A العالمية";white-space:pre;display:block;border-right:1px solid #E6E7EF;padding-right:12px;font-size:14.5px;font-weight:700;color:#292866;line-height:1.5}
html #navbar .brand-logo{height:48px;width:auto}
html #navbar .nav-links{gap:18px}
html #navbar .nav-links>.nav-item.alx-home{display:none!important}
html #navbar .nav-links>.nav-item>.nav-link{color:#2C2B4F!important;font-size:14px!important;font-weight:500;background:transparent!important;border-radius:0!important;padding:0 2px!important;height:80px!important;display:flex;align-items:center;box-shadow:none;white-space:nowrap}
html #navbar .nav-links>.nav-item>.nav-link::before{display:none!important}
html #navbar .nav-links>.nav-item>.nav-link.active{color:#292866!important;font-weight:700;box-shadow:inset 0 -3px 0 #C9A86A}
html #navbar .nav-links>.nav-item>.nav-link:hover{color:#292866!important;box-shadow:inset 0 -3px 0 #292866}
html #navbar .nav-links .dropdown-menu{border:1px solid #E6E7EF;border-radius:0 0 12px 12px;box-shadow:0 24px 48px rgba(27,26,74,.16)}
/* notch under the middle of the link that opened the menu; --alx-nw is the link width (alx-header.js) */
html #navbar .nav-links>.nav-item>.dropdown-menu::after{left:auto!important;right:calc(var(--alx-nw, 54px) / 2 - 10px)!important}
/* keyboard: open on focus, Esc closes until the pointer/focus leaves */
html #navbar .nav-links>.nav-item.has-dropdown:focus-within>.dropdown-menu{opacity:1!important;visibility:visible!important;transform:none!important;pointer-events:auto!important}
html #navbar .nav-links>.nav-item.has-dropdown.alx-closed>.dropdown-menu{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

/* ---------- Actions ---------- */
.alx-actions{display:flex;align-items:center;gap:8px;margin-inline-start:auto;flex-shrink:0}
.alx-actions+#mobileMenuToggle{margin-inline-start:0!important}
.alx-ic{width:44px;height:44px;border-radius:50%;border:1px solid #E6E7EF;background:#fff;color:#292866;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;flex-shrink:0}
.alx-ic svg{width:18px;height:18px}
.alx-sbtn[aria-expanded="true"]{background:#292866;color:#fff;border-color:#292866}
.alx-actions .cart-btn{width:44px!important;height:44px!important;min-width:0!important;min-height:0!important;border-radius:50%!important;border:1px solid #E6E7EF!important;display:inline-flex!important;align-items:center;justify-content:center;padding:0!important;background:#fff!important;color:#292866!important}
.alx-actions .cart-btn svg,.alx-actions .cart-btn i{margin:0!important}
.alx-actions .ml-md-50,.alx-actions .ml-50{margin:0!important}
.alx-actions .alx-login{color:#292866!important;font-weight:600;font-size:14px;padding:0 4px;white-space:nowrap;min-height:44px;display:inline-flex;align-items:center;text-decoration:none!important}
.alx-actions .navbar-auth-user-dropdown{margin:0!important}
.alx-actions .navbar-auth-user-dropdown .custom-dropdown-body{z-index:1000001!important}
.alx-actions .user-name{display:none!important}
.alx-cta{height:44px;padding:0 20px;border-radius:6px;background:#292866;color:#fff!important;font-size:14.5px;font-weight:700;display:inline-flex;align-items:center;text-decoration:none!important;white-space:nowrap}
.alx-cta:hover{background:#1B1A4A}

/* ---------- Search panel ---------- */
.alx-spanel{border-top:1px solid #ECEDF3;background:#fff;padding:14px 24px;box-shadow:0 18px 30px rgba(27,26,74,.10)}
.alx-spanel[hidden]{display:none}
.alx-spanel:not([hidden]){display:block} /* beats the old .alx-spanel{display:none} still in the customization field until it is cleared */
.alx-spanel form{max-width:720px;margin:0 auto}
.alx-spanel .search-input-wrapper-large{display:flex;align-items:center;background:#fff;border:2px solid #E6E7EF;border-radius:12px;overflow:hidden;height:52px}
.alx-spanel .search-input-wrapper-large:focus-within{border-color:#292866;box-shadow:0 0 0 4px rgba(41,40,102,.1)}
.alx-spanel .search-icon{margin:0 15px;color:#5E6080;flex-shrink:0}
.alx-spanel .search-field-large{flex:1;min-width:0;height:100%;border:0;padding:0 15px;font-size:15px;font-weight:500;color:#1C1B3F;background:transparent;outline:none}
.alx-spanel .search-field-large::placeholder{color:#5E6080;font-weight:400}
.alx-chips{max-width:720px;margin:12px auto 0;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.alx-chips span{font-size:12.5px;color:#5E6080;margin-inline-end:4px}
.alx-chips a{font-size:13px;font-weight:600;color:#292866!important;background:#F3F4F9;border:1px solid #E6E7EF;border-radius:999px;padding:0 14px;min-height:44px;display:inline-flex;align-items:center;text-decoration:none!important;white-space:nowrap}
.alx-chips a:hover{background:#EEEEF7;border-color:#C9CAE0}

/* ---------- Mobile toggle ---------- */
html #mobileMenuToggle{width:44px;height:44px;border-radius:50%;background:#292866!important;border:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;box-shadow:none;position:static!important;margin:0!important;margin-inline-start:auto!important;transform:none!important;flex-shrink:0;transition:none!important}
html #mobileMenuToggle .hamburger-line{background:#fff!important;width:18px;height:2px;margin:0}

/* ---------- Mobile drawer ---------- */
#mobileDrawer{background:#fff!important;scrollbar-width:thin;scrollbar-color:#C9CAE0 transparent}
#mobileDrawer::-webkit-scrollbar{width:4px}
#mobileDrawer::-webkit-scrollbar-thumb{background:#C9CAE0;border-radius:4px}
#mobileDrawer::-webkit-scrollbar-track{background:transparent}
#mobileDrawer .mobile-drawer-header{background:#1B1A4A!important;border:0!important;padding-top:18px;padding-bottom:18px}
#mobileDrawer .mobile-drawer-header .mobile-logo{filter:brightness(0) invert(1)}
#mobileDrawer .mobile-close-btn{background:transparent!important;border:1px solid #4B4A8A!important;color:#fff!important;box-shadow:none!important;min-width:44px;min-height:44px}
#mobileDrawer .mobile-close-btn svg{color:#fff!important;stroke:#fff!important}
#mobileDrawer .mobile-nav-link.active{background:transparent!important;box-shadow:none!important;color:#292866!important;font-weight:700}
#mobileDrawer .mobile-nav-link.active::after{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#C9A86A;margin-inline-start:10px;vertical-align:middle}
/* a parent with a submenu is one button: the word and the chevron both open it */
#mobileDrawer .alx-mparent{width:100%;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;cursor:pointer}
#mobileDrawer .alx-mparent .mobile-dropdown-toggle{pointer-events:none}
.alx-daud{display:flex;gap:4px;background:#F3F4F9;border-radius:10px;padding:4px;margin:12px 16px 4px}
.alx-daud a{flex:1;height:44px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#2C2B4F!important;font-size:13px;text-decoration:none!important}
.alx-daud a.on{background:#fff;color:#292866!important;font-weight:700;box-shadow:0 1px 3px rgba(27,26,74,.14)}
.alx-dfoot{padding:14px 16px 22px;border-top:1px solid #E6E7EF;display:flex;flex-direction:column;gap:10px}
.alx-cta.alx-block{display:flex;justify-content:center;height:50px}
.alx-drow{display:flex;gap:10px}
.alx-drow a{flex:1;height:46px;border-radius:8px;border:1px solid #292866;color:#292866!important;font-weight:700;font-size:13.5px;display:flex;align-items:center;justify-content:center;text-decoration:none!important}
.alx-dnote{margin:4px 16px 0;font-size:12px;color:#5E6080;text-align:center}
body.menu-open .alfac-contact-fab{display:none!important}

/* ---------- Focus ---------- */
:focus-visible{outline:2px solid #292866;outline-offset:2px}
.alx-util :focus-visible,#mobileDrawer .mobile-drawer-header :focus-visible{outline-color:#C9A86A}

/* ---------- Shrink after 60px of scroll (html.alx-scrolled, alx-header.js) ---------- */
html #navbar .navbar-wrapper,html #navbar .brand-logo,html #navbar .nav-links>.nav-item>.nav-link{transition:min-height .25s ease,height .25s ease}
html.alx-scrolled #navbar.faisal-navbar{box-shadow:0 8px 24px rgba(27,26,74,.08)!important}
html.alx-scrolled #navbar .navbar-wrapper{min-height:64px}
html.alx-scrolled #navbar .nav-links>.nav-item>.nav-link{height:64px!important}
html.alx-scrolled #navbar .brand-logo{height:40px}

/* up to 1439px the menu keeps the 16px gap so the longer corporate CTA still fits next to the academy name */
@media (max-width:1439px){
 html #navbar .nav-links{gap:16px}
}
/* ---------- 1200–1359px: tighter menu, no academy name ---------- */
@media (max-width:1359px){
 html #navbar .nav-links{gap:16px}
 html #navbar .nav-links>.nav-item>.nav-link{font-size:13.5px!important}
 html #navbar .brand-link::after{display:none}
 .alx-cta{padding:0 18px}
}

/* ---------- Below 1200px: mobile bar + drawer ---------- */
@media (max-width:1199px){
 .alx-util .alx-wrap{height:36px;padding:0 14px}
 .alx-aud{display:none}
 .alx-util-l{width:100%;justify-content:space-between;gap:12px}
 html #navbar .navbar-wrapper{min-height:64px;gap:8px}
 html #navbar .navbar-menu-desktop{display:none!important}
 html #navbar .brand-logo{height:40px}
 html #navbar .brand-link::after{display:block;font-size:13.5px}
 .alx-actions{gap:4px}
 .alx-actions>:not(.dropdown):not(.alx-ic){display:none!important}
 html #mobileMenuToggle{display:inline-flex!important}
 .alx-spanel{padding:10px 14px}
 html #navbar .navbar-main-level>.container-fluid{padding-left:14px;padding-right:14px}
}
/* below 360px the logo, three buttons and the two-line name do not fit; the logo stays */
@media (max-width:359px){
 html #navbar .brand-link::after{display:none}
}
@media (min-width:1200px){
 #mobileDrawer,#mobileOverlay{display:none!important}
}

/* ---------- «البرامج» mega menu (includes/alx_mega_menu.blade.php), desktop only ---------- */
/* positioned against the sticky #navbar so it spans the full width under the bar */
html #navbar .navbar-main-level,html #navbar .navbar-main-level>.container-fluid,html #navbar .navbar-wrapper,html #navbar .navbar-menu-desktop,html #navbar .nav-links,html #navbar .nav-links>.alx-has-mega{position:static!important}
.alx-mega{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border-top:1px solid #E6E7EF;box-shadow:0 30px 60px rgba(27,26,74,.25);z-index:1000000;max-height:calc(100vh - 140px);overflow-y:auto;text-align:right}
html #navbar .alx-has-mega:hover>.alx-mega,html #navbar .alx-has-mega:focus-within>.alx-mega{display:block}
html #navbar .alx-has-mega.alx-closed>.alx-mega{display:none}
.alx-mega-grid{max-width:1328px;margin:0 auto;padding:28px 24px;display:grid;grid-template-columns:270px minmax(0,1fr) 280px;column-gap:40px;row-gap:4px;align-items:start;position:relative}
.alx-mega-grid::before{content:"";grid-column:1;grid-row:1 / span 7;align-self:stretch;background:#F6F6FA;border-radius:10px;margin:-12px}
.alx-mega-label{grid-column:1;grid-row:1;margin:0;padding:4px 12px 8px;font-size:12px;font-weight:700;color:#5E6080}
.alx-mega-goal{grid-column:1;position:relative;min-height:48px;padding:0 12px;border-radius:8px;display:flex;align-items:center;color:#2C2B4F!important;font-size:14px;font-weight:500;text-decoration:none!important}
.alx-mega-goal:hover,.alx-mega-goal.on{background:#fff;color:#292866!important;font-weight:700;box-shadow:0 1px 4px rgba(27,26,74,.12)}
.alx-mega-goal.on::after{content:"";margin-inline-start:auto;width:7px;height:7px;border-top:2px solid currentColor;border-left:2px solid currentColor;transform:rotate(-45deg)}
.alx-mega-panel{grid-column:2;grid-row:1 / span 7;display:flex;flex-direction:column;gap:16px;min-width:0}
.alx-mega-panel[hidden]{display:none}
.alx-mega-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:1px solid #ECEDF3}
.alx-mega-title{margin:0;font-size:21px;font-weight:700;color:#1C1B3F}
.alx-mega-all{font-size:13.5px;font-weight:700;color:#292866!important;white-space:nowrap}
.alx-mega-programs{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}
.alx-mega-programs a{display:flex;flex-direction:column;gap:6px;padding:12px 0;border-bottom:1px solid #F0F0F5;text-decoration:none!important}
.alx-mega-pname{font-size:15px;font-weight:700;color:#1C1B3F;line-height:1.6}
.alx-mega-programs a:hover .alx-mega-pname{color:#292866;text-decoration:underline}
.alx-mega-tags{display:flex;flex-wrap:wrap;gap:6px}
.alx-mega-tags span{padding:2px 10px;border-radius:4px;background:#EEEEF7;color:#292866;font-size:11.5px;font-weight:600}
.alx-mega-level{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-radius:10px;border:1px dashed #C9CAE0;text-decoration:none!important}
.alx-mega-level strong{display:block;font-size:15px;color:#292866}
.alx-mega-level small{display:block;font-size:13px;color:#5E6080;margin-top:2px}
.alx-mega-level-btn{flex-shrink:0;min-height:40px;padding:0 18px;border-radius:6px;border:1px solid #292866;color:#292866;font-size:13.5px;font-weight:700;display:flex;align-items:center}
.alx-mega-promo{grid-column:3;grid-row:1 / span 7;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.alx-mega-promo img{width:100%;height:160px;object-fit:cover;border-radius:10px}
.alx-mega-badge{padding:3px 10px;border-radius:4px;background:#C9A86A;color:#1B1A4A;font-size:11.5px;font-weight:700}
.alx-mega-promo-title{margin:0;font-size:18px;font-weight:700;line-height:1.6;color:#1C1B3F}
.alx-mega-promo-text{margin:0;font-size:13px;line-height:1.8;color:#5E6080}
.alx-mega-promo a{font-size:13.5px;font-weight:700;color:#292866!important}
.alx-mega-help{background:#F6F6FA;border-top:1px solid #ECEDF3}
.alx-mega-help{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:none;padding:0 max(24px,calc((100% - 1328px) / 2 + 24px));min-height:56px;font-size:13.5px;color:#2C2B4F}
.alx-mega-help-links{display:flex;gap:22px}
.alx-mega-help-links a{font-weight:700;color:#292866!important;min-height:44px;display:inline-flex;align-items:center}
@media (max-width:1359px){
 .alx-mega-grid{grid-template-columns:240px minmax(0,1fr) 220px;column-gap:28px}
}

/* ---------- Goals as tiles in the mobile drawer ---------- */
.alx-dgoals{padding:10px 16px 6px}
.alx-dgoals p{margin:0 0 8px;font-size:12px;font-weight:700;color:#5E6080}
.alx-dgoals div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.alx-dgoals a{min-height:56px;padding:8px 12px;border-radius:10px;background:#F3F4F9;border:1px solid #E6E7EF;display:flex;align-items:center;color:#292866!important;font-size:13px;font-weight:700;line-height:1.5;text-decoration:none!important}
