/* ==========================================
   Luming Projects — UI system layer
   נטען אחרי main.css ואחרי ה-CSS של העמוד (extra_css), כדי לאחד רכיבים
   שהוגדרו בכמה מקומות. מקור: ביקורת העיצוב 10/2026.
   שימו לב: כלל כאן גובר גם על media query של קובץ קודם — לכן כל כלל
   שיש לו גרסת מובייל במקור מוגדר כאן מחדש גם ב-media.
   ========================================== */

:root {
  /* כפתורים — מערכת אחת לכל ה-CTA באתר */
  --btn-h: 52px;
  --btn-h-sm: 40px;
  --btn-radius: 8px;          /* זהה לשדות הטופס */
  --btn-px: 28px;
  --btn-px-sm: 18px;
  --btn-fs: 15px;
  --btn-fs-sm: 14px;
  --btn-fw: 700;
  --btn-border: 1.5px;

  /* ליים כטקסט/אייקון על רקע בהיר — כינוי ל-‎--lime-dark (#687000, ‏5.38:1 על לבן, main.css) */
  --lime-ink: var(--lime-dark);
}

/* ── Buttons ── */
.btn,
.btn-hero-primary, .btn-hero-outline,
.hero-btn-primary, .hero-btn-outline, .hero-btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 var(--btn-px);
  border-radius: var(--btn-radius);
  border-width: var(--btn-border);
  border-style: solid;
  font-family: var(--font);
  font-size: var(--btn-fs);
  font-weight: var(--btn-fw);
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}
/* btn-lg מבוטל: גובה CTA אחד בכל האתר (כולל טופס צור קשר) */
.btn-lg { min-height: var(--btn-h); padding: 0 var(--btn-px); font-size: var(--btn-fs); }
.btn-sm { min-height: var(--btn-h-sm); padding: 0 var(--btn-px-sm); font-size: var(--btn-fs-sm); }

.hero-btn-primary { border-color: var(--lime); }
.hero-btn-primary:hover { border-color: var(--lime-light); background: var(--lime-light); }
.hero-btn-outline { border-color: var(--gray-lighter); }
.btn-hero-outline { color: var(--white); border-color: rgba(255,255,255,0.6); }

.sticky-nav-btn {
  min-height: var(--btn-h-sm);
  padding: 0 var(--btn-px-sm);
  border-radius: var(--btn-radius);
  font-size: var(--btn-fs-sm);
  font-weight: var(--btn-fw);
  white-space: nowrap;
}

.cat-btn {
  min-height: var(--btn-h-sm);
  padding: 0 14px;
  border-radius: var(--btn-radius);
  border-width: var(--btn-border);
  font-size: 13px;
  white-space: nowrap;
}

.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Navbar / footer ── */
.navbar-logo img { height: 48px; }
.navbar-toggle,
.navbar-search-btn {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.mobile-nav-close { width: 44px; height: 44px; }
.footer-logo-img { max-height: none; height: 56px; filter: brightness(0) invert(1); }

/* ── Typography ── */
h1, h2 { text-wrap: balance; }
/* ריווח אותיות פוגע בקריאות של עברית */
.section-label, .hero-slide-label, .product-card-category, .article-card-category,
.project-card-type, .related-label, .related-card-cat, .hero-cat-tag, .dim-optics-label,
.cat-card-cat, .cat-filter-label, .cat-sidebar-head, .footer-col h2, .footer-col h4, .proj-type-badge,
.mobile-nav-sub-all, .mobile-nav-cat-title, .mobile-nav-cat-title a {
  letter-spacing: 0;
}

/* מספרים עם + / % בתוך עמוד RTL: "500+" ולא "+500" */
.hero-stat-number, .stat-num, .proj-stat-num {
  direction: ltr;
  unicode-bidi: isolate;
}

/* "1. Wall Washing" בכותרות מאמר — המספר הופך לתג (ראו numbered_headings) */
.h-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.3em;
  margin-inline-end: 0.35em;
  border-radius: 6px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.8em;
  font-weight: 800;
  line-height: 1;
  vertical-align: 0.1em;
}

/* ── Home ── */
.advantages-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* שני סקשנים אפורים ברצף (מאמרים ← צור קשר) */
.bg-gray + .contact-section { background: var(--white); }

/* ── Product cards: גובה אחיד בשורה ── */
.product-card { display: flex; flex-direction: column; }
.product-card-body { flex: 1; display: flex; flex-direction: column; }
.product-card-footer { margin-top: auto; gap: 8px; }
.product-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
  height: 24px;
  align-items: center;
}
.spec-tag {
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 20px;
  color: var(--gray);
  background: var(--gray-bg);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.cat-spec-tags { flex-wrap: nowrap; overflow: hidden; min-width: 0; }
.cat-spec-tag { flex-shrink: 0; white-space: nowrap; }

/* ── Catalog filter bar ── */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.filter-bar .search-bar { max-width: 340px; }
.search-bar input { min-width: 0; }

/* ── Image placeholders: אריח מותג מכוון, לא "תמונה חסרה" ── */
.media-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--lime) 22%, transparent) 0%, transparent 60%),
    var(--dark-2);
  color: var(--lime);
  font-size: 2.5rem;
}
.media-placeholder-lg { font-size: 5rem; }
.article-card-image .media-placeholder { aspect-ratio: 16 / 9; }
.about-story-media .media-placeholder { height: 100%; }
.hero-card-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 300px;
  font-size: 5rem;
  color: var(--gray-lighter);
}

/* ── Product page ── */
.hero-card-title {
  color: var(--dark);
  border-inline-start: 4px solid var(--lime);
  padding-inline-start: 16px;
}
/* 72px navbar + 56px sticky-nav (היה 74) */
.product-sticky-nav { padding: 4px 32px; }
.sticky-nav-inner { height: 48px; padding: 0 16px 0 4px; }
.sticky-nav-icon { width: 32px; height: 32px; }
.product-hero-wrap, .product-accordions, [id^="section-"] { scroll-margin-top: 136px; }

/* סולם כותרות: H2 של סקשן > H3 בתוכן (≤20px) */
.dim-optics-title { font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-weight: 800; }
.prd-accordion-content.rich-content h2 { font-size: 1.25rem; margin: 24px 0 10px; }
.prd-accordion-content.rich-content :is(h3, h4) { font-size: 1.1rem; margin: 20px 0 8px; }

/* אקורדיון: אותו "+" בכל מצב — רק האייקון מסתובב ל-×, המסגרת נשארת ריבוע */
.prd-accordion.open .prd-accordion-icon { transform: none; }
.prd-accordion-icon i { transition: transform 0.3s ease; }
.prd-accordion.open .prd-accordion-icon i { transform: rotate(45deg); }

/* ── Floating buttons: עמודה אחת מימין, הנגישות לבד משמאל ── */
.float-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* RTL: flex-start = ימין */
  gap: 12px;
  pointer-events: none;
}
.float-stack > * { pointer-events: auto; }
.float-stack .back-to-top,
.float-stack .whatsapp-float { position: static; }
.float-stack .back-to-top:not(.visible) { pointer-events: none; }

/* ה-badge מוסתר; טקסט הייחוס הנדרש מוצג מתחת לכל טופס (includes/recaptcha_notice.html) */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-notice { margin-top: 12px; font-size: 0.75rem; line-height: 1.5; color: var(--gray); }
.recaptcha-notice a { color: inherit; text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .advantages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .product-sticky-nav { padding: 4px 16px; }
  .sticky-nav-btn { font-size: 0; gap: 0; padding: 0 12px; margin-right: 4px; }
  .sticky-nav-btn i { font-size: 0.95rem; }
}
@media (max-width: 767.98px) {
  .float-stack { right: 16px; bottom: 16px; }
  .float-stack .back-to-top { display: none; }

  .filter-bar { padding: 14px; gap: 12px; }
  .filter-bar .search-bar { flex: 1 1 100%; max-width: none; }
  .filter-chips {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: -14px;
    padding: 0 14px 2px;
  }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .cat-content { padding: 18px 16px; }
}
@media (max-width: 600px) {
  .advantages-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card-image { padding: 10px; }
  .product-card-body { padding: 12px; }
  .product-card-category { font-size: 0.68rem; margin-bottom: 4px; }
  .product-card-name { font-size: 0.9rem; }
  .product-card-desc { display: none; }
  .product-card-footer { padding-top: 10px; }
  .product-card-arrow { width: 28px; height: 28px; font-size: 0.75rem; flex-shrink: 0; }
  /* בכרטיס צר נכנס תג אחד בלבד — נחתך ב-ellipsis במקום באמצע מילה */
  .product-card-tags .spec-tag:nth-child(n+2) { display: none; }
  .product-card-tags .spec-tag { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
