.elementor-447 .elementor-element.elementor-element-5ddcffc{--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-447 .elementor-element.elementor-element-782c33d{--display:grid;--e-con-grid-template-columns:repeat(2, 1fr);--e-con-grid-template-rows:repeat(1, 1fr);--grid-auto-flow:row;--padding-top:0px;--padding-bottom:0px;--padding-left:0px;--padding-right:0px;}.elementor-447 .elementor-element.elementor-element-a7912e6{font-family:var( --e-global-typography-secondary-font-family ), Sans-serif;font-size:var( --e-global-typography-secondary-font-size );font-weight:var( --e-global-typography-secondary-font-weight );}.elementor-447 .elementor-element.elementor-element-c2fb703{font-family:var( --e-global-typography-secondary-font-family ), Sans-serif;font-size:var( --e-global-typography-secondary-font-size );font-weight:var( --e-global-typography-secondary-font-weight );}@media(max-width:1024px){.elementor-447 .elementor-element.elementor-element-782c33d{--grid-auto-flow:row;}.elementor-447 .elementor-element.elementor-element-a7912e6{font-size:var( --e-global-typography-secondary-font-size );}.elementor-447 .elementor-element.elementor-element-c2fb703{font-size:var( --e-global-typography-secondary-font-size );}}@media(min-width:768px){.elementor-447 .elementor-element.elementor-element-5ddcffc{--content-width:97%;}}@media(max-width:767px){.elementor-447 .elementor-element.elementor-element-782c33d{--e-con-grid-template-columns:repeat(1, 1fr);--gap:0px 0px;--row-gap:0px;--column-gap:0px;--grid-auto-flow:row;--justify-items:center;}.elementor-447 .elementor-element.elementor-element-a7912e6{font-size:var( --e-global-typography-secondary-font-size );}.elementor-447 .elementor-element.elementor-element-c2fb703 > .elementor-widget-container{margin:-13px 0px 0px 0px;}.elementor-447 .elementor-element.elementor-element-c2fb703{font-size:var( --e-global-typography-secondary-font-size );}}/* Start custom CSS for shortcode, class: .elementor-element-431dde6 *//* --- הקונטיינר הראשי --- */
.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 */