
/* السلايدر - تعيين مساحة وتحديد العرض */
.swiper {
    position: relative;
    width: 100%;  /* عرض السلايدر 100% */
    overflow: hidden;  /* إخفاء العناصر الزائدة التي تتجاوز السلايدر */
}

/* السلايدر الذي يحتوي على المقالات */
.swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease;  /* إضافة تأثير التنقل بين المقالات */
}

/* العناصر داخل السلايدر - فقط 4 مقالات ستظهر */
.swiper-slide {
    display: inline-block;
    width: 25%;  /* كل مقال سيأخذ 25% من السلايدر، مما يعني أن 4 مقالات ستظهر */
    flex-shrink: 0;  /* تأكد أن المقالات لا تنكمش */
}

/* الأسهم - توضع خارج المحتوى */
#cpt-clients-1wu6LR .cpt-swiper-prev,
#cpt-clients-1wu6LR .cpt-swiper-next {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    position: absolute;
    top: 50%;  /* وضع الأسهم في المنتصف عموديًا */
    z-index: 10;
    cursor: pointer;
    transform: translateY(-50%);  /* تحسين المحاذاة عموديًا */
}

/* السهم الأيسر - وضعه خارج السلايدر */
#cpt-clients-1wu6LR .cpt-swiper-prev {
    left: -50px;  /* وضع السهم الأيسر خارج السلايدر */
}

/* السهم الأيمن - وضعه خارج السلايدر */
#cpt-clients-1wu6LR .cpt-swiper-next {
    right: -50px;  /* وضع السهم الأيمن خارج السلايدر */
}

/* ===== Custom Posttypes Styles (updated) ===== */

/* general grid */
.cpt-grid {
  display: grid;
  gap: 20px;
}

/* Works grid: desktop 4, tablet 2, mobile 2 */
.cpt-grid.works {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .cpt-grid.works { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cpt-grid.works { grid-template-columns: repeat(2, 1fr); }
}

/* Events grid (auto-fit) */
.cpt-grid.events {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* item card */
.cpt-item {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  padding: 12px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(13, 38, 59, 0.04);
}

/* No thumbnail placeholder */
.cpt-no-thumb {
  width: 100%;
  height: 140px;
  background: linear-gradient(90deg,#f2f2f2,#e9e9e9);
  border-radius: 6px;
}

/* ===== Clients slider styles ===== */
.myClientsSlider { padding: 10px 20px; }
.myClientsSlider .swiper-wrapper { align-items: center; }

/* client card background + shadow */
.client-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  padding: 14px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(11, 28, 50, 0.06);
}

/* client media */
.client-media { display:flex; align-items:center; justify-content:center; width:100%; height:80px; }
.client-logo { max-width: 120px; max-height: 80px; object-fit: contain; display:block; margin:0 auto; }

/* client name */
.client-name { font-size: 14px; color: #222; font-weight: 600; }

/* swiper arrows - smaller, subtle circle */
.myClientsSlider .swiper-button-next,
.myClientsSlider .swiper-button-prev {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: #111;
  top: 50%;
  transform: translateY(-50%);
}

/* make arrow icon smaller */
.myClientsSlider .swiper-button-next::after,
.myClientsSlider .swiper-button-prev::after {
  font-size: 14px;
}

/* ===== Works item styles ===== */
.work-thumb { width:100%; height:auto; border-radius:6px; display:block; }
.work-title { margin: 10px 0 6px; font-size:16px; }
.work-excerpt { font-size:14px; color:#555; margin-bottom:10px; min-height:42px; }
.work-actions { margin-top:8px; }

/* ===== Buttons ===== */
.cpt-btn {
  display:inline-block;
  padding:8px 14px;
  background:#0073aa;
  color:#fff;
  text-decoration:none;
  border-radius:6px;
  font-weight:600;
}
.cpt-btn:hover { background:#005177; }

.cpt-btn-outline {
  border:1px solid #0073aa;
  color:#0073aa;
  background:transparent;
  padding:7px 13px;
}
.cpt-btn-outline:hover {
  background:#0073aa;
  color:#fff;
}

/* ===== Events button ===== */
.cpt-gallery-btn {
  display:inline-block;
  margin:0 auto;
  padding:8px 14px;
  background:#0073aa;
  color:#fff;
  border-radius:6px;
  cursor:pointer;
  border:none;
  font-weight:600;
}
.cpt-gallery-btn:hover { background:#005177; }

/* minor responsive adjustments */
@media(max-width:600px){
  .client-card { min-height: 90px; padding:10px; }
  .client-logo { max-width: 100px; max-height: 60px; }
}

/* ==== EVENTS GRID BUTTONS STYLE ==== */
.cpt-item.event-item .event-actions {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px; /* المسافة بين الزرين */
  flex-wrap: wrap;
  margin-top: 12px;
}

/* الأزرار */
.cpt-item.event-item .event-actions .cpt-btn,
.cpt-item.event-item .event-actions .cpt-gallery-btn {
  flex: 1 1 48%; /* نصف العرض تقريبا */
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  border-radius: 8px;
}

/* تأثير hover */
.cpt-item.event-item .event-actions .cpt-btn:hover,
.cpt-item.event-item .event-actions .cpt-gallery-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* في الجوالات تنزل الأزرار تحت بعض */
@media (max-width: 600px) {
  .cpt-item.event-item .event-actions .cpt-btn,
  .cpt-item.event-item .event-actions .cpt-gallery-btn {
    flex: 1 1 100%;
  }
}

/* ضبط محاذاة التاريخ والموقع */
.cpt-item.event-item .event-date,
.cpt-item.event-item .event-location {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* نحذف الأيقونات المضافة تلقائياً */
.cpt-item.event-item .event-date::before,
.cpt-item.event-item .event-location::before {
  content: none;
}

/* ==== تحسين تصميم المشاريع ليبدو أجمل ومتناسق أكثر ==== */

/* الصورة مع الإطار */
.cpt-item .work-thumb,
.cpt-item img {
  position: relative;
  z-index: 1;
  border-radius: 14px; /* زوايا دائرية أكثر */
  padding: 3px; /* مساحة الإطار */
  background-image: linear-gradient(135deg, #0aa04a, #000000);
  box-sizing: border-box;
  display: block;
  background-clip: padding-box;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); /* ظل خلف الصورة والإطار */
}

/* تأثير عند تمرير الماوس */
.cpt-item .work-thumb:hover,
.cpt-item img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

/* عنوان المشروع */
.cpt-item .work-title {
  color: #0aa04a;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  margin-top: 12px;
  transition: color 0.3s ease;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cpt-item .work-title:hover { color: #1f3037; }

/* زر المشروع */
.cpt-item .cpt-btn,
.cpt-item .work-actions .cpt-btn {
  background: linear-gradient(135deg, #0aa04a, #1f3037);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px 0; /* ارتفاع جيد */
  width: 80%; /* توسيع عرض الزر */
  margin: 12px auto 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-decoration: none;
  display: block;
  text-align: center;
}

/* تأثير hover على الزر */
.cpt-item .cpt-btn:hover,
.cpt-item .work-actions .cpt-btn:hover {
  background: linear-gradient(135deg, #1f3037, #0aa04a);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

/* البطاقة نفسها */
.cpt-item {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  padding: 14px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(13, 38, 59, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.cpt-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}



/* ==== تنسيق الحاوية العامة للمشاريع ==== */
.works-container {
    display: flex;
    flex-direction: column; /* ترتيب الفلتر أولاً ثم المشاريع */
    gap: 20px;
    padding: 20px 0;
    align-items: center; /* توسيط المحتوى */
    padding-top: 0px;
}

/* ==== فلتر التصنيف ==== */
.filter-form {
    margin-bottom: 30px; /* مسافة بين الفلتر والمشاريع */
    width: 100%;
    max-width: 1200px; /* أقصى عرض للفلتر */
    text-align: center;
}

.filter-form select {
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
    width: auto;
    max-width: 250px;
}

.filter-form button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.filter-form button:hover {
    background-color: #005f85;
}

/* ==== عرض المشاريع في شبكة مرنة (Flexbox) ==== */
.works-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* توسيط المشاريع */
    width: 100%;
    max-width: 1200px; /* أقصى عرض للمحتوى */
}

/* ==== تنسيق المشروع ==== */
.work-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    flex-basis: calc(25% - 20px); /* 4 مشاريع في الصف الواحد */
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

.work-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* تأثير الصورة عند مرور الماوس */
.work-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.work-img img:hover {
    transform: scale(1.05);
}

.work-title {
    font-size: 24px;
    color: #333;
    margin-top: 15px;
    margin-bottom: 10px;
}

.work-excerpt {
    font-size: 16px;
    color: #777;
    margin-bottom: 20px;
}

/* ==== عرض 4 مشاريع في الصف على سطح المكتب (بأبعاد الشاشة الكبيرة) ==== */
@media (min-width: 1025px) {
    .work-item {
        flex-basis: calc(25% - 20px); /* 4 مشاريع في الصف */
    }
}

/* ==== عرض 3 مشاريع في الصف على الآيباد (شاشات متوسطة) ==== */
@media (max-width: 1024px) {
    .work-item {
        flex-basis: calc(33.33% - 20px); /* 3 مشاريع في الصف */
    }
}

/* ==== عرض 2 مشاريع في الصف على الجوال (الشاشات الصغيرة) ==== */
@media (max-width: 768px) {
    .work-item {
        flex-basis: calc(50% - 20px); /* 2 مشاريع في الصف */
    }
}


/* === الكتلة العلوية === */
.works-top-bar {
    width: 100%;
    max-width: 1200px;
    background: #fff;
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    text-align: center;
}

/* عنوان الصفحة */
.works-top-bar h1 {
    margin: 0 0 20px;
    font-size: 32px;
    color: #222;
    font-weight: 700;
}

/* الفلتر */
.works-top-bar .filter-form {
    margin: 0;
}


/* الحفاظ على تخطيط flex للصفحة بالكامل بدون كسر */
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* المحتوى الرئيسي يجب أن يأخذ المساحة المتبقية */
.content-area, #primary {
  flex-grow: 1;
  display: block;  /* التأكد من أن العنصر لا يطفو */
}

/* ضبط flex layout لمنطقة المحتوى */
.page-layout {
  display: flex;
  gap: 20px;
  width: 100%;
}

/* ضبط الشريط الجانبي والمحتوى ليظهر بجانب بعض */
.page-layout .sidebar {
  flex: 0 0 25%;  /* شريط جانبي بنسبة 25% */
  padding: 15px;
}

.page-layout .content-area {
  flex: 1 1 75%;  /* المحتوى الأساسي يأخذ 75% */
  
}

/* تصغير التخطيط للتابلت */
@media (max-width: 1023px) and (min-width: 768px) {
  .page-layout {
    flex-direction: column; /* يجعل الشريط الجانبي أسفل المحتوى */
  }

  .page-layout .sidebar,
  .page-layout .content-area {
    width: 100%;
  }
}

/* تصغير التخطيط للهواتف */
@media (max-width: 767px) {
  .page-layout {
    flex-direction: column;  /* يجعل الشريط الجانبي أسفل المحتوى */
  }

  .page-layout .sidebar,
  .page-layout .content-area {
    width: 100%;
  }
}

/* تنسيق الفوتر ليكون في أسفل الصفحة فقط */
footer {
  position: relative;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  width: 100%;
  clear: both;  /* تنظيف أي تأثير للـ floats */
}

.woocommerce-tabs {
    margin-top: 60px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    padding: 25px 30px;
    width: 100%;
}





/* -----------------------------------------------------------
   🎨 عام لكل صفحات السنغل (هيكل الصفحتين)
------------------------------------------------------------ */
.cpt-single {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

/* دعم الاتجاهات RTL و LTR */
html[dir="rtl"] .cpt-single {
    flex-direction: row-reverse;
}
html[dir="ltr"] .cpt-single {
    flex-direction: row;
}

.cpt-single-media {
    width: 45%;
}

.cpt-featured img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.cpt-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cpt-gallery img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.cpt-single-content {
    width: 55%;
}

.cpt-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.cpt-meta {
    background: #f7f7f7;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

.cpt-meta strong {
    color: #333;
}

.cpt-text {
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.9;
}


/* -----------------------------------------------------------
   🎨 قسم خاص بالأعمال (WORKS)
   هذه التنسيقات تخص صفحات أعمالنا فقط
------------------------------------------------------------ */

.works-single {}
.works-media {}
.works-featured {}
.works-gallery {}
.works-content {}
.works-title {}
.works-meta {}
.works-text {}

.works-title {
    color: #1c5b4a;
}

.works-meta {
    border-left: 4px solid #1c5b4a;
}

html[dir="rtl"] .works-meta {
    border-left: none;
    border-right: 4px solid #1c5b4a;
}


/* -----------------------------------------------------------
   🎨 قسم خاص بالمناسبات (EVENTS)
   هذه التنسيقات تخص صفحات المناسبات فقط
------------------------------------------------------------ */

.events-single {}
.events-media {}
.events-featured {}
.events-gallery {}
.events-content {}
.events-title {}
.events-meta {}
.events-text {}

.events-title {
    color: #8a1f1f;
}

.events-meta {
    border-left: 4px solid #8a1f1f;
}

html[dir="rtl"] .events-meta {
    border-left: none;
    border-right: 4px solid #8a1f1f;
}


/* -----------------------------------------------------------
   🎨 قسم خاص بالحلول (SOLUTIONS)
   هذه التنسيقات تخص صفحات الحلول فقط
------------------------------------------------------------ */

.solutions-single {}
.solutions-media {}
.solutions-featured {}
.solutions-gallery {}
.solutions-content {}
.solutions-title {}
.solutions-meta {}
.solutions-text {}

.solutions-title {
    color: #004a8f;
}

.solutions-meta {
    border-left: 4px solid #004a8f;
}

html[dir="rtl"] .solutions-meta {
    border-left: none;
    border-right: 4px solid #004a8f;
}


/* -----------------------------------------------------------
   🎨 تحسينات للعرض على الشاشات الصغيرة (Responsive)
------------------------------------------------------------ */

@media (max-width: 900px) {
    .cpt-single {
        flex-direction: column;
    }

    .cpt-single-media,
    .cpt-single-content {
        width: 100%;
    }

    .cpt-gallery img {
        width: 100px;
        height: 100px;
    }
}



/* وضع الحاوية بعرض ثابت جميل */
.cpt-single-wrapper {
    width: 100%;
    padding: 40px 0;
}

.cpt-single-container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* الصورة الجانبية */
.cpt-single-image {
    width: 40%;
    min-width: 350px;
}

/* ضبط الصورة الرئيسية */
.cpt-single-image .main-image {
    width: 100%;
    height: auto;
    max-height: 360px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

/* المعرض */
.cpt-gallery {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cpt-gallery img {
    width: 90px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

/* المحتوى */
.cpt-single-content {
    flex: 1;
}

/* عنوان */
.cpt-title {
    font-size: 32px;
    margin-bottom: 20px;
}

/* صندوق التاريخ */
.cpt-meta {
    padding: 10px 14px;
    margin-bottom: 15px;
    background: #f7f7f7;
    border-radius: 10px;
    border: 1px solid #eee;
    font-size: 16px;
}

/* تناسق RTL و LTR */
html[dir="rtl"] .cpt-single-container {
    flex-direction: row-reverse;
}

html[dir="ltr"] .cpt-single-container {
    flex-direction: row;
}


.works-single-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

.works-single-wrapper.ltr {
    flex-direction: row;
}

.works-single-wrapper.rtl {
    flex-direction: row-reverse;
}

.ws-images {
    width: 45%;
    position: sticky;
    top: 20px;
}

.ws-featured img {
    width: 100%;
    border-radius: 10px;
    transition: .3s;
}

.ws-featured img:hover {
    transform: scale(1.02);
}

.ws-gallery-scroll {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.ws-gallery-scroll img {
    width: 120px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: .3s;
}

.ws-gallery-scroll img:hover {
    transform: scale(1.05);
}

.ws-content {
    width: 55%;
}

.ws-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.ws-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 15px;
}

.meta-item strong {
    color: #555;
}

.cat-item {
    background: #e3e3e3;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-left: 5px;
}

.works-single-wrapper.rtl .cat-item {
    margin-left: 0;
    margin-right: 5px;
}

.ws-description {
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

@media (max-width: 768px) {
    .works-single-wrapper {
        flex-direction: column;
    }

    .ws-images, .ws-content {
        width: 100%;
    }
}
