/* ============================================================
   th-pages.css — עמודי מעמיס טלסקופי (עמוד שירות + עמודי כלי)
   ============================================================
   עיצוב: קובץ Figma "ש.ר שירותי מנופאים – דף מעמיס טלסקופי".
   נטען אחרי variables/components/sections של האתר המקורי.
   כל המחלקות עם הקידומת th- כדי לא להתנגש בסגנונות הקיימים.
   התפריט העליון והפוטר מגיעים מהאתר המקורי ואינם מוגדרים כאן.
   RTL: מאפיינים לוגיים (inline/block); אין left/right פיזיים
   מלבד עיצוב גרפי של חץ הפירורים.
   ============================================================ */

:root {
  --th-navy: #101B35;      /* כותרות */
  --th-blue: #2F5D8A;      /* קישורים, תגיות */
  --th-body: #4A5560;      /* גוף טקסט */
  --th-desc: #5F5F5F;      /* תיאור כרטיס (ניגודיות 6:1 על לבן) */
  --th-yellow: #FFC400;    /* פעולה ראשית */
  --th-char: #17212B;      /* טקסט על צהוב */
  --th-grey: #F6F6F6;      /* רקע "מה כולל השירות" */
  --th-line: #E0E3E0;      /* מסגרות דקות */
  --th-head: "Noto Sans Hebrew", "Assistant", system-ui, sans-serif;
  --th-text: "Noto Sans Hebrew", "Assistant", system-ui, sans-serif;
}

/* הרקע בעמודים האלה לבן. סרגל החיוג הקבוע במובייל והמרווח התחתון שלו (עד 720px) מגיעים מ-sections.css של האתר המקורי */
body.th-body { background: #fff; }

.th {
  font-family: var(--th-text);
  color: var(--th-body);
  background: #fff;
}
.th h1, .th h2, .th h3 { font-family: var(--th-head); color: var(--th-navy); margin: 0; font-weight: 700; }
.th p { margin: 0; }
.th a:focus-visible,
.th button:focus-visible,
.th .th-carousel:focus-visible {
  outline: 3px solid var(--th-blue);
  outline-offset: 3px;
}

.th-wrap {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(32px, 5.56vw, 80px);
}

/* ------------------------------ כפתור ראשי ------------------------------ */
.th-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 14px 28px;
  background: var(--th-yellow); color: var(--th-char);
  font-family: var(--th-text); font-weight: 700; font-size: 18px; line-height: 1.2;
  border-radius: 2px;
  transition: background .2s ease, transform .15s ease;
}
.th-btn:hover { background: #ffcf33; transform: translateY(-1px); }
.th-btn:active { transform: none; }

/* ------------------------------ Hero ------------------------------ */
/* RTL: העמודה הראשונה (טקסט) מימין, התמונה משמאל, צמודה לקצה */
.th-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(420px, 47vw, 680px);
  min-height: 640px;
  background: #fff;
}
.th-hero-text {
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding-block: 72px;
  padding-inline: clamp(32px, 5.56vw, 80px) clamp(32px, 5vw, 72px);
}
.th-hero-text h1 { font-size: clamp(30px, 2.9vw, 40px); line-height: 1.15; margin-block-end: 10px; white-space: nowrap; }
.th-hero-text p { font-size: 16.5px; line-height: 1.6; max-width: 620px; }
/* המילה הראשונה בכותרת בצהוב המותג (ניגודיות נמוכה על לבן, ראו memory.md) */
.th-h1-accent { color: var(--th-yellow); }
.th-hero-photo {
  background-color: #e9e6df;
  background-image: var(--th-hero-img);
  background-size: cover;
  background-position: center;
}

/* ------------------------------ מה כולל השירות ------------------------------ */
.th-included { background: var(--th-grey); padding-block: 72px 80px; }
.th-included h2, .th-tools h2 { font-size: 40px; line-height: 1.15; margin-block-end: 28px; }
.th-included-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
}
.th-feature-item { display: flex; }

/* כרטיס תכונה (FeatureCard): ממורכז, מסגרת דקה, פינות 12, הרמה וצל ב-hover */
.th-feature {
  flex: 1;
  background: #fff; color: var(--th-navy);
  border: 1px solid #E2E5E9; border-radius: 12px;
  padding: 32px 28px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform .3s ease-in-out, box-shadow .3s ease-in-out;
}
.th-feature-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%; margin-block-end: 24px;
  background: #F4F4F4; color: var(--th-navy);
}
.th-feature h3 { font-size: 18px; line-height: 1.3; font-weight: 600; margin-block-end: 8px; }
.th-feature p { font-size: 14px; line-height: 1.65; color: var(--th-desc); }
@media (hover: hover) {
  .th-feature:hover { transform: translateY(-8px); box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }
}

/* כניסה מדורגת: pending מוסתר עד שהגריד נכנס למסך, אז in מונפש (0.5s, השהיה 0.2s לכרטיס) */
.th-grid--pending .th-feature-item { opacity: 0; transform: translateY(20px); }
.th-grid--in .th-feature-item {
  opacity: 1; transform: none;
  transition: opacity .5s ease-out, transform .5s ease-out;
  transition-delay: calc(var(--i, 0) * 0.2s);
}

/* ------------------------------ הכלים שלנו ------------------------------ */
.th-tools { background: #fff; padding-block: 72px 88px; scroll-margin-top: 72px; }
.th-carousel {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
.th-tool {
  background: #fff; border: 1px solid var(--th-line); border-radius: 4px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.th-tool-photo { height: 240px; overflow: hidden; background: #fff; }
.th-tool-photo img { width: 100%; height: 100%; object-fit: contain; }
.th-tool-brand { font-size: 14px; color: var(--th-desc); }
.th-tool-title { font-size: 24px; line-height: 1.2; }
.th-tool-model { font-size: 20px; font-weight: 500; color: var(--th-navy); }
.th-tool-spec { font-size: 16px; line-height: 1.5; color: var(--th-body); }
.th-tool-spec strong { color: var(--th-navy); font-weight: 700; }
.th-tool-link {
  display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start;
  color: var(--th-blue); font-weight: 600; font-size: 16px;
}
.th-tool-link:hover { text-decoration: underline; }
.th-arrows { display: none; }

/* פס "יש לנו עוד כלים" */
.th-more {
  margin-block-start: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #fff; border: 1px solid var(--th-line); border-radius: 4px;
  padding: 28px 32px;
}
.th-more-text { display: flex; flex-direction: column; gap: 6px; }
.th-more h3 { font-size: 28px; line-height: 1.2; }
.th-more p { font-size: 16px; color: var(--th-desc); }

/* ------------------------------ עמוד כלי ------------------------------ */
/* RTL: הטקסט מימין, התמונה משמאל (כמו ב-Hero) */
.th-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 44vw, 640px); gap: clamp(32px, 4.4vw, 64px);
  padding-block: 56px 96px;
}
.th-detail-photo { margin: 0; height: clamp(380px, 36vw, 520px); overflow: hidden; background: #fff; }
.th-detail-photo img { width: 100%; height: 100%; object-fit: contain; }
.th-detail-body { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-width: 0; }
.th-detail-body h1 { font-size: 40px; line-height: 1.15; text-wrap: balance; }

.th-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 15px; }
.th-crumbs a { color: var(--th-blue); display: inline-flex; align-items: center; min-height: 32px; }
.th-crumbs a:hover { text-decoration: underline; }
.th-crumbs li[aria-current] { color: var(--th-navy); }
/* מפריד: שברון שמצביע לכיוון הקריאה (שמאלה ב-RTL), צויר ב-CSS כדי לא להתהפך */
.th-crumbs li + li::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-inline: 12px; color: var(--th-body);
}

.th-specs { margin: 0; width: 100%; }
.th-spec { display: flex; align-items: baseline; gap: 12px; padding-block: 11px; }
.th-spec dt {
  display: flex; align-items: baseline; flex: 1; gap: 12px;
  font-size: 18px; color: var(--th-body);
}
/* קו מנוקד בין התווית לערך */
.th-spec dt::after {
  content: ""; flex: 1; border-block-end: 1px dotted #B9BEC4; transform: translateY(-4px);
}
.th-spec dd { margin: 0; font-size: 18px; font-weight: 500; color: var(--th-navy); }
.th-note { font-size: 13px; line-height: 1.5; color: var(--th-desc); max-width: 560px; }

/* ------------------------------ טאבלט ------------------------------ */
@media (max-width: 1080px) {
  .th-wrap { padding-inline: 32px; }
  .th-hero { grid-template-columns: minmax(0, 1fr) 420px; }
  .th-hero-text { padding-inline: 32px; }
  .th-hero-text h1 { font-size: clamp(24px, 3.3vw, 36px); }
  .th-included-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-detail { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .th-detail-photo { height: 380px; order: -1; }
}

/* ------------------------------ מובייל ------------------------------ */
@media (max-width: 767px) {
  .th-wrap { padding-inline: 20px; }

  /* Hero: בלי תמונה במובייל (כמו בעיצוב); הרקע לא נטען */
  .th-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .th-hero-photo { display: none; }
  .th-hero-text { padding: 32px 20px 36px; gap: 12px; }
  .th-hero-text h1 { font-size: clamp(22px, 7vw, 26px); margin-block-end: 4px; }
  .th-hero-text p { font-size: 15px; }

  /* מה כולל: שתי עמודות */
  .th-included { padding-block: 40px; }
  .th-included h2, .th-tools h2 { font-size: 30px; margin-block-end: 16px; }
  .th-included-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .th-feature { padding: 20px 14px; border-radius: 10px; }
  .th-feature-icon { width: 52px; height: 52px; margin-block-end: 14px; }
  .th-feature-icon svg { width: 24px; height: 24px; }
  .th-feature h3 { font-size: 16px; margin-block-end: 6px; }
  .th-feature p { font-size: 13px; line-height: 1.55; }

  /* הכלים: קרוסלה אופקית */
  .th-tools { padding-block: 40px 40px; }
  .th-carousel {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .th-carousel::-webkit-scrollbar { display: none; }
  .th-tool { flex: 0 0 165px; padding: 12px; scroll-snap-align: start; }
  .th-tool-photo { height: 110px; }
  .th-tool-brand { font-size: 12px; }
  .th-tool-title { font-size: 15px; }
  .th-tool-model { font-size: 15px; }
  .th-tool-spec { font-size: 12px; }
  .th-tool-link { font-size: 13px; }

  .th-arrows { display: flex; justify-content: center; gap: 12px; margin-block-start: 16px; }
  .th-arrow {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: #fff; color: var(--th-navy); border: 1.5px solid var(--th-navy);
  }
  .th-arrow:disabled { color: #B7BCC4; border-color: #C9CDD3; cursor: default; }

  .th-more { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; margin-block-start: 24px; }
  .th-more h3 { font-size: 24px; }
  .th-more .th-btn { width: 100%; }

  /* עמוד כלי */
  .th-detail { padding-block: 24px 40px; gap: 20px; }
  .th-detail-photo { height: 260px; }
  .th-detail-body { gap: 16px; align-items: stretch; }
  .th-detail-body h1 { font-size: 28px; }
  .th-crumbs a { min-height: 44px; }
  .th-spec { padding-block: 8px; }
  .th-spec dt, .th-spec dd { font-size: 16px; }
  .th-detail-body .th-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .th-btn { transition: none; }
  .th-feature { transition: none; }
  .th-feature:hover { transform: none; }
  .th-grid--pending .th-feature-item, .th-grid--in .th-feature-item { opacity: 1; transform: none; transition: none; }
  .th-btn:hover { transform: none; }
}

/* תפריט האתר המקורי בטלפונים צרים מאוד (320px): מרווח קטן יותר כדי שלא תהיה גלישה אופקית. חל על העמודים האלה בלבד */
@media (max-width: 360px) {
  body.th-body .nav-inner { padding-inline: 16px; gap: 12px; }
}
