.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-block: 0.625rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  line-height: 0;
}

.logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo-img--header {
  width: 200px;
  height: auto;
  max-height: 38px;
  max-width: 100%;
}

@media (min-width: 1024px) {
  .logo-img--header {
    width: 230px;
    max-height: 44px;
  }
}

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

.header-saved-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  height: var(--touch);
  padding: 0 0.625rem;
  gap: 0.25rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.header-saved-link:hover,
.header-saved-link:focus-visible {
  border-color: var(--red);
  color: var(--red);
  outline: none;
}

.header-saved-link .icon {
  width: 1.35rem;
  height: 1.35rem;
}

.header-search {
  display: none;
  flex-basis: 100%;
  width: 100%;
}

.header-search-form {
  margin: 0;
  max-width: none;
  width: 100%;
}

.header-search-form .header-search-submit {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--red);
  color: var(--red);
  outline: none;
}

.nav-toggle .icon {
  width: 1.35rem;
  height: 1.35rem;
}

.nav-toggle-close {
  display: none;
}

.site-header.is-nav-open .nav-toggle-open {
  display: none;
}

.site-header.is-nav-open .nav-toggle-close {
  display: block;
}

.header-nav {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid var(--border);
}

.site-header.is-nav-open .header-nav {
  display: flex;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.nav a {
  padding: 0.75rem 0 0.75rem 0.75rem;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  margin-left: 0;
}

.nav a:last-child {
  border-bottom: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--red);
}

.kayitli-tarif-sayaci {
  font-weight: 700;
  color: var(--red);
  margin-left: 0.15rem;
}

.btn-save-header {
  font-size: 0.875rem;
  padding: 0 1rem;
  width: 100%;
  justify-content: center;
}

html.is-nav-open,
body.is-nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 1023px) {
  body.is-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(26, 26, 46, 0.45);
  }

  .site-header.is-nav-open {
    z-index: 100;
  }

  .site-header.is-nav-open .header-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--mobile-nav-top, 58px);
    bottom: 0;
    z-index: 95;
    flex-basis: auto;
    margin: 0;
    padding: 0.75rem 1rem max(1.5rem, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  }
}

@media (min-width: 1024px) {
  .header-inner {
    flex-wrap: nowrap;
    align-items: center;
  }

  .logo {
    flex: 0 1 auto;
  }

  .header-actions {
    display: none;
  }

  .header-search {
    display: flex !important;
    min-width: 0;
    flex: 1 1 auto;
    flex-basis: auto;
    max-width: 340px;
    margin: 0;
    padding: 0;
  }

  .site-header.has-hero-search .header-search {
    display: none !important;
  }

  .header-search-form {
    flex-direction: row;
  }

  .nav-toggle {
    display: none;
  }

  .header-nav {
    display: flex !important;
    flex: 1;
    flex-basis: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0;
    border-top: none;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    align-items: center;
  }

  .nav a {
    padding: 0.5rem 0.25rem;
    margin: 0;
    display: inline-flex;
    border-bottom: 2px solid transparent;
    border-left: none;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .nav a[aria-current="page"] {
    border-bottom-color: var(--red);
    border-left: none;
    box-shadow: none;
  }

  .btn-save-header {
    width: auto;
    flex-shrink: 0;
  }

  body.is-nav-open {
    overflow: visible;
  }
}

@media (max-width: 1023px) {
  .stats {
    gap: 0.5rem;
  }

  .stat-val {
    font-size: 1rem;
  }
}

.mobile-menu-search-form {
  margin: 0;
  max-width: none;
  width: 100%;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .mobile-menu-search {
    display: none;
  }
}
