/* ===== HEADER CONTAINER (FLOATING NAVBAR) ===== */
#header-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header {
  pointer-events: auto;
  width: calc(100% - 48px);
  max-width: 1340px;
  margin: 16px auto 0;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MAIN FLOATING NAV BAR ===== */
.header-main-bar {
  background: rgba(11, 25, 44, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(212, 163, 89, 0.15) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== WHEN ON SUBPAGES: SEAMLESS LUXURY BLEND OVER HERO ===== */
header.header-subpage .header-main-bar {
  background: rgba(11, 25, 44, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(212, 163, 89, 0.25) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ===== WHEN SCROLLING DOWN: SLEEK SOLID BACKGROUND (NO CLASHING) ===== */
header.header-scrolled .header-main-bar {
  background: #0B192C !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(212, 163, 89, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.header-inner {
  height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ===== LOGO (RIGHT in RTL) ===== */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  order: 1;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.logo-img:hover {
  transform: scale(1.04);
}

/* ===== NAV LINKS (CENTER) ===== */
.header-nav {
  order: 2;
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav ul li a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  font-family: "Cairo", sans-serif;
  position: relative;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.header-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #D4A359;
  border-radius: 3px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav ul li a:hover {
  color: #ffffff;
}

.header-nav ul li a:hover::after {
  width: 22px;
}

.header-nav ul li a.nav-active {
  color: #D4A359;
  font-weight: 800;
}

.header-nav ul li a.nav-active::after {
  width: 34px;
  background: #D4A359;
}

/* ===== ACTIONS: CTA ONLY (LEFT in RTL) ===== */
.header-actions {
  order: 3;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #E5BA73 0%, #C59B51 100%);
  color: #0B192C !important;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(212, 163, 89, 0.3);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  transition: opacity 0.3s ease;
}

.nav-cta:hover {
  background: linear-gradient(135deg, #f0c986 0%, #d4a359 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212, 163, 89, 0.45);
}

.nav-cta-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

/* ===== HAMBURGER (MOBILE) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  order: 3;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #D4A359;
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #D4A359;
}

/* ===== MOBILE DROPDOWN MENU ===== */
.mobile-menu {
  display: none;
  max-height: 0;
  overflow: hidden;
  background: rgba(11, 25, 44, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  display: block;
  max-height: 520px;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 12px 20px 8px;
}

.mobile-menu ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu ul li:last-child {
  border-bottom: none;
}

.mobile-menu ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  transition: all 0.25s ease;
  border-radius: 8px;
}

.mobile-menu ul li a svg,
.mobile-menu ul li a i {
  width: 18px;
  height: 18px;
  stroke: #D4A359;
  color: #D4A359;
  flex-shrink: 0;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.nav-active {
  color: #D4A359;
  background: rgba(212, 163, 89, 0.08);
  padding-right: 14px;
}

.mobile-contact-info {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
  padding-top: 12px;
}

.mobile-contact-info a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  transition: color 0.2s ease;
}

.mobile-contact-info a:hover {
  color: #D4A359 !important;
}

.mobile-contact-info a svg,
.mobile-contact-info a i {
  width: 16px;
  height: 16px;
  stroke: #D4A359;
  color: #D4A359;
  flex-shrink: 0;
}

.mobile-menu .mobile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background: linear-gradient(135deg, #E5BA73 0%, #C59B51 100%);
  color: #0B192C !important;
  padding: 11px 24px;
  border-radius: 12px;
  font-weight: 800;
  justify-content: center;
  width: 100%;
}

.mobile-menu .mobile-cta svg,
.mobile-menu .mobile-cta i {
  stroke: #0B192C !important;
  color: #0B192C !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 920px) {
  /* Dedicated status bar background shield matching navbar color #0B192C */
  #header-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: max(20px, env(safe-area-inset-top, 20px));
    background: #0B192C;
    z-index: -1;
    pointer-events: none;
  }

  #header-container {
    background: linear-gradient(180deg, rgba(11, 25, 44, 0.85) 0%, rgba(11, 25, 44, 0.35) 65%, transparent 100%);
  }

  #header-container.is-scrolled {
    background: linear-gradient(180deg, rgba(11, 25, 44, 0.98) 0%, rgba(11, 25, 44, 0.9) 80%, rgba(11, 25, 44, 0) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding-bottom: 6px;
  }

  header {
    width: calc(100% - 24px);
    margin: 8px auto 8px;
  }

  .header-inner {
    height: 60px;
    padding: 0 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-nav {
    display: none;
  }

  /* 1. Nav Toggle (Hamburger) placed on the RIGHT in RTL */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4.5px;
    order: 1;
    z-index: 3;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    transition: all 0.25s ease;
  }

  .nav-toggle:hover,
  .nav-toggle.active {
    background: rgba(212, 163, 89, 0.15);
    border-color: rgba(212, 163, 89, 0.4);
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
  }

  /* 2. Logo Centered */
  .header-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    pointer-events: auto;
  }

  .logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  }

  /* 3. Header CTA Inquiry Button on the LEFT in RTL */
  .header-actions {
    display: flex;
    align-items: center;
    order: 3;
    z-index: 3;
    margin: 0;
  }

  .header-actions .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    font-family: "Cairo", sans-serif;
    background: linear-gradient(135deg, #E5BA73 0%, #C59B51 100%);
    color: #0B192C !important;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 14px rgba(212, 163, 89, 0.35);
    transition: all 0.25s ease;
    text-decoration: none;
  }

  .header-actions .nav-cta-icon {
    width: 15px;
    height: 15px;
    stroke: #0B192C;
  }

  .header-inner::after {
    display: none !important;
  }

  .mobile-menu {
    display: none;
  }

  .mobile-menu.open {
    display: block;
  }
}

@media (max-width: 480px) {
  header {
    width: calc(100% - 20px);
    margin: 6px auto 6px;
  }

  .header-inner {
    height: 56px;
    padding: 0 10px;
  }

  .logo-img {
    height: 36px;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .header-actions .nav-cta {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
  }

  .header-actions .nav-cta span {
    display: none;
  }

  .header-actions .nav-cta-icon {
    width: 17px;
    height: 17px;
  }
}