/* ============================================================
   ALRAHEELY — Premium Header
   Dark Navy · Gold Accent · RTL · Cairo
   BEM-like: .sh = site header
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Core palette */
  --sh-navy:        #0b1f33;
  --sh-navy-deep:   #071524;
  --sh-navy-mid:    #0f2640;
  --sh-gold:        #c9a24d;
  --sh-gold-bright: #ddb96a;
  --sh-gold-dim:    rgba(201,162,77,.12);
  --sh-gold-glow:   rgba(201,162,77,.22);
  --sh-gold-line:   rgba(201,162,77,.30);

  /* Text on dark */
  --sh-white:       #ffffff;
  --sh-white-90:    rgba(255,255,255,.90);
  --sh-white-70:    rgba(255,255,255,.70);
  --sh-white-40:    rgba(255,255,255,.40);
  --sh-white-10:    rgba(255,255,255,.10);
  --sh-white-06:    rgba(255,255,255,.06);

  /* Green WA */
  --sh-wa:          #25d366;
  --sh-wa-dim:      rgba(37,211,102,.14);
  --sh-wa-line:     rgba(37,211,102,.35);

  /* Structure */
  --sh-r:           10px;
  --sh-r-sm:        8px;
  --sh-h:           76px;          /* header height desktop */
  --sh-h-mob:       62px;          /* header height mobile  */
  --header-offset:  76px;
  --sh-font:        "Cairo", system-ui, -apple-system, sans-serif;
  --sh-transition:  .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--sh-font); margin: 0; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  padding: 10px 18px;
  border-radius: var(--sh-r);
  background: var(--sh-gold);
  color: var(--sh-navy-deep);
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
  z-index: 10000;
  transform: translateY(-200%);
  transition: transform .2s;
  white-space: nowrap;
}
.skip-link:focus { transform: translateY(0); }

/* ============================================================
   HEADER SHELL
   ============================================================ */
.sh {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--sh-navy-deep);
  /* Subtle inner glow from below */
  box-shadow: 0 1px 0 var(--sh-white-06), inset 0 -1px 0 var(--sh-white-06);
  transition: box-shadow var(--sh-transition), background var(--sh-transition);
  will-change: box-shadow;
}

.sh.is-scrolled {
  background: rgba(7,21,36,.97);
  box-shadow:
    0 1px 0 var(--sh-white-06),
    0 8px 32px rgba(0,0,0,.40),
    0 2px 8px rgba(0,0,0,.25);
}

/* Gold top line */
.sh__accent {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--sh-gold) 25%,
    var(--sh-gold-bright) 50%,
    var(--sh-gold) 75%,
    transparent 100%
  );
  opacity: .75;
}

/* ── Inner bar ─────────────────────────────────────────────── */
.sh__inner {
  height: var(--sh-h);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: height var(--sh-transition);
}
.sh.is-scrolled .sh__inner {
  height: calc(var(--sh-h) - 8px);
}

/* ============================================================
   BRAND / LOGO
   ============================================================ */
.sh__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  /* contain img naturally */
  line-height: 0;
  outline-offset: 4px;
}
.sh__brand img {
  width: 170px;
  height: 54px;
  max-width: 200px;
  object-fit: cover;
  display: block;
  transition: opacity var(--sh-transition);
}
.sh__brand:hover img { opacity: .88; }

/* ============================================================
   DESKTOP NAV
   ============================================================ */
.sh__nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* wp_nav_menu outputs <ul class="sh-nav"> */
.sh-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sh-nav > li { position: relative; }

/* Nav link base */
.sh-nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  color: var(--sh-white-70);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: var(--sh-r-sm);
  white-space: nowrap;
  transition: color var(--sh-transition), background var(--sh-transition);
  position: relative;
}

/* Hover */
.sh-nav > li > a:hover {
  color: var(--sh-gold);
  background: var(--sh-gold-dim);
}

/* Active current page */
.sh-nav > li.current-menu-item > a,
.sh-nav > li.current-page-ancestor > a,
.sh-nav > li.current-menu-ancestor > a {
  color: var(--sh-gold);
}
.sh-nav > li.current-menu-item > a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  inset-inline-start: 13px;
  inset-inline-end: 13px;
  height: 2px;
  border-radius: 99px;
  background: var(--sh-gold);
}

/* Dropdown trigger arrow */
.sh-nav > li.nav__item--dropdown > a.nav__link--btn::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .5;
  transition: transform var(--sh-transition), opacity var(--sh-transition);
  flex-shrink: 0;
  margin-inline-start: 1px;
}
.sh-nav > li.nav__item--dropdown.is-open > a.nav__link--btn::after {
  transform: rotate(-135deg) translateY(2px);
  opacity: .9;
}

/* ── Dropdown panel ────────────────────────────────────────── */
.dropdown {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  min-width: 210px;
  background: var(--sh-navy-deep);
  border: 1px solid var(--sh-white-10);
  border-top: 2px solid var(--sh-gold);
  border-radius: 0 0 14px 14px;
  padding: 6px;
  box-shadow:
    0 24px 64px rgba(0,0,0,.50),
    0 4px 16px rgba(0,0,0,.30);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  pointer-events: none;
  z-index: 100;
}

.nav__item--dropdown.is-open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown items */
.dropdown > li { list-style: none; }
.dropdown > li + li { border-top: 1px solid var(--sh-white-06); }

.dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--sh-r-sm);
  text-decoration: none;
  color: var(--sh-white-70);
  font-size: .875rem;
  font-weight: 700;
  transition: background .15s, color .15s;
}
.dropdown a:hover {
  background: var(--sh-gold-dim);
  color: var(--sh-gold);
}
.dropdown .current-menu-item > a {
  color: var(--sh-gold);
  background: var(--sh-gold-dim);
}
/* Hide depth-2 */
.dropdown .sub-menu { display: none; }

/* ============================================================
   HEADER CTAs
   ============================================================ */
.sh__ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sh-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: var(--sh-r);
  font-family: var(--sh-font);
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform var(--sh-transition),
    box-shadow var(--sh-transition),
    background var(--sh-transition),
    color var(--sh-transition),
    border-color var(--sh-transition);
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.sh-cta:hover  { transform: translateY(-1px); }
.sh-cta:active { transform: none; }

.sh-cta__icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* WhatsApp */
.sh-cta--wa {
  background: var(--sh-wa-dim);
  border-color: var(--sh-wa-line);
  color: var(--sh-wa);
}
.sh-cta--wa:hover {
  background: rgba(37,211,102,.22);
  border-color: rgba(37,211,102,.6);
  color: #4de88a;
  box-shadow: 0 4px 20px rgba(37,211,102,.20);
}

/* Call — Gold solid */
.sh-cta--call {
  background: var(--sh-gold);
  border-color: var(--sh-gold);
  color: var(--sh-navy-deep);
  font-weight: 900;
  box-shadow: 0 4px 18px var(--sh-gold-glow);
}
.sh-cta--call:hover {
  background: var(--sh-gold-bright);
  border-color: var(--sh-gold-bright);
  box-shadow: 0 6px 26px rgba(201,162,77,.42);
}

/* Block modifier */
.sh-cta--block {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   BURGER BUTTON
   ============================================================ */
.sh__burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--sh-r-sm);
  border: 1.5px solid var(--sh-white-10);
  background: var(--sh-white-06);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: background var(--sh-transition), border-color var(--sh-transition);
  flex-shrink: 0;
  /* Push burger to visual left in RTL */
  margin-inline-end: auto;
}
.sh__burger:hover {
  background: var(--sh-gold-dim);
  border-color: var(--sh-gold-line);
}

.sh__burger-bar {
  display: block;
  height: 2px;
  background: var(--sh-white-70);
  border-radius: 99px;
  transition: width var(--sh-transition), background var(--sh-transition);
}
.sh__burger-bar:nth-child(1) { width: 20px; }
.sh__burger-bar:nth-child(2) { width: 13px; }
.sh__burger-bar:nth-child(3) { width: 20px; }
.sh__burger:hover .sh__burger-bar { background: var(--sh-gold); }
.sh__burger:hover .sh__burger-bar:nth-child(2) { width: 20px; }

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.sh-drawer {
  position: fixed;
  inset: 0;
  z-index: 990;
  pointer-events: none;
  visibility: hidden;
}
.sh-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* Backdrop */
.sh-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4,11,20,.70);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .28s ease;
}
.sh-drawer.is-open .sh-drawer__backdrop {
  opacity: 1;
}

/* Panel */
.sh-drawer__panel {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  bottom: 0;
  width: min(360px, 88vw);
  background: var(--sh-navy-deep);
  border-inline-start: 1px solid var(--sh-white-10);
  display: flex;
  flex-direction: column;
  transform: translateX(30px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .28s;
  overflow: hidden;
}
.sh-drawer.is-open .sh-drawer__panel {
  transform: translateX(0);
  opacity: 1;
}

/* Gold line at panel top */
.sh-drawer__top-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sh-gold), transparent);
  opacity: .65;
  flex-shrink: 0;
}

/* Drawer head */
.sh-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--sh-white-06);
  background: var(--sh-navy-mid);
  flex-shrink: 0;
}

.sh-drawer__close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--sh-white-10);
  background: var(--sh-white-06);
  color: var(--sh-white-40);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--sh-transition), color var(--sh-transition), border-color var(--sh-transition);
  flex-shrink: 0;
}
.sh-drawer__close svg { width: 15px; height: 15px; }
.sh-drawer__close:hover {
  background: var(--sh-gold-dim);
  color: var(--sh-gold);
  border-color: var(--sh-gold-line);
}

/* Drawer body */
.sh-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--sh-gold-line) transparent;
}
.sh-drawer__body::-webkit-scrollbar { width: 3px; }
.sh-drawer__body::-webkit-scrollbar-thumb {
  background: var(--sh-gold-line);
  border-radius: 99px;
}

/* Mobile nav list */
.sh-mnav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sh-mnav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: var(--sh-r-sm);
  text-decoration: none;
  color: var(--sh-white-70);
  font-size: .92rem;
  font-weight: 700;
  background: var(--sh-white-06);
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.sh-mnav a:hover,
.sh-mnav .current-menu-item > a {
  background: var(--sh-gold-dim);
  color: var(--sh-gold);
  border-color: var(--sh-gold-line);
}

/* Sub-menu parent arrow */
.sh-mnav .menu-item-has-children > a::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .45;
  flex-shrink: 0;
  transition: transform var(--sh-transition);
}
.sh-mnav .menu-item-has-children > a[aria-expanded="true"]::after {
  transform: rotate(-135deg) translateY(2px);
  opacity: .85;
}

/* Sub-menu */
.sh-mnav .sub-menu {
  display: none;
  list-style: none;
  margin: 3px 0 0;
  padding: 0 0 0 12px;
  flex-direction: column;
  gap: 2px;
}
.sh-mnav .sub-menu a {
  font-size: .86rem;
  color: var(--sh-white-40);
  background: transparent;
  padding: 10px 12px;
  border-color: transparent;
}
.sh-mnav .sub-menu a:hover {
  color: var(--sh-gold);
  background: var(--sh-gold-dim);
}

/* Gold separator */
.sh-drawer__sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sh-gold-line), transparent);
  border: none;
  margin: 2px 0;
  flex-shrink: 0;
}

/* Drawer CTA grid */
.sh-drawer__ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sh-drawer__ctas .sh-cta {
  padding: 13px 10px;
  font-size: .84rem;
}

/* Drawer note */
.sh-drawer__note {
  margin: 4px 0 0;
  font-size: .75rem;
  color: var(--sh-white-40);
  text-align: center;
  line-height: 1.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .sh__nav  { display: none; }
  .sh__burger { display: flex; }
}

@media (max-width: 640px) {
  :root { --sh-h: var(--sh-h-mob); --header-offset: var(--sh-h-mob); }
  .sh__ctas { display: none; }
}

@media (max-width: 640px) {
  /* When nav+CTAs hidden: burger left, logo right — reset margin on desktop */
  .sh__burger { margin-inline-start: auto; }
  .sh__brand img { height: 48px; }
}

@media (min-width: 641px) {
  /* On desktop burger is hidden — margin has no effect, but reset anyway */
  .sh__burger { margin-inline-start: 0; }
}

@media (max-width: 380px) {
  .sh__brand img { height: 42px; }
}
