/* ============================================================
   פסטיבל בית גלים — עיצוב מדויק לפי הפיגמה (קנבס 1920px).
   כל המידות כאן הן במידות העיצוב; ה-JS מקטין/מגדיל את כל
   העמוד יחסית לרוחב המסך (ראו js/main.js).
   מתחת ל-1100px (טאבלט/מובייל) מתחלף לפריסה זורמת — ראו הבלוק האחרון.
   ============================================================ */

@font-face { font-family: 'EditorSerif'; src: url('../fonts/EditorSerif-Regular.otf')  format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EditorSerif'; src: url('../fonts/EditorSerif-Semibold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'EditorSerif'; src: url('../fonts/EditorSerif-Bold.otf')     format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'TheBasics';   src: url('../fonts/TheBasics-Regular.otf')    format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'TheBasics';   src: url('../fonts/TheBasics-Bold.otf')       format('opentype'); font-weight: 700; font-display: swap; }

:root {
  --gray:   #dadada;
  --blue:   #00a6e0;
  --pink:   #f9b4d8;
  --yellow: #ffdc51;
  --orange: #f98232;
  --purple: #9a54d0;
  --mint:   #97ddd8;
  --black:  #000;
  --nav-h:  93px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--gray);
  color: var(--black);
  font-family: 'TheBasics', sans-serif;
  -webkit-font-smoothing: antialiased;
  /* בפיגמה אין שפה מוגדרת, ולכן הספרות בפונט לא עוברות החלפה עברית (locl) —
     כיבוי התכונה נותן ספרות באותו רוחב בדיוק כמו בעיצוב */
  overflow-x: hidden;
}
/* (הכלל כאן ולא ב-body, כי קיצור font בכל רכיב מאפס את התכונה) */
body, body * { font-feature-settings: 'locl' 0 !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, p, address { margin: 0; font: inherit; font-style: normal; }

/* ---------- קנבס 1920 מוקטן ---------- */
#page { position: relative; width: 100%; }
#stage { position: absolute; top: 0; left: 0; width: 1920px; transform-origin: 0 0; }
section, footer { position: relative; width: 1920px; }

/* ---------- סרגל עליון ---------- */
.nav {
  position: fixed; top: 0; left: 0; z-index: 100;
  width: 1920px; height: var(--nav-h);
  padding: 25px 120px;
  display: flex; justify-content: space-between; align-items: flex-start;
  background: var(--gray);
  transform-origin: 0 0;
}
.nav-toggle { display: none; }
.nav-logo { display: block; width: 206.474px; height: 42.625px; }
.nav-logo img { position: relative; left: .5px; width: 207px; height: 43px; max-width: none; }
.nav-links { display: flex; gap: 69px; }
.nav-btn {
  height: 43px; padding: 10px;
  font: 400 24px/23px 'EditorSerif', serif;
  color: #000; text-align: center; white-space: nowrap;
}
.nav-btn:nth-child(1) { width: 79px; }
.nav-btn:nth-child(2) { width: 95px; }
.nav-btn:nth-child(3) { width: 63px; }
.nav-btn:nth-child(4) { width: 100px; }
.nav-btn:hover, .nav-btn:focus-visible { background: var(--hover); color: #fff; outline: 0; }
.nav-btn:nth-child(1) { --hover: var(--orange); }   /* אודות */
.nav-btn:nth-child(2) { --hover: var(--purple); }   /* תוכנייה */
.nav-btn:nth-child(3) { --hover: var(--blue); }     /* מפה */
.nav-btn:nth-child(4) { --hover: var(--yellow); }   /* צור קשר */

/* ---------- פתיחה ---------- */
.hero { height: 1080px; background: var(--gray); overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 1920px; height: 1080px; object-fit: cover; }
.hero-logo { position: absolute; left: 574px; top: 507px; width: 772px; height: 159.375px; }
.hero-logo-img { width: 772px; height: 160px; max-width: none; }
.hit { position: absolute; inset: 0; width: 100%; height: 100%; }
.hit * { fill: rgba(0,0,0,0.001); pointer-events: all; cursor: default; }

.btn-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 71px; padding: 16px 30px;
  border: 1px solid #000; border-radius: 43px;
  font: 600 32px/39px 'EditorSerif', serif; color: #000; white-space: nowrap;
  transition: background-color .15s;
}
.btn-pill:hover, .btn-pill:focus-visible { background: var(--pink); outline: 0; }
.hero-btn { position: absolute; left: 120px; top: 954px; }
.hero-date {
  position: absolute; right: 120px; top: 950px; direction: ltr; text-align: left;
  font: 600 82.49px/79px 'EditorSerif', serif; white-space: nowrap;
}

/* ---------- אודות ---------- */
.about { height: 1011px; background: var(--blue); margin-top: 0; z-index: 2; }
.about-bg { position: absolute; inset: 0; width: 1920px; height: 1011px; display: none; }
.about-bg.is-on { display: block; }
.about-title { position: absolute; right: 120px; top: 397px; width: 372px; text-align: right; font: 600 32px/39px 'EditorSerif', serif; }
.about-text  { position: absolute; right: 120px; top: 518px; width: 363px; text-align: right; font: 400 24px/27px 'TheBasics', sans-serif; }
.about-note  { position: absolute; right: 120px; top: 663px; width: 363px; text-align: right; font: 600 24px/27px 'EditorSerif', serif; }

/* ---------- תוכנייה ---------- */
.program { margin-top: -3px; direction: rtl; overflow: visible; }
.program .bg { position: absolute; left: 0; width: 1920px; }
.program .icon { position: absolute; display: block; pointer-events: none; }

.tabs { position: absolute; top: 1px; left: 0; width: 1920px; height: 100px; display: flex; z-index: 3; }
.tab {
  width: 480px; height: 100px; padding: 10px;
  display: flex; align-items: center; justify-content: center;
  font: 600 32px/39px 'EditorSerif', serif; white-space: nowrap;
}
.tab:hover, .tab:focus-visible { color: #000 !important; outline: 0; }
.tab[data-cat="houses"]    { background: var(--blue);   color: var(--mint); }
.tab[data-cat="shows"]     { background: var(--pink);   color: var(--purple); }
.tab[data-cat="tours"]     { background: var(--yellow); color: var(--orange); }
.tab[data-cat="workshops"] { background: var(--gray);   color: var(--blue); }

.pills { position: absolute; left: 1670px; width: 130px; display: flex; flex-direction: column; gap: 20px; z-index: 2; }
.pill {
  width: 130px; height: 63px;
  border: 1px solid #000; border-radius: 42px; background: transparent;
  font: 600 32px/39px 'EditorSerif', serif; color: #000;
  transition: background-color .12s;
}
.pill:hover, .pill:focus-visible, .pill.is-active { background: var(--accent); outline: 0; }

.cols { position: absolute; left: 0; width: 1920px; height: 0; direction: ltr; z-index: 2; }
.col { position: absolute; top: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 100px; }

/* כרטיס אירוע (לחיץ — נפתח לתיאור) */
.ev {
  direction: rtl; text-align: right; width: max-content;
  height: 121px; overflow: hidden; cursor: pointer;
  transition: height .3s ease;
}
.ev.is-open { min-width: 299px; }
.ev-t { font: 600 32px/39px 'EditorSerif', serif; white-space: nowrap; }
.ev-m { margin-top: 14px; font: 700 24px/27px 'TheBasics', sans-serif; white-space: nowrap; }
.ev-d { margin-top: 14px; width: 0; min-width: 100%; font: 400 24px/27px 'TheBasics', sans-serif; }

/* בתים פתוחים */
.house { direction: rtl; display: flex; align-items: flex-start; gap: 26px; overflow: hidden; }
.house-num {
  flex: none; width: 60px; height: 60px; border: 3px solid var(--blue); background: var(--mint);
  display: flex; align-items: center; justify-content: center;
  font: 400 32px/39px 'TheBasics', sans-serif;
}
.house-txt { text-align: right; }
.house-t { font: 600 32px/39px 'EditorSerif', serif; }
.house-n { margin-top: 14px; font: 700 24px/27px 'TheBasics', sans-serif; white-space: pre-line; }
.hours { position: absolute; left: 1580px; top: 300px; width: 220px; direction: rtl; text-align: right; z-index: 2; }
.hours h3 { font: 600 32px/39px 'EditorSerif', serif; white-space: nowrap; }
.hours b, .hours span { position: absolute; right: 0; white-space: nowrap; font: 400 24px/31px 'TheBasics', sans-serif; }
.hours b { font-weight: 700; }

/* ---------- מפה ---------- */
.map { height: 1676px; background: var(--gray); }
.map-scroll { position: absolute; inset: 0; }
.map-sizer { position: relative; width: 1920px; height: 1676px; }
.map-canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1676px; transform-origin: 0 0; transform: scale(var(--ms, 1)); }
.map-img { position: absolute; inset: 0; width: 1920px; height: 1676px; }
.map-markers { position: absolute; inset: 0; }
.marker { position: absolute; cursor: pointer; border-radius: 4px; }
.marker.venue, .marker.parking { border-radius: 50%; }
.marker:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.map-popup {
  position: absolute; z-index: 5; width: 264px;
  padding: 20px 22px; background: var(--mint);
  direction: rtl; text-align: right; font: 400 24px/27px 'TheBasics', sans-serif;
}
.map-popup[hidden] { display: none; }
.map-popup b { font-weight: 700; }

/* ---------- צור קשר ---------- */
.contact { height: 1252px; background: var(--gray); }
.contact-line { position: absolute; left: 0; top: -6px; width: 1920px; height: 7px; background: var(--orange); z-index: 2; }
.contact-art { position: absolute; left: 101px; top: 13.5px; width: 1070.74px; height: 1004.43px; }
.contact-art > img { position: absolute; inset: 0; width: 1070.74px; height: 1004.43px; display: none; }
.contact-art > img.is-on { display: block; }
.contact-head { position: absolute; left: 1339px; top: 325px; width: 461px; direction: rtl; text-align: right; }
.contact-head h2 { font: 700 48px/46px 'EditorSerif', serif; }
.contact-head p  { margin-top: 18px; font: 600 32px/39px 'EditorSerif', serif; }
.contact-form { position: absolute; left: 0; top: 0; width: 1920px; height: 1252px; pointer-events: none; }
.field {
  position: absolute; left: 1307px; width: 493px; border: 0; border-radius: 0; margin: 0;
  direction: rtl; text-align: right; color: #000; outline: 0; pointer-events: all;
  font: 400 24px/27px 'TheBasics', sans-serif; padding: 26px 38px;
  appearance: none; -webkit-appearance: none; resize: none;
}
.field::placeholder { color: #000; opacity: 1; }
.field:focus { box-shadow: inset 0 0 0 2px #000; }
.f-yellow { top: 557px; height: 79px; background: var(--yellow); }
.f-blue   { top: 668px; height: 79px; background: var(--blue); }
.f-pink   { top: 779px; height: 261px; background: var(--pink); }
.send { position: absolute; left: 1172px; top: 951px; width: 89px; height: 89px; pointer-events: all; }
.send img { position: absolute; inset: 0; }
.send .s2 { display: none; }
.send:not(:disabled):hover .s1, .send:not(:disabled):focus-visible .s1 { display: none; }
.send:not(:disabled):hover .s2, .send:not(:disabled):focus-visible .s2 { display: block; }
.send:focus-visible { outline: 0; }
.send:disabled { opacity: .4; cursor: not-allowed; }
.form-msg {
  position: absolute; left: 1307px; top: 1062px; width: 493px; margin: 0;
  direction: rtl; text-align: right; color: var(--purple);
  font: 600 32px/39px 'EditorSerif', serif;
}
.form-msg:empty { display: none; }

/* ---------- פוטר ---------- */
.footer { height: 250px; background: var(--mint); }
.footer-logos { position: absolute; left: 1320px; top: 68px; width: 480px; height: 114px; }
.footer-logos img { width: 480px; height: 114px; }
.footer-social { position: absolute; left: 704.5px; top: 100.5px; width: 261px; height: 49px; }
.soc { position: absolute; display: block; }
.soc img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.soc .b { display: none; }
.soc:hover .a, .soc:focus-visible .a { display: none; }
.soc:hover .b, .soc:focus-visible .b { display: block; }
.soc:focus-visible { outline: 0; }
.soc-wa { left: 0;     top: 0;    width: 49px; height: 49px; }
.soc-fb { left: 71px;  top: 1px;  width: 48px; height: 47px; }
.soc-ig { left: 141px; top: .5px; width: 49px; height: 48px; }
.soc-tt { left: 212px; top: 0;    width: 49px; height: 49px; }
.footer-info { position: absolute; left: 120px; top: 69.5px; width: 230px; direction: rtl; text-align: right; font: 400 24px/27px 'TheBasics', sans-serif; display: flex; flex-direction: column; gap: 15px; }
.footer-info a { direction: ltr; text-align: right; unicode-bidi: plaintext; }

/* ============================================================
   מובייל וטאבלט (עד 1100px) — פריסה זורמת באותה שפה עיצובית.
   בפיגמה אין עיצוב למובייל, אז זו התאמה של אותם רכיבים:
   אותם פונטים, צבעים, צורות ומחוות.
   ============================================================ */
@media (max-width: 1100px) {
  :root { --nav-h: 60px; }

  #page { height: auto !important; }
  #stage { position: relative; width: 100%; transform: none !important; padding-top: var(--nav-h); }
  section, footer { width: 100%; }

  /* סרגל עליון + תפריט */
  .nav { width: 100%; transform: none !important; height: var(--nav-h); padding: 0 16px; align-items: center; }
  .nav-logo { width: 150px; height: auto; }
  .nav-logo img { left: 0; width: 150px; height: auto; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 48px; height: 48px; padding: 0 11px;
  }
  .nav-toggle span { display: block; height: 2px; background: #000; transition: transform .2s, opacity .2s; }
  .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--gray);
    border-top: 1px solid rgba(0,0,0,.15);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-btn { width: 100% !important; height: 64px; padding: 0 20px; font-size: 26px; line-height: 64px; text-align: right; border-bottom: 1px solid rgba(0,0,0,.12); }
  .nav-btn:active { background: var(--hover); color: #fff; }

  /* פתיחה */
  .hero { height: 560px; height: calc(100svh - var(--nav-h)); min-height: 520px; max-height: 920px; }
  .hero-video { width: 100%; height: 100%; }
  .hero-logo { left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(92%, 640px); height: auto; }
  .hero-logo-img { width: 100%; height: auto; }
  /* התאריך והכפתור באותה שורה בתחתית, ומתכווצים יחד עם רוחב המסך */
  .hero-date { right: 20px; top: auto; bottom: 28px; height: 46px; display: flex; align-items: center; font-size: clamp(30px, 11.5vw, 72px); line-height: 1; }
  .hero-btn { left: 20px; right: auto; top: auto; bottom: 28px; height: 46px; padding: 0 clamp(12px, 4vw, 26px); font-size: clamp(13px, 4.2vw, 22px); line-height: 1; }

  /* אודות — האייקון מתחלף כמו בדסקטופ, והרקע מתחלף איתו */
  .about { height: auto; overflow: hidden; padding: 300px 20px 44px; }
  .about[data-slide="0"] { background: var(--blue); }
  .about[data-slide="1"] { background: var(--yellow); }
  .about[data-slide="2"] { background: var(--pink); }
  .about[data-slide="3"] { background: var(--gray); }
  .about-bg { inset: auto; top: -97px; left: 50%; margin-left: -256px; width: 900px; height: auto; max-width: none; }
  .about-title, .about-text, .about-note { position: relative; z-index: 1; right: auto; top: auto; width: auto; }
  .about-title { font-size: 28px; line-height: 34px; }
  .about-text  { margin-top: 20px; font-size: 19px; line-height: 27px; }
  .about-note  { margin-top: 16px; font-size: 19px; line-height: 27px; }

  /* תוכנייה */
  .program { margin-top: 0; height: auto !important; display: flex; flex-direction: column; padding-bottom: 56px; }
  .program .bg { top: 0 !important; height: 100% !important; width: 100%; }
  .tabs { position: relative; order: 1; top: 0; left: 0; width: 100%; height: auto; }
  .tab { flex: 1 1 0; width: auto; min-width: 0; height: 68px; padding: 6px 4px; font-size: clamp(14px, 4vw, 26px); line-height: 1.15; white-space: normal; text-align: center; }
  .pills { position: relative !important; order: 2; top: auto !important; left: auto !important; width: auto !important; flex-direction: row; justify-content: center; gap: 10px; margin: 28px 20px 0; }
  .pill { width: auto; min-width: 88px; height: 48px; padding: 0 18px; font-size: 22px; line-height: 1; }
  .program .icon { position: relative !important; order: 3; left: auto !important; top: auto !important; width: min(78%, 340px) !important; height: auto !important; margin: 28px auto 4px; }
  .cols { position: relative !important; order: 4; top: auto !important; left: auto !important; width: auto !important; height: auto !important; direction: rtl; display: flex; flex-direction: column; gap: 36px; padding: 24px 20px 0; z-index: 2; }
  .col { position: static !important; width: 100%; align-items: stretch; gap: 36px; }
  .ev { width: auto; height: auto !important; min-width: 0 !important; overflow: visible; }
  .ev-t { font-size: 24px; line-height: 30px; white-space: normal; }
  .ev-m { margin-top: 8px; font-size: 18px; line-height: 24px; white-space: normal; }
  .ev-d { display: none; width: auto; min-width: 0; margin-top: 8px; font-size: 18px; line-height: 25px; }
  .ev.is-open .ev-d { display: block; }
  .house { height: auto !important; min-height: 0 !important; overflow: visible; gap: 16px; }
  .house-num { width: 48px; height: 48px; font-size: 24px; line-height: 1; }
  .house-txt { width: auto !important; flex: 1 1 auto; }
  .house-t { font-size: 24px; line-height: 30px; }
  .house-n { margin-top: 6px; font-size: 18px; line-height: 24px; }
  .hours { position: relative !important; order: 2; left: auto !important; top: auto !important; width: auto; margin: 28px 20px 0; }
  .hours h3 { font-size: 28px; line-height: 34px; }
  .hours b, .hours span { position: static !important; display: block; font-size: 18px; line-height: 26px; }
  .hours b { margin-top: 10px; }
  .hours span { margin-top: 0; }

  /* מפה — גוללים ומקישים על מספר בית; החלונית נפתחת בתחתית המסך */
  .map { height: auto; }
  .map-scroll { position: relative; inset: auto; height: min(78vh, 940px); overflow: auto; direction: ltr; -webkit-overflow-scrolling: touch; }
  .map-sizer { width: calc(1920px * var(--ms)); height: calc(1676px * var(--ms)); }
  .marker::after { content: ""; position: absolute; inset: -16px; }
  .map-popup { position: fixed; z-index: 120; left: 16px !important; right: 16px !important; top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom)) !important; width: auto; padding: 18px 20px; font-size: 19px; line-height: 26px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }

  /* צור קשר */
  .contact { height: auto; display: flex; flex-direction: column; padding: 56px 20px 52px; }
  .contact-line { top: 0; height: 5px; width: 100%; }
  .contact-head { position: static; width: auto; order: 1; }
  .contact-head h2 { font-size: 36px; line-height: 40px; }
  .contact-head p { margin-top: 12px; font-size: 22px; line-height: 30px; }
  .contact-form { position: static; width: auto; height: auto; pointer-events: all; order: 2; margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
  .field { position: static; left: auto; width: 100%; padding: 20px 22px; font-size: 20px; line-height: 27px; }
  .f-yellow, .f-blue { height: 66px; padding-block: 19px; }
  .f-pink { height: 190px; }
  .send { position: relative; left: auto; top: auto; width: 72px; height: 72px; align-self: flex-end; margin-top: 6px; }
  .send img { width: 100%; height: 100%; }
  .form-msg { position: static; left: auto; width: auto; margin-top: 4px; font-size: 26px; line-height: 32px; }
  .contact-art { position: relative; left: auto; top: auto; order: 3; width: min(100%, 460px); height: auto; aspect-ratio: 1071 / 1005; margin: 44px auto 0; }
  .contact-art > img { width: 100%; height: 100%; }

  /* פוטר */
  .footer { height: auto; display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 40px 20px calc(40px + env(safe-area-inset-bottom)); }
  .footer-logos { position: static; width: min(100%, 380px); height: auto; }
  .footer-logos img { width: 100%; height: auto; }
  .footer-social { position: static; width: auto; height: auto; display: flex; gap: 22px; }
  .soc { position: relative; left: auto !important; top: auto !important; width: 46px !important; height: 46px !important; }
  .footer-info { position: static; width: auto; align-items: center; text-align: center; font-size: 18px; line-height: 26px; gap: 6px; }
  .footer-info a { text-align: center; }
}


/* טאבלט: התוכן במרכז, בעמודה נוחה לקריאה */
@media (max-width: 1100px) and (min-width: 700px) {
  .about-title, .about-text, .about-note, .contact-head, .contact-form, .cols, .hours { width: 100% !important; max-width: 640px; margin-left: auto; margin-right: auto; }
  .cols { padding-left: 0; padding-right: 0; }
  .hours { padding: 0; }
  .about, .contact { padding-left: 32px; padding-right: 32px; }
  .ev-t, .house-t { font-size: 28px; line-height: 34px; }
  .ev-m, .ev-d, .house-n { font-size: 20px; line-height: 27px; }
}
