@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  
  --header-bg-resting: rgba(68, 9, 15, 0.95);
  --header-bg-scrolled: rgba(46, 5, 10, 0.98);
  --primary-burgundy: #550a12;
  --dark-burgundy: #380509;
  --accent-gold: #cba871;
  --accent-gold-light: #e5cb9b;
  --accent-gold-glow: rgba(203, 168, 113, 0.45);
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.78);
  --text-subtle: rgba(255, 255, 255, 0.55);
  --border-gold-subtle: rgba(203, 168, 113, 0.22);
  --border-gold-hover: rgba(203, 168, 113, 0.65);
  
  
  --header-height-resting: 92px;
  --header-height-scrolled: 72px;
  --header-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0d0e12;
  color: #f1f1f5;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  direction: ltr;
  text-align: left;
}

html[lang="zh"] body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Outfit', -apple-system, sans-serif;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-resting);
  z-index: 1000;
  background: var(--header-bg-resting);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-gold-subtle);
  transition: var(--header-transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.site-header.is-scrolled {
  height: var(--header-height-scrolled);
  background: var(--header-bg-scrolled);
  border-bottom-color: rgba(203, 168, 113, 0.35);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.header-container {
  max-width: 1680px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--header-transition);
  outline: none;
}

.brand-logo {
  height: 52px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  transition: var(--header-transition);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.site-header.is-scrolled .brand-logo {
  height: 42px;
}

.header-brand:hover .brand-logo {
  transform: scale(1.03);
  filter: drop-shadow(0 0 12px var(--accent-gold-glow));
}

.header-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 4px;
  letter-spacing: 0.2px;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold-light), transparent);
  transition: width 0.35s var(--ease-out-expo), left 0.35s var(--ease-out-expo);
  box-shadow: 0 0 10px var(--accent-gold-glow);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--text-white);
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-item.is-active .nav-link::after {
  width: 100%;
  left: 0;
  background: linear-gradient(90deg, var(--accent-gold), #ffffff, var(--accent-gold));
}

.nav-item.is-active .nav-link {
  color: var(--text-white);
  font-weight: 700;
}

.nav-item.is-active .nav-link::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold-glow);
}

.nav-item.has-dropdown {
  position: relative;
  padding-bottom: 16px;
  margin-bottom: -16px;
}

.nav-link-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-caret {
  transition: transform 0.3s ease;
  color: var(--accent-gold);
  opacity: 0.8;
}

.nav-item.has-dropdown:hover .nav-dropdown-caret,
.nav-item.has-dropdown.is-open .nav-dropdown-caret {
  transform: rotate(180deg);
  color: #ffffff;
}

.mega-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 740px;
  max-width: min(760px, calc(100vw - 36px));
  background: linear-gradient(160deg, rgba(46, 8, 14, 0.98) 0%, rgba(20, 5, 8, 0.99) 100%);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(203, 168, 113, 0.42);
  border-radius: 22px;
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.85), 0 0 35px rgba(120, 16, 26, 0.45);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
  transition-delay: 0.15s;
  z-index: 1000;
}

.mega-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -24px;
  left: -20px;
  right: -20px;
  height: 32px;
  background: transparent;
  pointer-events: auto;
}

.nav-item.has-dropdown:hover .mega-dropdown-panel,
.nav-item.has-dropdown:focus-within .mega-dropdown-panel,
.nav-item.has-dropdown.is-open .mega-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

.mega-panel-topbar {
  padding: 16px 24px;
  background: rgba(15, 4, 7, 0.7);
  border-bottom: 1px solid rgba(203, 168, 113, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 21px;
  border-top-right-radius: 21px;
  box-sizing: border-box;
}

.mega-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.mega-panel-badge .pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-gold);
}

.mega-panel-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(203, 168, 113, 0.15);
  transition: all 0.22s ease;
}

.mega-panel-all-link:hover {
  color: #ffffff;
  background: rgba(120, 16, 26, 0.5);
  border-color: rgba(203, 168, 113, 0.5);
  transform: translateY(-1px);
}

.mega-sectors-grid {
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.mega-sector-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 66px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(203, 168, 113, 0.12);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.mega-sector-card:last-child:nth-child(odd) {
  grid-column: span 2;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(120, 16, 26, 0.22) 100%);
}

.mega-sector-card:hover {
  background: rgba(120, 16, 26, 0.65);
  border-color: rgba(203, 168, 113, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.mega-sector-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(120, 16, 26, 0.75) 0%, rgba(68, 9, 15, 0.95) 100%);
  border: 1px solid rgba(203, 168, 113, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold-light);
  flex-shrink: 0;
  transition: all 0.22s ease;
}

.mega-sector-card:hover .mega-sector-icon-box {
  background: var(--accent-gold);
  color: #1a080c;
  box-shadow: 0 0 12px var(--accent-gold);
  transform: scale(1.06);
}

.mega-sector-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.mega-sector-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  transition: color 0.2s ease;
}

.mega-sector-card:hover .mega-sector-name {
  color: var(--accent-gold-light);
}

.mega-sector-count {
  font-size: 11.5px;
  color: var(--text-subtle);
  font-weight: 500;
}

.mega-sector-arrow {
  color: var(--text-subtle);
  opacity: 0.6;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.mega-sector-card:hover .mega-sector-arrow {
  opacity: 1;
  color: var(--accent-gold);
}

[dir="rtl"] .mega-sector-card:hover .mega-sector-arrow {
  transform: translateX(-4px);
}

[dir="ltr"] .mega-sector-card:hover .mega-sector-arrow {
  transform: translateX(4px);
}

.mega-panel-footer {
  padding: 14px 24px;
  background: rgba(12, 3, 5, 0.75);
  border-top: 1px solid rgba(203, 168, 113, 0.16);
  border-bottom-left-radius: 21px;
  border-bottom-right-radius: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.mega-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.mega-footer-note svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.mega-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold-light);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mega-footer-cta:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--accent-gold-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lang-dropdown-wrapper {
  position: relative;
}

.lang-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 30px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-white);
  transition: var(--header-transition);
  backdrop-filter: blur(10px);
}

.lang-trigger-btn:hover,
.lang-dropdown-wrapper.is-open .lang-trigger-btn {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--border-gold-hover);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.flag-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.flag-icon svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lang-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
  stroke: var(--accent-gold);
}

.lang-dropdown-wrapper.is-open .lang-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: rgba(38, 4, 8, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 20px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 58px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(85, 10, 18, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

.lang-dropdown-wrapper.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-item {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.lang-item .flag-icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid transparent;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.12);
}

.lang-item:hover .flag-icon {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.lang-item.is-selected .flag-icon {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

.lang-item::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(20, 2, 4, 0.95);
  color: var(--text-white);
  border: 1px solid var(--border-gold-subtle);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Cairo', sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lang-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 12px;
  cursor: pointer;
  padding: 8px;
  transition: var(--header-transition);
}

.mobile-toggle-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.mobile-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-gold-hover);
}

.mobile-toggle-btn.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--accent-gold);
}

.mobile-toggle-btn.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle-btn.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--accent-gold);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-drawer-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(380px, 86vw);
  height: 100vh;
  background: linear-gradient(175deg, #42070c 0%, #240306 100%);
  border-left: 1px solid var(--border-gold-subtle);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  padding: 30px 24px;
  transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
}

.mobile-drawer.is-open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-gold-subtle);
  margin-bottom: 24px;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--header-transition);
}

.mobile-drawer-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--border-gold-hover);
  color: var(--accent-gold);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.mobile-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease, padding 0.25s ease;
  border-right: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-item.is-active .mobile-nav-link {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
  border-right-color: var(--accent-gold);
  padding-right: 18px;
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-gold-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-lang-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1440px) {
  .nav-list {
    gap: 14px;
  }
  .nav-link {
    font-size: 13.5px;
    padding: 8px 2px;
  }
  .header-container {
    padding: 0 24px;
  }
  .brand-logo {
    max-width: 160px;
  }
}

@media (max-width: 1240px) {
  .nav-list {
    gap: 10px;
  }
  .nav-link {
    font-size: 12.5px;
    padding: 6px 1px;
  }
}

@media (max-width: 1160px) {
  .header-nav {
    display: none;
  }
  .mobile-toggle-btn {
    display: flex;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height-resting: 80px;
    --header-height-scrolled: 64px;
  }
  .header-container {
    padding: 0 18px;
  }
  .brand-logo {
    height: 42px;
    max-width: 140px;
  }
  .site-header.is-scrolled .brand-logo {
    height: 36px;
  }
}

html[dir="ltr"] .lang-menu {
  left: auto;
  right: 0;
}

html[dir="ltr"] .lang-item::after {
  right: auto;
  left: calc(100% + 12px);
  transform: translateY(-50%) translateX(-6px);
}

html[dir="ltr"] .lang-item:hover::after {
  transform: translateY(-50%) translateX(0);
}

html[dir="ltr"] .mobile-drawer {
  right: auto;
  left: -100%;
  border-left: none;
  border-right: 1px solid var(--border-gold-subtle);
  transition: left 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7);
}

html[dir="ltr"] .mobile-drawer.is-open {
  right: auto;
  left: 0;
}

html[dir="ltr"] .mobile-nav-link {
  border-right: none;
  border-left: 3px solid transparent;
}

html[dir="ltr"] .mobile-nav-link:hover,
html[dir="ltr"] .mobile-nav-item.is-active .mobile-nav-link {
  border-right-color: transparent;
  border-left-color: var(--accent-gold);
  padding-right: 14px;
  padding-left: 18px;
}
