/* ============================================================
   HEADER.CSS — Sarhad Shauryathon Navigation
   Font: Outfit (professional, readable, modern)
   Theme: Navy · Gold · Orange brand palette
   ============================================================ */

/* Fonts loaded globally via <link> in header.php */

html, body { margin: 0; padding: 0; }

/* ============================================================
   GLOBAL NAV TOKENS
   ============================================================ */
:root {
  --nav-h:        88px;
  --nav-h-mobile: 72px;
  --container-max: 1480px;
  --container-pad: 32px;

  --menu-gap: 30px;
  --menu-fs:  14px;
  --menu-fw:  650;
  --menu-ls:  0.04em;

  /* Brand-aligned nav colors */
  --nav-ink:    #0F1A2E;   /* navy text */
  --nav-hover:  #E84C1E;   /* orange on hover / active */
  --nav-border: rgba(15, 26, 46, 0.12);
  --nav-shadow: 0 4px 20px rgba(15, 26, 46, 0.08);

  /* CTA button */
  --cta-bg:    #E84C1E;
  --cta-hover: #C73D12;
  --cta-ring:  rgba(232, 76, 30, 0.30);

  /* Drawer (mobile) — deep navy */
  --drawer-bg:  #0F1A2E;
  --drawer-sub: #182236;
}

@media (max-width: 575.98px) {
  :root {
    --nav-h:         var(--nav-h-mobile);
    --container-pad: 16px;
    --menu-gap:      16px;
  }
}

body { padding-top: var(--nav-h); }

/* ============================================================
   SITE HEADER — fixed sticky bar
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
}

.navbar.nav-tall {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  transition: box-shadow 0.2s ease;
}

/* ============================================================
   LAYOUT — left / center / right
   ============================================================ */
.navbar .container.header-row {
  width: 100% !important;
  max-width: var(--container-max) !important;
  margin: 0 auto !important;
  padding: 0 var(--container-pad) !important;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-left  { display: flex; align-items: center; flex-shrink: 0; }
.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* ============================================================
   LOGOS
   ============================================================ */
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 74px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.15s ease;
}
.brand-logo:hover { opacity: 0.88; }

.company-logo {
  height: 62px;
  width: auto;
  object-fit: contain;
  display: block;
}

.arham-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.arham-logo-link:hover { opacity: 0.85; }
.arham-logo {
  height: 62px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ============================================================
   DESKTOP NAVIGATION MENU
   ============================================================ */
.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--menu-gap);
}

.tm-menu .nav-item { position: relative; }

.tm-menu .nav-link {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--menu-fs);
  font-weight: var(--menu-fw);
  letter-spacing: var(--menu-ls);
  text-transform: uppercase;
  color: var(--nav-ink);
  text-decoration: none;
  padding: 8px 2px;
  line-height: 1;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
  display: block;
}

.tm-menu .nav-link:hover,
.tm-menu .nav-link.active {
  color: var(--nav-hover);
  border-bottom-color: var(--nav-hover);
  text-decoration: none;
}

/* Dropdown arrow indicator */
.tm-menu .dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.65;
}

/* ============================================================
   CTA BUTTON — Register
   ============================================================ */
.btn-gold {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;

  background: linear-gradient(135deg, var(--cta-bg), #ff6b3d);
  color: #fff;
  text-decoration: none;

  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;

  box-shadow: 0 4px 16px var(--cta-ring);
  transition: transform 0.20s ease, box-shadow 0.20s ease, background 0.20s ease;
  overflow: hidden;
}
.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px var(--cta-ring);
  background: linear-gradient(135deg, var(--cta-hover), var(--cta-bg));
  color: #fff;
  text-decoration: none;
}
.btn-gold:active {
  transform: translateY(0) scale(0.99);
}
.btn-gold:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--cta-ring);
}

/* Shine sweep on hover */
.btn-gold::before {
  content: "";
  position: absolute;
  top: -120%; bottom: -120%;
  left: -30%; width: 28%;
  transform: rotate(25deg) translateX(-140%);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.45) 50%,
    rgba(255,255,255,0) 100%
  );
  transition: transform 0.55s ease;
  pointer-events: none;
}
.btn-gold:hover::before { transform: rotate(25deg) translateX(420%); }

/* ============================================================
   HAMBURGER (mobile)
   ============================================================ */
.nav-toggle {
  width: 46px;
  height: 44px;
  border: 0;
  background: transparent;
  display: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 0;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.nav-toggle:hover { background: rgba(15, 26, 46, 0.06); }
.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 3px;
  background: var(--nav-ink);
  margin: 5.5px 0;
  transition: background 0.15s ease;
}

/* ============================================================
   DESKTOP DROPDOWN
   ============================================================ */
.navbar .dropdown { position: relative; }

.navbar .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -16px;
  z-index: 99999;
}

/* Bridge gap so hover stays active */
.navbar .dropdown::after {
  content: "";
  position: absolute;
  left: 0; top: 100%;
  width: 100%; height: 16px;
  background: transparent;
}

@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu { display: block; }
}
.navbar .dropdown.show > .dropdown-menu { display: block; }

/* Frosted-glass dropdown — navy theme */
.custom-dropdown {
  min-width: 260px;
  padding: 8px 6px;
  border-radius: 18px;
  overflow: hidden;

  background:
    linear-gradient(160deg, rgba(18, 32, 58, 0.96) 0%, rgba(12, 23, 42, 0.94) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 50px rgba(10, 18, 40, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);

  animation: navDropIn 0.20s ease-out;
}

@keyframes navDropIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.custom-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;

  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;

  color: rgba(235, 242, 255, 0.90);
  padding: 11px 16px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 12px;
  margin: 1px 0;

  transition: background 0.16s ease, padding-left 0.16s ease, color 0.16s ease;
}

.custom-dropdown .dropdown-item:hover {
  background: rgba(240, 180, 41, 0.14);   /* gold tint on hover */
  padding-left: 20px;
  color: #fff;
  text-decoration: none;
}

/* Arrow indicator */
.custom-dropdown .dropdown-item::after {
  content: "›";
  margin-left: auto;
  color: rgba(240, 180, 41, 0.70);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.16s ease, color 0.16s ease;
  flex-shrink: 0;
}
.custom-dropdown .dropdown-item:hover::after {
  transform: translateX(3px);
  color: #F0B429;
}

/* ============================================================
   BACKDROP (mobile overlay)
   ============================================================ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 35, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9990;
  display: none;
}
body.drawer-open .drawer-backdrop { display: block; }

.drawer-close { display: none; }

/* ============================================================
   MOBILE DRAWER  (≤ 991.98px)
   ============================================================ */
@media (max-width: 991.98px) {

  .navbar .container.header-row { gap: 8px; }

  .brand-logo   { height: 58px; }
  .company-logo { height: 50px; }
  .arham-logo   { height: 50px; }

  .nav-toggle {
    display: block;
    margin-left: 8px;
  }

  .nav-right { justify-content: flex-end; gap: 10px; }
  .header-right { gap: 10px; margin-left: auto; }

  .btn-gold { height: 42px; padding: 0 18px; font-size: 13px; }

  /* ---- Off-canvas drawer — NAVY, not blue ---- */
  #mainNav {
    position: fixed;
    top: 0; left: -100%;
    height: 100vh;
    width: min(86vw, 400px);

    background: var(--drawer-bg);        /* navy */
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 8px 0 60px rgba(10,18,35,0.50);

    overflow-y: auto;
    padding: 72px 14px 28px;
    z-index: 9995;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: stretch;
    border-radius: 0;
  }
  #mainNav.show { left: 0; }

  /* Close × button */
  .drawer-close {
    display: block;
    position: absolute;
    top: 14px; right: 14px;
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 5;
    transition: background 0.15s ease;
  }
  .drawer-close:hover { background: rgba(255,255,255,0.14); }

  /* Drawer nav list */
  #mainNav .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 2px;
    margin-top: 8px;
  }

  #mainNav .nav-item { width: 100%; }

  #mainNav .nav-link {
    width: 100%;
    color: rgba(235, 242, 255, 0.92);
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 13px 16px;
    border-radius: 12px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease, color 0.15s ease;
  }
  #mainNav .nav-link:hover {
    background: rgba(240, 180, 41, 0.12);
    color: #fff;
    border-bottom: none;
    text-decoration: none;
  }

  /* Drawer dropdown arrow (override) */
  #mainNav .dropdown-toggle::after {
    content: '›';
    border: none;
    width: auto; height: auto;
    font-size: 22px;
    opacity: 0.65;
    margin-left: auto;
    transform: rotate(90deg);
    display: block;
  }
  #mainNav .dropdown.show .dropdown-toggle::after {
    transform: rotate(-90deg);
    opacity: 1;
  }

  /* Sub-menu — slightly lighter navy */
  #mainNav .dropdown-menu {
    position: static;
    display: none;
    margin: 4px 8px 8px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: var(--drawer-sub);       /* mid navy */
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    animation: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-width: auto;
  }
  #mainNav .dropdown.show > .dropdown-menu { display: block; }

  #mainNav .custom-dropdown {
    min-width: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 14px;
    animation: none;
    padding: 0;
  }

  #mainNav .dropdown-item {
    color: rgba(210, 225, 255, 0.88);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;          /* consistent, readable */
    font-weight: 700;
    padding: 11px 14px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: normal;       /* allow wrapping on small screens */
    word-break: break-word;
    min-height: 44px;          /* touch-friendly even when text wraps */
    align-items: center;
  }
  #mainNav .dropdown-item:hover {
    background: rgba(240, 180, 41, 0.16);
    padding-left: 18px;
    color: #fff;
  }
  #mainNav .dropdown-item::after {
    font-size: 18px;
    flex-shrink: 0;
  }
}

/* Tighter spacing on small phones so REGISTER + dual logos + hamburger fit */
@media (max-width: 575.98px) {
  .brand-logo   { height: 48px; }
  .company-logo { height: 42px; }
  .arham-logo   { height: 42px; }
  .header-right { gap: 6px; }
  .btn-gold     { height: 38px; padding: 0 12px; font-size: 11.5px; letter-spacing: 0.04em; }
}
@media (max-width: 400px) {
  .brand-logo   { height: 42px; }
  .company-logo { height: 36px; }
  .arham-logo   { height: 36px; }
  .header-right { gap: 4px; }
  .btn-gold     { height: 34px; padding: 0 10px; font-size: 10.5px; }
}

/* ============================================================
   z-index safety
   ============================================================ */
header, .navbar { position: relative; z-index: 10000; }
