/* ==========================================================================
   HODE Luxury Apple-Grade Language Switcher & Navbar Alignment Styles
   Harmonized with HODE Light Navigation Theme & Electric Blue Brand Color
   ========================================================================== */

/* 1. Header Container Width & Spacing (Eliminates layout squeeze) */
.header-container {
  max-width: 1180px !important;
  width: 100% !important;
}

.header-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 16px !important;
}

.header-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.header-buttons {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. Fix "Get Early Access" Button Wrapping (Prevents the giant circle bug) */
.header-button .hero-button,
.hero-button[data-wf--hero-button--variant="navbar-button"],
.header-buttons .hero-button {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border-radius: 100px !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
  background-color: #0082fb !important;
  box-shadow: 0 4px 14px rgba(0, 130, 251, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.header-button .hero-button:hover,
.header-buttons .hero-button:hover {
  background-color: #0070d8 !important;
  box-shadow: 0 6px 18px rgba(0, 130, 251, 0.4) !important;
  transform: translateY(-1px);
}

.header-button .hero-button .hero-button-text,
.header-buttons .hero-button-text {
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
}

/* ==========================================================================
   Language Switcher Component (Refined Apple Studio Light Aesthetic)
   ========================================================================== */
.hode-lang-switcher {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", sans-serif !important;
  z-index: 1000 !important;
  flex-shrink: 0 !important;
}

/* RTL adjustment */
[dir="rtl"] .hode-lang-switcher {
  direction: rtl;
}

/* Switcher Button Trigger */
.hode-lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 100px !important;
  padding: 0 14px !important;
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  user-select: none !important;
  white-space: nowrap !important;
  -webkit-font-smoothing: antialiased !important;
}

.hode-lang-btn:hover,
.hode-lang-switcher.is-open .hode-lang-btn {
  background: #ffffff !important;
  border-color: #0082fb !important;
  box-shadow: 0 4px 12px rgba(0, 130, 251, 0.15), 0 0 0 1px rgba(0, 130, 251, 0.2) !important;
  color: #0082fb !important;
}

.hode-lang-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 130, 251, 0.25) !important;
}

.hode-lang-globe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0082fb;
  transition: transform 0.25s ease;
}

.hode-lang-btn:hover .hode-lang-globe {
  transform: rotate(20deg);
}

.hode-lang-current {
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  color: #0f172a !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.hode-lang-btn:hover .hode-lang-current,
.hode-lang-switcher.is-open .hode-lang-current {
  color: #0082fb !important;
}

.hode-lang-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.hode-lang-switcher.is-open .hode-lang-chevron {
  transform: rotate(180deg);
  color: #0082fb;
}

/* ==========================================================================
   Dropdown Card - Refined Light Frosted Card
   ========================================================================== */
.hode-lang-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 220px !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 16px !important;
  padding: 8px !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.16),
              0 0 0 1px rgba(15, 23, 42, 0.04),
              0 4px 12px rgba(0, 0, 0, 0.04) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-8px) scale(0.96) !important;
  transform-origin: top right !important;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s !important;
  pointer-events: none !important;
  z-index: 999999 !important;
}

/* RTL positioning */
[dir="rtl"] .hode-lang-dropdown {
  right: auto !important;
  left: 0 !important;
  transform-origin: top left !important;
}

.hode-lang-switcher.is-open .hode-lang-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

.hode-lang-dropdown-header {
  padding: 6px 10px 6px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 4px !important;
}

/* Dropdown Option Items */
.hode-lang-option {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: all 0.16s ease !important;
  cursor: pointer !important;
  user-select: none !important;
  border: 1px solid transparent !important;
}

.hode-lang-option:hover {
  background: #f8fafc !important;
  color: #0082fb !important;
}

.hode-lang-option.active {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #0082fb !important;
}

.hode-lang-flag {
  font-size: 17px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
}

.hode-lang-meta {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.hode-lang-name {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
}

.hode-lang-option.active .hode-lang-name {
  color: #0082fb !important;
}

.hode-lang-native {
  font-size: 11px !important;
  color: #64748b !important;
  line-height: 1.2 !important;
}

.hode-lang-option.active .hode-lang-native {
  color: #3b82f6 !important;
}

.hode-lang-check {
  font-size: 13px !important;
  color: #0082fb !important;
  font-weight: 700 !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease !important;
}

.hode-lang-option.active .hode-lang-check {
  opacity: 1 !important;
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */
@media screen and (max-width: 991px) {
  .header-container {
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media screen and (max-width: 767px) {
  .header-button {
    gap: 8px !important;
  }
  .hode-lang-btn {
    padding: 0 10px !important;
    height: 38px !important;
    min-height: 38px !important;
    font-size: 12px !important;
  }
  .hode-lang-current {
    font-size: 12px !important;
  }
  .hode-lang-dropdown {
    right: -10px !important;
    width: 210px !important;
  }
  [dir="rtl"] .hode-lang-dropdown {
    right: auto !important;
    left: -10px !important;
  }
}

/* ==========================================================================
   RTL Typography & Layout Overrides (Arabic Mode)
   ========================================================================== */
[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] p,
[dir="rtl"] a,
[dir="rtl"] span,
[dir="rtl"] button {
  font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

[dir="rtl"] .navitem-menu-icon {
  flex-direction: row-reverse !important;
}

[dir="rtl"] .header-line {
  margin-left: 20px !important;
  margin-right: 0 !important;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subhead,
[dir="rtl"] .heading-4,
[dir="rtl"] .body-text-16 {
  text-align: right !important;
}

[dir="rtl"] .single-menu-link {
  flex-direction: row-reverse !important;
  text-align: right !important;
}

[dir="rtl"] .feature-menu-content {
  text-align: right !important;
}
