/**
 * Theme Name: Santamaria Theme
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ===== حل قطع الصور الطولانية في التصنيفات (أرشيف) ===== */

/* 1. استهداف كل الحاويات التي تحوي الصور في بطاقات الأرشيف */
.ct-image-container,
.ct-media-container,
.entry-card .ct-image-container,
.entry-card .ct-media-container,
.post-card .ct-image-container {
    aspect-ratio: auto !important;
    height: 450px !important;    /* الارتفاع الثابت الذي تريده */
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important; /* منع القص من الحاوية */
    display: flex !important;    /* استخدام الفليكس لتوسيط الصورة */
    align-items: center !important;
    justify-content: center !important;
    background: #f7f7f7; /* لون خلفية احتياطي للفراغات الجانبية (اختياري) */
}

/* 2. استهداف الصورة نفسها داخل هذه الحاويات */
.ct-image-container img,
.ct-media-container img,
.entry-card .ct-image-container img,
.entry-card .ct-media-container img,
.post-card .ct-image-container img {
    height: 100% !important;      /* يأخذ ارتفاع الحاوية الأب (450px) */
    width: auto !important;       /* العرض تلقائي حسب النسبة */
    max-width: 100% !important;   /* لا يتجاوز عرض العمود */
    max-height: 100% !important;  /* يمنع خروج الصورة عن الإطار */
    object-fit: contain !important; /* يجعل الصورة تظهر كاملة داخل الإطار */
    aspect-ratio: auto !important; /* إلغاء أي نسبة مفروضة */
    position: relative !important; /* إصلاح أي تداخل من positioning */
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* 3. إلغاء أي overflow خفي من العناصر الأب */
.entry-card,
.post-card,
.ct-posts-grid figure {
    overflow: visible !important;
}

/* 4. إضافة دعم إضافي لبعض الحالات الخاصة في Blocksy */
.ct-posts-grid .ct-image-container,
.ct-posts-grid .ct-media-container {
    aspect-ratio: auto !important;
    height: 450px !important;
    width: 100% !important;
}

/* 5. منع أي تأثير للـ lazy load قد يغير الأبعاد */
img[data-lazy-src] {
    height: 100% !important;
    width: auto !important;
}






.single img.wp-post-image {
    height: 550px !important;
    width: auto !important;
     object-fit: contain !important;
    aspect-ratio: auto !important;
}