/* ===== Header — fixed, transparent over hero, opaque on scroll ===== */
.hdr {
  position: fixed;
  top: 0; right: 0; left: 0;
  width: 100%; max-width: 100%;
  height: calc(100vw * 150 / 1920);
  z-index: 100;
  overflow: hidden;
  transition: background .25s ease, box-shadow .25s ease;
}
/* ===== White header state — on scroll OR when mega-menu open ===== */
.hdr.is-scrolled,
body.mega-open .hdr {
  background: #fff;
  backdrop-filter: none;
  box-shadow: 0 2px 18px rgba(0,0,0,.07);
}
.hdr.is-scrolled .hdr__logo-name,
.hdr.is-scrolled .hdr__nav a,
.hdr.is-scrolled .hdr__phone-label,
.hdr.is-scrolled .hdr__phone-num,
.hdr.is-scrolled .hdr__cta-label,
body.mega-open .hdr .hdr__logo-name,
body.mega-open .hdr .hdr__nav a,
body.mega-open .hdr .hdr__phone-label,
body.mega-open .hdr .hdr__phone-num,
body.mega-open .hdr .hdr__cta-label { color: #141414; }
.hdr.is-scrolled .hdr__logo-tag,
body.mega-open .hdr .hdr__logo-tag { color: #8a8a8a; }
.hdr.is-scrolled .hdr__line,
body.mega-open .hdr .hdr__line { background: rgba(0,0,0,.12); }
/* white svg icons -> dark on white bg */
.hdr.is-scrolled .hdr__cta-circle img,
.hdr.is-scrolled .hdr__phone-ic img,
body.mega-open .hdr .hdr__cta-circle img,
body.mega-open .hdr .hdr__phone-ic img { filter: brightness(0); }
/* CTA pill -> gold border (per design) */
.hdr.is-scrolled .hdr__cta,
body.mega-open .hdr .hdr__cta { border-color: #d6b577; }
.hdr.is-scrolled .hdr__cta-circle,
body.mega-open .hdr .hdr__cta-circle { border-color: rgba(214,181,119,.55); }
/* active nav item underline (תחומי התמחות) */
.hdr__nav a.is-active { position: relative; }
.hdr.is-scrolled .hdr__nav a.is-active::after,
body.mega-open .hdr .hdr__nav a.is-active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -4px; height: 2px; background: #141414;
}
/* ===== Sticky (scrolled) only — hide tagline + gold rule, vertically center the logo =====
   DESKTOP ONLY — the mobile header logo is a static grid, so these must not apply there. */
@media (min-width: 1025px) {
  .hdr.is-scrolled .hdr__logo-tag,
  .hdr.is-scrolled .hdr__logo-rule { display: none; }
  .hdr.is-scrolled .hdr__logo {
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

.hdr__stage {
  position: absolute;
  top: 0; right: 0;
  width: var(--canvas-w);
  height: 150px;
  transform-origin: top right;
  transform: scale(calc(100vw / var(--canvas-w)));
}

/* --- CTA pill (left) --- */
.hdr__cta {
  position: absolute; left: 310px; top: 28px;
  width: 184px; height: 48px;
  display: flex; direction: ltr; align-items: center;
  border: 1px solid #fff; border-radius: var(--r-pill);
  color: #fff;
}
.hdr__cta-circle {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
}
.hdr__cta-circle img { width: 24px; height: 24px; }
.hdr__cta-label { flex: 1; text-align: center; font-weight: 700; font-size: 19px; padding-left: 6px; }

/* --- Phone (right) --- right edge aligns to right divider line end (x1610) */
.hdr__phone {
  position: absolute; top: 29px; right: 310px;
  display: flex; direction: ltr; align-items: center; gap: 11px;
}
.hdr__phone-txt { display: flex; flex-direction: column; align-items: flex-end; }
.hdr__phone-label { color: #fff; font-weight: 700; font-size: 18px; line-height: 18px; }
.hdr__phone-num { color: var(--gold); font-weight: 700; font-size: 26px; line-height: 30px; margin-top: 7px; }
.hdr__phone-ic { position: relative; width: 46px; height: 46px; }
.hdr__phone-ic .circ { width: 100%; height: 100%; }
.hdr__phone-ic .glyph { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 22px; height: 22px; }

/* --- Logo (center) — gold YD monogram, Radley name, tagline flanked by gold lines --- */
.hdr__logo {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.hdr__logo-mark { width: 66px; height: 70px; object-fit: contain; }
.hdr__logo-name { color: #fff; font-family: var(--font-latin); font-size: 20px; font-weight: 400; letter-spacing: .5px; }
.hdr__logo-tagwrap { display: flex; direction: ltr; align-items: center; gap: 10px; }
.hdr__logo-line { width: 42px; height: 1px; background: var(--gold); display: block; }
.hdr__logo-tag { color: #fff; font-size: 17px; letter-spacing: 1px; font-weight: 400; }

/* --- EN language toggle (left of CTA) --- */
.hdr__lang {
  position: absolute; left: 504px; top: 28px; width: 65px; height: 48px;
  display: flex; direction: ltr; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid rgba(255,255,255,.4); background: none; color: #fff; font-size: 18px;
  font-family: var(--font-latin);
}
.hdr__lang-globe { width: 16px; height: 16px; }
.hdr.is-scrolled .hdr__lang, body.mega-open .hdr .hdr__lang { color: #141414; border-color: rgba(0,0,0,.25); }
.hdr.is-scrolled .hdr__lang-globe, body.mega-open .hdr .hdr__lang-globe { filter: brightness(0); }

/* --- Nav --- groups centered at Figma x (right 1379, left 540.5), sitting BELOW the line --- */
.hdr__nav { position: absolute; top: 116px; display: flex; direction: rtl; gap: 14px; transform: translateX(-50%); }
.hdr__nav a { color: #fff; font-weight: 600; font-size: 20px; padding: 6px 8px; white-space: nowrap; transition: color .2s; }
.hdr__nav a:hover { color: var(--gold); }
.hdr__nav--right { left: 1379px; }
.hdr__nav--left  { left: 540.5px; }
.hdr__nav .caret { display: inline-block; margin-right: 6px; font-size: 13px; opacity: .8; }

/* --- Flanking lines (Figma: right x1118-1610, left x309-801) --- */
.hdr__line { position: absolute; top: 104px; height: 1px; width: 492px; background: rgba(255,255,255,.22); }
.hdr__line--right { left: 1118px; }
.hdr__line--left { left: 309px; }

/* --- Hamburger (mobile only) --- */
.hdr__burger { display: none; }

@media (max-width: 1024px) {
  .hdr {
    height: 72px;
    background: transparent;
  }
  .hdr.is-scrolled { background: #fff; backdrop-filter: none; }
  .hdr.is-scrolled .hdr__burger span { background: #141414; }
  body.menu-open .hdr { background: rgba(13,44,33,.96); backdrop-filter: blur(8px); }
  .hdr::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 110px;
    background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
    pointer-events: none; z-index: -1;
  }
  .hdr.is-scrolled::before, body.menu-open .hdr::before { opacity: 0; }
  .hdr__stage {
    position: static; width: 100%; height: 72px; transform: none;
    direction: ltr; display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
  }
  .hdr__cta, .hdr__phone, .hdr__nav, .hdr__line, .hdr__logo-rule, .hdr__lang { display: none; }
  /* logo: monogram left + stacked names/tagline right */
  .hdr__logo {
    position: static; transform: none; order: 1; top: 0;
    display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto;
    align-items: center; column-gap: 9px; row-gap: 0;
  }
  .hdr__logo-mark { grid-row: 1 / 3; grid-column: 1; width: 30px; height: 40px; object-fit: contain; object-position: center; }
  .hdr__logo-names { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 0; }
  .hdr__logo-names .sep { display: none; }
  .hdr__logo-names .he { font-size: 13.5px; line-height: 1.15; }
  .hdr__logo-names .en { font-size: 9.5px; line-height: 1.15; letter-spacing: .3px; }
  .hdr__logo-tag { grid-column: 2; grid-row: 2; font-size: 7px; margin: 1px 0 0; letter-spacing: .2px; }
  /* hamburger (per provided SVG: white 24 / gold #B58D41 12 right / white 24) */
  .hdr__burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    order: 3; width: 26px; height: 40px; background: none; border: 0; padding: 0;
  }
  .hdr__burger span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform .25s, opacity .2s, width .25s; }
  .hdr__burger span:nth-child(2) { width: 50%; background: #B58D41; align-self: flex-end; }
  body.menu-open .hdr__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .hdr__burger span:nth-child(2) { opacity: 0; }
  body.menu-open .hdr__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ===== Mobile full-screen menu (Figma 4970:19238) ===== */
.site-menu { display: none; }
.mm__mtop, .mm__bar { display: none; }
@media (max-width: 1024px) {
  .site-menu {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 120;
    background: #fff; padding: 0; transform: translateX(100%);
    transition: transform .34s cubic-bezier(.4,0,.2,1); overflow-y: auto;
  }
  body.menu-open .site-menu { transform: translateX(0); }
  body.menu-open { overflow: hidden; }

  /* top bar: logo (left) + X (right) — force LTR so logo anchors left */
  .site-menu__top, .mm__mtop {
    display: flex; align-items: center; justify-content: space-between; direction: ltr;
    padding: 14px 16px; border-bottom: 1px solid #ededed; flex: 0 0 auto;
  }
  .site-menu__logo-tx { text-align: left; }
  .site-menu__logo { display: flex; align-items: center; gap: 9px; }
  .site-menu__logo-mark { width: 32px; height: 43px; object-fit: contain; }
  .site-menu__logo-tx { display: flex; flex-direction: column; line-height: 1.18; }
  .site-menu__logo-tx b { font-size: 14px; font-weight: 700; color: #141414; }
  .site-menu__logo-tx i { font-style: normal; font-family: var(--font-latin); font-size: 10px; letter-spacing: .3px; color: #141414; }
  .site-menu__logo-tx em { font-style: normal; font-size: 8px; color: #9a8348; margin-top: 1px; }
  .site-menu__close {
    width: 40px; height: 40px; border: 0; background: none; color: #141414;
    font-size: 30px; line-height: 1; display: flex; align-items: center; justify-content: center;
  }

  /* nav list */
  .site-menu__nav { flex: 1 1 auto; padding: 4px 0 0; }
  .site-menu__nav a,
  .site-menu__sub {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%;
    background: none; border: 0; border-bottom: 1px solid #efefef;
    padding: 19px 24px; font-size: 19px; font-weight: 600; color: #161616;
    text-align: right; font-family: inherit; cursor: pointer;
  }
  /* text on the right, chevron pushed to the left edge (RTL) */
  .site-menu__sub { justify-content: space-between; }
  .site-menu__chev {
    width: 9px; height: 9px; border-left: 2px solid #161616; border-bottom: 2px solid #161616;
    transform: rotate(45deg); /* points left ‹ */
  }

  /* CTA pill */
  .site-menu__cta {
    flex: 0 0 auto; margin: 26px 24px 34px; height: 56px; border-radius: 900px;
    background: var(--gold); color: var(--green-900) !important;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    font-weight: 700; font-size: 19px; direction: ltr;
  }
  .site-menu__cta .circ {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(13,44,33,.4);
    display: flex; align-items: center; justify-content: center;
  }
  .site-menu__cta .circ img { width: 20px; height: 20px; filter: brightness(0); }

  /* EN language toggle — bottom of the dropdown, hugging the right (Figma 5025:8766) */
  .site-menu__lang {
    flex: 0 0 auto; margin: 0 24px 34px auto;   /* margin-left:auto pushes it to the right edge */
    display: flex; direction: ltr; align-items: center; justify-content: center; gap: 7px;
    width: 80px; height: 46px; border: 1px solid rgba(0,0,0,.22); background: none;
    font-family: var(--font-latin); font-size: 17px; color: #141414; cursor: pointer;
  }
  .site-menu__lang img { width: 18px; height: 18px; object-fit: contain; }
}
/* desktop header EN stays hidden inside the mobile dropdown only */
.site-menu__lang { display: none; }
@media (max-width: 1024px) { .site-menu__lang { display: flex; } }

/* ===== MEGA MENU (תחומי התמחות dropdown) ===== */
.megamenu {
  position: fixed; top: calc(100vw * 150 / 1920); left: 0; right: 0; z-index: 99;
  background: #fff; box-shadow: 0 16px 30px rgba(0,0,0,.10); border-top: 1px solid #eee;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
body.mega-open .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }
.megamenu__inner {
  max-width: 1500px; margin: 0 auto; padding: 40px 40px 52px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 44px; direction: rtl;
}
.mm__col h4 {
  font-size: 23px; font-weight: 500; color: #1a1a1a; text-align: right;
  margin: 0 0 16px; padding-bottom: 15px; border-bottom: 1.5px solid var(--gold);
}
.mm__col a { display: block; font-size: 16.5px; line-height: 32px; color: #6e6e6e; text-align: right; transition: color .15s; }
.mm__col a:hover { color: var(--gold-deep); }

/* ===== Mobile mega submenu (Figma 4984:5223 / 4984:5985) ===== */
@media (max-width: 1024px) {
  /* full-screen white panel over the main mobile menu */
  .megamenu {
    position: fixed; inset: 0; top: 0; z-index: 130;
    background: #fff; box-shadow: none; border-top: 0;
    opacity: 0; visibility: hidden; transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1), opacity .2s, visibility .32s;
    display: flex; flex-direction: column; overflow: hidden; /* pin bars, scroll list only */
  }
  body.m-mega-open .megamenu { opacity: 1; visibility: visible; transform: translateX(0); }

  /* cream breadcrumb bar with back arrow */
  .mm__bar {
    display: flex; align-items: center; justify-content: center; position: relative;
    background: #f2ece0; padding: 16px 20px; flex: 0 0 auto;
  }
  .mm__bar-title { font-size: 18px; font-weight: 600; color: #141414; }
  .mm__back {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border: 0; background: none; cursor: pointer;
  }
  .mm__back::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 11px;
    border-top: 2px solid #141414; border-right: 2px solid #141414;
    transform: translate(-50%,-50%) rotate(45deg); /* arrow → (back, RTL) */
  }

  /* accordions — each .mm__col becomes a collapsible row */
  .megamenu__inner { display: block; max-width: none; width: 100%; margin: 0; padding: 0; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .mm__col { border-bottom: 1px solid #ededed; }
  .mm__col h4 {
    position: relative; margin: 0; padding: 19px 24px; border-bottom: 0;
    font-size: 18px; font-weight: 700; color: #161616; cursor: pointer; text-align: right;
  }
  .mm__col h4::after {
    content: ""; position: absolute; left: 24px; top: 24px; width: 9px; height: 9px;
    border-right: 2px solid #161616; border-bottom: 2px solid #161616;
    transform: rotate(45deg); transition: transform .25s; /* chevron down ▼ */
  }
  .mm__col.open h4::after { transform: rotate(-135deg); }   /* up ^ */
  /* links collapse individually (no wrapper needed) */
  .mm__col a {
    display: block; max-height: 0; overflow: hidden; opacity: 0;
    padding: 0 40px; font-size: 16px; line-height: 1.5; color: #6e6e6e;
    text-align: right; border: 0;
    transition: max-height .28s ease, opacity .2s ease, padding .28s ease;
  }
  .mm__col.open a { max-height: 44px; opacity: 1; padding: 9px 40px; }
  .mm__col.open a:last-child { margin-bottom: 10px; }
}
