/* ==========================================================================
   Yonei Estate - header chrome.

   Desktop: logo, navigation, inline language selector, consultation button on
   one row, plus a floating vertical language rail fixed to the right gutter.
   Below 1025px: navigation and button are replaced by a hamburger that opens a
   full-screen overlay. Nothing is persistently visible.
   ========================================================================== */

/* --- 0. Header band ------------------------------------------------------
   The header is its own surface: light ground, a hairline base, and a shadow
   once the page scrolls, so it never reads as part of the section beneath it.
   ---------------------------------------------------------------------- */

/* Astra sets body { overflow-x: hidden }, which makes the body a scroll
   container and stops position:sticky from ever sticking to the viewport.
   overflow-x: clip prevents horizontal scrolling without that side effect.
   Browsers without clip support simply keep Astra's value. */
html,
body {
  overflow-x: clip;
}

.xpro-theme-builder-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--ye-bg);
  border-bottom: 1px solid var(--ye-line);
  transition: box-shadow 0.35s ease;
}

/* The inner Elementor container carries its own background; keeping it opaque
   means the bar stays light even where it overlaps dark sections. */
.xpro-theme-builder-header .e-con-boxed {
  background-color: var(--ye-bg) !important;
}

.xpro-theme-builder-header.is-scrolled {
  box-shadow: 0 2px 18px rgba(17, 17, 17, 0.08);
}

/* --- 1. Desktop navigation row ------------------------------------------ */

.xpro-elementor-horizontal-navbar-nav {
  flex-wrap: nowrap;
  align-items: center;
}

.xpro-elementor-horizontal-navbar-nav > li {
  margin: 0 clamp(8px, 1.1vw, 17px);
  white-space: nowrap;
}

/* The Polylang switcher is the last nav item, so it lands between Contact and
   the consultation button exactly as in the original layout. */
.xpro-elementor-horizontal-navbar-nav > li.pll-parent-menu-item {
  margin-left: clamp(12px, 1.6vw, 24px);
}

.xpro-elementor-horizontal-navbar-nav > li.pll-parent-menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px !important;
  border: 1px solid var(--ye-line);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ye-ink);
}

.xpro-elementor-horizontal-navbar-nav > li.pll-parent-menu-item > a::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M2.75 12h18.5M12 2.75c2.5 2.6 3.75 5.7 3.75 9.25S14.5 18.65 12 21.25c-2.5-2.6-3.75-5.7-3.75-9.25S9.5 5.35 12 2.75z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M2.75 12h18.5M12 2.75c2.5 2.6 3.75 5.7 3.75 9.25S14.5 18.65 12 21.25c-2.5-2.6-3.75-5.7-3.75-9.25S9.5 5.35 12 2.75z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.xpro-elementor-horizontal-navbar-nav > li.pll-parent-menu-item > a:hover {
  border-color: var(--ye-accent);
  color: var(--ye-accent);
}

/* Xpro draws a 16px square rotated 45deg beneath every dropdown as a pointer,
   filled with the Elementor kit's primary colour. On this palette that renders
   as a black diamond under the language selector. The original design has no
   pointer, so it is removed outright. */
.xpro-elementor-horizontal-navbar-nav > li > .xpro-elementor-dropdown-menu::after,
.xpro-elementor-horizontal-navbar-nav > li > .xpro-elementor-dropdown-menu::before {
  content: none !important;
  display: none !important;
}

/* Dropdown opens directly beneath the selector. Xpro's own rules are more
   specific than a single class, so the panel is addressed through the header. */
/* Xpro anchors the panel to the list item's left edge, which reads as offset
   against a compact selector. A fixed width with a negative half-margin centres
   it under the button; margin is used rather than translateX because Xpro
   animates the panel with transform. */
.xpro-theme-builder-header .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu {
  width: 168px !important;
  min-width: 168px !important;
  max-width: 168px !important;
  left: 50% !important;
  right: auto !important;
  margin-left: -84px !important;
  padding: 6px;
  background: var(--ye-bg) !important;
  background-color: var(--ye-bg) !important;
  border: 1px solid var(--ye-line) !important;
  border-radius: 0 !important;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.1);
}

/* The parent must establish the positioning context for the centring above. */
.xpro-theme-builder-header .xpro-elementor-horizontal-navbar-nav > li.pll-parent-menu-item {
  position: relative;
}

/* Xpro fills each row with the kit primary and white text; this restores the
   light, minimal list from the original. */
.xpro-theme-builder-header .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li > a {
  padding: 9px 12px !important;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 0 !important;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ye-muted) !important;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.xpro-theme-builder-header .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li > a:hover,
.xpro-theme-builder-header .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li.current-lang > a {
  color: var(--ye-accent) !important;
  background-color: rgba(184, 139, 91, 0.09) !important;
}

/* The language rows carry no sub-menus, so no nested caret is needed. */
.xpro-theme-builder-header .xpro-elementor-dropdown-menu .xpro-dropdown-menu-toggle {
  display: none !important;
}

/* The selector's own caret stays: a thin chevron in the current text colour. */
.xpro-elementor-horizontal-navbar-nav > li.pll-parent-menu-item > a > .xpro-dropdown-menu-toggle {
  margin-left: 2px;
  font-size: 11px;
  color: currentColor;
}

.xpro-theme-builder-header .ast-header-navigation-arrow { display: none !important; }

/* Xpro's own responsive panel and toggler are never used. */
.xpro-elementor-horizontal-menu-toggler-wrapper,
.xpro-elementor-horizontal-menu-close { display: none !important; }

/* --- 2. Floating language rail (large screens) -------------------------- */

.ye-lang-rail {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 900;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 6px;
  background: rgba(245, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ye-line);
}

.ye-lang-rail__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 5px;
  border: 1px solid var(--ye-line);
  color: var(--ye-ink);
}

.ye-lang-rail__icon svg { width: 16px; height: 16px; }

.ye-lang-rail__item {
  padding: 6px 7px;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--ye-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.ye-lang-rail__item:hover { color: var(--ye-ink); }

.ye-lang-rail__item.is-active { color: var(--ye-accent); }

.ye-lang-rail__item.is-active::after {
  content: "";
  display: block;
  width: 13px;
  height: 1px;
  margin: 4px auto 0;
  background: var(--ye-accent);
}

/* Shown only where the viewport gutter is wide enough that the rail cannot
   sit over container content. */
@media (min-width: 1400px) {
  .ye-lang-rail { display: flex; }
}

/* --- 3. Hamburger ------------------------------------------------------- */

/* Elementor's global kit styles bare <button> elements with a dark fill, light
   text and 18px/36px padding. That selector outranks a single class, so every
   declaration that defines this control is forced. */
.ye-burger.ye-burger {
  /* A flex child of the header row, not a floating overlay button. */
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-left: auto;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px !important;
  height: 44px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: rgba(245, 243, 238, 0.92) !important;
  background-color: rgba(245, 243, 238, 0.92) !important;
  border: 1px solid var(--ye-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--ye-ink) !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s ease;
}

.ye-burger.ye-burger:hover { border-color: var(--ye-accent) !important; }

.ye-burger.ye-burger span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 0 auto;
  padding: 0;
  background: #111111 !important;
  background-color: #111111 !important;
  border: 0;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.ye-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ye-burger.is-open span:nth-child(2) { opacity: 0; }
.ye-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- 4. Full-screen overlay -------------------------------------------- */

.ye-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  /* Matches the original: 24px top row, generous side gutter, 48px base. */
  padding: 24px clamp(20px, 6vw, 48px) 48px;
  background: var(--ye-bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.ye-overlay[hidden] { display: none; }

.ye-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Same override reasoning as the hamburger above. */
.ye-overlay__close.ye-overlay__close {
  position: absolute;
  top: 13px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px !important;
  height: 44px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid var(--ye-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #111111 !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.ye-overlay__close.ye-overlay__close:hover {
  border-color: var(--ye-accent) !important;
  color: var(--ye-accent) !important;
}

.ye-overlay__close.ye-overlay__close svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
}

.ye-overlay__top {
  display: flex;
  align-items: center;
  height: 44px;
}

.ye-overlay__logo {
  font-family: Manrope, sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ye-ink);
  text-decoration: none;
}

.ye-overlay__nav {
  display: flex;
  flex-direction: column;
  margin-top: 64px;
}

.ye-overlay__link {
  padding: 9px 0;
  border-bottom: 1px solid var(--ye-line);
  font-family: Manrope, sans-serif;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ye-ink);
  text-decoration: none;
  transition: color 0.3s ease;
}

.ye-overlay__link:hover,
.ye-overlay__link:focus-visible { color: var(--ye-accent); }

.ye-overlay__cta {
  display: block;
  margin-top: 32px;
  padding: 19px 24px;
  background: var(--ye-accent);
  color: #ffffff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}

.ye-overlay__cta:hover { background: var(--ye-ink); color: #ffffff; }

.ye-overlay__langs {
  margin-top: auto;
  padding-top: 36px;
}

.ye-overlay__langs-label {
  display: block;
  margin-bottom: 12px;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ye-accent);
}

.ye-overlay__langs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ye-overlay__lang {
  padding: 11px 17px;
  border: 1px solid var(--ye-line);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ye-muted);
  text-decoration: none;
}

.ye-overlay__lang:hover { color: var(--ye-ink); }

.ye-overlay__lang.is-active {
  border-color: var(--ye-accent);
  color: var(--ye-accent);
}

html.ye-no-scroll,
html.ye-no-scroll body { overflow: hidden; }

/* --- 5. Breakpoint switch ---------------------------------------------- */

@media (max-width: 1024px) {
  /* Only the logo stays in the header bar. */
  .xpro-theme-builder-header .e-con-inner > .e-con:nth-child(2),
  .xpro-theme-builder-header .e-con-inner > .e-con:nth-child(3) {
    display: none !important;
  }

  .xpro-theme-builder-header .e-con-inner > .e-con:first-child {
    --width: auto !important;
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  .xpro-theme-builder-header .e-con-inner {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    /* Guaranteed clearance between the wordmark and the menu button. */
    gap: 16px;
  }

  /* A dedicated header band, clearly taller than its contents. */
  .xpro-theme-builder-header .e-con-boxed {
    min-height: 68px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Must match the doubled-class specificity of the base rule above,
     otherwise display:none wins and the button never appears. */
  .ye-burger.ye-burger { display: flex !important; }
  .ye-lang-rail { display: none !important; }
}

@media (max-width: 767px) {
  .xpro-theme-builder-header .e-con-boxed {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .ye-overlay__link { font-size: 27px; }
}

/* 320-414px: the wordmark must never wrap or collide with the button. */
@media (max-width: 479px) {
  .xpro-theme-builder-header .elementor-heading-title {
    font-size: 15px !important;
    letter-spacing: 0.18em !important;
    white-space: nowrap;
  }

  .xpro-theme-builder-header .e-con-inner > .e-con:first-child
    .elementor-widget-heading:nth-child(2) .elementor-heading-title {
    font-size: 8px !important;
    letter-spacing: 0.22em !important;
  }

  .ye-burger.ye-burger,
  .ye-overlay__close.ye-overlay__close {
    width: 40px !important;
    height: 40px !important;
    top: 12px;
    right: 14px;
  }

  .ye-overlay__top { height: 40px; }
  .ye-overlay__logo { font-size: 16px; letter-spacing: 0.2em; }
  .ye-overlay__nav { margin-top: 48px; }

  .xpro-theme-builder-header .e-con-inner > .e-con:first-child {
    padding-right: 62px !important;
  }

  .ye-overlay__link { font-size: 25px; padding: 13px 0; }
}

@media (max-width: 359px) {
  .xpro-theme-builder-header .e-con-inner > .e-con:first-child
    .elementor-widget-heading:nth-child(2) { display: none; }
  .xpro-theme-builder-header .elementor-heading-title { font-size: 14px !important; }
}
