/* =========================
   HEADER
   ========================= */

.site-header {
  padding-top: 6px;
  border-bottom: 1px solid var(--card-border);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
  max-width: 1200px;
  padding-top: 10px;
}

.header-left {
  display: flex;
  align-items: center;
}

/* logo + tagline block */

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  height: 24px;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.2;
  text-align: center;
}

/* =========================
   NAVIGATION
   ========================= */

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: -4px;
}

nav a {
  margin-left: 1rem;
  font-weight: 500;
  opacity: 1;
  align-items: center;
  padding-top: 6px;
}

nav a:not(.nav-cta):hover {
  text-decoration: underline;
  opacity: 1;
}

/* =========================
   NAV CTA
   ========================= */

.nav-cta {
  background: var(--button-bg);
  color: var(--button-text);
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 2px solid var(--button-bg);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.nav-cta:hover {
  background: var(--button-text);
  color: var(--button-bg);
  border-color: var(--button-bg);
}

.nav-theme-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-right: 6px;
  cursor: pointer;

  display: flex;
  align-items: center;
}

.nav-theme-toggle .theme-icon {
  width: 16px;
  height: 16px;

  background-color: var(--text-main);

  mask-repeat: no-repeat;
  mask-size: contain;
}

/* moon default */
.nav-theme-toggle .theme-icon {
  mask-image: url('/assets/icons/moon.svg');
}

/* sun when dark mode active */
[data-theme="dark"] .nav-theme-toggle .theme-icon {
  mask-image: url('/assets/icons/sun.svg');
}

.nav-theme-toggle:hover {
  opacity: .7;
}

@media (max-width: 640px) {
  .nav-theme-toggle {
    display: none;
  }
}

.nav-theme-toggle {
  transform: translateY(3px);
}
/* =========================
   MOBILE MENU
   ========================= */

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--card-border);
}

.mobile-menu a {
  padding: 8px 0;
  font-size: 0.95rem;
}

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

.mobile-theme-toggle {
  margin-top: 6px;
  padding: 8px 0;
  background: none;
  border: none;
  font-size: 0.95rem;
  text-align: left;
  color: var(--text-main);
  cursor: pointer;
}

/* =========================
   MOBILE THEME ICON
   ========================= */

.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-theme-toggle .theme-icon {
  width: 16px;
  height: 16px;

  background-color: var(--text-main);

  mask-repeat: no-repeat;
  mask-size: contain;
}

.theme-icon {
  width: 16px;
  height: 16px;
}

/* default (light mode → show moon) */
.mobile-theme-toggle .theme-icon {
  mask-image: url('/assets/icons/moon.svg');
}

/* dark mode → show sun */
[data-theme="dark"] .mobile-theme-toggle .theme-icon {
  mask-image: url('/assets/icons/sun.svg');
}

@media (max-width: 640px) {
  .theme-toggle {
    display: none;
  }
}

/* =========================
   HAMBURGER ICON
   ========================= */

.mobile-menu-toggle {
  display: none;
  width: 22px;
  height: 16px;
  position: relative;
  cursor: pointer;
  top: -2px;
}

.mobile-menu-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.8px;
  background: var(--text-main);
  transition: all .25s ease;
}

.mobile-menu-toggle span:nth-child(1) {
  top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
  top: 7px;
}

.mobile-menu-toggle span:nth-child(3) {
  bottom: 0;
}

/* X animation */

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 7px;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 7px;
}

/* =========================
   MOBILE HEADER
   ========================= */

@media (max-width: 640px) {

  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 1200px;
    padding-top: 6px;
    padding-bottom: 4px;
  }

  .header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    height: 20px;
  }

  .site-header nav a {
    display: none;
  }

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

  .tagline {
    font-size: 0.75rem;
  }

}


/* Desktop icon button */
.nav-icon-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile link with icon */
.mobile-link-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon-btn {
  color: var(--text-main);
}
.save-icon {
  width: 16px;
  height: 16px;

  background-color: var(--text-main);

  mask-image: url('/assets/icons/save.svg');
  mask-repeat: no-repeat;
  mask-size: contain;
}

@media (max-width: 640px) {
  #savedJobsBtn {
    display: none;
  }
}

.nav-icon-btn {
  transform: translateY(3px);
}


/* Header save icon (SVG version) */
.header-save-icon {
  stroke: currentColor;
  fill: none;
}

/* Fill when at least one saved job exists */
.saved-active .header-save-icon {
  fill: currentColor;
}


/* ===== Inline logo + tagline ===== */

.logo-block {
  display: flex;
  align-items: center;
  gap: 10px; /* space between logo and tagline */
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 0; /* remove vertical offset if any */
}

/* Optional: tighten header height */
.site-header {
  padding-top: 10px;
  padding-bottom: 10px;
}


/* ===== Header: compact + inline tagline (desktop) ===== */

/* Undo the "optional: tighten header height" that made it taller */
.site-header {
  padding-top: 6px !important;
  padding-bottom: 0px !important;
}

/* Your container has padding-top: 10px; make it compact */
.site-header .container {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* Force logo + tagline inline (desktop) */
.logo-block {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 10px !important;
}

/* Tagline inline styling */
.tagline {
  margin-top: 0 !important;
  text-align: left !important;
  line-height: 1 !important;
}

/* Optional: keep CTA from pushing header taller */
.nav-cta {
  margin-top: 0 !important;
}

/* Optional: on mobile, stack tagline under logo again */
@media (max-width: 640px) {
  .logo-block {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }

  .tagline {
    text-align: left !important;
  }
}


.nav-theme-toggle {
  transform: none;
}

.nav-icon-btn {
  transform: none;
}

.logo {
  display: block;
}

nav a {
  margin-left: 1rem;
  font-weight: 500;
  opacity: 1;
  display: flex;
  align-items: center;
  padding-top: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav-cta {
  position: relative;
  top: -2px;
}

.logo-block {
  position: relative;
  top: -2px;
}

.nav-theme-toggle,
.nav-icon-btn {
  position: relative;
  top: -1px;
}
