/* استدعاء خط المراعي من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
body, p, span, a, h1, h2, h3, h4, h5, h6, input, button, select, textarea, li, label, .form-control {
    font-family: 'Almarai', sans-serif !important;
}

/* 3. حماية الأيقونات (التي تظهر كمربعات) وإعادة خطها الأصلي */
.fa, .fas, .far, .fab, .glyphicon, [class^="fa-"], [class*=" fa-"] {
    font-family: 'FontAwesome' !important; /* تأكد من اسم الخط المستخدم في نسختك */
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    display: inline-block !important;
}

/* 4. معالجة خاصة لأيقونات البطاقات الفاخرة */
.card-icon i {
    font-family: 'FontAwesome' !important;
}


.navbar-brand img {
    height: 60px !important;
}
/* تنسيق السلايدر */
#homeCarousel {
    height: 450px;
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.slide-overlay {
    height: 450px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* طبقة تظليل فوق الصور لبروز النص */
.slide-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(58, 72, 67, 0.8), rgba(45, 52, 54, 0.9));
}

.slide-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
}





/* إجبار عناصر VuFind على التراصف الأفقي */
.searchForm {
    flex-direction: row-reverse !important; /* للغة العربية */
    gap: 15px !important;
    align-items: center !important;
}
.searchForm-inputs {
    display: flex !important;
    justify-content: center !important; /* توسيط أفقي */
    align-items: center !important;     /* توسيط عمودي */
    gap: 10px !important;               /* مسافة ثابتة بين العناصر */
    width: 100% !important;
    flex-wrap: nowrap !important;       /* منع العناصر من النزول لسطر جديد */
}
.searchForm .form-control {
    background: transparent !important;
    font-size: 1.2rem !important;
}

.searchForm-inputs .form-control,
.searchForm-inputs .form-select,
.searchForm-inputs .btn {
    margin: 0 !important; /* إلغاء أي هوامش جانبية تسبب انحراف التوسيط */
}

.searchForm .btn-primary {
    background: #50635c !important; /* لونك الزيتوني المعتمد */
    border-radius: 40px !important;
    padding: 10px 35px !important;
    font-weight: bold !important;
}

/* إخفاء السايدبار في الصفحة الرئيسية */
.template-dir-home.template-name-index .sidebar {
    display: none !important;
}


/* حاوية الاستعراض الكبرى */
.browse-section {
   
    background: #fcfcfc;
}

/* هيكل الشبكة (Grid) */
.browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* تصميم البطاقة الفاخرة */
.fancy-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.fancy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(58, 72, 67, 0.15);
    border-color: #3a4843;
}

/* الأيقونات (افتراضياً نستخدم دوائر جمالية) */
.card-icon {
    width: 70px;
    height: 70px;
    background: rgba(58, 72, 67, 0.1);
    color: #3a4843;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    transition: 0.3s;
}

.fancy-card:hover .card-icon {
    background: #3a4843;
    color: #ffffff;
}

/* العناوين */
.fancy-card h3 {
    font-size: 1.4rem;
    color: #2d3436;
    margin-bottom: 20px;
    font-weight: 700;
}

/* القوائم والروابط */
.fancy-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fancy-card ul li {
    margin-bottom: 12px;
}

.fancy-card ul li a {
    color: #636e72;
    text-decoration: none;
    transition: 0.2s;
    font-size: 1rem;
    display: inline-block;
}

.fancy-card ul li a:hover {
    color: #3a4843;
    padding-right: 8px; /* حركة بسيطة لليمين عند التأشير */
    font-weight: 600;
}

/* حاوية الأقسام السفلية */
.creative-footer-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.creative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* تصميم البطاقة الإبداعية */
.creative-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.creative-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(58, 72, 67, 0.1);
    border-color: #3a4843;
}

/* رأس البطاقة والأيقونة */
.card-header-flex {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.card-icon-box {
    width: 45px;
    height: 45px;
    background: #3a4843;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.creative-card h3 {
    font-size: 1.25rem;
    color: #3a4843;
    margin: 0;
    font-weight: 700;
}

/* قائمة الروابط */
.creative-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.creative-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}

.creative-list li:last-child {
    border: none;
}

.creative-list li a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
    display: block;
}

.creative-list li a:hover {
    color: #3a4843;
    padding-right: 10px;
    font-weight: 600;
}

/* إصلاح هيكل الفوتر بالكامل */
footer.footer-container {
    background-color: #3a4843 !important; /* اللون الزيتوني الفاخر */
    color: #ffffff !important;
    padding: 50px 0 30px !important;
    direction: rtl !important; /* فرض الاتجاه من اليمين لليسار */
    text-align: right !important;
    clear: both !important;
    display: block !important;
}

/* ترتيب الأعمدة بشكل أفقي صحيح */
.footer-container .row {
    display: flex !important;
    flex-direction: row-reverse !important; /* لضمان ترتيب الشعار يمين والروابط يسار */
    flex-wrap: wrap;
    align-items: flex-start;
}

/* تنسيق الشعار والوصف */
.footer-col img.footer-logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 15px;
    display: block;
}

/* إلغاء النقاط السوداء المزعجة من الروابط */
.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* العناوين الذهبية */
.footer-title {
    color: #d4af37 !important; /* اللون الذهبي */
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* تنسيق سطر الحقوق السفلي */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}