/* تصميم العنصر الرئيسي للسلايدر */
main {
    position: relative; /* للحفاظ على التدفق الطبيعي */
    width: 100%; /* عرض كامل */
    height: 100vh; /* ارتفاع مناسب - 60% من نافذة العرض */
    max-height: 700px; /* حد أقصى للارتفاع */
    min-height: 400px; /* حد أدنى للارتفاع */
    /* background: url('path-to-your-banner-image.jpg') center/cover no-repeat; */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); /* ظل خفيف */
    z-index: 1; /* لضمان عدم تداخل العناصر */
    display: flex; /* تفعيل التخطيط المرن */
    align-items: center; /* محاذاة عمودية للوسط */
    justify-content: center; /* محاذاة أفقية للوسط */
}

main .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 255, 0.7), rgba(0, 0, 255, 0));
    z-index: 2; /* التدرج فوق الخلفية */
}

/* محتوى البانر */
main .banner-content {
    color: white; /* لون النص */
    text-align: center; /* توسيط النصوص */
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); /* إضافة ظل للنص */
}

main .banner-content h1 {
    font-size: clamp(2rem, 5vw, 4rem); /* حجم مرن للعناوين */
    margin: 0;
}

main .banner-content p {
    font-size: clamp(1rem, 2.5vw, 1.5rem); /* حجم مرن للوصف */
    margin: 10px 0;
}

main .banner-content button {
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2); /* خلفية شفافة */
    color: white; /* لون النص */
    border: 2px solid white; /* إطار أبيض */
    border-radius: 5px; /* حواف مستديرة */
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

main .banner-content button:hover {
    background-color: rgba(255, 255, 255, 0.3); /* لون مختلف عند التحويم */
    transform: scale(1.05); /* تكبير خفيف */
}

/* إعدادات العناصر الفردية (البطاقات) داخل السلايدر */
.item {
  width: 200px; /* عرض البطاقة */
  height: 300px; /* ارتفاع البطاقة */
  list-style-type: none; /* إزالة نقاط القائمة */
  position: absolute; /* لتحديد موقع كل بطاقة بشكل فردي */
  top: 50%; /* محاذاة رأسياً في منتصف السلايدر */
  transform: translateY(-50%); /* ضبط الموقع لإبقاء العنصر في المنتصف */
  z-index: 1; /* مستوى التكديس، لجعل العناصر فوق بعضها */
  background-position: center; /* محاذاة الخلفية في المركز */
  background-size: cover; /* جعل الخلفية تغطي البطاقة */
  border-radius: 20px; /* زوايا مستديرة للبطاقة */
  box-shadow: 0 20px 30px rgba(255, 255, 255, 0.3) inset; /* ظل داخلي */
  transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s; /* تأثيرات التحويل والانتقال */
}

/* تحديد البطاقة النشطة */
.item:nth-child(1), .item:nth-child(2) {
    left: 0; /* جعل البطاقات الأولى والثانية تملأ السلايدر */
    top: 0;
    width: 100%; /* عرض كامل */
    height: 100%; /* ارتفاع كامل */
    transform: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1; /* جعلها مرئية بالكامل */
}

/* موقع البطاقة الثالثة */
.item:nth-child(3) {
    left: 50%; /* وضعها في منتصف السلايدر */
}

/* البطاقة الرابعة وما بعدها */
.item:nth-child(4) { left: calc(50% + 220px); }
.item:nth-child(5) { left: calc(50% + 440px); }
.item:nth-child(6) { left: calc(50% + 660px); opacity: 0; }

/* محتوى البطاقات (النصوص والأزرار) */
.content {
    width: min(30vw, 400px); /* عرض المحتوى لا يتجاوز 400px أو 30% من العرض */
    position: absolute;
    top: 50%; /* محاذاة رأسياً في منتصف البطاقة */
    left: 3rem; /* مسافة عن الحافة اليسرى */
    transform: translateY(-50%); /* إبقاء العنصر في المنتصف */
    font: 400 0.85rem 'Cairo', sans-serif; /* إعدادات الخط */
    color: white; /* لون النص */
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); /* إضافة ظل للنص */
    opacity: 0; /* إخفاء النص افتراضياً */
    display: none; /* إخفاء العنصر عند البداية */
}

/* عنوان البطاقة */
.content .title {
    font-family:'Cairo';
    text-transform: uppercase; /* تحويل النص إلى أحرف كبيرة */
}

/* وصف البطاقة */
.content .description {
    line-height: 1.7; /* ارتفاع الخط */
    margin: 1rem 0 1.5rem; /* مسافة أعلى وأسفل الوصف */
    font-size: 0.8rem; /* حجم الخط */
}

/* تصميم الزر */
.content button {
    width: fit-content; /* جعل الزر يناسب النص بداخله */
    background-color: rgba(0, 0, 0, 0.1); /* خلفية شفافة */
    color: white; /* لون النص */
    border: 2px solid white; /* إطار أبيض */
    border-radius: 0.25rem; /* زوايا مستديرة */
    padding: 0.75rem; /* مسافة داخلية */
    cursor: pointer; /* مؤشر الفأرة يظهر كزر */
}

/* عرض النص في البطاقة الثانية */
.item:nth-of-type(2) .content {
    display: block; /* إظهار النص */
    animation: show 0.75s ease-in-out 0.3s forwards; /* تأثير ظهور النص */
}

/* تأثير الظهور */
@keyframes show {
    0% {
        filter: blur(5px); /* ضبابية النص عند البداية */
        transform: translateY(calc(-50% + 75px)); /* وضع النص للأعلى */
    }
    100% {
        opacity: 1; /* إظهار النص */
        filter: blur(0); /* إزالة الضبابية */
    }
}

/* شريط التنقل */
.nav {
    position: absolute;
    bottom: 2rem; /* وضع الشريط في الأسفل */
    left: 50%; /* محاذاة في المنتصف */
    transform: translateX(-50%);
    z-index: 5; /* فوق السلايدر */
    user-select: none; /* منع تحديد الأزرار */
}

/* تصميم الأزرار */
.nav .btn {
    background-color: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.6);
    margin: 0 0.25rem;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
}

/* تأثير الأزرار عند التمرير */
.nav .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* إعدادات التصميم للشاشات المتوسطة */
@media (width > 650px) and (width < 900px) {
    .content .title { font-size: 1rem; }
    .content .description { font-size: 0.7rem; }
    .content button { font-size: 0.7rem; }
    .item {
        width: 160px;
        height: 270px;
    }
}

/* إعدادات التصميم للشاشات الصغيرة */
@media (width < 650px) {
    .content .title { font-size: 0.9rem; }
    .content .description { font-size: 0.65rem; }
    .content button { font-size: 0.7rem; }
    .item {
        width: 130px;
        height: 220px;
    }
}

/* .last-news-section {
    width: 90%;
    margin: auto;
    padding: 40px 0;
} */

/* محتوى البطاقة بالكامل */
.slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.5s ease-in-out;
}

/* حاوية الصورة الرئيسية */
.news-image-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

/* الصورة داخل البطاقة */
.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* تكبير الصورة عند التحويل إلى الشريحة الرئيسية */
.swiper-slide-active .news-image-container {
    transform: scale(1);
}

/* بيانات المؤلف (تظهر بشكل دائم) */
.news-author {
    position: absolute;
    top: -40px; /* تم تغيير الموقع ليكون أعلى البطاقة */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1); 
    z-index: 2;
    opacity: 1; /* جعلها ظاهرة دائمًا */
}

/* تصميم صورة المؤلف */
.author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
}

/* معلومات المؤلف */
.author-info {
    flex: 1;
}

/* اسم المؤلف */
.author-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
}

/* تاريخ النشر */
.publish-date {
    margin: 0;
    font-size: 12px;
    color: #007bff;
}

/* المحتوى النصي داخل البطاقة */
.news-details {
    position: absolute;
    bottom: 0; /* تم تغيير الموقع ليكون ثابتًا أسفل البطاقة */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    transition: none; /* إزالة التأثيرات */
}
.news-title{
    font-size: 18px;
    font-weight: bold;
}

/* تأثير الهوفر على الشريحة */
.swiper-slide:hover {
    transform: translateY(-5px);
}

/* تنسيق قسم الإعلانات */
/* .Advertisements { */
    /* width: 90%; */
    /* margin: auto; */
    /* padding: 40px 0; */
    /* text-align: center; */
    /* background-image: radial-gradient(circle at 17% 77%, rgba(17, 17, 17,0.04) 0%, rgba(17, 17, 17,0.04) 50%,rgba(197, 197, 197,0.04) 50%, rgba(197, 197, 197,0.04) 100%),radial-gradient(circle at 26% 17%, rgba(64, 64, 64,0.04) 0%, rgba(64, 64, 64,0.04) 50%,rgba(244, 244, 244,0.04) 50%, rgba(244, 244, 244,0.04) 100%),radial-gradient(circle at 44% 60%, rgba(177, 177, 177,0.04) 0%, rgba(177, 177, 177,0.04) 50%,rgba(187, 187, 187,0.04) 50%, rgba(187, 187, 187,0.04) 100%),linear-gradient(19deg, rgb(28, 117, 250),rgb(34, 2, 159)); */
/* } */

/* تصميم البطاقة */
.ad-card {
    position: relative;
    width: 100%;
    height: 450px; 
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* خلفية الورقة */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* محتوى البطاقة */
.card-content {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    height: 100%;
    padding: 20px 10px;
    color: #fff;
}

.card-content {
    bottom: 20px;
    left: 20px;
    right: 20px;
    /* text-align: center; */
}
/* حاوية الشعار وأيقونات التواصل */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
}

.college-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    padding: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    font-size: 20px;
    color: #007bff !important; 
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #0056b3; 
}

/* حاوية المحتوى السفلي */
.ads-footer-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* حاوية "إعلان هام" */
.important-announcement {
    background: linear-gradient(to right, #007bff, #0056b3);
    padding: 10px 20px;
    font-size: 17px;
    font-weight: bold;
    width: fit-content;
    margin-top: 180px;
}

/* نص الإعلان */
.announcement-text {
    font-size: 16px;
    line-height: 1.5;
    color: #007bff; 
    font-weight: bold;
    margin: 0;
}

.events {
    background-color: #fff;
    /* width: 100%; */
    /* min-height: 80vh; */
    /* padding: 40px 100px;  */
    /* padding: 0px; */
}
.card {
    border: none;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 400px; /* كل الكروت بنفس الطول */
    width: 400px; /* كل الكروت بنفس الطول */
    /* position: relative;
    overflow: hidden;
    border-radius: 15px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);  */
}

.card-img-top {
    /* height: auto; */
    display: block;
    /* height: 400px;  */
    object-fit: cover; 
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;   /* الصورة تغطي البطاقة */
    object-position: center; /* وسط الصورة */
    /* display: block; */
}

.card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 255, 0.7); 
    color: white; 
    /* padding: 15px; */
    /* border-bottom-left-radius: 10px; */
    /* border-bottom-right-radius: 10px; */
}

.event-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px; 
}

.event-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5; 
}

.event-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: white; 
    color: blue; 
    text-decoration: none; 
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 5px; 
    transition: background-color 0.3s ease, color 0.3s ease; 
}

.event-more:hover {
    background-color: blue; 
    color: white; 
}

.date-circle {
    position: absolute;
    top: 15px; 
    right: 15px; 
    background-color: rgba(0, 0, 255, 0.7); 
    color: white; 
    width: 60px;
    height: 60px;
    border-radius: 50%; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
}

.date-circle .day {
    font-size: 1.2rem;
    font-weight: bold;
}

.date-circle .month {
    font-size: 0.8rem;
}

.btn-rounded {
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 16px;
}

/* .elite-section {
    padding: 60px 20px;
    background: #f9f9f9;
} */
/* .elite-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
} */

.elite-card {
    /* border: none; */
    border-radius: 15px;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff; */
    /* overflow: hidden; */
    /* position: relative; */
    height: 100%;
}

.elite-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 100%; 
}

.elite-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.elite-card:hover .elite-img {
    transform: scale(1.1);
}

.overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%; /* التدرج يصل حتى منتصف البطاقة فقط */
    background: linear-gradient(to top, rgba(28, 117, 250, 0.9), rgba(34, 2, 159, 0.0)); 
    border-radius: 15px;
}

.elite-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    /* text-align: center; */
}

.elite-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    /* transition: color 0.3s ease; */
}

.elite-role {
    font-size: 18px;
    color: #ddd;
}
/* <!-- هنا التنسيق الموحد لكل السيكشنات --> */
.section-custom {
    /* padding: 60px 20px; */
    /* background: #f9f9f9; */
    /* text-align: center; */
    /* width: 100%; */
    /* margin: auto; */
    padding: 40px 0;
    /* background-image: radial-gradient(circle at 17% 77%, rgba(17, 17, 17,0.04) 0%, rgba(17, 17, 17,0.04) 50%,rgba(197, 197, 197,0.04) 50%, rgba(197, 197, 197,0.04) 100%),radial-gradient(circle at 26% 17%, rgba(64, 64, 64,0.04) 0%, rgba(64, 64, 64,0.04) 50%,rgba(244, 244, 244,0.04) 50%, rgba(244, 244, 244,0.04) 100%),radial-gradient(circle at 44% 60%, rgba(177, 177, 177,0.04) 0%, rgba(177, 177, 177,0.04) 50%,rgba(187, 187, 187,0.04) 50%, rgba(187, 187, 187,0.04) 100%),linear-gradient(19deg, rgb(28, 117, 250),rgb(34, 2, 159)); */
}
.sections-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* padding-top: 20px; */
    padding-bottom: 40px;
    gap: 8px;
}
.sub-title {
    font-size: 16px;
    font-weight: 400;
    color: hsla(0, 0.00%, 0.00%, 0.60);
    margin: 0;
}

.main-title {
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(90deg, #007BFF, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    position: relative;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #007BFF, #0056b3);
    border-radius: 2px;
    margin-top: 5px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
    transform: translateX(5px); 
}

.read-more .arrow {
    margin: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.read-more:hover .arrow {
    transform: translateX(5px);
}

/* ضبط السلايدر */
.swiper {
    position: relative;
    width: 100%;
    height: 450px;
    padding: 10px;
}
/* تعديل تصميم البطاقة */
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 15px;
    border: 3px solid white; /* إضافة إطار أبيض */
    transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out; /* إضافة انتقال لتغيير اللون */
    overflow: hidden;
}

/* عند مرور الماوس على السلايد */
.swiper-slide:hover {
    border-color: #1c75fa; /* تحويل اللون إلى الأزرق عند التحويم */
}

/* .swiper-button-next::after,
.swiper-button-prev::after {
    display: none !important;
    content: none !important;
    
}

.swiper-button-prev,.swiper-button-next {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25%;
    color: black;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.swiper-button-prev{
    right: -1px !important;
} */

/* .swiper-button-next{
    left: -1px !important; */
    /* left: 0; */  
/* } */

/* .swiper-button-prev .bx,
.swiper-button-next .bx {
    font-size: 25px;
} */

.swiper-button-prev,
.swiper-button-next {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25%;
    color: black;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* .swiper-button-prev {
    right: -1px !important;
}
.swiper-button-next {
    left: -1px !important;
} */

/* الوضع الافتراضي - اللغة العربية RTL */
[dir="rtl"] .swiper-button-prev {
    right: -1px !important;
    left: auto !important;
}
[dir="rtl"] .swiper-button-next {
    left: -1px !important;
    right: auto !important;
}

/* للغة الإنجليزية LTR */
[dir="ltr"] .swiper-button-prev {
    left: -1px !important;
    right: auto !important;
}
[dir="ltr"] .swiper-button-next {
    right: -1px !important;
    left: auto !important;
}

.swiper-button-prev .bx,
.swiper-button-next .bx {
    font-size: 25px;
}
/* 🚫 إلغاء أي محتوى افتراضي يضيفه Swiper */
.swiper-button-next::after,
.swiper-button-prev::after {
    content: none !important;
    display: none !important;
}


/*////////////////////////////////////////////////////////////////////*/
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    main {
        height: 70vh;
        min-height: 320px;
        max-height: 520px;
        overflow: hidden;
    }

    .item {
        max-width: 100%;
    }

    .item:nth-child(n+3) {
        display: none;
    }

    .content {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }

    .card {
        width: 100%;
        max-width: 100%;
    }

    .swiper,
    .swiper-slide {
        max-width: 100%;
        overflow: hidden;
    }
}
