/* Site Header Redesign */
:root {
  --header-primary: #0095c9;
  --header-primary-dark: #026c96;
  --header-text: #0f2b46;
  --header-muted: #6b7c92;
  --header-glow: rgba(255, 255, 255, 0.85);
  --chip-bg: rgba(255, 255, 255, 0.95);
  --chip-shadow: 0 8px 18px rgba(15, 43, 70, 0.12);
  --nav-link: #0f2b46;
  --nav-link-muted: rgba(15, 43, 70, 0.7);
  --accent: #007acc;
}


.site-header {
  font-family: 'Inter', 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 1.4rem 0;
}

.header-surface {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15), transparent 45%),
    linear-gradient(120deg, #0a2742, #0b2d52 35%, #10365f 70%, #0a2340);
  box-shadow: 0 35px 80px rgba(7, 23, 41, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.brand-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  opacity: 0.95;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f4f8ff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: rgba(232, 241, 255, 0.85);
}


.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  row-gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.primary-nav .nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  transform: none !important;
}

.primary-nav .nav-link:hover,
.primary-nav .nav-link:focus,
.primary-nav .nav-link.active {
  color: #1a365d;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-color: transparent;
  box-shadow: none;
  transform: none !important;
}

.primary-nav .nav-link:focus {
  outline: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fdfdfd;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-chip select {
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 600;
}

.language-chip select:focus {
  outline: none;
}

.social-links {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 0.3rem;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.social-links a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  color: #fefefe;
  transition: background 0.2s ease, transform 0.15s ease;
  pointer-events: auto;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}


.language-dropdown {
  border: none;
  border-radius: 999px;
  padding: 0.28rem 1.3rem 0.28rem 0.8rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: #0b233d;
  background: #fff;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7c8a9f 50%),
    linear-gradient(135deg, #7c8a9f 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.language-dropdown:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

@media (max-width: 1100px) {
  .header-surface {
    grid-template-columns: 1fr;
    border-radius: 40px;
    gap: 1rem;
  }

  .header-identity {
    justify-content: center;
  }

  .primary-nav {
    flex-wrap: wrap;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .brand-emblem {
    width: 56px;
    height: 56px;
  }

  .brand-label {
    font-size: 1.05rem;
  }
}

@media (max-width: 600px) {
  .header-identity {
    flex-direction: column;
    text-align: center;
  }

  .primary-nav {
    gap: 0.6rem;
  }

  .primary-nav .nav-link {
    width: 100%;
    text-align: center;
  }

  .header-right {
    flex-direction: column;
    gap: 0.75rem;
  }

  .social-links {
    justify-content: center;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .site-header .social-links {
    flex-direction: row !important;
    align-items: center;
  }
}
