/* تنسيق عام للصفحة */
body {
    font-family: Arial, sans-serif;
    
}

/* تنسيق شبكة الصور */
.gallery {
    display: grid; /* استخدام grid layout */
    gap: 50px; /* المسافة بين العناصر */
    padding: 20px; /* المسافة بين الحواف */
	margin:15px;
    box-sizing: border-box;
    background-color: transparent;
    min-height: auto; /* ارتفاع لا يقل عن طول الشاشة */
    justify-content: center; /* توسيط العناصر أفقياً */
	height: fit-content;
	/*        grid-template-columns: repeat(2, minmax(calc(50% - 50px), 1fr)); /* عنصران مع مسافة */
		grid-template-columns: repeat(3, minmax(calc(33.33% - 30px), 1fr)); /* ثلاثة عناصر مع مسافة */
/* grid-template-columns: repeat(4, minmax(calc(25% - 25px), 1fr)); /* ثلاثة عناصر مع مسافة */

}

/* تنسيق كل عنصر صورة */
.image-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #007bff; /* برواز أزرق */
    border-radius: 10vh;
    padding: 10px;
    background-color: var(--base-bg);
    text-align: center;
    width: 100%; /* لجعل العناصر تأخذ العرض الكامل المتاح داخل الخلية */
	min-height:300px;
	transition: transform 0.3s;
}

/* جعل الصورة قابلة للنقر */
.image-card a {
    display: block;
    width: 100%;
     border-radius: 10vh; /* نفس قيمة برواز الكارت أو قيمة أخرى */
    overflow: hidden; /* لإخفاء أجزاء الصورة الزائدة عن الشكل الدائري */
    
}

/* تنسيق الصورة داخل البطاقة */
.image-card img {
    width: 100%;
    aspect-ratio: 1.5; /* 3/2 نسبة العرض إلى الارتفاع المطلوبة */
    object-fit: cover; /* اقتصاص تلقائي للحفاظ على النسبة */
    transition: transform 0.3s; /* تأثير عند التمرير */
}

/* تأثير تكبير بسيط عند التمرير على الصورة */
.image-card a:hover img {
    transform: scale(1.05);
}

/* اسم القسم */
.caption {
    font-weight: bold;
    margin-top: 10px;
    color: var(--text-color);
}

/* وصف القسم */
.description {
    font-size: 14px;
    color: var(--text-color);
    margin-top: 5px;
	padding-left:20px;	
	padding-right:20px;
}
.pagination-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    justify-content: space-evenly;
    align-items: center;
    background-color:var(--bg-base);
    min-height: 60px;
}
.toggle-button {
    text-decoration: none;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.toggle-button:hover {
    background-color: #0056b3;
}
/* تصميم مخصص للشاشات المتوسطة (تابلت) وما فوقها (سطح مكتب) */
@media (min-width: 769px) {
    .gallery {

    }
	
}

/* تصميم مخصص للشاشات الصغيرة (موبايل) */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr; /* عنصر واحد في الصف */
		gap: 15px; /* المسافة بين العناصر */
		padding: 15px; /* المسافة بين الحواف */
		 justify-items: center;
    }
.image-card {
	height: auto-fit;
}
	
}