/* Wazzifni site header on the CV builder page — mirrors the main site's header (web/css/components/nav.css)
   so visitors can get back to the rest of the site. Self-contained: the builder's own styles are untouched. */
.site-header {
  --sh-h: 64px;
  --sh-canvas: #0F1012;
  --sh-ink: #F5F6F8;
  --sh-body: #9AA0AB;
  --sh-hairline: #2A2C31;
  --sh-primary: #0087C6;
  --sh-primary-hover: #006FA6;
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--sh-h);
  background: color-mix(in oklab, var(--sh-canvas) 92%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--sh-hairline);
  font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', Tahoma, 'Segoe UI', sans-serif;
}

.site-header .header-inner {
  max-width: 1104px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header .brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.site-header .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--sh-ink);
}

.site-header .primary-nav {
  display: flex;
  gap: 4px;
  margin-inline-start: 8px;
}

.site-header .primary-nav a {
  position: relative;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--sh-body);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-header .primary-nav a:hover {
  color: var(--sh-ink);
  background: rgba(255, 255, 255, 0.05);
}

.site-header .primary-nav a[aria-current] { color: var(--sh-ink); }

.site-header .primary-nav a[aria-current]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sh-primary);
  transform: translateX(-50%);
}

.site-header .header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header .sh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.site-header .sh-btn svg {
  width: 1.15em;
  height: 1.15em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header .sh-btn--primary {
  background: var(--sh-primary);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.site-header .sh-btn--primary:hover { background: var(--sh-primary-hover); }

.site-header .sh-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sh-ink);
  border-color: var(--sh-hairline);
}

.site-header .sh-home { display: none; }

/* Same breakpoint as the main site: the link row gives way to a "home" button */
@media (max-width: 1024px) {
  .site-header .primary-nav { display: none; }
  .site-header .sh-home { display: inline-flex; }
}

@media (max-width: 768px) {
  .site-header .header-inner { padding: 0 16px; }
  .site-header .sh-download { display: none; }
}

/* Keep the builder's pinned preview, and the jump to it, clear of the header */
.stage { scroll-margin-top: 76px; }
.stage { top: calc(64px + max(12px, env(safe-area-inset-top, 0px))); }

@media print {
  .site-header { display: none !important; }
}

/* Language toggle: shows the language it switches to */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--sh-hairline, #2A2C31);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sh-ink, #F5F6F8);
  font: 600 13px/1 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lang-toggle:hover { background: rgba(255, 255, 255, 0.09); }
.lang-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lang-toggle .lt-to-ar { font-family: 'IBM Plex Sans Arabic', sans-serif; }
html[lang="en"] .lang-toggle .lt-to-en,
html:not([lang="en"]) .lang-toggle .lt-to-ar { display: none; }

/* Small phones: the logo already links home, so the home button goes */
@media (max-width: 400px) {
  .site-header .sh-home { display: none; }
}
