/* The red header. Wide screens: logo, every section and the tools on one row.
   Below 1200px: logo, the Resmî İlanlar link BİK needs in view, search and a labelled menu button. */

.g-header {
  --g-band-h: 56px;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* On the home page's phones and tablets the header scrolls away with the page. */
body.home .g-header {
  position: static;
}

@media (min-width: 1200px) {
  body.home .g-header {
    position: sticky;
  }
}

.g-header__band {
  position: relative;
  z-index: 2;
  display: flex;
  margin: 0;
  padding-block: 0;
  align-items: center;
  gap: 4px;
  min-height: var(--g-band-h);
  padding-inline: 8px 0;
  background: var(--wp--preset--color--brand);
  color: #ffffff;
}

.g-header__band a {
  color: inherit;
}

.gorunum-wordmark {
  flex: none;
  margin: 0;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.gorunum-wordmark a {
  text-decoration: none;
}

/* A logo set in the Site Editor replaces the wordmark at the band's own height. */
.g-header__band .wp-block-site-logo {
  flex: none;
  margin: 0;
  line-height: 0;
}

.g-header__band .wp-block-site-logo img {
  width: auto;
  max-width: 160px;
  height: auto;
  max-height: 36px;
  object-fit: contain;
}

.g-header__band:has(.wp-block-site-logo img) .gorunum-wordmark {
  display: none;
}

/* White on red: the ring has to be white to show. */
.g-header__band :focus-visible,
.g-menu__panel :focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -4px;
}

.g-header__strip {
  flex: 1 1 auto;
  min-width: 0;
}

.g-header__strip ul {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.g-header__strip li:not(:last-child) {
  display: none;
}

.g-header__strip a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
}

.g-header__strip a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0 6px;
  height: 3px;
  background: #ffffff;
}

.g-header__tools {
  display: flex;
  flex: none;
  align-items: center;
}

.g-header__tools .gorunum-theme-toggle {
  display: none;
}

.g-menu__toggle,
.gorunum-search summary,
.gorunum-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  list-style: none;
  cursor: pointer;
}

.g-menu__toggle {
  gap: 4px;
  padding-inline: 2px;
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--pano-nav);
  font-weight: 600;
}

.g-menu__toggle::-webkit-details-marker,
.gorunum-search summary::-webkit-details-marker {
  display: none;
}

.gorunum-search__form {
  position: absolute;
  z-index: 3;
  inset: 100% 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px max(16px, calc((100% - var(--g-page-max)) / 2));
  background: var(--wp--preset--color--mist);
  color: var(--wp--preset--color--ink);
}

.gorunum-search__form input,
.g-menu__search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--wp--preset--color--stone);
  background: var(--wp--preset--color--paper);
  color: var(--wp--preset--color--ink);
  font: inherit;
}

.gorunum-search__form button,
.g-menu__search button {
  min-height: 44px;
  padding-inline: 16px;
  border: 0;
  background: var(--wp--preset--color--brand);
  color: #ffffff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.gorunum-search__form button:focus-visible {
  outline-color: var(--wp--preset--color--ink);
}

.g-menu__search button {
  background: color-mix(in srgb, var(--wp--preset--color--brand) 78%, #000000);
}

/* Full-screen menu. */
.g-menu__panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--wp--preset--color--brand);
  color: #ffffff;
}

.g-menu__bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  min-height: var(--g-band-h);
  padding-inline: 12px 4px;
}

.g-menu__logo {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--pano-section);
  font-weight: 800;
  line-height: 1;
}

.g-menu__bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  height: 44px;
  padding-inline: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--pano-nav);
  font-weight: 600;
  cursor: pointer;
}

.g-menu__search {
  display: flex;
  flex: none;
  gap: 8px;
  margin: 4px 12px 8px;
}

.g-menu__group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.g-menu__group a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: inherit;
  font-weight: 500;
  font-size: 1.0625rem;
  text-decoration: none;
}

.g-menu__group a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.g-menu__group--primary {
  flex: none;
  padding-inline: 16px;
}

.g-menu__group--primary a {
  justify-content: space-between;
  min-height: 60px;
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.28);
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.08;
}

.g-menu__group--primary a::after {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.g-menu__lower {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px 12px;
  margin-top: 12px;
  padding: 10px 16px 16px;
  background: color-mix(in srgb, var(--wp--preset--color--brand) 78%, #000000);
}

.g-menu__group--small a {
  font-weight: 400;
}

.g-menu__social {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  margin-left: -10px;
}

.g-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: inherit;
}

@media (hover: hover) {
  .g-header__strip a:hover,
  .g-menu__group a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
  }
}

body[data-menu-open] {
  overflow: hidden;
}

@media (min-width: 360px) {
  .g-header__band {
    gap: 8px;
    padding-inline: 12px 4px;
  }

  .gorunum-wordmark {
    font-size: 1.625rem;
  }

  .g-header__strip a {
    font-size: 0.875rem;
  }

  .g-menu__toggle {
    gap: 7px;
    padding-inline: 6px;
  }
}

@media (min-width: 390px) {
  .gorunum-wordmark {
    font-size: 1.875rem;
  }
}

@media (min-width: 430px) {
  .gorunum-wordmark {
    font-size: var(--wp--preset--font-size--pano-section);
  }

  .g-header__strip a {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .g-header__band,
  .g-menu__bar {
    padding-inline: 16px 8px;
  }

  .g-menu__lower {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .g-header {
    --g-band-h: 74px;
  }

  .g-header__band .wp-block-site-logo img {
    max-width: 260px;
    max-height: 48px;
  }

  .g-header__band {
    gap: 16px;
    padding-inline: max(16px, calc((100% - var(--g-page-max)) / 2));
  }

  .g-header__strip ul {
    justify-content: center;
    gap: 12px;
  }

  .g-header__strip li:not(:last-child) {
    display: list-item;
  }

  .g-header__strip li {
    list-style: none;
  }

  .g-header__tools .gorunum-theme-toggle {
    display: flex;
  }

  .g-menu {
    display: none;
  }
}

@media (min-width: 1320px) {
  .g-header__strip ul {
    gap: 22px;
  }

  .g-header__strip a {
    font-size: var(--wp--preset--font-size--pano-nav);
  }
}
