/* ─── Site chrome (global header + footer) ────────────── */

:root {
  --cs-cream: #FCF1EB;
  --cs-orange: #E84F36;
  --cs-blue: #2589CC;
  --cs-line: #000000;
  --cs-border: 3px;
}

/* ─── Header ──────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 200ms ease;
  border-bottom: 3px solid transparent;
}

.site-header.header-is-scrolled {
  background: var(--cs-cream);
  border-color: black;
}


.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  height: 90px;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 100px;
  box-sizing: content-box;
}

/* Logo (BEIT AUSTRIA / בית אוסטריה) */
.site-nav__logo {
  display: block;
  width: 164px;
  height: 60px;
  flex: 0 0 auto;
}

.site-nav__logo img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Menu */
.site-nav__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}

.site-nav__item a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--cs-font-heading);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  color: var(--cs-line);
  white-space: nowrap;
  transition: color 200ms ease;
      font-variation-settings: "wght" 500, "wdth" 460;
}

.site-nav__item a:hover,
.site-nav__item a:focus-visible {
  color: var(--cs-orange);
}

.site-nav__caret {
  width: 12px;
  height: 8px;
  flex: 0 0 auto;
  color: currentColor;
}

.site-nav__item--has-children {
  position: relative;
}

.site-nav__submenu {
  position: absolute;
  top: 100%;
  min-width: 200px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--cs-cream);
  border: var(--cs-border) solid var(--cs-line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 10;
}
.site-nav__submenu .site-nav__subitem {
    border-bottom: 3px solid black;
}

.site-nav__submenu .site-nav__subitem:last-child {
    border-bottom: unset;

}
.site-nav__item--has-children:hover .site-nav__submenu,
.site-nav__item--has-children:focus-within .site-nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__subitem a {
  display: block;
  padding: 14px 20px;
  font-family: var(--cs-font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--cs-line);
  white-space: nowrap;
  transition: color 200ms ease;
  font-variation-settings: "wght" 600, "wdth" 460;
}

.site-nav__subitem a:hover,
.site-nav__subitem a:focus-visible {
  color: var(--cs-orange);
}

/* ─── Language switcher (nav dropdown) ─────────────────────────
   Closed state shows the current language + a chevron; on hover or
   keyboard focus it opens a cream, black-bordered panel of the other
   languages as links — same visual language as the "פעילויות" submenu. */
.site-nav__lang-switch {
  position: relative;
  flex: 0 0 auto;
}

.site-nav__lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--cs-font-heading);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  color: var(--cs-orange);
  font-variation-settings: "wght" 500, "wdth" 460;
}

.site-nav__lang-toggle .site-nav__caret {
  transition: transform 200ms ease;
}

/* Flip the caret while the panel is open. */
.site-nav__lang-switch:hover .site-nav__caret,
.site-nav__lang-switch:focus-within .site-nav__caret {
  transform: rotate(180deg);
}

.site-nav__lang-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;    /* anchor to the trigger's start edge so the panel
                               opens to the opposite side of the label; the
                               logical property auto-mirrors between RTL & LTR */
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--cs-cream);
  border: var(--cs-border) solid var(--cs-line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 10;
}

.site-nav__lang-switch:hover .site-nav__lang-menu,
.site-nav__lang-switch:focus-within .site-nav__lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__lang-menu li {
  border-bottom: var(--cs-border) solid var(--cs-line);
}

.site-nav__lang-menu li:last-child {
  border-bottom: 0;
}

.site-nav__lang-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: var(--cs-font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--cs-line);
  white-space: nowrap;
  text-decoration: none;
  transition: color 200ms ease;
  font-variation-settings: "wght" 600, "wdth" 460;
}

.site-nav__lang-link:hover,
.site-nav__lang-link:focus-visible {
  color: var(--cs-orange);
}

.site-nav__lang-flag {
  display: block;
  width: 20px;
  height: auto;
  flex: 0 0 auto;
}

/* ─── Mobile menu: hamburger + drawer (≤768px) ────────── */

/* 2×2 grid hamburger icon — hidden on desktop, shown in the mobile query. */
.site-nav__toggle {
  display: none;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.site-nav__toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 13px);
  grid-template-rows: repeat(2, 13px);
  gap: 3px;
}

.site-nav__toggle-grid span {
  width: 13px;
  height: 13px;
  border: var(--cs-border) solid var(--cs-line);
  box-sizing: border-box;
}

/* Full-screen drawer — disabled on desktop, enabled inside the mobile query. */
.mobile-drawer {
  display: none;
}

/* Centered menu links */
.mobile-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

/* Center the parent link line too — without this, an item with children grows
   to the submenu's width and the link sticks to the (right) edge. */
.mobile-nav__list > li {
  text-align: center;
}

.mobile-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--cs-font-heading);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  color: var(--cs-line);
  transition: color 200ms ease;
  font-variation-settings: "wght" 500, "wdth" 460;
}

.mobile-nav__list a:hover,
.mobile-nav__list a:focus-visible {
  color: var(--cs-orange);
}

/* Caret injected by main.js after a parent link */
.dropdown-toggle-btn {
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: 8px;
  font-size: 12px;
  line-height: 1;
  color: var(--cs-line);
  cursor: pointer;
  transition: transform 200ms ease, color 200ms ease;
}

.menu-item-has-children.submenu-open .dropdown-toggle-btn {
  transform: rotate(180deg);
  color: var(--cs-orange);
}

/* Submenu — collapsed until its parent is toggled open */
.mobile-nav__list .sub-menu {
  display: none;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  text-align: center;
}

.mobile-nav__list .submenu-open > .sub-menu {
  display: block;
}

.mobile-nav__list .sub-menu li {
  margin-top: 20px;
}

.mobile-nav__list .sub-menu li:first-child {
  margin-top: 0;
}

.mobile-nav__list .sub-menu a {
  font-size: 16px;
  line-height: 1.4;
  font-variation-settings: "wght" 500, "wdth" 460;
}

/* Bottom language switcher (flag + גרמנית) */
.mobile-drawer__lang {
  flex: 0 0 auto;
  margin-top: auto;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;   /* now an <a> language link */
  border-top: var(--cs-border) solid var(--cs-line);
  border-bottom: var(--cs-border) solid var(--cs-line);
  background: none;
  cursor: pointer;
}

/* When several languages stack in the drawer, collapse the shared edge so it
   reads as one divider instead of a doubled 6px line. */
.mobile-drawer__lang + .mobile-drawer__lang {
  border-top: 0;
}

.mobile-drawer__lang-icon {
  display: block;
  width: 20px;
  height: auto;
}

.mobile-drawer__lang-label {
  font-family: var(--cs-font-heading);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  color: var(--cs-orange);
  font-variation-settings: "wght" 500, "wdth" 460;
}

/* Lock background scroll while the drawer is open */
body.drawer-open {
  overflow: hidden;
}

/* ─── Sponsors strip ─────────────────────────────────── */

.site-sponsors {
  background: var(--cs-cream);
  border-top: var(--cs-border) solid var(--cs-line);
}

.site-sponsors__container {
  width: 100%;
  max-width: 1240px;          /* 1300px logo row + 2×70px gutters, no horizontal overflow at 1440 */
  margin-inline: auto;
  box-sizing: border-box;
}

.site-sponsors__list {
  list-style: none;
  margin: 0;
  padding-block: 90px;
  padding-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-sponsors__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
}

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

/* Logo becomes a link when a partner URL is set (ACF). Keep it laid out like
   the bare <img> and add a light hover cue. */
.site-sponsors__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 200ms ease;
}

.site-sponsors__link:hover,
.site-sponsors__link:focus-visible {
  opacity: 0.7;
}

@media (max-width: 1280px) {
  .site-sponsors__container {
    padding-inline: clamp(1rem, 4vw, 2.5rem);
  }
}

@media (max-width: 1024px) {
  .site-sponsors__list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 40px;
    padding-block: 48px;
  }
}

@media (max-width: 768px) {
  .site-sponsors__list {
    gap: 20px 28px;
  }

  /* Two logos per row on phones — each item fills half the row, minus the column gap */
  .site-sponsors__item {
    flex: 0 0 calc(50% - 14px);
  }

  .site-sponsors__item img {
    max-height: 56px;
    width: auto;
  }
}

/* ─── Footer ──────────────────────────────────────────── */

.site-footer {
  background: var(--cs-color-cream);
  color: var(--cs-color-line);
  font-family: var(--cs-font-body);
  border-top: 3px solid var(--cs-color-line);
  border-bottom: 3px solid var(--cs-color-line);
  /* Footer follows Figma's LTR visual flow (lockup-left, contact-right;
     designed-by-left, social-right). Hebrew text inside individual elements
     still flows RTL via dir="auto" on each <p>. */
  direction: ltr;
}

.site-footer__container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 100px;
  box-sizing: content-box;
}

/* Top section: lockup + contact */
.site-footer__main {
  display: flex;
  align-items: center;
  border-bottom: 3px solid var(--cs-color-line);
}

.site-footer__main .site-footer__container {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 40px;
}

/* Left side: bilingual organization lockup + emblem */
.site-footer__lockup {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 0 0 auto;
}

/* Bilingual organization lockup (DAS ZENTRALKOMITEE / הועד המרכזי). */
.site-footer__lockup-img {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

/* Optional dedicated mobile asset for the bilingual lockup (ACF). */
.site-footer__lockup-img--mobile {
  display: none;
  width: auto;
  max-width: 100%;
  height: auto;
}

/* Right side: contact info */
.site-footer__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex: 0 0 auto;
  align-self: center;
  padding-top: 10px;
  text-align: center;
}

.site-footer__emblem {
  width: 85px;
  height: 85px;
  flex: 0 0 auto;
}

.site-footer__emblem img {
  width: 100%;
  height: 100%;
  display: block;
}

.site-footer__address {
  font-style: normal;
  font-family: var(--cs-font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.site-footer__address p {
  margin: 0;
}

/* Footer chrome links keep the footer's own black by default (they inherit the
   footer text colour) and go menu-red on hover, no underline — the footer opts
   out of the global blue link colour. Covers contact, credit and legal links. */
.site-footer__address a,
.site-footer__credit a,
.site-footer__legal a {
  color: inherit;
}

/* Legal links (accessibility / privacy) are underlined, per the design. */
.site-footer__legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer__address a:hover,
.site-footer__address a:focus-visible,
.site-footer__credit a:hover,
.site-footer__credit a:focus-visible,
.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
  color: var(--cs-color-link-hover);
}

/* Bottom strip — sized to match the 50px social icon row in the Figma. */
.site-footer__bar {
  padding-block: 0;
}

.site-footer__bar .site-footer__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 50px;
}

/* Credit + legal grouped, spread apart within their share of the bar */
.site-footer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex: 1 1 auto;
}

.site-footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--cs-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  white-space: nowrap;
}

/* WYSIWYG content (ACF) drops a <p> in here — keep it on the inline-flex row. */
.site-footer__credit > p,
.site-footer__legal > p {
  margin: 0;
}
.site-footer__legal > p {
  display: flex;
  flex-direction: row;
  gap: 20px; /* design spacing between ID / accessibility / privacy (mobile overrides below) */
}

.site-footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-family: var(--cs-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  white-space: nowrap;
}

.site-footer__legal-id {
  margin-inline-start: 0;
}

.site-footer__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cs-blue);
  flex: 0 0 auto;
}

/* Social icons */
.site-footer__social {
  display: inline-flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-inline-end: 3px solid var(--cs-line);
    color: #2B7AED;
    transition: color 200ms ease;
}

.site-footer__social li:last-child .site-footer__social-icon {
  border-inline-end: 3px solid var(--cs-line);
}



.site-footer__social-icon img,
.site-footer__social-icon svg {
  width: auto;
  display: block;
}

.site-footer__social-icon:hover,
.site-footer__social-icon:focus-visible {
  color: var(--cs-color-primary, #FB3E25);
  background-color: #fff;
}

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 1280px) {
  .site-nav,
  .site-footer__container {
    padding-inline: clamp(1rem, 4vw, 2.5rem);
  }
}

@media (max-width: 1024px) {
  .site-nav__menu {
    gap: 24px;
  }
 .site-footer__main {
  border-bottom: unset;
 }
  .site-footer__main .site-footer__container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }

  .site-footer__bar .site-footer__container {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .site-footer__meta,
  .site-footer__legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .site-nav {
    height: 70px;
    gap: 16px;
    /* border-box so the 22px side padding (Figma) stays inside the 375px viewport
       instead of adding to width:100% and overflowing. */
    box-sizing: border-box;
    padding-inline: 22px;
  }

  /* Desktop menu + inline language switcher give way to the hamburger. */
  .site-nav__menu,
  .site-nav__lang-switch {
    display: none;
  }

  .site-nav__toggle {
    display: block;
  }

  /* Smaller logo to match the mobile design (keeps the 2.73:1 ratio). */
  .site-nav__logo {
    width: 120px;
    height: 44px;
  }

  /* Activate the full-screen drawer. */
  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    background: var(--cs-cream);
    padding-top: 70px; /* clear the fixed header */
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms;
  }

  .mobile-drawer.is-open {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile footer stacks (per Figma): contact on top, full-bleed lockup below,
     then a bottom bar with vertical social icons (left) + legal block (right). */

  /* Reverse the main row so the contact block sits above the lockup, and drop
     the container's side padding so the lockup can run full-bleed.
     (Base .site-footer__container is content-box — force border-box here so
     side padding doesn't add to width:100% and overflow the viewport.) */
  .site-footer__main .site-footer__container {
    flex-direction: column-reverse;
    flex-wrap: nowrap;
    align-items: stretch;
    box-sizing: border-box;
    gap: 0;
    padding-inline: 0;
    /* Anchor for the decorative emblem, which is pinned into the contact band. */
    position: relative;
  }

  /* Contact: right-aligned, padded. */
  .site-footer__contact {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 20px 22px;
    text-align: start;
  }

  .site-footer__address {
    text-align: start;
  }

  /* Lockup: full-bleed mobile asset; the desktop image is hidden. */
  .site-footer__lockup {
    transform: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
  }

  /* Emblem: the contact text above is right-aligned, leaving the left half of the
     cream band empty — pin the emblem there rather than letting it stack under the
     full-bleed lockup image. Offsets match the contact block's own 20px/22px padding. */
  .site-footer__emblem {
    position: absolute;
    top: 20px;
    inset-inline-start: 22px;
    width: 64px;
    height: 64px;
    z-index: 1;
  }

  .site-footer__lockup-img--desktop {
    display: none;
  }

  .site-footer__lockup-img--mobile {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  /* Bottom bar: social icons (left) + legal/credit (right), vertically centred.
     DOM order is meta-then-social, so row-reverse puts the social column left.
     Per Figma the social column is flush to the left edge and spans the bar's
     full height (no vertical padding) — its borders form the left frame line.
     Only the right side is padded so the legal text clears the edge.
     border-box stops the side padding from overflowing the 100%-wide container. */
  .site-footer__bar .site-footer__container {
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    box-sizing: border-box;
    text-align: start;
    gap: 16px;
    padding-block: 0;
    padding-inline: 20px 0;
    min-height: 0;
  }

  /* Social icons stack vertically, each a fully-bordered 50px box (border-box
     keeps the outer size at 50px to match the design). column-reverse flips the
     DOM order (Facebook, YouTube, LinkedIn) to the design's LinkedIn → Facebook. */
  .site-footer__social {
    flex-direction: column-reverse;
    gap: 0px;
    flex: 0 0 auto;
  }

  /* Both vertical edges are drawn so the stacked icons read as a framed column. */
  .site-footer__social-icon {
    box-sizing: border-box;
    border: unset;
    border-bottom: 3px solid var(--cs-line);
    border-inline-start: 3px solid var(--cs-line);
    border-inline-end: 3px solid var(--cs-line);
  }

    .site-footer__social li:first-child .site-footer__social-icon {
          border-bottom: unset;

    }

  /* Right column: legal lines on top, "Designed by" credit at the bottom. */
  .site-footer__meta {
    flex-direction: column-reverse;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 70px);
    text-align: start;
  }

  /* Stack the legal links/id as separate right-aligned lines. They live in a
     single WYSIWYG <p>, so turn that <p> into a flex column and use `order` to
     match the design's top-to-bottom sequence: ע"ר → מדיניות → הצהרת. (The two
     policy links carry no distinguishing class, so they're ordered by position.) */
  .site-footer__legal {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    white-space: normal;
  }

  .site-footer__legal > p {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    width: 100%;
    text-align: start;
  }

  .site-footer__legal > p > .site-footer__legal-id {
    order: -2;   /* ע"ר 580291441 on top */
  }

  .site-footer__legal > p > a:nth-of-type(2) {
    order: -1;   /* מדיניות פרטיות (2nd link) above… */
  }

  .site-footer__legal > p > a:nth-of-type(1) {
    order: 0;    /* …הצהרת נגישות (1st link) */
  }

  .site-footer__credit {
    white-space: normal;
    text-align: start;
  }

  /* The decorative blue dots are desktop-only. */
  .site-footer__dot {
    display: none;
  }
}
