/*
Theme Name: Torah Theme
Description: תבנית ייחודית לאתר תורה
Version: 1.0
Text Direction: RTL
*/

/* ===========================
   CSS VARIABLES
=========================== */
:root {
    --cream:        #F5F0E8;      /* רקע קרם */
    --cream-light:  #FAF7F2;      /* קרם בהיר */
    --brown:        #d4ecf1;      /* חום זהוב - טקסט וכפתורים */
    --brown-dark:   #6B4F0E;      /* חום כהה */
    --brown1: #8d583b;
    --brown-light:  #C4A44A;      /* חום בהיר */
    --light-blue:     #e1f0f3;
    --teal:           #1DBAD6;      /* תכלת */
    --teal-light:   #E8F4F7;      /* תכלת בהיר רקע */
    --teal-dark:    #2A7080;      /* תכלת כהה */
    --gold:         #D4A847;      /* זהב */
    --gray:        #46555d;      /* אפור ניטרלי */  
    --header-height: 80px;
    --font-heading: 'Mikhmoret', 'Frank Ruhl Libre', serif;  /* כותרות */
    --font-body: 'Talent', 'Rubik', sans-serif;       /* טקסט רץ */
}
html {
    scroll-behavior: smooth;
}
section[id] {
    scroll-margin-top: 0; /* גובה ה-header שלך */
}
/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--brown-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

img { max-width: 100%; height: auto; }

/* ===========================
   HEADER
=========================== */
.site-header {
    position: fixed;          /* במקום sticky */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;  /* שקוף כברירת מחדל */
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
/* כשגוללים — רקע נוסף */
.site-header.is-scrolled {
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(139, 105, 20, 0.1);
}

/* פרונט פייג — ה-main מתחיל מלמעלה (0) */
.front-page-main {
    position: relative;
    top: 0;           /* הסרת ה-top הקודם */
    margin-bottom: 0;
}

/* hero מתחיל מ-0 וה-header צף מעליו */
.hero-section {
    min-height: 100vh; /* במקום calc עם header-height */
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
        max-height: 100px;
}

/* ===========================
   LOGO - RIGHT SIDE
=========================== */
.header-logo {
flex-shrink: 0;
    margin-top: -4px;
    background-color: #1DBAD6;
    padding: 64px 13px 31px;
    margin-left: 80px;
    border-radius: 0 0 10px 10px;
}

.logo-link {
    display: block;
    line-height: 0;
}

.header-logo img,
.header-logo .custom-logo {
    width: 52px;
    object-fit: contain;
    object-position: top center;
    margin-top: -4px;
    filter: drop-shadow(0 2px 4px rgba(139, 105, 20, 0.15));
}

.logo-placeholder {
    display: flex;
    align-items: center;
    height: var(--header-height);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brown);
    letter-spacing: 0.02em;
}

/* ===========================
   NAVIGATION - 3 LEVELS
=========================== */
.main-navigation {

    display: flex;
    justify-content: flex-start;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

/* Level 1 */
.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--brown1);
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-menu > li > a::after {
    /* חץ למטה לפריטים עם תת-תפריט */
    content: '';
    display: none;
}

.nav-menu > li.menu-item-has-children > a::after {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--brown);
    margin-right: 4px;
    transition: transform 0.2s ease;
}

.nav-menu > li:hover > a,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
    color: var(--brown-dark);
    background-color: rgba(139, 105, 20, 0.08);
}

.nav-menu > li:hover > a::after {
    transform: rotate(180deg);
}

/* Level 2 - Dropdown */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--cream-light);
    border: 1px solid rgba(139, 105, 20, 0.18);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(139, 105, 20, 0.15);
    padding: 8px;
    list-style: none;
    z-index: 100;
    animation: dropIn 0.2s ease forwards;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 9px 14px;
    font-size: 0.9rem;
    color: var(--brown);
    border-radius: 6px;
    white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
    background-color: rgba(139, 105, 20, 0.08);
    color: var(--brown-dark);
}

/* Level 3 - Sub-dropdown */
.nav-menu .sub-menu .sub-menu {
    top: 0;
    right: calc(100% + 4px);
    left: auto;
}

/* Separator line for sub-items */
.nav-menu .sub-menu > li + li {
    border-top: 1px solid rgba(139, 105, 20, 0.08);
}

/* ===========================
   RIGHT ACTIONS (visually left side, LTR actions area)
=========================== */
.header-right-actions {
    display: flex;
    margin-right: auto;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ===========================
   SECONDARY LOGO (small, left of auth button)
=========================== */
.secondary-logo {
    display: flex;
    align-items: center;
    opacity: 1;
    transition: opacity 0.2s;
}

.secondary-logo:hover { opacity: 0.85; }

.secondary-logo-img {
    width: 42px;
    object-fit: contain;
}

.secondary-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 38px;
    height: 38px;
}

/* ===========================
   AUTH BUTTONS
=========================== */
.auth-button-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-greeting {
    font-size: 0.85rem;
    color: var(--brown1);
    opacity: 0.8;
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 7px 20px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--brown);
    background: transparent;
    border: 1.5px solid var(--brown);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.btn-auth:hover {
    background-color: var(--brown);
    color: var(--cream);
    box-shadow: 0 3px 12px rgba(139, 105, 20, 0.25);
}

.btn-logout {
    border-color: rgba(139, 105, 20, 0.5);
    color: rgba(139, 105, 20, 0.7);
}

.btn-logout:hover {
    background-color: rgba(139, 105, 20, 0.08);
    color: var(--brown);
    border-color: var(--brown);
    box-shadow: none;
}

/* ===========================
   HAMBURGER (mobile)
=========================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--brown);
    border-radius: 2px;
    transition: all 0.25s ease;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 900;
}

/* ===========================
   FRONT PAGE
=========================== */
.front-page-main {
    min-height: calc(100vh);
        position: relative;
}

.front-page-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 32px;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
    .header-inner { padding: 0 20px; gap: 16px; }
    .nav-menu > li > a { padding: 8px 12px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    :root { --header-height: 68px; }

    .menu-toggle { display: flex; }

    .main-navigation {
        position: fixed;
        top: var(--header-height);
        right: -280px;
        width: 280px;
        height: calc(100vh - var(--header-height));
        background: var(--cream-light);
        border-left: 1px solid rgba(139, 105, 20, 0.15);
        flex-direction: column;
        justify-content: flex-start;
        padding: 24px 16px;
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 950;
    }

    .main-navigation.is-open { right: 0; }
    .mobile-overlay.is-visible { display: block; }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-menu > li > a { padding: 12px 16px; }

    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding-right: 16px;
        animation: none;
        background: transparent;
    }

    .nav-menu li:hover > .sub-menu { display: none; }
    .nav-menu li.sub-open > .sub-menu { display: block; }

    .user-greeting { display: none; }
    .btn-auth { padding: 6px 14px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0 14px; }
    .secondary-logo { display: none; }
}

/* ===========================
   FRONT PAGE - HERO SECTION
=========================== */

.front-page-main {
    min-height: 100vh;
}

.hero-section {
    position: relative;
    min-height: calc(100vh);
    background-color: var(--cream-light);
    overflow: hidden;
}

/* טקסטורה שקופה מעל הרקע */
.hero-texture {
    position: absolute;
    inset: 0;
    background-image: url('../images/TEXTURE1.PNG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 3fr;
    min-height: calc(100vh);
    max-width: 100%;
    background-image: url(../images/bg_bg.png);
    background-size: 101% 120%;
    background-color: white;
    background-repeat: no-repeat;
    background-position: left;
}

/* ---- עמודת טקסט ימין (רבע) ---- */
.hero-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 60px 40px 60px 32px;
}

.annual-plan-tag {
    display: inline-block;
    font-family: var(--font-body);
font-size: 17px;
    font-weight: 500;
    color: var(--brown-dark);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    /* border-bottom: 2px solid var(--teal); */
    padding-bottom: 4px;
    align-self: flex-start;

}

.hero-main-title {
        font-family: var(--font-heading);
    font-size: 124px;
    font-weight: bold;
    color: var(--brown-dark);
    line-height: .8;
}

.hero-greeting {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--brown-dark);
    line-height: 1.8;
}

.greeting-label {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 8px;
}
.unit-header-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    position: absolute;
    top: 14px;
}

.unit-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--teal);;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}
a.custom-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}
a.custom-logo-link img{
    width: 50%;
}
.unit-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.unit-nav-btn--disabled {
    opacity: 0.3;
    cursor: default;
}
/* כפתור יחידות */
.btn-units {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    background-color: var(--teal);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.35rem;
    font-weight: 600;
    border-radius: 8px;
    align-self: flex-start;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(42, 112, 128, 0.3);
}

.btn-units:hover {
    background-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(42, 112, 128, 0.4);
    color: #fff;
}

.btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 1.1em;
}

.btn-units:hover .btn-arrow {
    transform: translateX(-4px);
}

/* ---- עמודת פסים שמאל (3/4) ---- */
.hero-strips-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* PEN.PNG — מכסה מלמעלה, לא לחיצה */
.pen-wrap {
bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
    z-index: 20;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    height: 100%;
    width: 100%;
    position: absolute;
    max-width: 973px;
}

.pen-wrap.is-hovered {
    transform: translateY(-16px);
}
@keyframes pen-idle {
    0%   { transform: translateY(0)    rotate(0deg);   }
    25%  { transform: translateY(-4px) rotate(0.4deg); }
    50%  { transform: translateY(-2px) rotate(-0.3deg);}
    75%  { transform: translateY(-5px) rotate(0.2deg); }
    100% { transform: translateY(0)    rotate(0deg);   }
}
.pen-img {
 width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(80, 55, 20, 0.15));
    transition: filter 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
     animation: pen-idle 3.5s ease-in-out infinite;
    transform-origin: bottom center;
}
.pen-wrap:hover .pen-img {
    animation: none;
    transform: translateY(-18px) rotate(-1deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pen-wrap.is-hovered .pen-img {
    filter: drop-shadow(0 14px 28px rgba(80, 55, 20, 0.25));
}

/* ===========================
   פסים - מלבנים לגובה ויזואליים
=========================== */

/*
   סקאלת צבעים לפסים (8 צבעים):
   1. #A8C5BD  תכלת-ירקרק בהיר
   2. #7BAAB5  תכלת בינוני
   3. #5C8FA0  תכלת עמוק
   4. #3A7A8C  תכלת כהה
   5. #C4B08A  חום-זהב בהיר
   6. #A89060  חום-זהב בינוני
   7. #8B7248  חום עמוק
   8. #6B5535  חום כהה
*/

/* הגדרת גבהים ייחודיים לכל פס */
:root {
--strip-h-1: 456px;
    --strip-h-2: 522px;
    --strip-h-3: 400px;
    --strip-h-4: 249px;
    --strip-h-5: 324px;
    --strip-h-6: 370px;
    --strip-h-7: 456px;
    --strip-h-8: 350px;
    --strip-scale: 1.11;

}

.strips-container {
    display: flex;
    flex-direction: row;      /* לגובה = אופקי */
    align-items: center;    /* כולם מיושרים לתחתית */
    gap: 15px;
    width: 100%;
    position: relative;
    z-index: 3;
    padding: 0 28px 0 28px;
    /* מרווח מלמעלה — PEN.PNG מכסה מלמעלה */
    margin-top: auto;
    padding-top: 20px;
    flex: 1;
}

/* בסיס לכל מלבן */
.strip-item {
    display: block;
    flex-shrink: 0;
    flex: 1;                  /* כל המלבנים חולקים רוחב שווה */
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    text-decoration: none;

    /* תמונת רקע מהיחידה */
    background-image: url(../images/111.png);
        background-size: 100% 100%;
    background-position: center bottom;
    background-repeat: no-repeat;

    /* אנימציה */
    transition: height 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
                box-shadow 0.3s ease,
                transform 0.3s ease;

    /* opacity overlay */
}

/* צבע רקע כ-fallback + overlay */
.strip-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* --- גבהים ייחודיים לכל פס --- */
.strip-item:nth-child(1) { height: var(--strip-h-1); }
.strip-item:nth-child(2) { height: var(--strip-h-2);  }
.strip-item:nth-child(3) { height: var(--strip-h-3);  }
.strip-item:nth-child(4) { height: var(--strip-h-4); }
.strip-item:nth-child(5) { height: var(--strip-h-5);  }
.strip-item:nth-child(6) { height: var(--strip-h-6);  }
.strip-item:nth-child(7) { height: var(--strip-h-7);  }
.strip-item:nth-child(8) { height: var(--strip-h-8);  }
.strip-item:nth-child(9) { height: var(--strip-h-1);  }
.strip-item:nth-child(10) { height: var(--strip-h-2);  }


/* --- הובר --- */
.strip-item:hover {
    height: calc(var(--strip-h-1) * var(--strip-scale)); /* fallback */
    box-shadow: 0 -8px 28px rgba(0,0,0,0.18);
    transform: translateY(-4px);
    z-index: 10; 
}

.strip-item:nth-child(1):hover { height: calc(var(--strip-h-1) * var(--strip-scale)); }
.strip-item:nth-child(2):hover { height: calc(var(--strip-h-2) * var(--strip-scale)); }
.strip-item:nth-child(3):hover { height: calc(var(--strip-h-3) * var(--strip-scale)); }
.strip-item:nth-child(4):hover { height: calc(var(--strip-h-4) * var(--strip-scale)); }
.strip-item:nth-child(5):hover { height: calc(var(--strip-h-5) * var(--strip-scale)); }
.strip-item:nth-child(6):hover { height: calc(var(--strip-h-6) * var(--strip-scale)); }
.strip-item:nth-child(7):hover { height: calc(var(--strip-h-7) * var(--strip-scale)); }
.strip-item:nth-child(8):hover { height: calc(var(--strip-h-8) * var(--strip-scale)); }
.strip-item:nth-child(9):hover { height: calc(var(--strip-h-1) * var(--strip-scale)); }
.strip-item:nth-child(10):hover { height: calc(var(--strip-h-2) * var(--strip-scale)); }

.strip-item:hover::before { opacity: 0.5; }
/* ===========================
   SECTION 2 - ABOUT (תכלת)
=========================== */
.about-section {
    position: relative;
    background-color: var(--light-blue);
    overflow: hidden;
    padding: 80px 0;
}

.about-bg-texture {
    position: absolute;
    inset: 0;
    background-image: url('../images/bg_blue.jpg');
        background-size: 100% 100%;
    background-position: center;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}

.about-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 48px;
    align-items: center;
}

/* כותרת */
.about-title {
    font-family: var(--font-heading);
    font-size: clamp(70px, 2.8vw, 2.6rem);
    font-weight: 400;
    color: var(--brown-dark);
    margin-bottom: 16px;
    line-height: 1.25;
        width: max-content;
}

/* קו עם עיגול בסוף שמאל */
.about-title-line {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    width: calc(100% + 80px);
}

.about-title-line::before {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--brown-dark);
    opacity: 0.5;
}

.about-line-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--brown-dark);
    opacity: 0.6;
    margin-right: 0;
    flex-shrink: 0;
}

/* תיבת תוכן לבנה שקופה */
.about-box {
    position: relative;
    background-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
        padding: 80px 83px;
}

/* עיטורי פינות */
.about-deco {
    position: absolute;
    width: 60px;
    height: auto;
    pointer-events: none;
}
.circle-vector{
    background-image: url(../images/circleIn.png);
    width: 104px;
    height: 104px;
    position: relative;
    background-position: center;
    background-repeat: no-repeat;
    bottom: -78px;

}
.circle-vector::before{
    content: "";
    background-image: url(../images/circle.png);
    right: 0;
    top: 0;
    animation: rotation 15s infinite linear;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
}

/* הגדרת הסיבוב */
@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.about-deco--tr {
    top: 23px;
    right: 23px;
}

.about-deco--bl {
    bottom: 23px;
    left: 23px;
}

.about-box-content {
    font-family: var(--font-body);
    font-size: 0.97rem;
    line-height: 1.85;
    color: var(--brown-dark);
}

.about-box-content strong {
    font-weight: 700;
    color: var(--brown-dark);
}

/* ─── כפתור "אני רוצה ללמוד עוד" ─── */
.about-box-footer {
    margin-top: 22px;
    text-align: left;
}

.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background-color: var(--gold, #c8973a);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(200, 151, 58, 0.35);
}

.btn-learn-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 151, 58, 0.5);
}

.btn-learn-more:hover .btn-arrow {
    transform: translateX(-4px);
}

/* ─── פופאפ learn_more ─── */
.learn-more-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.learn-more-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.learn-more-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px 44px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    direction: rtl;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.learn-more-overlay.is-open .learn-more-modal {
    transform: translateY(0);
}

.learn-more-close {
    position: absolute;
    top: 14px;
    left: 16px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.learn-more-close:hover {
    color: #333;
}

.learn-more-content {
    font-family: 'Assistant', 'Arial Hebrew', sans-serif;
    font-size: 15px;
    line-height: 1.9;
    color: #2c1f12;
    direction: rtl;
    text-align: right;
}

.learn-more-content p { margin-bottom: 12px; }
.learn-more-content strong { font-weight: 700; }

.learn-more-content h2 {
    font-family: 'Mikhmoret', serif;
    font-size: 22px;
    color: #2A7080;
    font-weight: 400;
    margin: 20px 0 10px;
}

.learn-more-content h3 {
    font-family: 'Mikhmoret', serif;
    font-size: 30px;
    color: #d4c4a8;
    font-weight: 400;
    margin: 18px 0 8px;
}

.learn-more-content .teal-box,
.learn-more-content .bg-teal {
    background: #d4ecf1;
    color: #2c1f12;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    display: block;
}

.learn-more-content .bg-beige,
.learn-more-content .bg-beige p,
.learn-more-content .bg-beige li {
    background: #eae0cc !important;
    color: #2c1f12;
}

.learn-more-content .bg-beige {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    display: block;
}

.learn-more-content ul {
    list-style: none;
    padding-right: 8px;
    margin: 10px 0;
}

.learn-more-content ul li {
    position: relative;
    padding-right: 26px;
    margin-bottom: 8px;
}

.learn-more-content ul li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: #1DBAD6;
    font-weight: 700;
    font-size: 14px;
}

/* עמודת תמונה */
.about-image-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-rabi-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
    margin-right: -29px;
}
/* ===========================
   SECTION 3 - DEMO (קרם)
=========================== */
.demo-section,.tax-page ,.footer-section{
    position: relative;
    background-color: var(--cream);
    padding: 80px 0;
    overflow: hidden;
}
.tax-title{
        text-align: center;
    font-size: 70px;
    font-weight: bold;
    position: relative;
    font-family: 'Mikhmoret';
    z-index: 1;
        margin: 0 0 60px 0;
}
.title_decore_tax{
    position: absolute;
    background-image: url('../images/title_decore_tax.png');
    top: calc(100% + -20px);
    right: 0;
    left: 0;
    margin: 0 auto;
    height: 32px;
    width: 409px;
}
.tax-page .demo-bg-texture{
    background-position: top;
}
.demo-bg-texture,.footer-bg-texture {
    position: absolute;
    inset: 0;
    background-image: url('../images/bg_long.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}
.footer-bg-texture {
    background-image: url('../images/demo-bg-texture.png');
}
.fo-top-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 48px;
        justify-content: space-between;
    
}
.bold{
    font-weight: bolder;
}
.fo-contacts-row {
    display: flex;
    flex-direction: row;
    gap: 22px;
    align-items: center;
    flex-wrap: wrap;
}

.fo-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brown-dark);
    background: #ffffff6b;
    font-family: var(--font-body);
    font-size: 0.9rem;
    direction: ltr;
    padding: 13px 22px;
}

.fo-contact::before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.fo-contact.icon-wa::before   { background-image: url('../images/icon-wa.svg');   }
.fo-contact.icon-tel::before  { background-image: url('../images/icon-tel.svg');  }
.fo-contact.icon-enve::before { background-image: url('../images/icon-enve.svg'); }
/* שורה 2 — לוגו + קישורים */
.fo-bottom-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.fo-brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fo-copyright {
    font-size: 0.82rem;
    color: var(--brown-dark);
}

/* קישורים */
.fo-links {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
}

.fo-contact-2 {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--brown1);
    text-decoration: none;
    border-radius: 20px;
    padding: 3px 12px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.fo-contact-2:hover {
    background: var(--brown1);
    color: #fff;
}
.demo-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

/* ריבוע לבן שקוף */
.demo-box {
    position: relative;
        background: #FFF2E399;
    /* border-radius: 16px; */
    padding: 48px 52px;
    width: 100%;
}

/* עיטורי פינות — 20px מהקצה */
.demo-deco {
    position: absolute;
    width: 64px;
    height: auto;
    pointer-events: none;
}
.demo-deco--tl { top: 20px;  left: 20px;  }
.demo-deco--br { bottom: 20px; right: 20px; }

/* כותרת + קו */
.demo-title ,.himnon-title{
    font-family: var(--font-heading);
    font-size: 70px;
    font-weight: 400;
    color: var(--brown-dark);
    margin-bottom: 14px;
    line-height: 80px;
        position: relative;
}

.demo-title-line,.himnon-title-line {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}
.demo-title-line::before,.himnon-title-line::before,.himnon-title-line::after {
    content: '';
    display: block;
        width: calc(100% + 80px);
    height: 2px;
    background-color: var(--brown-dark);
    opacity: 0.45;
    position: absolute;
}

.demo-line-dot,.himnon-line-dot ,.himnon-title-line::after{
    display: block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background-color: var(--brown-dark);
    opacity: 0.6;
    flex-shrink: 0;
        position: absolute;
    left: 30px;
}
.himnon-title-line::after{
    position: absolute;
}
.himnon-title {
        text-align: center;
    width: max-content;
    margin: 0 auto;
}
/* תמונה */
.demo-image-wrap {
    position: relative;
    display: flex;
    width: 630px;
    text-align: center;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    height: 430px;
    margin-top: 98px;
}
.demo-img {
    width: 632.55px;
    max-width: 100%;
    height: 462.35px;
    border-radius: 10px;
    display: block;
}

/* נקודות חמות */
.hotspot {
    position: absolute;
    z-index: 10;
    transform: translateY(-50%);
}

.hotspot-ring {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--teal);
    border: 4px solid rgba(58, 143, 160, 0.35);
    cursor: pointer;
    animation: hotspot-pulse 2.2s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.hotspot:hover .hotspot-ring {
    transform: scale(1.2);
    animation-play-state: paused;
}

@keyframes hotspot-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(58, 143, 160, 0.5); }
    50%       { box-shadow: 0 0 0 10px rgba(58, 143, 160, 0);   }
}

/* טיפ */
.hotspot-tip {
    display: block;
    position: absolute;
    background-color: #7A531E0D;
    color: var(--brown-dark);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 27px;
    border-radius: 8px;
    width: 200px;
    /* box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12); */
    white-space: normal;
    z-index: 20;
    top: 50%;
    transform: translateY(-50%);
}

.hotspot:hover .hotspot-tip { display: block; }

.hotspot-tip--left  { left: calc(100% - 14px); }
.hotspot-tip--right { right:  calc(100% - 14px); }
.hotspot-tip--bottom {
    top: calc(100% - 39px);
    left: 50%;
    right: -19px;
}

/* כפתור */
.demo-btn-wrap {
    margin-top: 32px;
    display: flex;
    justify-content: flex-start;
}
.btn-demo {
        display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    background-color: var(--teal);
    color: #fff;
    font-family:(--font-body);
    font-size: 22px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(42, 112, 128, 0.28);
    position: relative;
    bottom: 17px;
}
.btn-demo:hover {
    background-color: var(--teal);
    transform: translateY(-2px);
    color: #fff;
}
/* ═══════════════════════════════════════
   TAX SEARCH
═══════════════════════════════════════ */
.tax-search-wrap {
    position: relative;
    display: flex;
    justify-content: flex-end;
    padding: 0 32px;
    margin-bottom: -20px;
    z-index: 10;
    margin-top: 40px;
}

.tax-search-inner {
    position: relative;
    width: 340px;
}

.tax-search-input {
    width: 100%;
    padding: 12px 44px 12px 18px;
    background-color: #7A531E;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    outline: none;
    direction: rtl;
}

.tax-search-input::placeholder { color: rgba(255,255,255,0.65); }

.tax-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.75);
    pointer-events: none;
    display: flex;
}

/* תוצאות */
.tax-search-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(122,83,30,0.2);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    overflow: hidden;
    z-index: 200;
    max-height: 380px;
    overflow-y: auto;
}

.tsr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--brown-dark);
    text-decoration: none;
    border-bottom: 1px solid rgba(122,83,30,0.08);
    transition: background 0.15s;
}
.tsr-item:last-child { border-bottom: none; }
.tsr-item:hover { background: rgba(122,83,30,0.06); }

.tsr-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.tsr-thumb--empty {
    background: rgba(122,83,30,0.1);
    border-radius: 6px;
}

.tsr-num {
    font-size: 0.78rem;
    color: var(--brown);
    flex-shrink: 0;
    min-width: 24px;
}

.tsr-title {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 500;
}

.tsr-arrow {
    color: var(--brown);
    font-size: 1rem;
    flex-shrink: 0;
}

.tsr-empty {
    padding: 16px;
    text-align: center;
    color: var(--brown);
    font-size: 0.9rem;
    opacity: 0.7;
}
/* ═══════════════════════════════════════
   CURRENT UNITS ROW — 5 ריבועים
   עיצוב זהה ל-unit-card
═══════════════════════════════════════ */
.current-units-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2.3fr 1fr 1fr;
    gap: 40px;
    margin-top: 24px;
    align-items: start;
}

.cu-card {
    display: block;
    position: relative;
    padding: 24px 16px 20px;
    text-decoration: none;
    color: var(--brown-dark);
    background: transparent;
    transition: background 0.2s ease;
}

/* מסגרת גרדיאנט כמו unit-card */
.cu-card::before,
.cu-card::after {
    content: '';
    position: absolute;
    top: 0;
    width: 1.5px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent       0%,
        transparent       5%,
        var(--brown-dark) 20%,
        var(--brown-dark) 80%,
        transparent       95%,
        transparent       100%
    );
    opacity: 0.35;
}
.cu-card::before { right: 0; }
.cu-card::after  { left: 0;  }

/* כרטיס ריק */
.cu-card--empty {
    pointer-events: none;
    opacity: 0;
}

/* כרטיס נוכחי — תכלת, שאר הסגנון זהה */
.cu-card--current {
    padding-bottom: 64px;
    margin-top: 29px; /* מקום לחצים */
}
.cu-card--current .cu-card-inner{
    background: linear-gradient(to left, #1497af36, #00788c4f);
        border-radius: 10px;
    overflow: hidden;
    text-align: right;
}
.cu-card--current .cu-current-title-block{
background: linear-gradient(to top, #1497AF, #00788C);
width: 100%;
    
}
.cu-card--current::before,
.cu-card--current::after { display: none; }
.cu-card--current:hover  { transform: translateY(-3px); }

/* בלוק כותרת */
.cu-current-title-block {
        display: grid;
    grid-template-columns: 2fr 1fr 6fr 1fr;
    gap: 6px;
    padding: 16px 16px 20px;
    align-items: center;
}

.cu-current-unit-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.05em;
}

.cu-current-decor {
    width: 19px;
    height: auto;
    opacity: 0.9;
}

.cu-current-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    display: block;
}

.cu-current-arrow {
    color: #fff;
    font-size: 1rem;
}

.cu-card--current::before,
.cu-card--current::after { opacity: 0; } /* בתכלת אין גרדיאנט */

.cu-card-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    text-align: center;
}
/* ── סליידר אנימציות ── */
.cu-slide-out-right {
    animation: cuSlideOutRight 0.3s ease forwards;
}
.cu-slide-out-left {
    animation: cuSlideOutLeft 0.3s ease forwards;
}
.cu-slide-in-left {
    animation: cuSlideInLeft 0.35s cubic-bezier(0.34,1.2,0.64,1) forwards;
}
.cu-slide-in-right {
    animation: cuSlideInRight 0.35s cubic-bezier(0.34,1.2,0.64,1) forwards;
}

@keyframes cuSlideOutRight {
    to { opacity: 0; transform: translateX(40px); }
}
@keyframes cuSlideOutLeft {
    to { opacity: 0; transform: translateX(-40px); }
}
@keyframes cuSlideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes cuSlideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
/* תמונה — זהה ל-unit-card-thumb */
.cu-card-thumb {
    width: 100%;
    max-width: 204px;
    height: 290px;
    object-fit: contain;
    display: block;
    background: transparent;
    border-radius: 0;
}
.cu-card--current .cu-card-thumb {
    max-width: unset;
    opacity: 0.75;
}
.cu-card-thumb--empty {
    width: 204px;
    height: 307px;
    background: linear-gradient(
        160deg,
        rgba(58,143,160,0.1) 0%,
        rgba(196,164,74,0.1) 100%
    );
    border-radius: 2px;
}

/* מספר */
.cu-card-num {
    font-family: 'Talent', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--brown1);
    margin-top: 10px;
    line-height: 1.4;
    display: block;
    text-align: center;
    width: 100%;
}
.cu-card--current .cu-card-num { color: rgba(255,255,255,0.75); }

/* כותרת */
.cu-card-title {
    font-family: 'Talent', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--brown-dark);
    line-height: 1.35;
    display: block;
    width: 100%;
    margin-bottom: 13px;
}
.cu-card--current .cu-card-title { color: #fff; }

/* תגית "יחידה נוכחית" */
.cu-card-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: 0.78rem;
    border-radius: 20px;
    font-family: var(--font-body);
}

/* חצים דיפדוף */
.cu-nav-btn {
    position: absolute;
    bottom: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
        border: 1.5px solid var(--brown-dark);
    background: transparent;
    color: var(--brown-dark);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 2;
}
.cu-nav-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
}
.cu-nav-btn:disabled { opacity: 0.3; cursor: default; }
.cu-nav-btn--prev { left: calc(50% - 31px); }
.cu-nav-btn--next { left: calc(50% + 15px); }
/* ===========================
   שורת יחידות תוכן
=========================== */
.w96{
    
    width: 1300px;
    max-width: 96%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.w100{
    width: 100%;
}
.mrgt80{
    margin-top: 80px;
}
.inrowf{
        display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}
.units-row-wrap {
    width: 100%;
    padding: 0 4px;
}

.units-slider-wrap {
    overflow: hidden;
    position: relative;
}

.units-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* slider mode — activated by JS when count > 6 */
.units-slider-wrap.is-slider .units-row {
    display: flex;
    flex-wrap: nowrap;
    direction: rtl;
    gap: 40px;
    transition: transform 0.4s ease;
    will-change: transform;
}

.units-slider-wrap.is-slider .unit-card {
    direction: rtl;
    flex-shrink: 0;
}

.units-nav-wrap {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.units-nav-wrap.is-visible {
    display: flex;
}

.units-nav-wrap .cu-nav-btn {
    position: static;
}

/* כרטיס */
.unit-card {
    display: block;
    position: relative;
    padding: 24px 16px 20px;
    text-decoration: none;
    color: var(--brown-dark);
    background: transparent;

    /* מסגרת רק ימין ושמאל — גרדיאנט חום כהה באמצע, נעלם למעלה/למטה */
    border-right: none;
    border-left:  none;
    border-top:   none;
    border-bottom:none;

    /* גרדיאנט כמסגרת דרך pseudo */
    transition: background 0.2s ease;
}

/* מסגרת ימין */
.unit-card::before,
.unit-card::after {
    content: '';
    position: absolute;
    top: 0;
    width: 1.5px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent       0%,
        transparent      5%,
        var(--brown-dark) 20%,
        var(--brown-dark) 80%,
        transparent      95%,
        transparent      100%
    );
    opacity: 0.35;
}
.unit-card::before { right: 0; }
.unit-card::after  { left:  0; }

.unit-card:hover {
    background: rgba(139, 105, 20, 0.04);
}

/* תמונה */
.unit-card-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.unit-card-thumb {
    width: 204px;
    max-width: 100%;
    height: 307px;
    object-fit: contain;
    display: block;
    background: transparent;
    border-radius: 0;
}

.unit-card-thumb--empty {
    background: linear-gradient(
        160deg,
        rgba(58,143,160,0.1) 0%,
        rgba(196,164,74,0.1) 100%
    );
    border-radius: 2px;
}

/* מספר יחידה */
.unit-card-num {
    font-family: 'Talent', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--brown1);
    margin-top: 10px;
    line-height: 1.4;
    width: 100%;
    text-align: center;
}

/* כותרת */
.unit-card-title {
        margin-bottom: 7px;
    width: 100%;
    text-align: center;
    font-family: 'Talent', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--brown-dark);
    line-height: 1.35;
    display: block;
}

/* תקציר 6 מילים */
.unit-card-excerpt {
    font-family: 'Talent', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--brown1);
    line-height: 1.5;
    opacity: 0.8;
    margin: 0;
}

/* חץ */
.unit-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-top: 8px;
    font-size: 1.1rem;
    color: var(--brown1);
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.unit-card-arrow:hover,
.unit-card:hover .unit-card-arrow {
    transform: translateX(-5px);
    color: var(--brown-dark);
}

/* Placeholder */
.unit-card--placeholder .unit-card-inner {
    align-items: center;
    justify-content: center;
    min-height: 380px;
}
.unit-card--placeholder .unit-card-num {
    font-size: 2rem;
    opacity: 0.15;
    margin-top: 0;
}

/* שורת אייקונים */
.units-icons-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 40px 0 0;
    flex-wrap: wrap;
    margin-top: 70px;
}

.units-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.units-icon-item img {
        width: 148px;
    height: 130px;
    object-fit: contain;
    opacity: .7;
}

.units-icon-label {
    font-family: 'Talent', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--brown1);
    text-align: center;
}

/* עיטור סוף סקשן */
.section-footer-deco {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    padding-bottom: 0;
}

.section-footer-deco img {
    width: 100%;
    max-width: 740px;
    height: auto;
    opacity: 0.6;
}

/* מרווח 80px לפני הסקשן הבא */
.section-gap {
    height: 80px;
}
/* ===========================
   SECTION 4 - מפת מסלול
   קיים: map-section, map-bg, mazpen-wrap, map-inner,
         map-title, map-title-line — ללא שינוי.
   חדש:  ms-* — פריסת תוכן בלבד.
=========================== */

/* ── קיים ─────────────────────────────────────── */
.map-section {
    position: relative;
    background-color: #FAF8F3;
    overflow: visible;
    padding: 60px 0 80px;
}
.map-bg {
    position: absolute;
    inset: 0;
    background-image: url(../images/mount.png);
    background-size: contain;
    background-position: center;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
}
.mazpen-wrap {
    position: absolute;
    top: -117px;
    left: 48px;
    z-index: 10;
    width: 350px;
    cursor: pointer;
}
.mazpen-wrap img {
    width: 450px;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
}
.mazpen-wrap:hover img { transform: rotate(35deg); }
.map-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}
.map-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 14px;
    margin-top: 20px;
}
.map-title-line {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}
.map-title-line::before {
    content: '';
    display: block;
    width: clamp(100px, 18vw, 200px);
    height: 2px;
    background-color: var(--brown);
    opacity: 0.45;
}
.map-title-line-dot {
    display: block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background-color: var(--brown);
    opacity: 0.6;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   ms-5cols — 5 עמודות מושגים
══════════════════════════════════════════════════ */
.ms-5cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    direction: rtl;
    align-items: start;
    padding: 0 24px;
}

.ms-col5 {
    padding: 20px 18px;
    border-right: 1px solid rgba(139, 105, 20, 0.18);
}
.ms-col5:last-child {
    border-right: none;
}

.ms-col5__header {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(200, 151, 58, 0.4);
}

/* ══════════════════════════════════════════════════
   ms-cards-wrap + ms-card — תת-כותרות וקישורים
══════════════════════════════════════════════════ */
.ms-cards-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ms-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brown1);
}

.ms-card__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ms-card__links a {
    font-family: 'Talent', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--brown1);
    text-decoration: none;
    display: block;
    transition: color 0.18s;
    padding: 1px 0;
}
.ms-card__links a:hover {
    color: var(--teal-dark);
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   רספונסיבי
══════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .ms-5cols {
        grid-template-columns: repeat(3, 1fr);
    }
    .ms-col5:nth-child(3) { border-right: none; }
}
@media (max-width: 600px) {
    .ms-5cols {
        grid-template-columns: repeat(2, 1fr);
    }
    .ms-col5:nth-child(2) { border-right: none; }
    .ms-col5:nth-child(3) { border-right: 1px solid rgba(139, 105, 20, 0.18); }
}
/* ===========================
   MORE PAGE - חומרים נלווים
=========================== */
/* header ב-more-page — רקע + צבע לינקים */
.more-page .site-header {
    background: rgba(245, 240, 232, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(139, 105, 20, 0.1);
}

.more-page .nav-menu > li > a {
    color: var(--brown1);
}

.more-page .nav-menu > li.menu-item-has-children > a::after {
    border-top-color: var(--brown1);
}

.more-page-main {
    direction: rtl;
    background: #FAF8F3;
    min-height: 60vh;
    padding-top: var(--header-height);
}

/* ביטול min-height:100vh של hero-section בתוך more-page */
.more-page-main .hero-section {
    min-height: unset;
    overflow: visible;
}
.more-page-main .hero-inner {
    min-height: unset;
    grid-template-columns: 1fr;
    display: block;
}

/* ── הימנון ── */
.more-himnon-section {
    background: #fff;
    padding: 50px 0 40px;
    border-bottom: 1px solid rgba(139, 105, 20, 0.12);
}

.more-himnon-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.more-himnon-inner .himnon-title {
    margin-bottom: 28px;
}

.more-himnon-embed {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.more-himnon-embed iframe {
    display: block;
    width: 100%;
    height: 480px;
    border: none;
}

/* ── סקשן ── */
.more-section {
    padding: 0 0 48px;
}

.more-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #086673;
    padding: 15px 44px;
    background-color: #e9f8fb;
    border-bottom: 1px solid rgba(139, 105, 20, 0.08);
    box-shadow: 0px 2px 17.3px -9px #00000021;
    margin: 40px 0 28px;
    text-align: center;
}

/* ── גריד כרטיסים ── */
.more-sipurim-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 32px;
}


/* ===========================
   SECTION 5 - 3 עמודות תכלת
=========================== */
.cols-section {
    position: relative;
    background-color: var(--light-blue) ;
    padding: 80px 0;
    overflow: hidden;
}

.cols-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/bg_bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    pointer-events: none;
    z-index: 1;
}

.cols-inner {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 48px;
}

.cols-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 14px;
}

.cols-title-line {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
}
.cols-title-line::before {
    content: '';
    display: block;
    width: clamp(100px, 18vw, 200px);
    height: 2px;
    background-color: var(--brown);
    opacity: 0.45;
}
.cols-title-line-dot {
    display: block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background-color: var(--brown);
    opacity: 0.6;
    flex-shrink: 0;
}

/* שלוש עמודות */
.cols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    align-items: start;
}

/* עמודה בודדת */
.col-card {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px 24px 28px;
    max-height: 870px;
    overflow: hidden;  /* גלילה פנימית אם עולה */
    background-image: url(../images/dekor_t.png);
    background-position: 10px 10px;
    background-repeat: no-repeat;
}

/* חץ גלילה — מוצג כשיש תוכן נוסף */
.col-card.is-overflow::after {
    content: '↓';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.88) 55%);
    color: var(--brown-dark);
    font-size: 18px;
    pointer-events: none;
    animation: scroll-hint 1.6s ease-in-out infinite;
}

@keyframes scroll-hint {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50%       { opacity: 1;   transform: translateY(3px); }
}

/* עיטור פינה שמאל עליון */
.col-deco {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 32px;
    height: auto;
    pointer-events: none;
    opacity: 0.75;
}

/* תוכן */
.col-card-content::-webkit-scrollbar {
    width: 1px;
}

.col-card-content::-webkit-scrollbar-track {
    background: transparent;
}

.col-card-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, transparent 10%, var(--brown-dark) 10%,var(--brown-dark) 90%);
    border-radius: 1px;
}

.col-card-content::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.col-card-content::-webkit-scrollbar-button:start:decrement,
.col-card-content::-webkit-scrollbar-button:end:increment {
    display: none;
}
.col-card-content {
    font-family: 'Talent', sans-serif;
    width: 98%;
    overflow-y: scroll;
    padding: 0 0 0 20%;
    max-height: 600px;
}

.col-card-content h3,
.col-card-content h2 {
    font-family: 'Mikhmoret', serif;
    font-size: 35px;
    font-weight: 700;
    color: var(--brown-dark);
    line-height: 80px;
    margin: 0;
}

.col-card-content p {
    font-family: 'Talent', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--brown-dark);
    line-height: 28px;
    margin: 0 0 12px;
}
.col-sub-item ul {
    padding-right: 1.2rem;
    list-style: disc;
}

.col-sub-item ul li {
    margin-bottom: 0.3rem;
}
.col-card-content ol {
    font-family: 'Talent', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--brown);
    line-height: 28px;
    padding-right: 24px;
    margin: 0 0 12px;
}

.col-card-content ol li {
    margin-bottom: 6px;
}
/* ===========================
   SINGLE UNIT - HEADER FIXED
=========================== */
.single-unit-page {
    background-color: var(--cream);
}

/* Header קבוע למעלה */
.unit-header {
    display: flex;
    align-items: stretch;
    height: 160px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    overflow: visible;
}

/* ריבוע לוגו */
.unit-header-logo-box {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    background-color: #1DBAD6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.unit-header-logo-img {
    width: 110px;
    height: auto;
    object-fit: contain;
}

.unit-header-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
}

/* אזור גרדיאנט */
.unit-header-gradient {
    flex: 1;
    background: linear-gradient(to left, #1497AF, #00788C);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    gap: 24px;
}

/* טקסט ימין */
.unit-header-text {
    display: flex;
    align-items: center;
    gap: 15px;
        position: relative;
    top: 27px;
}

.unit-header-number {
    font-family: 'Mikhmoret', serif;
    font-size: 50px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.unit-header-decor {
    height: 35px;
    width: auto;
    opacity: 1;
    position: relative;
    bottom: 3px;
}

.unit-header-title {
    font-family: 'Mikhmoret', serif;
    font-size: 50px;
    font-weight: 400;
    color: #fff;
    line-height: 1.3;
    margin: 0;
}

/* קישורים שמאל */
.unit-header-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    flex-shrink: 0;
        align-self: flex-end;
    margin-bottom: 30px;
}

.unit-header-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.88;
    transition: opacity 0.2s;
}
.unit-header-link:hover { opacity: 1; color: #fff; }

.unit-link-arrow {
    font-size: 1rem;
    transition: transform 0.2s;
}
.unit-header-link:hover .unit-link-arrow {
    transform: translateX(-4px);
}

/* חצי עיגול תמונה */
.unit-header-thumb-wrap {
    position: absolute;
    left: 18%;
    top: 0;
    z-index: 3;
}

.unit-header-thumb-semicircle {
    width: 281px;
    height: 140.5px;
    border-radius: 0 0 281px 281px;
    overflow: hidden;
    background: #fff;
}

.unit-header-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ===========================
   UNIT BODY — מתחת לheader הקבוע
=========================== */
.unit-body {
    display: flex;
    padding-top: 160px; /* גובה הheader */
    min-height: 100vh;
    position: relative;
}

/* ===========================
   SIDEBAR ניווט FIXED
=========================== */
.unit-sidebar {
    position: fixed;
    right: 0;
    top: 160px;
    bottom: 0;
    width: 163px;
    background-color: #006374;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 4px;
    z-index: 100;
    box-shadow: -3px 0 18px rgba(0,0,0,0.12);
}

/* ===========================
   SIDEBAR ITEM
=========================== */
.unit-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 8px;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.25s ease;
}


.unit-sidebar-item.is-active::before { opacity: 1; }

/* ===========================
   ICON WRAP — עיגול אנימציה
=========================== */
.unit-sidebar-icon-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 0.3s ease;
    border-radius: 50%;
    background-color: transparent;
}

/* hover — עיגול עדין */
.unit-sidebar-item:hover .unit-sidebar-icon-wrap {
    background-color: rgba(255,255,255,0.12);
    transform: scale(1.1);
}

/* active — עיגול זהב + גדל + מסתובב */
.unit-sidebar-item.is-active .unit-sidebar-icon-wrap {
    background-color: var(--brown);
    transform: scale(1.4) rotate(15deg);
    box-shadow: 0 4px 16px rgba(224, 192, 126, 0.45);
}

/* ===========================
   ICON — default ו-active
=========================== */
.unit-sidebar-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    position: absolute;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* default icon */
.unit-sidebar-icon--default {
    opacity: 1;
    filter: brightness(0) invert(1);
    transform: scale(1);
}

/* active icon */
.unit-sidebar-icon--active {
    opacity: 0;
    filter: brightness(0) invert(1);
    transform: scale(0.7) rotate(-15deg);
}

/* כשאקטיב — מחליף אייקונים */
.unit-sidebar-item.is-active .unit-sidebar-icon--default {
    opacity: 0;
    transform: scale(0.7) rotate(15deg);
}
.unit-sidebar-item.is-active .unit-sidebar-icon--active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* hover — שקיפות קלה */
.unit-sidebar-item:hover .unit-sidebar-icon--default {
    opacity: 0.9;
}

/* label */
.unit-sidebar-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    text-align: center;
    line-height: 1.3;
    transition: color 0.25s;
    margin-top: 8px; /* מקום לעיגול שגדל */
}
 .unit-sidebar-label.brown{
color: var(--brown);
position: absolute;
    top: 100%;
}
.brown .unit-sidebar-icon{
        position: relative;
        width: 75px;
        height: 75px;
    top: 43%;
}
.unit-sidebar-item.is-active .unit-sidebar-label {
    color: #fff;
    font-weight: 700;
}

/* ===========================
   UNIT CONTENT — גלילה מלאה
=========================== */
.unit-content {
    flex: 1;
    margin-right: 163px;
    position: relative;
    background: linear-gradient(45deg, #e7f6f9, #ffffff);
}

.unit-bg-texture {
    position: fixed; /* fixed כדי שלא יגלל עם התוכן */
    inset: 160px 163px 0 0;
    background-image: url('../images/bg_bg.png');
    background-size: cover;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* ===========================
   SECTION — גובה מסך מלא
=========================== */
.unit-section {
    position: relative;
    z-index: 1;
    min-height: 100vh; /* גובה מסך מלא */
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(139,105,20,0.12);
    scroll-margin-top: 0;
    scroll-snap-align: start;
    overflow: hidden; /* תוכן ארוך מוסתר — גלילה פנימית 
    max-width: 1000px;*/
}

/* כשיש תוכן ארוך — גלילה פנימית */
.unit-section--scrollable {
    overflow-y: auto;
}

/* כותרת סקשן — נשארת למעלה */
.unit-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #086673;
    margin: 0;
    padding: 15px 44px 9px 40px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(139, 105, 20, 0.08);
        background-color: #e9f8fb;
    margin: 40px 0 40px 20px;
    box-shadow: 0px 2px 17.3px -9px #00000021;

    
}

.unit-section-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    opacity: 0.75;
}

/* תוכן — גולל פנימה אם ארוך */
.unit-section-content {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray);
    padding: 0 40px 0 20px;
    overflow-y: auto;
    flex: 1;
}

/* מסך ה-scroll בתוך section */
.unit-section-content::-webkit-scrollbar {
    width: 1px;
}
.unit-section-content::-webkit-scrollbar-track {
    background: transparent;
}
.unit-section-content::-webkit-scrollbar-thumb {
    background: rgba(139,105,20,0.25);
    border-radius: 2px;
}

.unit-section-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal);
}

.unit-section-content p { margin-bottom: 14px; }

.unit-section-content ol,
.unit-section-content ul {
    padding-right: 24px;
    margin-bottom: 14px;
}

.unit-section-content li { 
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 6px; }

/* ===========================
   SCROLL SNAP על הcontainer
=========================== */
.unit-content {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: calc(100vh - 160px);
}

/* ===========================
   OVERVIEW CARDS
=========================== */
.overview-grid {
     display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 28px;
}
.overview-grid .box-1 {
    grid-column: 1 / -1; /* תופס את כל הרוחב */
}

.overview-grid .box-2 {
    margin-left: 0;
}

.overview-grid .box-3 {
    /* אוטומטי — שליש */
}
.overview-image-wrap {
    width: 50%;
}
.overview-image-wrap h5{
        display: flex;
    background-color: var(--brown);
    font-size: 30px;
    color: #156f7b;
    font-family: var(--font-heading);
    font-weight: 400;
    padding: 7px 16px;
    border-radius: 14px 14px 0 0;
        align-items: center;
}
.overview-image-wrap h5::before{
        content: '';
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    padding: 4px;
    margin-left: 10px;
    background-image: url(../images/i_pic.svg);
    background-size: 65%;
    background-repeat: no-repeat;
    background-position: center;
}
.overview-cards-wrap h5::before{
    background-image: url(../images/i_targetb.svg);
}

.overview-re {
    padding: 16px;
    font-size: 15px;
    line-height: 1.9;
    color: #2c1f12;
}

.overview-re p { margin: 0 0 10px; }
.overview-re p:last-child { margin-bottom: 0; }

.overview-long-text-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px auto 0;
    padding: 10px 22px;
    background-color: var(--teal);
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(29, 186, 214, 0.3);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.overview-long-text-btn::after {
    content: '←';
    font-size: 14px;
}
.overview-long-text-btn:hover {
    background-color: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 186, 214, 0.4);
}

.overview2-card{
        background: #FFFEFC;
    box-shadow: 6px 6px 50px -22px #00000040;
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 12px;
}
.overview2-card h3{
        display: flex;
    color: var(--teal);
    font-size: 30px;
    font-weight: 400;
}
.overview2-card h3::before{
    content: '';
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--teal);
    padding: 4px;
    margin-left: 10px;
    background-image: url(../images/i_target.svg);
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
}
.overview2-card h3.i_torah::before{
    background-image: url(../images/i_torah.svg);
}
.overview2-card h3.i_zoom::before{
    background-image: url(../images/i_zoom.svg);
}
.overview2-card h3.i_lamp::before{
    background-image: url(../images/i_lamp.svg);
}
.overview-card-icon { font-size: 1.2rem; line-height: 1; }

.overview-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin: 0;
}
.jcc{
    justify-content: center;

}
.overview3 .overview2-card.box-1{
    background-image: url(../images/torah.png);
        background-color: transparent;
    min-height: 231px;
    box-shadow: none;
    background-size: 100% 100%;
}
.overview2-card.box-1 ul,.overview2-card.box-2 ul,.overview2-card.box-3 ul{
        columns: 2;
    column-gap: 70px;
    max-width: 90%;
    margin-right: 40px;
    margin-top: 10px;
}
/* ─── overview3-cards ─── */
.overview3-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-height: 480px;
    overflow-y: auto;
    padding-left: 2px; /* מקום לסקרולבר */
}


/* ─── כרטיס מדרש ─── */
.midrash {
    background: #E0C07E1A;
    padding: 14px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    min-width: 0; /* חשוב ל-grid */
}

.midrash:hover {
    box-shadow: 0 4px 16px rgba(200, 151, 58, 0.2);
    transform: translateY(-2px);
}

.midrash h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 8px;
}

.midrash .midrash-excerpt {
    font-size: 12px;
    color: #6b4c38;
    line-height: 1.6;
}
a.read-more{
        font-size: 10px;
    text-align: left;
    border-bottom: 1px solid var(--brown-dark);
    padding-left: 13px;
}
.more svg{
    position: relative;
    right: -8px;
}
.more {
    display: flex;
    align-items: center;
    justify-content: end;
}
.midrash .read-more {
}
.midrash .read-more:hover {
    border-color: #c8973a;
}

/* ─── כרטיס מדרש עם תמונה ─── */
.midrash--has-img {
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.midrash-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

.midrash-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.midrash--has-img:hover .midrash-img {
    transform: scale(1.05);
}

.midrash--has-img h5 {
    padding: 10px 14px 4px;
    margin-bottom: 4px;
}

.midrash--has-img .midrash-excerpt {
    padding: 0 14px 14px;
}

.colume-2{
    columns: 2;
}
/* ─── פופאפ ─── */   
.midrash-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(40, 25, 10, 0.55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.midrash-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.midrash-popup {
    background: #fffdf7;
    border: 1px solid #d4c4a8;
    border-radius: 18px;
    padding: 36px 40px;
    width: 90%;
    max-width: 920px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    scrollbar-width: thin;
    scrollbar-color: #c8973a transparent;
}
.midrash-popup::-webkit-scrollbar { width: 4px; }
.midrash-popup::-webkit-scrollbar-thumb { background: #c8973a; border-radius: 4px; }

.midrash-popup-overlay.is-open .midrash-popup {
    transform: translateY(0);
}

/* ─── סיפורים — פופאפ רחב דו-עמודי ─── */
.midrash-popup-overlay.sipur-mode .midrash-popup {
    max-width: 920px;
    padding: 32px 36px;
}

.sipur-popup-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 28px;
    align-items: start;
    direction: rtl;
}

.sipur-popup-right {
    position: sticky;
    top: 0;
}

.sipur-popup-img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.sipur-popup-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sipur-popup-left--full {
    grid-column: 1 / -1;
}

.sipur-popup-audio-label {
    font-size: 12px;
    font-weight: 700;
    color: #8a7060;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: -8px;
}

.midrash-popup-title {
        font-size: 47px;
    font-weight: 700;
    color: #c8b898;
    /* margin-bottom: 20px; */
    /* padding-bottom: 14px; */
    border-bottom: 1px solid #d4c4a8;
    font-family: var(--font-heading);
}

.midrash-popup-content {
    font-size: 15px;
    line-height: 1.8;
    color: #2c1f12;
}

.midrash-popup-content strong { font-weight: 700; }
.midrash-popup-content em     { font-style: italic; }
.midrash-popup-content h2 {
    font-family: 'Mikhmoret', serif;
    font-size: 34px;
    color: var(--teal);
    margin: 20px 0 10px;
    font-weight: 400;
}
.midrash-popup-content h3 {
    font-family: 'Mikhmoret', serif;
    font-size: 30px;
    color: #d4c4a8;
    margin: 18px 0 8px;
    font-weight: 400;
}
.midrash-popup-content .teal-box,
.midrash-popup-content .bg-teal {
    background: #d4ecf1;
    color: #2c1f12;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    display: block;
}
.midrash-popup-content .bg-beige {
    background: #eae0cc;
    color: #2c1f12;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    display: block;
}
.midrash-popup-content ul,
.midrash-popup-content ol     { padding-right: 8px; margin: 10px 0; list-style: none; }
.midrash-popup-content ul li  {
    position: relative;
    padding-right: 26px;
    margin-bottom: 8px;
}
.midrash-popup-content ul li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--teal);
    font-weight: 700;
    font-size: 14px;
}
.midrash-popup-content ol     { list-style: decimal; padding-right: 20px; }
.midrash-popup-content li     { margin-bottom: 6px; }

.midrash-popup-close {
    position: absolute;
    top: 16px;
    left: 16px; /* RTL — שמאל */
    width: 32px;
    height: 32px;
    border: none;
    background: #f0e8d8;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #6b4c38;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.midrash-popup-close:hover { background: #c8973a; color: #fff; }

@media (max-width: 600px) {
    .midrash-popup-overlay { align-items: flex-end; }

    .midrash-popup,
    .midrash-popup-overlay.sipur-mode .midrash-popup {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 18px 18px 0 0;
        padding: 20px 16px 28px;
    }

    .midrash-popup-title { font-size: 28px; }

    /* layout דו-עמודי → עמודה אחת */
    .sipur-popup-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sipur-popup-right { position: static; }

    .sipur-popup-embed-top { aspect-ratio: 16/9; height: auto; }
    .sipur-popup-embed-top iframe { height: 100%; }

    .midrash-popup-audio { width: 100%; }
}

/* ─── sipurim cards ─── */
.sipurim-cards {
    grid-template-columns: repeat(4, 1fr);
    max-height: none; /* סיפורים — בלי גבלת גובה, יש תמונות */
    overflow-y: visible;
}

.sipur-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sipur-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.sipur-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.sipur-card:hover .sipur-img {
    transform: scale(1.04);
}

.sipur-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sipur-body h5 {
        font-size: 19px;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 0;
    font-family: var(--font-heading);
}

/* ─── אייקונים ─── */
.sipur-icons {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
        justify-content: end;
}

.sipur-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brown-dark);
    color: #ffffff;
    transition: background 0.2s, color 0.2s;
}

.sipur-icon--text:hover     { background: #e8c47a; color: #3d2b1f; }
.sipur-icon--sound:hover    { background: #c8973a; color: #fff; }
.sipur-icon--embed:hover    { background: #3d2b1f; color: #fff; }
.sipur-icon--download:hover { background: #c8973a; color: #fff; }
.sipur-icon--pdf:hover      { background: #c0392b; color: #fff; }

.sipur-popup-pdf {
    background: #c0392b;
    color: #fff;
}
.sipur-popup-pdf:hover { background: #96281b; color: #fff; }

/* ─── פופאפ — תוספות לסיפורים ─── */
.midrash-popup-pic {
    display: block;
    width: calc(100% + 80px);
    margin-bottom: 22px;
    max-height: 220px;
    object-fit: cover;
    border-radius: 18px 18px 0 0;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* מניעת גרירה ושמירה לכל תמונה בתוך הפופאפ */
#midrashOverlay img,
#midrashOverlay .sipur-popup-img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.midrash-popup-audio {
    width: 100%;
    margin: 16px 0;
    accent-color: #c8973a;
}

.midrash-popup-embed {
    margin: 16px 0;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.midrash-popup-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* embed מלוא הרוחב בראש פופאפ סיפור */
.sipur-popup-embed-top {
    margin: 0 0 20px 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    width: 100%;
}

.sipur-popup-embed-top iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.midrash-popup-divider {
    border: none;
    border-top: 1px dashed #d4c4a8;
    margin: 16px 0;
}
/* ─── overview5 ─── */
.ov5-grid {
    columns: 2;
    column-gap: 20px;
}

.ov5-section {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--surface, #fffdf7);
        overflow: hidden;
        border-radius: 12px;
    box-shadow: 6px 6px 50.9px -22px #00000040;
}

.ov5-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
}

.ov5-section-header svg {
        flex-shrink: 0;
    width: 35px;
    padding: 5px;
    height: 35px;
    position: relative;
}
.ov5-section-header > div.icon{
position: relative;
}
.ov5-section-header > div.icon {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
}
.ov5-section-header > div.icon::before{
    content: '';
    width: 39px;
    background-color: var(--teal);
    position: absolute;
    right: 0;
    left: 0;
    height: 39px;
    border-radius: 50%;

}

.ov5-section-header h3 {
    font-size: 30px;
    font-weight: 400;
    color: var(--teal);
    margin: 0;
}
.v5-section-header h3::before{
    content: '';
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--teal);
    padding: 4px;
    margin-left: 10px;
    background-image: url(../images/i_target.svg);
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
}
.v5-section-header h3.i_play::before{
    background-image: url(../images/i_play.svg);
}
/* ─── games — תמונה + טקסט ─── */
.ov5-games-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 12px;
}

.ov5-games-list .ov5-game-row {
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 12px;
    overflow: hidden;
}

.ov5-games-list .ov5-game-row:only-child {
    grid-column: 1 / -1;
}

.ov5-games-list .ov5-game-pic {
    width: 120px;
    height: auto;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}

.ov5-games-list .ov5-game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 16px;
}

.ov5-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 12px;
}

.ov5-list .ov5-list-row:only-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
}

.ov5-list .ov5-list-row:only-child .ov5-list-pic {
    width: 140px;
    flex-shrink: 0;
    aspect-ratio: unset;
    height: auto;
}

.ov5-list .ov5-list-row:only-child .ov5-game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 16px;
}


.ov5-game-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    background-color: #E0C07E1A;
    justify-content: space-between;
}

.ov5-list-row {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #E0C07E1A;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ov5-game-row:hover { background: #f5f0e8; }

.ov5-game-pic {
    width: 60px;
    height: 60px;
    overflow: hidden;
    flex-shrink: 0;
}
.ov5-game-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ov5-list-pic {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 0;
}

.ov5-list-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ov5-list-row:hover .ov5-list-pic img {
    transform: scale(1.05);
}

.ov5-list-row:hover {
    box-shadow: 0 4px 16px rgba(200, 151, 58, 0.25);
    transform: translateY(-2px);
}

.ov5-game-info {
    padding: 10px 14px 14px;
    flex: 1;
}

.ov5-game-info h5 {
    font-size: 18px;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 4px;
    line-height: 1.3;
    font-family: var(--font-heading);
}
.ov5-game-info p {
    font-size: 15px;
    color: #8a7060;
    line-height: 1.5;
    margin: 0;
}

/* ─── tolk / פעילויות — כרטיסים עם תמונה ─── */
.ov5-tolk-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 12px;
}

.ov5-tolk-cards .ov5-tolk-card:only-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
}

.ov5-tolk-cards .ov5-tolk-card:only-child .ov5-tolk-img {
    width: 140px;
    flex-shrink: 0;
    aspect-ratio: unset;
    height: auto;
}

.ov5-tolk-cards .ov5-tolk-card:only-child .ov5-tolk-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 16px;
}

.ov5-tolk-card {
    background: #E0C07E1A;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.ov5-tolk-card:hover {
    box-shadow: 0 4px 16px rgba(200, 151, 58, 0.25);
    transform: translateY(-2px);
}

.ov5-tolk-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

.ov5-tolk-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ov5-tolk-card:hover .ov5-tolk-img img {
    transform: scale(1.05);
}

.ov5-tolk-body {
    padding: 10px 14px 14px;
    flex: 1;
}

.ov5-tolk-body h5 {
    font-size: 18px;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 4px;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.ov5-tolk-body p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.5;
    margin: 0;
}

/* ─── רשימות (sound, video, games3/4, tolk) ─── */

.ov5-list-row:last-child { border-bottom: none; }

.ov5-row-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f0e8d8;
    color: #8a7060;
    transition: background 0.2s, color 0.2s;
}
.ov5-list-row-video{
display: block;
}
.ov5-list-row:hover .ov5-row-icon { background: #c8973a; color: #fff; }

.ov5-row-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--brown-dark);
        justify-content: space-between;
    padding: 7px;
    display: flex;
}
.ov5-row-title svg{
width: 40px;
}
/* ─── video thumb ─── */
/* ─── video list ─── */
.ov5-video-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 15px;
}

.ov5-video-list:has(.ov5-list-row-video:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
}

.ov5-list-row-video {
    display: flex !important;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.ov5-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.ov5-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ov5-list-row-video:hover .ov5-video-thumb img {
    transform: scale(1.04);
}

.ov5-video-thumb--noimg {
    min-height: 90px;
    background: #2a1f14;
}

.ov5-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    color: #fff;
    transition: background 0.2s;
}

.ov5-list-row-video:hover .ov5-play-btn {
    background: rgba(0,0,0,0.55);
}

.ov5-video-external:hover .ov5-play-btn--external {
    background: rgba(29, 186, 214, 0.52);
}
.ov5-video-external {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.ov5-video-caption {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brown-dark);
    line-height: 1.4;
}

/* ─── sounds list ─── */
.ov5-sounds-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.ov5-sound-row {
    background: #fffdf7;
    border: 1px solid #e8dcc8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.ov5-sound-row:hover {
    box-shadow: 0 4px 14px rgba(200,151,58,0.15);
}

.ov5-sound-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 8px;
}

.ov5-sound-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brown-dark);
    flex: 1;
}

.ov5-sound-player {
    padding: 0 14px 12px;
}

.ov5-sound-audio {
    display: block;
    width: 100%;
    height: 36px;
    accent-color: #c8973a;
    border-radius: 20px;
    background: transparent;
}

.ov5-sound-audio::-webkit-media-controls-panel {
    background: #f5f0e8;
    border-radius: 20px;
}

/* ─── פופאפ — הורדה ─── */
.midrash-popup-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 18px;
    background: #3d2b1f;
    color: #e8c47a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.midrash-popup-download:hover { background: #c8973a; color: #fff; }
.midrash-popup-download svg { flex-shrink: 0; }
.print-actions {
    margin-top: auto;
    padding-top: 10px;
}

.print-actions .sipur-icon {
    background: #fff;
    color: var(--teal-dark);
}

.print-actions .sipur-icon--download {
    background: var(--teal-dark);
    color: #fff;
}

.print-actions .sipur-icon--view:hover,
.print-actions .sipur-icon--print:hover {
    background: var(--teal-dark);
    color: #fff;
}

.print-actions .sipur-icon--download:hover {
    background: #c8973a;
    color: #fff;
}

button.sipur-icon {
    border: none;
    cursor: pointer;
    padding: 0;
}

/* ─── PDF viewer popup ─── */
.pf-pdf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.pf-pdf-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.pf-pdf-modal {
    width: 92%;
    max-width: 960px;
    height: 88vh;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pf-pdf-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}
.pf-pdf-close:hover { background: #c8973a; }

.pf-pdf-iframe {
    width: 100%;
    flex: 1;
    border: none;
    display: block;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    :root { --header-height: 64px; }

    /* Header */
    .site-header { height: var(--header-height); }

    .header-inner {
        padding: 0 14px;
        gap: 10px;
        height: var(--header-height);
        justify-content: space-between;
    }

    /* לוגו — הקטנה דרסטית */
    .header-logo {
        padding: 28px 9px 14px;
        margin-left: 0;
    }
    .header-logo img,
    .header-logo .custom-logo {
        width: 34px;
    }

    /* המבורגר — גלוי, מחוץ ל-nav */
    .menu-toggle {
        display: flex;
        order: -1; /* ממוקם לפני כל השאר */
    }

    /* nav — drawer מלא */
    .main-navigation {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: min(280px, 85vw);
        height: calc(100dvh - var(--header-height));
        background: var(--cream-light);
        border-left: 1px solid rgba(139,105,20,0.15);
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 14px;
        overflow-y: auto;
        transition: right 0.28s ease;
        z-index: 950;
    }
    .main-navigation.is-open { right: 0; }

    /* המבורגר שבתוך ה-nav — מוסתר (משתמשים בזה שבחוץ) */
    .main-navigation .menu-toggle { display: none; }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
    }
    .nav-menu > li > a { padding: 12px 14px; font-size: 1rem; }

    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding-right: 14px;
        animation: none;
        background: transparent;
        display: none;
    }
    .nav-menu li.sub-open > .sub-menu { display: block; }

    /* Actions */
    .header-right-actions { gap: 8px; }
    .user-greeting { display: none; }
    .btn-auth { padding: 6px 12px; font-size: 0.8rem; }
    .secondary-logo { display: none; }
    .mobile-overlay.is-visible { display: block; }
}
@media (max-width: 768px) {
    .unit-header { height: 100px; position: relative; }
    .unit-body { padding-top: 100px; }
    .unit-sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 64px;
        flex-direction: row;
        padding: 0;
        justify-content: space-around;
    }
    .unit-content {
        margin-right: 0;
        margin-bottom: 64px;
        height: calc(100vh - 100px);
    }
    .unit-bg-texture { inset: 100px 0 64px 0; }
    .unit-section { height: calc(100vh - 164px); }
    .unit-sidebar-label { display: none; }
    .overview-cards { grid-template-columns: 1fr; }
}
.unit-section-content li { margin-bottom: 6px; }
/* ===========================
   OVERVIEW - מבט כללי
=========================== */
.overview-anchors-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
        align-items: center;
    justify-content: center;
}

.overview-anchor-item {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 50%;
    background: var(--brown);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 120px;
    height: 120px;
}

.overview-anchor-item:hover {
    opacity: .6;
}

.overview-anchor-item .unit-sidebar-label {
    font-size: 0.8rem;
}
.overview-image-wrap {
        width: 100%;
    max-width: 680px;
    background-color: #FFFEFC;
    border-radius: 14px;
    box-shadow: 6px 6px 50.9px -22px #00000040;
}

.overview-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        max-height: 383px;
    object-fit: cover;
}

/* כרטיסי מבט כללי */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.overview-card {
        background: #E0C07E1A;
    border-radius: 10px;
    margin: 20px 20px 0;
    padding: 14px 19px;
}

.overview-card-header h3{
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
}

.overview-card-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.overview-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin: 0;
}

.overview-card-list {
    font-family: 'Talent', sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--brown-dark);
    padding-right: 18px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* מושגים — תגיות */
.overview-card-list--tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-tag {
    background: rgba(212, 168, 71, 0.15);
    border: 1px solid rgba(212, 168, 71, 0.4);
    color: var(--brown-dark);
    font-family: 'Talent', sans-serif;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }
}
/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    .unit-header          { height: auto; flex-wrap: wrap; }
    .unit-header-logo-box { width: 80px; height: 80px; }
    .unit-header-gradient { padding: 16px 16px 16px 80px; }
    .unit-header-number   { font-size: 32px; }
    .unit-header-title    { font-size: 18px; }
    .unit-header-thumb-wrap { display: none; }

    .unit-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 68px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        gap: 0;
    }
    .unit-sidebar-item { padding: 8px 4px; gap: 3px; }
    .unit-sidebar-item::before { top: 0; right: 0; left: 0; bottom: auto; width: 100%; height: 3px; }
    .unit-sidebar-icon { width: 22px; height: 22px; }
    .unit-sidebar-label { font-size: 9px; }

    .unit-content { margin-right: 0; margin-bottom: 68px; }
    .unit-section { padding: 40px 24px; }
}
@media (max-width: 1024px) {
    .cols-grid { gap: 32px; }
}
@media (max-width: 768px) {
    .cols-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .cols-inner { padding: 0 16px; }
    .col-card { max-height: 600px; }
}
@media (max-width: 768px) {
    .mazpen-wrap { left: 16px; width: 90px; }
    .map-inner   { padding: 0 16px; }
    .map-track-wrap { min-height: 500px; }
    .map-stop-card  { min-width: 90px; max-width: 120px; padding: 8px 10px; }
}
@media (max-width: 1024px) {
    .units-row { grid-template-columns: repeat(3, 1fr); }
    .unit-card-thumb { height: 220px; }
}
@media (max-width: 600px) {
    .units-row { grid-template-columns: repeat(2, 1fr); }
    .unit-card-thumb { height: 180px; }
}


/* Responsive */
@media (max-width: 768px) {
    .about-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 24px;
    }
    .about-image-col { order: -1; }
    .about-rabi-img  { max-width: 220px; }
    .about-box       { padding: 24px 20px; }
}
/* ===========================
   RESPONSIVE - HERO
=========================== */
@media (max-width: 1024px) {
    .hero-text-col { padding: 40px 28px 40px 24px; }
    .strips-container { gap: 10px; padding: 0 16px; }
}

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .hero-text-col {
        padding: 40px 24px;
        border-left: none;
        border-bottom: 1px solid rgba(139, 105, 20, 0.12);
    }
    .strips-container {
        gap: 8px;
        padding: 0 12px;
        min-height: 220px;
    }
    :root {
        --strip-h-1: 100px; --strip-h-2: 80px;  --strip-h-3: 110px; --strip-h-4: 88px;
        --strip-h-5: 105px; --strip-h-6: 76px;  --strip-h-7: 115px; --strip-h-8: 90px;
        --strip-h-9: 100px; --strip-h-10: 80px; --strip-h-8: 90px;
    }
        /* עמודת טקסט */
    .hero-text-col {
        padding: 100px 24px 32px; /* מרווח מה-header */
        gap: 16px;
        order: 0;
        z-index: 5;
        position: relative;
    }

    .hero-main-title {
        font-size: 64px;
        line-height: 0.85;
    }

    .annual-plan-tag {
        font-size: 14px;
    }

    .btn-units {
        font-size: 1.1rem;
        padding: 11px 20px;
    }
    .about-deco--tr,.hotspot-tip{
        display: none;
    }

    .circle-vector {
        display: none; /* מיותר במובייל */
    }
}

/* Scroll reveal */
.strip-item.strip-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
@media (max-width: 768px) {
iframe {
    max-height: 212px;
}
    /* Demo box */
    .demo-inner { padding: 0 16px; gap: 32px; }
    .demo-box   { padding: 28px 20px; }

    /* כותרת */
    .demo-title, .himnon-title {
        font-size: 42px;
        line-height: 1.1;
        width: auto;        /* הסרת max-content */
        text-align: right;
    }

    .demo-title-line::before,
    .himnon-title-line::before {
        width: calc(100% - 30px);        /* במקום calc(100% + 80px) */
    }

    .demo-line-dot,
    .himnon-line-dot {
        position: relative;
        left: auto;
    }

    /* תמונת demo */
    .demo-image-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        margin-top: 40px;
    }

    .demo-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* נקודות חמות — מוסתרות, קשה לנהל במובייל */
    .hotspot { display: none; }

    /* כפתור demo */
    .inrowf {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .demo-btn-wrap { margin-top: 0; }

    .btn-demo {
        font-size: 18px;
        padding: 11px 22px;
        bottom: 0;
    }

    /* שורת יחידות */
    .units-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .unit-card-thumb {
        height: 200px;
    }

    /* שורת אייקונים */
    .units-icons-row {
        gap: 20px;
        margin-top: 40px;
    }

    .units-icon-item img {
        width: 80px;
        height: 70px;
    }

    /* iframe וידאו */
    .himnon-title { margin: 40px auto 24px; }

    /* iframe — responsive wrapper */
    [style*="player.vimeo.com"] ~ script { display: none; }
}
@media (max-width: 768px) {

    .map-section { padding: 40px 0 60px; }

    /* מחבר המפות */
    .mazpen-wrap { display: none; }

    .ms-5cols {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .ms-col5 {
        border-right: none;
        border-bottom: 1px solid rgba(139,105,20,0.12);
        padding: 16px 8px;
    }
    .ms-col5:last-child { border-bottom: none; }

    .ms-cards-wrap { gap: 10px; }

    .ms-card__title { font-size: 1rem; }

    .ms-card__links a { font-size: 0.85rem; }

    /* כותרת map */
    .about-title { font-size: 42px; }
}
/* ===========================
   TAX PAGE — MOBILE
=========================== */
@media (max-width: 768px) {

    /* ── כותרת ראשית ── */
    .tax-title {
        font-size: 42px;
        margin: 0 0 36px 0;
    }

    .title_decore_tax {
        width: 240px;
        right: 50%;
        transform: translateX(50%);
    }

    /* ── חיפוש ── */
    .tax-search-wrap {
        padding: 0 16px;
        margin-bottom: 0;
        margin-top: 24px;
    }

    .tax-search-inner {
        width: 100%; /* במקום 340px קבוע */
    }

    /* ── כותרת סקשן ── */
    .demo-title {
        font-size: 36px;
        line-height: 1.1;
    }

    .demo-title-line { position: relative; }

    .demo-title-line::before {
        width: 100%; /* במקום calc(100% + 80px) */
        position: relative;
    }

    .demo-line-dot {
        position: relative;
        left: auto;
    }

    /* ── יחידה נוכחית — מבנה ── */
    .current-units-row {
        grid-template-columns: 1fr; /* 5 עמודות → 1 */
        gap: 16px;
    }

    /* כרטיסי צד — מוסתרים, הנוכחי מספיק */
    .cu-card--side,
    .cu-card--empty {
        display: none;
    }

    /* כרטיס נוכחי — תופס רוחב מלא */
    .cu-card--current {
        margin-top: 0;
        padding-bottom: 52px;
    }

    .cu-card--current .cu-card-inner {
        border-radius: 10px;
    }

    .cu-card-thumb {
        max-width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .cu-current-title-block {
        grid-template-columns: auto auto 1fr auto;
        padding: 12px 14px 16px;
        gap: 4px;
    }

    .cu-current-title {
        font-size: 1.1rem;
    }

    .cu-current-unit-label {
        font-size: 11px;
    }

    /* חצי ניווט — ממורכזים */
    .cu-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .cu-nav-btn--prev { left: calc(50% - 44px); }
    .cu-nav-btn--next { left: calc(50% + 4px);  }

    /* ── גריד כל היחידות ── */
    .units-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .unit-card-thumb {
        height: 180px;
    }

    .unit-card-title {
        font-size: 14px;
    }

    .unit-card-num {
        font-size: 11px;
    }

    /* ── מרווחים כלליים ── */
    .w96 {
        max-width: 100%;
        padding: 0 16px;
    }

    .mrgt80 { margin-top: 48px; }
}

@media (max-width: 480px) {
    .units-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .unit-card-thumb { height: 150px; }

    .tax-title { font-size: 34px; }
}

/* ─── pshat0 מקורות — עיגולים ─── */
.pshat0-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 16px 0 8px;
}

.pshat0-circle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pshat0-circle {
    width: 154px;
    height: 80px;
    border-radius: 7%;
    background-color: #d4c4a8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 2px 2px 3px #0000004d;
}

.pshat0-circle-wrap:hover .pshat0-circle {
    transform: scale(1.07);
    box-shadow: 0 4px 18px rgba(200, 151, 58, 0.35);
    background-color: #c8b898;
}

.pshat0-circle-wrap:active .pshat0-circle {
    transform: scale(0.96);
}

.pshat0-label {
    font-size: 24px;
    color: #3d2b1f;
    text-align: center;
    font-weight: 600;
    line-height: 1.4;
    padding: 0 8px;
    font-family: 'Mikhmoret', serif;
}

/* ─── pshat0 פופאפ ─── */
.pshat0-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(40, 25, 10, 0.55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    
}

.pshat0-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.pshat0-popup {
    background: #fffdf7;
    border: 1px solid #d4c4a8;
    border-radius: 18px;
    padding: 36px 40px;
    width: 90%;
    max-width: 960px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: #c8973a transparent;
}

.pshat0-popup::-webkit-scrollbar { width: 4px; }
.pshat0-popup::-webkit-scrollbar-thumb { background: #c8973a; border-radius: 4px; }

.pshat0-popup-overlay.is-open .pshat0-popup {
    transform: translateY(0);
}

.pshat0-popup-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0e8d8;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #6b4c38;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.pshat0-popup-close:hover { background: #c8973a; color: #fff; }

.pshat0-popup-source {
    font-size: 22px;
    font-weight: 700;
    color: #3d2b1f;
    margin-bottom: 18px;
}

.pshat0-popup-img {
    max-width: 100%;
    width: auto;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: block;
    object-fit: contain;
    image-rendering: high-quality;
}

.pshat0-popup-note {
    font-size: 15px;
    line-height: 1.8;
    color: #2c1f12;
    text-align: right;
}

/* ── טאבלט ── */
@media (max-width: 768px) {
    /* המבורגר — צבע כהה ב-more-page */
    .more-page .hamburger-line { background-color: var(--brown1); }

    /* hero-section בתוך more-page — איפוס מלא */
    .more-page-main .hero-section { background: #fff; overflow: visible; }
    .more-page-main .hero-inner {
        display: block;
        grid-template-columns: unset;
        grid-template-rows: unset;
        min-height: unset;
        background-image: none;
        padding: 0;
    }

    /* כותרת הימנון — ביטול width:max-content שגולש */
    .more-himnon-inner .himnon-title {
        width: 100%;
        max-width: 100%;
        overflow-wrap: break-word;
        font-size: 32px;
        line-height: 1.2;
        text-align: center;
        margin-bottom: 16px;
        white-space: normal;
    }
    .more-himnon-inner .himnon-title-line { justify-content: center; }

    .more-himnon-inner { padding: 0 16px; }
    .more-himnon-embed iframe { height: 220px; }

    /* גריד — מקסימום 2 עמודות */
    .more-sipurim-grid { grid-template-columns: repeat(2, 1fr); padding: 0 16px; gap: 12px; }

    /* סקשן */
    .more-section { padding: 0 0 28px; }
    .more-section-title { font-size: 18px; padding: 12px 16px; margin: 24px 0 16px; }
}

/* ── מובייל קטן ── */
@media (max-width: 480px) {
    .more-himnon-inner { padding: 0 12px; }
    .more-himnon-inner .himnon-title { font-size: 26px; }
    .more-himnon-embed iframe { height: 190px; }
    .more-section-title { font-size: 16px; padding: 10px 14px; }
    .more-sipurim-grid  { grid-template-columns: repeat(2, 1fr); padding: 0 12px; gap: 10px; }
    .more-section { padding: 0 0 20px; }
}