/*
 * Single-row header on every page (card 046457a1, Pixel's plan in
 * store/reports/weboldal-nulla): logo, menu, an outline "Webapp megnyitása"
 * and an orange "Letöltés" button, on a translucent cream bar. The buttons are
 * menu items (functions.php ka_add_webapp_nav_button), so the same markup is
 * the hamburger menu's on phones. Desktop vs. phone follows Astra's own
 * body.ast-header-break-point, not a fixed width (Sentry 89ff4f9).
 */

#masthead.site-header {
  background: rgba(255, 248, 241, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eaddd1;
  box-shadow: none;
}

#masthead .main-header-bar,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
  background: transparent;
  border-bottom: 0;
}

#masthead .site-title,
#masthead .site-title a {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: #2b211c;
}

#masthead .main-header-menu .menu-link {
  font-family: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #4a3d36;
}

/* Seven links and two buttons have to share one row on desktop (measured: at
   15.5px with Astra's 15.5px link padding they needed ~1000px of a 908px slot). */
body:not(.ast-header-break-point) #masthead .main-header-menu > .menu-item > .menu-link {
  padding-left: 9px;
  padding-right: 9px;
}

/* Card 0189aef8: with the ninth item (Videók) the "Letöltés" pill slid onto a
   second row at every desktop width (measured live, header 118 px instead of
   81). 14 px between links (Pixel 19093) and 16 px button padding fit all of
   it on one row. Gated by Astra's break point class like the rule above (the
   break point is 1220 px, functions.php ka_header_break_point), so the phone
   menu is untouched. */
body:not(.ast-header-break-point) #masthead .main-header-menu > .menu-item > .menu-link {
  padding-left: 7px;
  padding-right: 7px;
}

body:not(.ast-header-break-point) #masthead .ka-nav-download-button {
  padding-left: 16px;
  padding-right: 16px;
}

#masthead .main-header-menu .menu-link:hover,
#masthead .main-header-menu .current-menu-item > .menu-link {
  color: #b4552a;
}

/* The two buttons: pills, the brand orange (#d9743f) in outline and in fill. */
#masthead .ka-nav-webapp-button,
#masthead .ka-nav-download-button {
  min-height: 0;
  border-radius: 999px;
  font-family: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
}

#masthead .ka-nav-webapp-button {
  padding: 8px 16px;
  border: 2px solid #d9743f;
  background: transparent;
  color: #b4552a;
}

#masthead .ka-nav-webapp-button:hover,
#masthead .ka-nav-webapp-button:focus-visible {
  background: #fbe3d3;
  color: #b4552a;
}

#masthead .ka-nav-download-button {
  padding: 10px 18px;
  border: 0;
  background: #b4552a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(180, 85, 42, 0.3);
}

/* White text needs the darker orange (4.6:1), Pixel 16618. */
#masthead .ka-nav-download-button:hover,
#masthead .ka-nav-download-button:focus-visible {
  background: #9c4a24;
  color: #fff;
}

/* Cookie banner (Complianz) on every page: it stays as it is, only the
   accept button takes the brand's button orange (Pixel 16618). */
.cmplz-cookiebanner {
  --cmplz_button_accept_background_color: #b4552a;
  --cmplz_button_accept_border_color: #b4552a;
  --cmplz_button_accept_text_color: #ffffff;
}

.main-header-menu .ka-nav-download-item {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

/* Desktop: one row, the buttons right after the menu links. */
body:not(.ast-header-break-point) #masthead .site-primary-header-wrap {
  min-height: 72px;
}

body:not(.ast-header-break-point) #masthead .main-header-menu {
  align-items: center;
}

body:not(.ast-header-break-point) #masthead .main-header-menu .ka-nav-webapp-item {
  margin-left: 6px;
}

/* Phone: the title may shrink (ellipsis) so the hamburger never leaves the
   viewport; measured 40 px over at 320 px with the live title before this. */
.ast-header-break-point #masthead .site-header-primary-section-left,
.ast-header-break-point #masthead .site-header-primary-section-left .ast-builder-layout-element,
.ast-header-break-point #masthead .site-branding,
.ast-header-break-point #masthead .ast-site-title-wrap {
  min-width: 0;
  flex-shrink: 1;
}

.ast-header-break-point #masthead .site-title {
  min-width: 0;
  overflow: hidden;
}

.ast-header-break-point #masthead .site-title a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
}

.ast-header-break-point .main-header-menu .ka-nav-download-item {
  justify-content: center;
  padding: 0 20px 14px;
}

.ast-header-break-point .main-header-menu .ka-nav-download-button {
  width: 100%;
  justify-content: center;
}

/* Pixel review 16550: the brand tint, not Astra's light blue, behind the
   current item in the phone menu, and the hamburger/close icon in ink. The
   focus ring stays Astra's own (accessibility). */
.ast-header-break-point #masthead .main-header-menu .current-menu-item > .menu-link {
  background: #fbe3d3;
  color: #b4552a;
}

#masthead .menu-toggle,
#masthead .menu-toggle:hover {
  background: transparent;
  color: #2b211c;
}

#masthead .menu-toggle .ast-mobile-svg {
  fill: #2b211c;
}

/* Between Astra's own 921px and our 1220px break point (functions.php
   ka_header_break_point) Astra's CSS would still show the desktop header while
   its JS already switched to the phone layout. These two rules move the header
   swap to the same 1220px; Astra's JS adds the class when innerWidth <= 1220. */
@media (max-width: 1220.99px) {
  #ast-desktop-header {
    display: none;
  }
}

@media (min-width: 922px) and (max-width: 1220.99px) {
  #ast-mobile-header {
    display: block;
  }
}

/* Card f6a88940: the orange dot after "Mi új" while the latest release is
   recent (functions.php adds .ka-menu-new). */
#masthead .main-header-menu .ka-menu-new > .menu-link::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #d9743f;
  vertical-align: middle;
}
