/* تنسيقات خاصة بالشبكة المعطاة فقط */
.grid.md\:grid-cols-3.two-row.grid-flow-row.gap-3.sm\:gap-8 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 12px;
}

@media (min-width: 768px) {
    .grid.md\:grid-cols-3.two-row.grid-flow-row.gap-3.sm\:gap-8 {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

a.banner-entry.square-photos {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

a.banner-entry.square-photos:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

a.banner-entry.square-photos > div.lazy__bg.lazy.bg-no-repeat {
    width: 100%;
    height: 100%;
    min-height: 150px;
    background-size: contain; /* تغيير من 'cover' إلى 'contain' */
    background-position: center;
    background-repeat: no-repeat;
}

/* إزالة تأثير التكبير عند hover */
a.banner-entry.square-photos:hover > div.lazy__bg.lazy.bg-no-repeat {
    transform: none;
}

/* جعل الصور مربعة */
a.banner-entry.square-photos::before {
    content: "";
    display: block;
    padding-top: 100%;
}

a.banner-entry.square-photos > div.lazy__bg.lazy.bg-no-repeat {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}