/* GAON | ציוני דרך היסטוריים
   מקור: Figma SYYawKACqZUzT0QyPgv4bf, node 1:3362 (1292x463 בתוך פריים 1440)

   כללי הבנייה של הפרויקט:
   - clamp יחיד מעוגן ל-360 ול-1440, em לכל מה שנגזר ממנו
   - פרופרטיז לוגיים בלבד

   הציר היה במקור סימון מיקום בלבד, והניווט היה בחיצים. עכשיו כל שנה
   היא כפתור שקופץ ישר לכרטיס שלה. השנה והנקודה הן מטרה אחת, כי מי שרואה
   אותן אחת מעל השנייה לא חושב עליהן כעל שני דברים, וכי נקודה של 12px
   לבדה היא מטרה קטנה מדי לאצבע.
*/

.gtl{
  --gtl-max: 100%;
  --gtl-gap: 104px;
  --gtl-ink: #040404;
  --gtl-text: #1E1E1E;
  --gtl-muted: #9D9D9D;
  --gtl-line: #CFCFCF;
  --gtl-dot: #C4C4C4;
  --gtl-accent: #87A6E7;
  --gtl-badge-border: #CBCBCB;
  --gtl-badge-bg: #FFFFFF;
  --gtl-media-radius: clamp(16.16px, 14.81px + 0.361vw, 20px);
  --gtl-dot-size: clamp(12px, 9.33px + 0.741vw, 20px);
  /* Held as variables because the axis row height and the dotted rule are now
     calculated from them. They used to be written inline, with the row height
     guessed as 1.6em against the base font rather than against the year's own
     clamped size - which only looked right because the years are positioned
     absolutely and never affected it. */
  --gtl-year-size: clamp(12px, 9.33px + 0.741vw, 20px);
  --gtl-mark-gap: clamp(8px, 5.33px + 0.741vw, 16px);
  --gtl-font: "Noto Sans Hebrew", system-ui, Arial, sans-serif;

  inline-size: 100%;
  max-inline-size: var(--gtl-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 26.67px + 3.704vw, 80px);
  font-family: var(--gtl-font);
  color: var(--gtl-text);
}

.gtl__head{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  text-align: start;
}

.gtl__badge{
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: clamp(16px, 11.77px + 1.127vw, 28px);
  padding-block: 2px;
  padding-inline: clamp(10px, 4.4px + 1.49vw, 26px);
  border: 1px solid var(--gtl-badge-border);
  border-radius: clamp(5.74px, 4.24px + 0.4vw, 10px);
  background-color: var(--gtl-badge-bg);
  font-size: clamp(10px, 7.54px + 0.657vw, 17px);
  line-height: 1.4;
  color: var(--gtl-ink);
  white-space: nowrap;
}

.gtl__title{
  margin: 0;
  font-weight: 500;
  font-size: clamp(38px, 32.92px + 1.354vw, 52.42px);
  line-height: clamp(45px, 38.94px + 1.617vw, 62.22px);
  color: var(--gtl-ink);
}

.gtl__br{ display: none; }

.gtl__body{
  display: flex;
  flex-direction: column;
  gap: var(--gtl-gap);
}

/* ציר השנים כרונולוגי משמאל לימין, כמו בפיגמה. הטקסט בתוכו נשאר עברי. */
.gtl__axis{
  direction: ltr;
  position: relative;
}

/* One list, one control per year. The year and its dot sit in the same button,
   so there is a single tab stop and a single hit area per milestone instead of
   two elements that look like one. */
.gtl__marks{
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  block-size: calc(var(--gtl-year-size) * 1.6 + var(--gtl-mark-gap) + var(--gtl-dot-size));
}

/* The dotted rule runs through the centre of the dot row. */
.gtl__marks::before{
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(var(--gtl-year-size) * 1.6 + var(--gtl-mark-gap) + var(--gtl-dot-size) / 2);
  border-block-start: 1px dotted var(--gtl-line);
  pointer-events: none;
}

.gtl__mark{
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: var(--x);
  transform: translateX(-50%);
}

/* אותו טיפול כמו בקרוסלת "למה לבחור בגאון": ריסט של Hello Elementor על
   [type="button"] הוא בעל משקל 0,2,0, ולכן כל כלל כאן נכתב בשני קלאסים. */
.gtl .gtl__mark-btn{
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gtl-mark-gap);
  /* Grows the target without moving anything. The sides use a matching
     negative margin; the tail below the dot needs none, because the mark is
     positioned absolutely and the row has an explicit height, so padding there
     overflows into the empty space above the card and pushes nothing. */
  padding-inline: 10px;
  margin-inline: -10px;
  padding-block-end: 10px;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.gtl .gtl__mark-btn:hover .gtl__label{ color: var(--gtl-ink); }
.gtl .gtl__mark-btn:hover .gtl__dot{ background-color: var(--gtl-ink); }
.gtl .gtl__mark-btn:focus{ outline: none; background-color: transparent; }
.gtl .gtl__mark-btn:focus-visible{ outline: 2px solid var(--gtl-ink); outline-offset: 4px; border-radius: 6px; }

.gtl__label{
  font-size: var(--gtl-year-size);
  line-height: 1.6;
  font-weight: 400;
  color: var(--gtl-muted);
  white-space: nowrap;
  transition: color .24s ease;
}

.gtl__label.is-active{
  font-weight: 700;
  color: var(--gtl-ink);
}

.gtl__dot{
  inline-size: var(--gtl-dot-size);
  block-size: var(--gtl-dot-size);
  border-radius: 50%;
  background-color: var(--gtl-dot);
  transition: background-color .24s ease;
}

.gtl__dot.is-active{ background-color: var(--gtl-ink); }

/* הכרטיס. ב-RTL העמודה הראשונה היא הימנית, ולכן:
   שנה וחיצים מימין, טקסט באמצע, תמונה משמאל.
   grid-row מפורש על שלושת הילדים, אחרת המיקום האוטומטי של הגריד
   פותח שורה חדשה לכל אחד מהם והכרטיס נשבר לשלוש שורות. */
.gtl__panels{ position: relative; }

.gtl__panel{
  display: grid;
  grid-template-columns: 23% 1fr 27%;
  column-gap: 7.5%;
  align-items: start;
}

.gtl__panel[hidden]{ display: none; }

.gtl__aside{
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4em;
}

.gtl__text{
  grid-column: 2;
  grid-row: 1;
  text-align: start;
}

.gtl__media{
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  aspect-ratio: 349 / 261;
  border-radius: var(--gtl-media-radius);
  overflow: hidden;
  background-color: #E4E4E4;
}

.gtl .gtl__media img{
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.gtl__panel-title{
  margin: 0;
  font-weight: 700;
  font-size: clamp(22px, 19.33px + 0.741vw, 30px);
  line-height: clamp(26px, 23px + 0.833vw, 35px);
  color: var(--gtl-text);
}

.gtl__panel-body{
  margin-block-start: 1.5625em;
  margin-block-end: 0;
  font-weight: 400;
  font-size: clamp(15px, 14.67px + 0.093vw, 16px);
  line-height: 1.5625;
  color: var(--gtl-text);
}

.gtl__stamp{
  margin: 0;
  font-weight: 700;
  font-size: clamp(44px, 35.33px + 2.407vw, 70px);
  line-height: 1;
  color: var(--gtl-accent);
}

.gtl__nav{
  direction: ltr;
  display: flex;
  align-items: center;
  gap: clamp(12px, 9.33px + 0.741vw, 20px);
  margin-block-start: .3em;
}

.gtl .gtl__btn{
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 43px;
  block-size: 24px;
  color: var(--gtl-ink);
  background-color: transparent;
  border: 0;
  text-decoration: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .2s ease;
}
.gtl .gtl__btn:hover{ opacity: .55; background-color: transparent; color: var(--gtl-ink); }
.gtl .gtl__btn:active{ opacity: .4; background-color: transparent; color: var(--gtl-ink); }
.gtl .gtl__btn:focus{ background-color: transparent; color: var(--gtl-ink); outline: none; }
.gtl .gtl__btn:focus-visible{ outline: 2px solid var(--gtl-ink); outline-offset: 4px; border-radius: 4px; }
.gtl .gtl__btn[disabled]{ opacity: .28; cursor: default; }
.gtl .gtl__btn .gtl__ico{ display: block; inline-size: 43px; block-size: 24px; }

.gtl__live{
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 767px){
  .gtl{ --gtl-gap: 40px; }

  .gtl__panel{
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .gtl__media{ grid-column: 1; grid-row: 1; }
  .gtl__aside{ grid-column: 1; grid-row: 2; align-items: flex-start; }
  .gtl__text{ grid-column: 1; grid-row: 3; }

  .gtl .gtl__btn{ inline-size: 34px; block-size: 20px; }
  .gtl .gtl__btn .gtl__ico{ inline-size: 34px; block-size: 20px; }
}

@media (min-width: 768px){
  .gtl__head{ align-items: center; text-align: center; }
  .gtl__br{ display: inline; }
}

@media (prefers-reduced-motion: reduce){
  .gtl__label,
  .gtl__dot,
  .gtl .gtl__btn{ transition: none; }
}
