.elementor-9 .elementor-element.elementor-element-3441277{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;}.elementor-9 .elementor-element.elementor-element-b728319{--display:flex;}@media(min-width:768px){.elementor-9 .elementor-element.elementor-element-3441277{--content-width:97%;}}/* Start custom CSS for shortcode, class: .elementor-element-c77bec7 *//* --- הקונטיינר הראשי --- */
.justified-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
}

/* --- הפריט --- */
.gallery-item {
    /* גובה קבוע שרצית */
    height: 300px;
    
    /* נותן לפריט לגדול ולתפוס מקום, אבל לא מכריח רוחב קבוע */
    flex-grow: 1;
    width: auto; 
    
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* --- התמונה - הלב של התיקון --- */
.gallery-item img.gallery-img {
    /* הגובה 100% מהקונטיינר (300px) */
    height: 100%;
    
    /* הרוחב אוטומטי! זה מה ששומר על הפרופורציה המקורית */
    width: auto;
    
    /* מבטיח שהתמונה תכסה את כל הריבוע שנוצר, 
       אבל בגלל שהרוחב אוטומטי, החיתוך יהיה מינימלי רק בקצוות בגלל ה-flex */
    min-width: 100%; 
    object-fit: cover; 
    display: block;
}

/* טיפול בשורה האחרונה שלא תימרח */
.gallery-item:last-child {
    flex-grow: 0;
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* --- עיצוב ההובר --- */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
}

.gallery-item:hover .hover-overlay {
    opacity: 1;
}

/* --- תוכן ההובר --- */
.hover-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* מרכוז */
    gap: 0;
    height: 100%;
    width: 100%;
    color: #000000;
}

/* --- טקסטים --- */
.text-he, .text-en, .bottom-year {
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.2;
    color: #000;
    margin: 0;
    text-align: center; /* מרכוז */
    width: 100%;
}

.text-he {
    direction: rtl;
    margin-bottom: 8px !important;
}

.text-en {
    direction: ltr;
    margin-bottom: 8px !important;
}

.bottom-year {
    direction: ltr;
    margin-bottom: 0;
}

/* --- התאמה למובייל --- */
@media (max-width: 768px) {
    .justified-gallery {
        flex-direction: column;
        gap: 30px;
    }

    .gallery-item {
        /* מבטל את הגובה הקבוע במובייל כדי לאפשר לתמונה להיות בגודל מלא */
        height: auto !important; 
        width: 100%;
        flex-grow: 0;
        overflow: visible;
    }

    .gallery-item img.gallery-img {
        width: 100%;
        height: auto; /* שומר על יחס תמונה מושלם במובייל */
        object-fit: contain; /* מוודא שרואים את כל התמונה בלי חיתוכים בכלל */
    }
    
    .hover-overlay {
        position: relative;
        opacity: 1;
        padding: 10px 0 0 0;
        background-color: transparent;
        height: auto;
        width: 100%;
        transition: none;
    }

    .hover-content {
        gap: 4px;
        justify-content: flex-start;
        align-items: center;
    }

    .text-he, .text-en {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: center;
        width: 100%;
        margin: 0 !important;
        font-size: 16px;
    }

    .bottom-year {
        display: block;
        text-align: center;
        margin-top: 2px;
        font-size: 15px;
        color: #000;
    }
}/* End custom CSS */
/* Start custom CSS *//* ===== WORKS GRID: 300px rows + wide images span 2 + no crop ===== */

/* הגריד עצמו */
.works-masonry .elementor-loop-container.elementor-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: 300px !important;   /* ✅ גובה קבוע לכל שורה */
  grid-auto-flow: dense !important;   /* ✅ מילוי חכם */
  gap: 0 !important;                  /* תשים gap אם בא לך */
}

@media (max-width: 1024px){
  .works-masonry .elementor-loop-container.elementor-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 767px){
  .works-masonry .elementor-loop-container.elementor-grid{
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* כל פריט */
.works-masonry .e-loop-item{
  min-width: 0 !important;
}

/* ✅ תמונה רחבה = 2 עמודות */
.works-masonry .e-loop-item.gb-wide{
  grid-column: span 2 !important;
}

/* ה-CTA תופס 100% מהתא */
.works-masonry .elementor-widget-call-to-action,
.works-masonry .elementor-cta{
  height: 100% !important;
}

/* עטיפת התמונה + תמונה עצמה בגובה התא */
.works-masonry .elementor-cta__bg-wrapper{
  height: 100% !important;
}

.works-masonry img.cta-img{
  width: 100% !important;
  height: 100% !important;          /* ✅ עכשיו זה יישב על 300px */
  object-fit: contain !important;    /* ✅ אף פעם לא נחתך */
  display: block !important;
}

/* מבטל כל זום/אנימציות של אלמנטור */
.works-masonry .elementor-cta__bg,
.works-masonry .elementor-cta__bg-overlay{
  transform: none !important;
  transition: none !important;
}/* End custom CSS */