Theme Name: Astra Child Fixed
Template: astra
*/
/* Tajawal local @font-face (moved from fonts/tajawal.css) */
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/tajawal-v11-arabic-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/tajawal-v11-arabic-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
body {
  font-family: 'Tajawal', sans-serif;
  font-weight: 500; /* النصوص داخل المقالة */
}

h1, h2, h3 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700; /* العناوين الرئيسية */
}

.related-posts h3 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 500; /* عناوين المقالات المتعلقة */
}


/* ✅ تخصيصات التصميم */
/* تحسين الصورة البارزة */
.featured-image-default {
  aspect-ratio: 1200 / 628;
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: #f0f0f0;
  margin: 0 0 20px; /* مسافة أسفل الصورة */
  padding: 0;
}

@media (min-width: 769px) {
  .featured-image-default {
    margin-bottom: 24px; /* على الشاشات الكبيرة */
  }
}
.site-content {
  min-height: 100vh;
}

/* أضف في النهاية: */
.related-post-image {
    width: 100%;
    height: auto;
    max-width: 115px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.related-post-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .related-post-image {
        max-width: 90px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .related-post-image {
        max-width: 80px;
        height: 50px;
    }
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}
/* إصلاح الصور في الصفحة الرئيسية */
.home .wp-post-image,
.blog .wp-post-image,
.archive .wp-post-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 0 auto;
}

/* إصلاح اللوجو في الهيدر */
.site-branding {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

.custom-logo {
    margin: 0 auto !important;
    display: block !important;
    max-width: 200px !important;
    height: auto !important;
}

/* إصلاح الصور في المقالات المتعلقة بالصفحة الرئيسية */
.home .related-post-image,
.blog .related-post-image {
    max-width: 100% !important;
    height: auto !important;
}

/* إصلاح الشبكة في الصفحة الرئيسية */
.home .related-grid,
.blog .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

/* تحسين التجاوب على الموبايل */
@media (max-width: 768px) {
    .home .wp-post-image,
    .blog .wp-post-image,
    .archive .wp-post-image {
        max-width: 100% !important;
        margin: 0 auto;
    }
    
    .site-branding {
        text-align: center !important;
    }
    
    .custom-logo {
        max-width: 150px !important;
    }
}
.post-thumbnail {
    position: relative;
    aspect-ratio: 1200/628; /* ✅ يمنع الاهتزاز البصري */
    overflow: hidden;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* ✅ يحافظ على التناسب دون تشويه */
}
.related-post:not(:hover) .related-post-image {
    transform: scale(1);
    transition: none; /* ✅ يوقف التحويلات غير الضرورية */
}
.related-grid {
    will-change: transform; /* ✅ يحسن أداء التحريك */
    backface-visibility: hidden; /* ✅ يحسن الأداء على الجوال */
}
