/* סגנונות משותפים לכל דפי האתר:
   1. כותרת עליונה אחידה (site-header) - מבודדת בקידומת sh- כדי לא להתנגש בסגנונות הפנימיים של כל דף
   2. התאמה למסכי דסקטופ רחבים (מכולה רחבה יותר וטיפוגרפיה מוגדלת במסכים גדולים)
   הקובץ נטען בסוף ה-<head>, אחרי הסגנונות הפנימיים, ולכן גובר עליהם. */

/* ---------- 1. Site header ---------- */
header.site-header {
    --sh-green: #0d4d32;
    --sh-green-2: #1a6b47;
    --sh-gold: #d4af37;
    --sh-text: #24332c;
    --sh-muted: #5f6b7a;
    --sh-tint: #eef5f1;
    --sh-border: #e3e9e6;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--sh-border);
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    box-shadow: none;
    text-align: right;
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    transition: box-shadow 0.25s ease;
}
header.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(13, 77, 50, 0.08); }
header.site-header *, header.site-header *::before, header.site-header *::after { box-sizing: border-box; }

.sh-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.sh-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none !important;
    color: var(--sh-green) !important;
}
.sh-brand img { height: 46px; width: auto; display: block; }
.sh-brand-text {
    display: flex;
    flex-direction: column;
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--sh-green);
}
.sh-brand-text small {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--sh-muted);
    margin-top: 3px;
}

.sh-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}
.sh-list, .sh-menu { list-style: none; margin: 0; padding: 0; }
.sh-list { display: flex; align-items: center; gap: 2px; }
.sh-list > li { position: relative; }

.sh-link, .sh-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--sh-text) !important;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.sh-link::after, .sh-link::before { display: none !important; }
.sh-link:hover, .sh-menu-btn:hover, .sh-menu-btn[aria-expanded="true"] {
    background: var(--sh-tint);
    color: var(--sh-green) !important;
}
.sh-link[aria-current="page"], .sh-link.is-current, .sh-menu-btn.is-current {
    color: var(--sh-green) !important;
    font-weight: 700;
    background: var(--sh-tint);
}
.sh-chevron { width: 12px; height: 12px; transition: transform 0.2s ease; }
.sh-menu-btn[aria-expanded="true"] .sh-chevron { transform: rotate(180deg); }

/* תפריט נפתח: מחשבונים */
.sh-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 330px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--sh-border);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(13, 77, 50, 0.14);
    display: none;
}
.sh-menu::before { /* גשר שקוף כדי שהתפריט לא ייסגר במעבר העכבר */
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.sh-has-menu.is-open > .sh-menu { display: block; }
.sh-menu a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--sh-text) !important;
    text-decoration: none !important;
    font-size: 0.97rem;
    font-weight: 700;
    transition: background-color 0.2s ease;
}
.sh-menu a span { font-size: 0.84rem; font-weight: 400; color: var(--sh-muted); }
.sh-menu a:hover, .sh-menu a[aria-current="page"] { background: var(--sh-tint); color: var(--sh-green) !important; }

.sh-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sh-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--sh-green) !important;
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none !important;
    direction: ltr;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.sh-phone:hover { background: var(--sh-tint); }
.sh-phone svg { width: 17px; height: 17px; flex-shrink: 0; }
.sh-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 24px;
    border-radius: 999px;
    background: var(--sh-green);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.98rem;
    white-space: nowrap;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(13, 77, 50, 0.22);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sh-cta:hover { background: var(--sh-green-2); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(13, 77, 50, 0.28); }

/* כפתור תפריט (מובייל) */
.sh-toggle {
    display: none;
    margin-right: auto;
    width: 46px;
    height: 46px;
    border: 1px solid var(--sh-border);
    border-radius: 12px;
    background: #fff;
    color: var(--sh-green);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.sh-toggle svg { width: 22px; height: 22px; }
.sh-toggle .sh-icon-close { display: none; }
header.site-header.is-open .sh-toggle .sh-icon-open { display: none; }
header.site-header.is-open .sh-toggle .sh-icon-close { display: block; }

/* מסכים בינוניים: מספר הטלפון מוצג כאייקון בלבד */
@media (max-width: 1260px) and (min-width: 1101px) {
    .sh-phone-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .sh-phone { padding: 8px 12px; }
    .sh-link, .sh-menu-btn { padding: 8px 11px; }
}

/* פתיחה בריחוף בדסקטופ */
@media (hover: hover) and (min-width: 1101px) {
    .sh-has-menu:hover > .sh-menu { display: block; }
}

/* מובייל וטאבלט */
@media (max-width: 1100px) {
    .sh-inner { height: 68px; padding: 0 16px; gap: 12px; }
    .sh-brand img { height: 40px; }
    .sh-brand-text { font-size: 1.15rem; }
    .sh-toggle { display: inline-flex; }
    .sh-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px 20px;
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        background: #fff;
        border-bottom: 1px solid var(--sh-border);
        box-shadow: 0 18px 32px rgba(13, 77, 50, 0.12);
    }
    header.site-header.is-open .sh-nav { display: flex; }
    .sh-list { flex-direction: column; align-items: stretch; gap: 0; }
    .sh-list > li { border-bottom: 1px solid var(--sh-border); }
    .sh-link, .sh-menu-btn {
        width: 100%;
        justify-content: space-between;
        min-height: 52px;
        padding: 12px 6px;
        border-radius: 0;
        font-size: 1.05rem;
    }
    .sh-link:hover, .sh-menu-btn:hover, .sh-menu-btn[aria-expanded="true"],
    .sh-link[aria-current="page"], .sh-menu-btn.is-current { background: transparent; }
    .sh-menu {
        position: static;
        width: auto;
        padding: 0 0 10px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }
    .sh-menu::before { display: none; }
    .sh-menu a { padding: 10px 12px; background: #f6f9f7; margin-bottom: 6px; }
    .sh-actions { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 16px; }
    .sh-phone, .sh-cta { justify-content: center; min-height: 50px; font-size: 1.05rem; }
    .sh-phone { border: 1.5px solid var(--sh-green); }
}
@media (max-width: 380px) {
    .sh-brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    header.site-header, header.site-header * { transition: none !important; }
}

/* ---------- 2. Desktop: מסכים רחבים וגדולים ---------- */
/* הרחבת המכולה הראשית בדפים שבנויים על .container (לא בדפי טקסט צרים, שם אורך שורה קצר עדיף לקריאה) */
@media (min-width: 1440px) {
    html body .container:not(main) { max-width: 1320px; }
}
@media (min-width: 1680px) {
    html { font-size: 106.25%; }
    html body { font-size: 1rem; }
    html body .container:not(main) { max-width: 1400px; }
    .sh-inner { max-width: 1400px; }
}
@media (min-width: 1920px) {
    html { font-size: 112.5%; }
    html body .container:not(main) { max-width: 1480px; }
    .sh-inner { max-width: 1480px; height: 84px; }
    header.site-header { font-size: 17px; }
}
@media (min-width: 2400px) {
    html { font-size: 125%; }
    html body .container:not(main) { max-width: 1680px; }
    .sh-inner { max-width: 1680px; }
}
