/* ================= إعدادات المتغيرات والألوان الأساسية ================= */
/* ================= إعدادات المتغيرات والألوان الأساسية (محدثة حسب الهوية الجديدة) ================= */
/* ================= إعدادات المتغيرات (أبيض وذهبي فقط من الصورة) ================= */
/* ================= إعدادات المتغيرات (ألوان كريمية مُذْهَبة فخمة) ================= */
/* ================= إعدادات المتغيرات (كريمي مُذْهَب أغنى وأعمق) ================= */
:root {
    --royal-blue: #F2E6D0; /* درجة كريمي أغمق سِنة (شامبين دافئ) للهيدر والواجهة والفوتر */
    --gold: #C5A059; /* الذهبي الأساسي زي ما هو عشان يفضل متناسق مع الصورة */
    --gold-hover: #A07D45;
    --ivory: #F8F1E3; /* لون خلفية باقي الأقسام أغمق درجة بسيطة عشان التناسق */
    --text-dark: #2A2421; /* النص أسود دافئ مريح جداً للقراءة */
    --text-light: #2A2421; 
    --font-heading: 'Amiri', serif;
    --font-body: 'Tajawal', sans-serif;
}

/* ================= أوامر ضرورية لضبط النصوص على الخلفية البيضاء الجديدة ================= */

/* تغيير لون الروابط في الهيدر لأسود، ولما تقف عليها بالماوس تبقى ذهبي */
.nav-links a {
    color: var(--text-dark) !important;
    font-weight: bold;
}
.nav-links a:hover {
    color: var(--gold) !important;
}

/* تلوين العناوين الأساسية في الموقع بالذهبي */
h2, h3, h4 {
    color: var(--gold) !important;
}

/* ضبط لون النص الوصفي تحت اسم الدكتور لأسود بدل الرمادي الفاتح اللي كان بيختفي */
.hero-description {
    color: #444 !important;
}

/* ضبط الكلمة الصغيرة تحت اللوجو */
.logo-sub {
    color: #666 !important;
}

/* تظبيط شكل الأزرار (استشارة / تحميل) عشان تبقى خلفيتها ذهبي والكلام أبيض */
.btn-small, .submit-btn {
    background-color: var(--gold) !important;
    color: #fff !important;
    border: none !important;
}
.btn-small:hover, .submit-btn:hover {
    background-color: var(--gold-hover) !important;
}

/* إضافة خط ذهبي أنيق تحت الهيدر وفوق الفوتر عشان يحددوهم في الخلفية البيضاء */
.main-header {
    border-bottom: 2px solid var(--gold);
}
.site-footer {
    border-top: 3px solid var(--gold);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--ivory);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--royal-blue);
    margin-bottom: 15px;
}

/* ================= 1. القائمة الرئيسية (Header & Navbar) ================= */
.main-header {
    background-color: var(--royal-blue);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--gold);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    text-decoration: none;
    color: var(--gold);
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--ivory);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px; /* قللنا المسافة من 25 لـ 15 */
}
.nav-links a {
    color: var(--ivory);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px; /* قللنا المسافة من 15 لـ 10 */
}

.lang-switch {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-small {
    background-color: var(--gold);
    color: var(--royal-blue);
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-small:hover {
    background-color: var(--text-light);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--gold);
    transition: 0.3s;
}

/* ================= 2. واجهة الموقع (Hero Section) ================= */
.hero-section {
    position: relative;
    background-color: var(--royal-blue);
    color: var(--ivory);
    padding: 45px 0;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.badge {
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--gold);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 15px;
}

.highlight-gold {
    color: var(--gold);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.stats-container {
    display: flex;
    gap: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
}

.stat-box h3 {
    font-family: var(--font-body);
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 5px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-top: -50px; /* هذا السطر سيرفع الصورة لأعلى بمقدار 50 بكسل */
}

.image-frame {
    width: 100%;
    max-width: 400px;
    border: 8px solid var(--gold);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* ================= 3. قسم الاستشارات القانونية ================= */
.consultations-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background-color: var(--gold);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.expertise-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-top: 4px solid var(--royal-blue);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--gold);
}

.academic-consulting-banner {
    background-color: var(--royal-blue);
    color: var(--text-light);
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 60px;
    border-right: 8px solid var(--gold);
}

.academic-consulting-banner h3 {
    color: var(--gold);
}

.academic-content ul {
    list-style-type: disc;
    margin-right: 20px;
    margin-top: 15px;
}

.how-it-works {
    text-align: center;
    margin-bottom: 60px;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    background: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--gold);
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 15px auto;
}

.consultation-form-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--ivory);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.security-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--royal-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.file-upload small {
    display: block;
    margin-top: 5px;
    color: #666;
}

.submit-btn {
    background-color: var(--royal-blue);
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    font-family: var(--font-body);
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--gold);
}

/* ================= 4. التذييل (Footer) ================= */
.site-footer {
    background-color: var(--royal-blue);
    color: var(--text-light);
    padding: 40px 0;
    margin-top: 60px;
    border-top: 5px solid var(--gold);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info h4 {
    color: var(--gold);
}

.footer-contact p {
    margin-bottom: 10px;
}

/* ================= استعلامات الوسائط (Responsive & Mobile) ================= */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        justify-content: center;
        margin-top: 30px;
    }

    .stats-container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none; 
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .form-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
}
/* ================= 5. قسم السيرة الذاتية (About Section) ================= */
.about-section {
    padding: 80px 0;
    background-color: #fff; /* لون أبيض لكسر خلفية العاجي للموقع */
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.resume-card {
    background-color: var(--ivory);
    padding: 35px 25px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.resume-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: var(--gold);
}

.card-icon {
    font-size: 2.5rem;
    position: absolute;
    top: -25px;
    right: 25px;
    background-color: var(--royal-blue);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.resume-card h3 {
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: var(--royal-blue);
    border-bottom: 2px dashed #ccc;
    padding-bottom: 10px;
}

.resume-list {
    list-style: none;
}

.resume-list li {
    margin-bottom: 15px;
    position: relative;
    padding-right: 25px;
    line-height: 1.7;
}

.resume-list li::before {
    content: '▪';
    color: var(--gold);
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.resume-list strong {
    color: var(--royal-blue);
}
/* ================= 6. قسم المكتبة القانونية (Library Section) ================= */
.library-section {
    padding: 80px 0;
    background-color: var(--ivory); /* نفس لون الخلفية الأساسي */
}

/* تصميم أزرار التبويبات */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: transparent;
    border: 2px solid var(--royal-blue);
    color: var(--royal-blue);
    padding: 12px 30px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--royal-blue);
    color: var(--gold);
    border-color: var(--royal-blue);
}

/* إخفاء وإظهار المحتوى */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active-tab {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* تصميم شبكة الكتب */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.book-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.book-cover img {
    width: 100%;
    height: 260px; /* نزلنا الارتفاع من 380 لـ 260 بيكسل عشان الكارت يلم */
    object-fit: contain; 
    background-color: #ffffff;
    border-bottom: 3px solid var(--gold);
    padding: 10px; /* قللنا المسافة شوية عشان الصورة تاخد راحتها */
}

.book-info {
    padding: 20px;
    text-align: center;
}

.book-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.book-info p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

.publisher {
    display: inline-block;
    background: var(--ivory);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--royal-blue);
    font-weight: bold;
    border: 1px solid #ddd;
}

/* تصميم قائمة الأبحاث */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.research-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    border-right: 5px solid var(--gold);
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}

.research-item:hover {
    transform: translateX(-5px); /* حركة خفيفة لليسار عند التمرير (عشان الموقع عربي) */
}

.research-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.research-details p {
    color: #666;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .research-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        border-right: none;
        border-top: 5px solid var(--gold);
    }
}
/* تنسيقات مكتبة Swiper الخاصة بالموقع */
.swiper {
    width: 100%;
    padding: 20px 10px 50px 10px !important; /* مساحة للأزرار تحت */
}

/* توحيد ارتفاع البطاقات داخل السلايدر */
.swiper-slide {
    height: auto;
    display: flex;
}

.swiper-slide .book-card, 
.swiper-slide .research-item {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.swiper-slide .research-item {
    justify-content: space-between;
}

/* ألوان أزرار التنقل (الأسهم والنقاط) */
.swiper-button-next, 
.swiper-button-prev {
    color: var(--gold) !important;
}

.swiper-button-next::after, 
.swiper-button-prev::after {
    font-size: 1.5rem !important;
    font-weight: bold;
}

.swiper-pagination-bullet-active {
    background-color: var(--royal-blue) !important;
}
/* ================= 8. قسم الإشراف العلمي وخدمة المجتمع ================= */
.community-supervision-section {
    padding: 80px 0;
    background-color: var(--ivory); /* عشان يتناسق مع باقي الموقع */
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.content-box {
    background-color: #fff;
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.04);
    border-top: 5px solid var(--royal-blue);
    transition: transform 0.3s ease;
}

.content-box:hover {
    transform: translateY(-5px);
    border-top-color: var(--gold);
}

.content-box h3 {
    color: var(--gold);
    margin-bottom: 30px;
    font-size: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.box-item {
    margin-bottom: 25px;
}

.box-item:last-child {
    margin-bottom: 0;
}

.box-item h4 {
    color: var(--royal-blue);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* تصميم نقطة ذهبية صغيرة جنب العناوين الفرعية */
.box-item h4::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
}

.box-item p {
    color: #555;
    font-size: 1rem;
    padding-right: 18px; /* عشان النص يترتب مع النقطة الذهبية */
    line-height: 1.7;
}
/* ================= 9. المركز الإخباري المصغر ================= */
.news-ticker {
    background-color: var(--royal-blue);
    color: var(--text-light);
    padding: 12px 0;
    border-bottom: 3px solid var(--gold);
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
}

.ticker-title {
    background-color: var(--gold);
    color: var(--royal-blue);
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 15px;
    z-index: 2; /* عشان العنوان يفضل ثابت فوق الكلام اللي بيتحرك */
    box-shadow: -3px 0 10px rgba(0,0,0,0.2);
}

.ticker-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.ticker-text {
    display: inline-flex;
    gap: 30px;
    white-space: nowrap;
    /* حركة النص من الشمال لليمين عشان القراءة بالعربي */
    animation: tickerScroll 25s linear infinite; 
}

.ticker-text span {
    font-size: 1rem;
    font-weight: 500;
}

.ticker-text span:hover {
    color: var(--gold);
    cursor: pointer;
}

/* برمجة حركة شريط الأخبار */
@keyframes tickerScroll {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* وقف الحركة لما الماوس ييجي عليها عشان الزائر يلحق يقرأ */
.ticker-content:hover .ticker-text {
    animation-play-state: paused;
}
/* ================= 10. مربع البحث في القائمة ================= */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1); /* شفافية خفيفة عشان تليق مع الأزرق */
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 3px 12px;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-light);
    outline: none;
    padding: 5px;
    width: 60px; /* خلينا العرض 60 بدل 140 */
    font-family: var(--font-body);
    transition: width 0.4s ease; /* ضفنا سطر الحركة ده */
}

/* وهتضيف البلوك ده تحته مباشرة (بعد سطر 885) */
.search-box:focus-within input {
    width: 160px; 
}

.search-box input::placeholder { 
    color: #cbd5e1; 
    font-size: 0.9rem;
}

.search-box button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--gold);
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.1);
}

/* تعديل للموبايل عشان مربع البحث ميبوظش الشكل */
@media (max-width: 992px) {
    .search-box {
        display: none; /* الأفضل إخفاؤه في الموبايل أو نقله داخل القائمة المنسدلة */
    }
}
/* ================= 11. معرض الصور والفيديو ================= */
.gallery-section {
    padding: 80px 0;
    background-color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 3px solid var(--ivory);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* الشريط اللي بيظهر لما تحط الماوس على الصورة */
.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(29, 41, 81, 0.85); /* أزرق شفاف */
    color: var(--gold);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    transition: bottom 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08); /* تكبير الصورة بشكل خفيف */
}

.gallery-item:hover .gallery-overlay {
    bottom: 0; /* إظهار شريط الوصف */
}
/* ================= 12. تحديثات التذييل (الخريطة والسوشيال) ================= */
.footer-content {
    display: grid !important; /* بنستخدم Grid بدل Flex عشان نقسمه 3 عواميد مظبوطين */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold);
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    background: var(--gold);
    color: var(--royal-blue);
    transform: translateY(-3px);
}

.footer-map iframe {
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.footer-map iframe:hover {
    transform: scale(1.03); /* زووم خفيف لما الماوس ييجي على الخريطة */
}
/* ================= إصلاح ألوان النصوص المخفية (أبيض على أبيض) ================= */

/* 1. إظهار كلمة "الأستاذ الدكتور" اللي فوق الاسم */
.hero-text h1 {
    color: var(--text-dark) !important; /* هيخليها بالأسود الأنيق */
}

/* 2. إظهار الكلام اللي تحت الأرقام (كتاباً ومؤلفاً، بحثاً، رسالة) */
.stat-box p {
    color: #555555 !important; /* رمادي غامق مريح للعين */
    font-weight: bold;
    font-size: 1.1rem;
}

/* 3. تظبيط لون كلمة "الموقع الرسمي" اللي في المربع الصغير فوق */
.badge {
    color: #8E7450 !important; /* ذهبي غامق عشان يتقرأ بوضوح */
    font-weight: bold;
    border: 1px solid #C5A059;
}

/* 4. التأكد إن خلفية الواجهة والتذييل بيضاء تماماً وكلامهم أسود */
/* ربط الواجهة والفوتر باللون المُذهب الجديد بدل الأبيض الساطع */
.hero-section, .site-footer {
    background-color: var(--royal-blue) !important;
}

/* تلوين الهيدر (القائمة اللي فوق) بنفس اللون المُذهب */
.main-header {
    background-color: var(--royal-blue) !important;
    border-bottom: 2px solid var(--gold);
}

.site-footer p, .footer-contact strong {
    color: #333333 !important;
}
/* ================= إصلاح باقي العناصر في وسط الموقع ================= */

/* 1. الكلمات البارزة في السيرة الذاتية */
.resume-list strong {
    color: var(--text-dark) !important;
}

/* 2. أيقونات السيرة الذاتية (عشان تبان فخمة بالذهبي) */
.card-icon {
    background-color: var(--ivory) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2) !important;
}

/* 3. أزرار تبويبات المكتبة (الكتب والأبحاث) */
.tab-btn {
    border-color: var(--gold) !important;
    color: var(--text-dark) !important;
}
.tab-btn.active, .tab-btn:hover {
    background-color: var(--gold) !important;
    color: #fff !important;
}

/* 4. اسم دار النشر تحت الكتب */
.publisher {
    color: var(--text-dark) !important;
    border-color: var(--gold) !important;
}

/* 5. شريط الاستشارات الأكاديمية */
.academic-consulting-banner {
    background-color: var(--ivory) !important;
    border: 1px solid var(--gold) !important;
    border-right: 8px solid var(--gold) !important;
}
/* ================= 15. السيرة الذاتية التفاعلية ================= */
.cv-container {
    display: flex;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    overflow: hidden;
    min-height: 500px;
}

.cv-tabs {
    flex: 0 0 250px;
    background-color: #101828; /* لون كحلي غامق صريح لحل مشكلة اختفاء النص */
    display: flex;
    flex-direction: column;
}

.cv-tab-btn {
    background: transparent;
    color: #ffffff; /* لون النص أبيض */
    border: none;
    padding: 20px;
    text-align: right;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    padding-right: 25px; /* حركة خفيفة عند التمرير */
}

.cv-tab-btn.active {
    background-color: var(--gold);
    color: var(--dark-blue);
    border-right: 5px solid #fff;
}

.cv-content-area {
    flex: 1;
    padding: 40px;
    background-color: #fafafa;
}

.cv-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.cv-tab-content.active {
    display: block;
}

.cv-block {
    margin-bottom: 30px;
}

.cv-block h3 {
    color: var(--dark-blue);
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
    display: inline-block;
}

.cv-block h3 i {
    color: var(--gold);
    margin-left: 8px;
}

.cv-list {
    list-style: none;
    padding: 0;
}

.cv-list li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
}

.cv-list li::before {
    content: "■";
    position: absolute;
    right: 0;
    top: 0;
    color: var(--gold);
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* للموبايل */
@media (max-width: 768px) {
    .cv-container {
        flex-direction: column;
    }
    .cv-tabs {
        flex: auto;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
    }
    .cv-tab-btn {
        padding: 15px;
        text-align: center;
        border-bottom: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    .cv-tab-btn.active {
        border-right: none;
        border-bottom: 4px solid #fff;
    }
    .cv-content-area {
        padding: 20px;
    }
}
/* ================= 16. قسم الاستشارات (الأكورديون) ================= */
.accordion-wrapper {
    max-width: 850px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    padding: 20px 30px;
}

.accordion-item {
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 5px;
}

.accordion-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 25px 0;
    cursor: pointer;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.accordion-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--dark-blue);
    transition: color 0.3s;
}

.accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 2px solid #8e9eab;
    border-radius: 8px; /* حواف شبه دائرية زي الصورة */
    color: #8e9eab;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* عند مرور الماوس */
.accordion-header:hover .accordion-title {
    color: var(--gold);
}
.accordion-header:hover .accordion-icon {
    border-color: var(--gold);
    color: var(--gold);
}

/* المحتوى المخفي */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content p {
    padding-bottom: 25px;
    padding-top: 5px;
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
    border-top: 1px solid transparent; /* مسافة بسيطة */
}

/* حالة الفتح (Active) */
.accordion-item.active .accordion-title {
    color: var(--gold);
}

.accordion-item.active .accordion-icon {
    border-color: var(--gold);
    color: #fff;
    background-color: var(--gold);
}
/* ================= 17. المركز الإعلامي (فيديوهات ومقالات) ================= */
.media-tabs-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.media-tab-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-family: 'Cairo', sans-serif;
    font-weight: bold;
    background-color: #fff;
    color: var(--dark-blue);
    border: 2px solid var(--dark-blue);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-tab-btn i {
    margin-left: 8px;
}

.media-tab-btn:hover, .media-tab-btn.active {
    background-color: var(--dark-blue);
    color: var(--gold);
    border-color: var(--dark-blue);
}

.media-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.media-tab-content.active {
    display: block;
}

/* شبكة الفيديوهات والمقالات */
.video-grid, .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* كارت الفيديو */
.video-card, .article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.video-card:hover, .article-card:hover {
    transform: translateY(-5px);
}

/* ضبط مقاس الفيديو عشان يكون متجاوب (16:9 Aspect Ratio) */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* نسبة العرض للطول 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info, .article-info {
    padding: 20px;
}

.video-info h3, .article-info h3 {
    color: var(--dark-blue);
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.video-date, .article-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.article-info p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    color: var(--gold);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more i {
    margin-right: 5px;
    font-size: 0.9rem;
}

.read-more:hover {
    color: var(--dark-blue);
}

@media (max-width: 768px) {
    .video-grid, .article-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== Production hardening & added content ===== */
html { scroll-behavior: smooth; }
.skip-link { position: fixed; top: 8px; right: 8px; transform: translateY(-150%); z-index: 99999; background: #fff; color: var(--dark-blue); padding: 10px 16px; border-radius: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.15); }
.skip-link:focus { transform: translateY(0); }
.hp-field { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; opacity: 0 !important; pointer-events: none !important; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.search-box { position: relative; }
.search-results { display:none; position:absolute; top:calc(100% + 8px); inset-inline-end:0; width:min(420px, 88vw); background:#fff; border:1px solid #e6e8ec; border-radius:10px; box-shadow:0 14px 40px rgba(15,35,66,.15); overflow:hidden; z-index:9999; }
.search-results.visible { display:block; }
.search-result-item,.search-empty { display:block; width:100%; padding:12px 14px; text-align:right; border:0; border-bottom:1px solid #eef0f3; background:#fff; color:var(--dark-blue); font:inherit; cursor:pointer; }
.search-result-item:hover,.search-result-item:focus { background:#f7f4ed; outline:none; }
.search-highlight { outline:3px solid var(--gold); outline-offset:5px; transition:outline-color .3s; }
.insights-section,.news-section,.faq-section { padding:80px 0; }
.insights-section,.faq-section { background:#f8fafc; }
.news-section { background:#fff; }
.eyebrow,.content-tag { color:var(--gold); font-weight:700; letter-spacing:.02em; }
.insights-grid,.news-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.insight-card,.news-card { background:#fff; border:1px solid #e7e8eb; border-radius:12px; padding:26px; box-shadow:0 8px 24px rgba(15,35,66,.05); }
.insight-card h3,.news-card h3 { color:var(--dark-blue); margin:10px 0; }
.insight-card a { display:inline-block; margin-top:12px; color:var(--dark-blue); font-weight:700; text-decoration:none; border-bottom:1px solid var(--gold); }
.news-card time { color:#7b828c; font-size:.9rem; }
.faq-list { max-width:900px; margin:0 auto; display:grid; gap:14px; }
.faq-list details { background:#fff; border:1px solid #e7e8eb; border-radius:10px; padding:0 20px; }
.faq-list summary { cursor:pointer; color:var(--dark-blue); font-weight:700; padding:18px 0; }
.faq-list p { color:#5d6570; padding:0 0 18px; line-height:1.8; }
.form-status { margin-top:14px; border-radius:8px; padding:0; line-height:1.7; }
.form-status.pending,.form-status.success,.form-status.error { padding:12px 14px; }
.form-status.pending { background:#f4f6f9; color:#34445b; }
.form-status.success { background:#edf8f1; color:#176a38; }
.form-status.error { background:#fff1f1; color:#9f2d2d; }
#consultSubmit:disabled { opacity:.65; cursor:not-allowed; }
.consent-group label { display:flex; gap:10px; align-items:flex-start; color:#555; line-height:1.7; }
.consent-group input { margin-top:6px; }
.footer-legal { border-top:1px solid rgba(255,255,255,.16); margin-top:28px; padding:18px 0; display:flex; gap:10px; justify-content:center; }
.footer-legal a { color:inherit; }
.verified-links-note { opacity:.75; font-size:.9rem; }
@media (max-width: 1100px) {
  .insights-grid,.news-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .nav-links.mobile-open { display:flex !important; flex-direction:column; position:absolute; top:100%; left:0; right:0; width:100%; background:var(--royal-blue); padding:18px; border-bottom:3px solid var(--gold); z-index:9998; }
}
@media (max-width: 700px) {
  .insights-grid,.news-grid { grid-template-columns:1fr; }
  .insights-section,.news-section,.faq-section { padding:55px 0; }
}
.cert-img-wrapper img { transition: transform .3s ease; }
.cert-img-wrapper:hover img { transform: scale(1.05); }
.managed-library { margin-top: 34px; display: grid; gap: 28px; }
.managed-library h3 { color: var(--dark-blue); margin-bottom: 14px; }
.managed-library-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.managed-library-card { background:#fff; border:1px solid #e7e8eb; border-radius:10px; padding:20px; }
.managed-library-card img { width:100%; aspect-ratio:3/4; object-fit:contain; border-radius:8px; margin-bottom:12px; }
.managed-library-card h4 { color:var(--dark-blue); margin:0 0 8px; }
.managed-library-card a { font-weight:700; color:var(--dark-blue); }
@media (max-width:900px){.managed-library-grid{grid-template-columns:1fr 1fr}}@media(max-width:600px){.managed-library-grid{grid-template-columns:1fr}}

/* ===== UI polish — spacing, hero fold and section headings ===== */
:root { --dark-blue: #2A2421; }

/* Give the desktop header room to breathe without making it taller. */
.main-header .navbar.container { max-width: 1720px; padding-inline: 28px; }
.navbar { min-height: 92px; height: auto; gap: 22px; }
.logo { flex: 0 0 auto; min-width: 190px; }
.logo-text { font-size: 1.42rem; line-height: 1.25; white-space: nowrap; }
.logo-sub { font-size: .78rem; margin-top: 5px; white-space: nowrap; }
.nav-links { flex: 1 1 auto; justify-content: center; align-items: center; gap: clamp(14px, 1.45vw, 28px); }
.nav-links li { flex: 0 0 auto; }
.nav-links a { display: block; font-size: clamp(.94rem, 1vw, 1.08rem); line-height: 1.45; white-space: nowrap; }
.nav-actions { flex: 0 0 auto; gap: 12px; }
.search-box { margin-left: 0; }
.btn-small { padding: 10px 16px; white-space: nowrap; }
.lang-switch { min-width: 48px; min-height: 42px; }

/* Keep the three counters and their labels visible together in the first fold. */
.hero-section { padding: 42px 0 32px; }
.hero-description { margin-bottom: 20px; line-height: 1.75; }
.stats-container { gap: 42px; padding-top: 16px; align-items: flex-start; }
.stat-box { min-width: 120px; }
.stat-box h3 { line-height: 1; margin-bottom: 8px; }
.stat-box p { margin: 0; line-height: 1.45; }

/* Sticky header should never cover the beginning of a section. */
section[id] { scroll-margin-top: 118px; }
.cv-section { padding-top: 72px; }
.cv-section > .container > .section-header:first-child { margin-top: 0; }

/* Consistent hierarchy: eyebrow on its own line, title on its own line,
   and underline spans the complete title instead of a short middle segment. */
.section-header { display: block; text-align: center; }
.section-header .eyebrow { display: block; width: fit-content; margin: 0 auto 10px; font-size: 1rem; line-height: 1.5; }
.section-header h2 { display: table; width: fit-content; max-width: 100%; margin: 0 auto 16px; padding: 0 0 10px; line-height: 1.35; }
.section-header h2::after { left: 0; right: 0; width: 100%; }
.section-header p { max-width: 900px; margin: 0 auto; line-height: 1.85; color: #4b4642; }

/* Values used --dark-blue before it existed, leaving white text on white.
   The variable above restores the intended dark pills and other dark accents. */
.core-values span { background: var(--dark-blue) !important; color: #fff !important; }

/* Footer contains public legal information only; admin remains available by direct URL. */
.footer-legal { justify-content: center; }

@media (max-width: 1380px) {
  .main-header .navbar.container { padding-inline: 20px; }
  .navbar { gap: 14px; }
  .logo { min-width: 165px; }
  .logo-text { font-size: 1.25rem; }
  .nav-links { gap: 13px; }
  .nav-links a { font-size: .92rem; }
  .search-box { padding-inline: 9px; }
  .btn-small { padding-inline: 12px; }
}

@media (max-width: 1100px) {
  .navbar { min-height: 80px; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .logo { min-width: 0; }
  .hero-description { margin-bottom: 18px; }
}

@media (max-width: 700px) {
  .hero-section { padding: 34px 0 28px; }
  .stats-container { gap: 18px; padding-top: 14px; }
  .stat-box { min-width: 90px; }
  .stat-box h3 { font-size: 2rem; }
  .stat-box p { font-size: .95rem !important; }
  .cv-section { padding-top: 54px; }
  section[id] { scroll-margin-top: 92px; }
}

/* CMS runtime controls */
html{font-size:var(--cms-base-font,16px)}
.container{max-width:var(--cms-content-width,1200px)}
.hero-section,.cv-section,.students-section,.library-section,.consultations-section,.insights-section,.news-section,.faq-section,.academic-hub,.media-gallery-section{scroll-margin-top:120px}
.insight-card,.news-card,.managed-library-card,.content-box,.gallery-item,.video-card{border-radius:var(--cms-card-radius,12px)}
@media(min-width:700px){.students-section,.library-section,.consultations-section,.insights-section,.news-section,.faq-section,.academic-hub,.media-gallery-section{padding-top:var(--cms-section-spacing,80px)!important;padding-bottom:var(--cms-section-spacing,80px)!important}}

/* CMS custom sections */
.custom-section-public{padding:var(--cms-section-spacing,80px) 20px}.custom-section-inner{max-width:var(--cms-content-width,1200px);margin:auto}.custom-section-public .section-header{text-align:center;margin-bottom:30px}.custom-block{margin:18px 0}.custom-block img{max-width:100%;height:auto;display:block;margin:auto;border-radius:var(--cms-card-radius,12px)}.custom-block.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}.custom-card{padding:22px;border:1px solid rgba(0,0,0,.08);border-radius:var(--cms-card-radius,12px);background:#fff}.custom-block.button{text-align:center}.custom-block.button a{display:inline-block;background:var(--gold);color:#fff;padding:12px 22px;border-radius:10px;text-decoration:none}.custom-video{position:relative;padding-top:56.25%}.custom-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:12px}


/* ===== Mobile-first production pass — 2026-09-06 ===== */
html { color-scheme: light only; background: #F8F1E3; overflow-x: hidden; }
body { width: 100%; max-width: 100%; overflow-x: hidden; background: var(--ivory) !important; color: var(--text-dark) !important; }
img, video, iframe, svg, canvas { max-width: 100%; }
main, section, header, footer, nav, .container { min-width: 0; }
.local-video-wrapper { padding-bottom: 0; height: auto; aspect-ratio: 16 / 9; }
.local-video-wrapper video { width: 100%; height: 100%; display: block; object-fit: contain; background: #111; }
.academic-documents-block { margin-top: 34px; padding: 30px; background: #fff; border: 1px solid rgba(197,160,89,.28); border-radius: var(--cms-card-radius,12px); }
.academic-documents-block > h3 { color: var(--gold) !important; margin-bottom: 8px; }
.academic-documents-intro { color: #5a514b; margin-bottom: 22px; }
.academic-documents-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.academic-document-card { display:flex; align-items:center; gap:12px; padding:15px 16px; border:1px solid #eadfc9; border-radius:10px; background:#fffaf0; color:var(--text-dark); text-decoration:none; line-height:1.65; transition:.2s ease; }
.academic-document-card:hover { border-color:var(--gold); transform:translateY(-2px); }
.academic-document-icon { flex:0 0 auto; font-size:1.25rem; }
.media-archive-heading { margin: 50px 0 24px; text-align: center; }
.media-archive-heading h3 { color: var(--gold) !important; }
.archive-gallery .gallery-item { margin:0; }
.archive-extra { display:none; }
.archive-extra.archive-extra-visible { display:block; }
.archive-gallery-actions { text-align:center; margin-top:24px; }
.archive-toggle-btn { border:1px solid var(--gold); background:var(--gold); color:#fff; font:inherit; font-weight:700; padding:12px 24px; border-radius:999px; cursor:pointer; }
.archive-toggle-btn:hover { background:var(--gold-hover); }

@media (prefers-color-scheme: dark) {
  html, body { color-scheme: light only !important; background: #F8F1E3 !important; color: #2A2421 !important; }
  .main-header, .hero-section, .site-footer { background: #F2E6D0 !important; }
  .book-card, .research-item, .content-box, .insight-card, .news-card, .faq-list details, .video-card, .article-card, .gallery-item, .cv-container, .cv-content-area, .academic-documents-block, .academic-document-card, .custom-card { background-color:#fff !important; color:#2A2421 !important; }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  .container, .main-header .navbar.container { width:100% !important; max-width:100% !important; padding-inline:16px !important; }
  .navbar { min-height: auto !important; height:auto !important; padding-block:10px; flex-wrap:wrap; gap:10px !important; position:relative; }
  .logo { min-width:0 !important; max-width:55%; }
  .logo-text { font-size:1.08rem !important; white-space:normal !important; }
  .logo-sub { font-size:.7rem !important; white-space:normal !important; line-height:1.35; }
  .menu-toggle { display:flex !important; margin-inline-start:auto; padding:8px; border-radius:8px; }
  .nav-actions { width:100%; display:grid !important; grid-template-columns:minmax(0,1fr) auto auto; gap:8px !important; order:3; }
  .search-box { width:100%; min-width:0; }
  .search-box input { width:100%; min-width:0; }
  .lang-switch { min-width:44px; min-height:40px; padding:6px 9px; }
  .btn-small { min-height:40px; padding:8px 11px !important; font-size:.86rem; display:inline-flex; align-items:center; justify-content:center; }
  .nav-links.mobile-open { top:100% !important; padding:12px 16px !important; gap:0 !important; background:#F2E6D0 !important; box-shadow:0 12px 24px rgba(42,36,33,.12); }
  .nav-links.mobile-open li { width:100%; }
  .nav-links.mobile-open a { padding:11px 4px; border-bottom:1px solid rgba(197,160,89,.22); white-space:normal !important; }
  .search-results { width:min(92vw,420px); inset-inline-start:0; inset-inline-end:auto; }

  .hero-section { padding:28px 0 24px !important; }
  .hero-content { width:100%; gap:22px !important; }
  .hero-text { width:100%; min-width:0; }
  .hero-text h1 { font-size:clamp(2rem,10vw,2.65rem) !important; line-height:1.45; overflow-wrap:anywhere; }
  .hero-description { font-size:1rem; line-height:1.8; }
  .hero-image { width:100%; margin-top:4px !important; }
  .hero-image img { width:min(100%,340px); height:auto; margin-inline:auto; display:block; }
  .stats-container { width:100%; display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px !important; }
  .stat-box { min-width:0 !important; padding-inline:4px; }
  .stat-box h3 { font-size:1.7rem !important; }
  .stat-box p { font-size:.78rem !important; line-height:1.45; }

  .section-header { margin-bottom:28px !important; }
  .section-header h2 { font-size:clamp(1.75rem,8vw,2.25rem) !important; max-width:100%; overflow-wrap:anywhere; }
  .section-header p { font-size:.96rem; line-height:1.8; }
  .eyebrow { font-size:.88rem !important; }
  .about-section, .cv-section, .students-section, .library-section, .consultations-section, .community-supervision-section, .insights-section, .news-section, .faq-section, .academic-hub, .media-gallery-section { padding-top:48px !important; padding-bottom:48px !important; }

  .resume-grid, .split-grid, .books-grid, .gallery-grid, .video-grid, .article-grid, .insights-grid, .news-grid, .managed-library-grid, .academic-documents-grid { grid-template-columns:minmax(0,1fr) !important; gap:16px !important; }
  .resume-card, .content-box, .insight-card, .news-card, .managed-library-card, .academic-documents-block { padding:20px 16px !important; }
  .research-item { flex-direction:column !important; align-items:stretch !important; gap:16px; padding:20px 16px !important; }
  .research-actions, .book-actions { width:100%; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
  .research-actions a, .book-actions a { flex:1 1 140px; text-align:center; }
  .tabs-container { gap:9px; margin-bottom:26px; }
  .tab-btn { width:100%; padding:10px 14px !important; font-size:.96rem !important; }

  .cv-container { min-height:0 !important; width:100%; max-width:100%; }
  .cv-tabs { width:100%; max-width:100%; flex:0 0 auto !important; }
  .cv-tab-btn { flex:0 0 auto; font-size:.88rem !important; padding:12px 14px !important; }
  .cv-content-area { width:100%; min-width:0; padding:18px 14px !important; }
  .cv-list li { font-size:.96rem; padding-right:20px; overflow-wrap:anywhere; }

  .consultation-form, .form-container { width:100%; max-width:100%; }
  .form-grid { grid-template-columns:minmax(0,1fr) !important; gap:14px !important; }
  input, select, textarea, button { max-width:100%; }
  input, select, textarea { font-size:16px !important; }
  .file-upload-area { width:100%; }

  .media-gallery-section .video-grid { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:16px !important; margin-bottom:40px !important; }
  .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .gallery-item img { height:170px !important; object-fit:cover; }
  .gallery-overlay { font-size:.82rem; padding:8px 10px; }
  .archive-extra.archive-extra-visible { display:block; }

  .site-footer { padding-top:36px; }
  .footer-content { width:100%; display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:24px; text-align:center; }
  .footer-map, .footer-map iframe { width:100% !important; max-width:100% !important; }
  .footer-legal { margin-top:20px; }

  .custom-section-public { padding:48px 16px !important; }
  .custom-block.cards { grid-template-columns:minmax(0,1fr) !important; }
}

@media (max-width: 420px) {
  .container, .main-header .navbar.container { padding-inline:12px !important; }
  .nav-actions { grid-template-columns:minmax(0,1fr) 42px auto; }
  .btn-small { font-size:.8rem; padding-inline:9px !important; }
  .stats-container { gap:4px !important; }
  .stat-box h3 { font-size:1.5rem !important; }
  .stat-box p { font-size:.72rem !important; }
  .gallery-grid { grid-template-columns:minmax(0,1fr) !important; }
  .gallery-item img { height:auto !important; aspect-ratio:4/3; }
}

/* ===== Hard phone / touch-device fallback — 2026-09-06 v2 ===== */
@media (hover: none) and (pointer: coarse) {
  :root {
    color-scheme: only light !important;
    --royal-blue:#F2E6D0; --gold:#C5A059; --gold-hover:#A07D45;
    --ivory:#F8F1E3; --text-dark:#2A2421; --text-light:#2A2421; --dark-blue:#2A2421;
  }
  html, body { background:#F8F1E3 !important; color:#2A2421 !important; overflow-x:clip !important; max-width:100% !important; }
  body { min-width:0 !important; }
  .main-header,.hero-section,.site-footer { background:#F2E6D0 !important; color:#2A2421 !important; }
  .about-section,.gallery-section { background:#fff !important; }
  .container,.main-header .navbar.container { width:100% !important; max-width:100% !important; min-width:0 !important; padding-inline:14px !important; margin-inline:auto !important; }
  .navbar { width:100% !important; min-height:0 !important; height:auto !important; display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:8px !important; padding-block:9px !important; position:relative; }
  .logo { flex:1 1 0 !important; min-width:0 !important; max-width:calc(100% - 58px) !important; }
  .logo-text,.logo-sub { white-space:normal !important; overflow-wrap:anywhere; }
  .logo-text { font-size:1.08rem !important; }
  .logo-sub { font-size:.7rem !important; }
  .menu-toggle { display:flex !important; flex:0 0 auto !important; margin-inline-start:auto !important; }
  .nav-links { display:none !important; }
  .nav-links.mobile-open { display:flex !important; flex-direction:column !important; position:absolute !important; top:100% !important; inset-inline:0 !important; width:100% !important; min-width:0 !important; background:#F2E6D0 !important; padding:10px 14px !important; z-index:9998 !important; }
  .nav-links.mobile-open li,.nav-links.mobile-open a { width:100% !important; min-width:0 !important; white-space:normal !important; }
  .nav-actions { width:100% !important; flex:1 0 100% !important; display:grid !important; grid-template-columns:minmax(0,1fr) auto auto !important; gap:7px !important; min-width:0 !important; }
  .search-box { display:flex !important; width:100% !important; min-width:0 !important; }
  .search-box input { width:100% !important; min-width:0 !important; }
  .btn-small,.lang-switch { min-width:0 !important; }
  .hero-section { padding:26px 0 22px !important; }
  .hero-content { display:flex !important; flex-direction:column !important; width:100% !important; max-width:100% !important; min-width:0 !important; gap:20px !important; text-align:center !important; }
  .hero-text,.hero-image { flex:none !important; width:100% !important; max-width:100% !important; min-width:0 !important; }
  .hero-text h1 { font-size:clamp(1.85rem,8vw,2.45rem) !important; line-height:1.45 !important; overflow-wrap:anywhere !important; }
  .hero-image { justify-content:center !important; margin-top:0 !important; }
  .hero-image img { width:min(100%,330px) !important; height:auto !important; display:block !important; margin-inline:auto !important; }
  .stats-container { width:100% !important; max-width:100% !important; display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:5px !important; padding-top:10px !important; }
  .stat-box { min-width:0 !important; width:auto !important; }
  .stat-box h3 { font-size:1.55rem !important; }
  .stat-box p { font-size:.72rem !important; overflow-wrap:anywhere; }
  section,main,footer,header,nav { max-width:100% !important; min-width:0 !important; }
  .resume-grid,.split-grid,.books-grid,.video-grid,.article-grid,.insights-grid,.news-grid,.managed-library-grid,.academic-documents-grid { display:grid !important; grid-template-columns:minmax(0,1fr) !important; width:100% !important; min-width:0 !important; gap:15px !important; }
  .gallery-grid { display:grid !important; grid-template-columns:minmax(0,1fr) !important; width:100% !important; min-width:0 !important; }
  .resume-card,.content-box,.insight-card,.news-card,.managed-library-card,.academic-documents-block,.book-card,.research-item,.video-card,.article-card,.gallery-item,.custom-card { min-width:0 !important; max-width:100% !important; }
  .cv-container { display:flex !important; flex-direction:column !important; width:100% !important; max-width:100% !important; min-width:0 !important; }
  .cv-tabs { width:100% !important; max-width:100% !important; display:flex !important; flex-direction:row !important; overflow-x:auto !important; }
  .cv-content-area { width:100% !important; max-width:100% !important; min-width:0 !important; padding:18px 13px !important; }
  .form-grid { display:grid !important; grid-template-columns:minmax(0,1fr) !important; width:100% !important; }
  .consultation-form,.form-container,input,select,textarea,.file-upload-area { width:100% !important; max-width:100% !important; min-width:0 !important; }
  input,select,textarea { font-size:16px !important; }
  .footer-content { display:grid !important; grid-template-columns:minmax(0,1fr) !important; width:100% !important; min-width:0 !important; text-align:center !important; }
  .footer-map,.footer-map iframe { width:100% !important; max-width:100% !important; min-width:0 !important; }
  .book-card,.research-item,.content-box,.insight-card,.news-card,.faq-list details,.video-card,.article-card,.gallery-item,.cv-container,.cv-content-area,.academic-documents-block,.academic-document-card,.custom-card { background:#fff !important; color:#2A2421 !important; }
}

/* ===== Mobile root-cause fix — 2026-09-06 v3 =====
   Fixes real overflow sources instead of masking body overflow, and hardens
   the light palette against aggressive Android/OEM auto-dark engines. */
:root { color-scheme: only light !important; }
html, body { min-inline-size: 0; }
img, video, iframe, svg, canvas { max-inline-size: 100%; }

@media (max-width: 900px) {
  html {
    overflow-x: hidden !important;
    background-color: #F8F1E3 !important;
    background-image: linear-gradient(#F8F1E3,#F8F1E3) !important;
    forced-color-adjust: none;
  }
  body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    background-color: #F8F1E3 !important;
    background-image: linear-gradient(#F8F1E3,#F8F1E3) !important;
    color: #2A2421 !important;
    -webkit-text-fill-color: #2A2421;
    forced-color-adjust: none;
  }

  /* Real overflow sources: inline minmax grids and fixed-width flex fields. */
  .vision-mission-grid,
  .objectives-grid,
  .students-grid,
  .split-grid,
  .resume-grid,
  .books-grid,
  .video-grid,
  .article-grid,
  .insights-grid,
  .news-grid,
  .managed-library-grid,
  .academic-documents-grid,
  .footer-content,
  .custom-block.cards {
    grid-template-columns: minmax(0,1fr) !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .vision-mission-grid > *,
  .objectives-grid > *,
  .students-grid > *,
  .split-grid > *,
  .resume-grid > *,
  .books-grid > *,
  .video-grid > *,
  .article-grid > *,
  .insights-grid > *,
  .news-grid > *,
  .managed-library-grid > *,
  .academic-documents-grid > * { min-width:0 !important; max-width:100% !important; }

  .contact-pair { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px !important; width:100% !important; }
  .contact-pair input { width:100% !important; min-width:0 !important; }
  .urgency-options { display:flex !important; flex-wrap:wrap !important; width:100% !important; }
  .urgency-options label { width:auto !important; min-width:0 !important; }
  .urgency-options input,
  input[type="radio"], input[type="checkbox"] { width:auto !important; min-width:auto !important; }

  .consultation-form-container,
  .consultation-form,
  .form-group,
  .form-container,
  .about-us-wrapper,
  .cv-container,
  .cv-content-area,
  .content-box,
  .research-item,
  .book-card,
  .video-card,
  .article-card,
  .gallery-item,
  .insight-card,
  .news-card,
  .faq-list,
  .academic-documents-block,
  .custom-section-public,
  .custom-section-inner { min-width:0 !important; max-width:100% !important; }

  .main-header, .hero-section, .news-ticker, .site-footer {
    background-color:#F2E6D0 !important;
    background-image:linear-gradient(#F2E6D0,#F2E6D0) !important;
  }
  .cv-section, .students-section, .library-section, .consultations-section,
  .insights-section, .news-section, .faq-section, .academic-hub,
  .media-gallery-section, .community-supervision-section, .custom-section-public {
    background-color:#F8F1E3 !important;
    background-image:linear-gradient(#F8F1E3,#F8F1E3) !important;
  }
  .about-us-wrapper, .resume-card, .content-box, .book-card, .research-item,
  .consultation-form, .insight-card, .news-card, .faq-list details,
  .video-card, .article-card, .gallery-item, .cv-container, .cv-content-area,
  .academic-documents-block, .academic-document-card, .custom-card {
    background-color:#FFFDF8 !important;
    background-image:linear-gradient(#FFFDF8,#FFFDF8) !important;
  }

  /* OEM auto-dark resistant text paints. */
  body, p, li, label, input, select, textarea, summary, .hero-description,
  .logo-sub, .footer-contact, .footer-info, .research-details p, .book-info p {
    color:#2A2421 !important;
    -webkit-text-fill-color:#2A2421 !important;
  }
  h2, h3, h4, .highlight-gold, .badge, .logo-text, .eyebrow,
  .content-tag, .ticker-title, .gallery-overlay, .media-archive-heading h3 {
    color:#C5A059 !important;
    -webkit-text-fill-color:#C5A059 !important;
  }
  .btn-small, .submit-btn, #consultSubmit, .btn-primary-gold {
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
  }

  /* Do not let animated/internal strips establish page-wide scroll width. */
  .ticker-wrapper, .ticker-content, .news-ticker, .swiper, .swiper-wrapper,
  .search-results { max-width:100% !important; }
  .ticker-content { min-width:0 !important; }
  .ticker-text { max-width:none !important; }
  .swiper { overflow:hidden !important; }
  .cv-tabs { overscroll-behavior-inline:contain; }

  /* Mobile header is a real two-row layout, no off-canvas width. */
  .navbar { max-width:100% !important; overflow:visible !important; }
  .nav-actions { max-width:100% !important; }
  .search-box { margin-left:0 !important; }
  .search-results { width:calc(100vw - 28px) !important; max-width:420px !important; }
}

/* Horizontal gesture policy: the public site has no page-wide horizontal navigation. */
@media (max-width: 900px) {
  html, body { overscroll-behavior-x: none; }
  body { touch-action: pan-y pinch-zoom; }
}


/* ===== Mobile root fix v4 — 2026-09-06 =====
   1) Chrome/OEM Auto Dark: advertise dark support, then intentionally paint the
      exact same brand palette in dark preference. This prevents forced recoloring.
   2) Header: deterministic grid rows; no flex auto-margin can push the logo off-screen.
   3) Page start/gestures: no horizontal page pan and no pinch zoom on public pages.
*/
:root {
  color-scheme: only light !important;
}
html, body {
  inline-size: 100%;
  max-inline-size: 100%;
}
input, select, textarea, button {
  color-scheme: light !important;
}

/* Same visual identity in OS light and dark modes. Declaring dark support above
   prevents Chrome's automatic color inversion; these rules own the dark rendering. */
@media (prefers-color-scheme: dark) {
  :root {
    --royal-blue:#F2E6D0 !important;
    --gold:#C5A059 !important;
    --gold-hover:#A07D45 !important;
    --ivory:#F8F1E3 !important;
    --text-dark:#2A2421 !important;
    --text-light:#2A2421 !important;
    --dark-blue:#2A2421 !important;
    color-scheme: only light !important;
  }
  html, body { background:#F8F1E3 !important; color:#2A2421 !important; }
  .main-header, .hero-section, .news-ticker, .site-footer,
  .nav-links.mobile-open { background:#F2E6D0 !important; color:#2A2421 !important; }
  .cv-section, .students-section, .library-section, .consultations-section,
  .insights-section, .news-section, .faq-section, .academic-hub,
  .media-gallery-section, .community-supervision-section, .custom-section-public {
    background:#F8F1E3 !important; color:#2A2421 !important;
  }
  .about-us-wrapper, .resume-card, .content-box, .book-card, .research-item,
  .consultation-form, .insight-card, .news-card, .faq-list details, .video-card,
  .article-card, .gallery-item, .cv-container, .cv-content-area,
  .academic-documents-block, .academic-document-card, .custom-card,
  .search-results, .search-result-item, input, select, textarea {
    background:#FFFDF8 !important; color:#2A2421 !important;
  }
  body, p, li, label, summary, .hero-description, .logo-sub, .footer-contact,
  .footer-info, .research-details p, .book-info p, input, select, textarea {
    color:#2A2421 !important; -webkit-text-fill-color:#2A2421 !important;
  }
  h2, h3, h4, .highlight-gold, .badge, .logo-text, .eyebrow, .content-tag,
  .ticker-title { color:#C5A059 !important; -webkit-text-fill-color:#C5A059 !important; }
  .btn-small, .submit-btn, #consultSubmit, .btn-primary-gold {
    background:#C5A059 !important; color:#fff !important; -webkit-text-fill-color:#fff !important;
  }
}

@media (max-width: 900px) {
  /* A real two/three-row header. Direction-safe placement prevents the RTL logo
     from starting outside the visual viewport. */
  .main-header { overflow:visible !important; }
  .main-header .navbar.container {
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    grid-template-rows:auto auto auto !important;
    align-items:center !important;
    column-gap:10px !important;
    row-gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    padding:10px max(12px, env(safe-area-inset-right)) 9px max(12px, env(safe-area-inset-left)) !important;
    margin:0 !important;
  }
  .logo {
    grid-column:2 !important;
    grid-row:1 !important;
    justify-self:end !important;
    align-self:center !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    text-align:right !important;
    overflow:visible !important;
  }
  .logo-text,.logo-sub {
    display:block !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }
  .logo-text { font-size:1rem !important; line-height:1.25 !important; }
  .logo-sub { font-size:.68rem !important; line-height:1.35 !important; margin-top:2px !important; }
  .menu-toggle {
    grid-column:1 !important;
    grid-row:1 !important;
    justify-self:start !important;
    align-self:center !important;
    margin:0 !important;
    width:40px !important;
    height:40px !important;
    padding:7px !important;
  }
  .nav-actions {
    grid-column:1 / -1 !important;
    grid-row:2 / span 2 !important;
    display:contents !important;
  }
  .lang-switch {
    grid-column:1 !important;
    grid-row:2 !important;
    justify-self:end !important;
    width:42px !important;
    min-width:42px !important;
    height:38px !important;
    min-height:38px !important;
    padding:4px 6px !important;
    font-size:.82rem !important;
    border-radius:8px !important;
  }
  .nav-actions > .btn-small {
    grid-column:2 !important;
    grid-row:2 !important;
    justify-self:start !important;
    width:auto !important;
    max-width:150px !important;
    min-height:38px !important;
    padding:7px 12px !important;
    font-size:.82rem !important;
    line-height:1.2 !important;
    border-radius:8px !important;
    white-space:nowrap !important;
  }
  .search-box {
    grid-column:1 / -1 !important;
    grid-row:3 !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
  }
  .search-box input { min-height:38px !important; }
  .nav-links.mobile-open {
    inset-inline:0 !important;
    top:100% !important;
    width:100% !important;
    max-width:100% !important;
  }

  /* Vertical-only page gesture. Horizontal carousels remain internally controlled
     by their own components; the document itself never pans sideways. */
  html, body {
    overflow-x:clip !important;
    overscroll-behavior-x:none !important;
    touch-action:pan-y !important;
  }
  body { position:relative !important; }
  .swiper, .swiper-wrapper, .ticker-wrapper, .ticker-content { max-inline-size:100% !important; }
}

@media (max-width: 360px) {
  .main-header .navbar.container { grid-template-columns:40px minmax(0,1fr) !important; column-gap:7px !important; }
  .logo-text { font-size:.94rem !important; }
  .logo-sub { font-size:.62rem !important; }
  .lang-switch { width:38px !important; min-width:38px !important; font-size:.76rem !important; }
  .nav-actions > .btn-small { max-width:132px !important; padding-inline:9px !important; font-size:.76rem !important; }
}


/* ================= V6: Final single-theme policy =================
   The site intentionally uses one controlled light brand palette on every OS mode.
   This avoids browser/OEM auto-dark recoloring and removes the unreliable theme toggle.
*/
:root, html, body {
  color-scheme: only light !important;
  --royal-blue:#F2E6D0 !important;
  --gold:#C5A059 !important;
  --gold-hover:#A07D45 !important;
  --ivory:#F8F1E3 !important;
  --text-dark:#2A2421 !important;
  --text-light:#2A2421 !important;
  --dark-blue:#2A2421 !important;
}
html, body { background:#F8F1E3 !important; color:#2A2421 !important; }
.main-header, .hero-section, .news-ticker, .site-footer, .nav-links.mobile-open {
  background:#F2E6D0 !important; color:#2A2421 !important;
}
.cv-section, .students-section, .library-section, .consultations-section,
.insights-section, .news-section, .faq-section, .academic-hub,
.media-gallery-section, .community-supervision-section, .custom-section-public,
.en-section, .en-section.alt {
  background:#F8F1E3 !important; color:#2A2421 !important;
}
.about-us-wrapper, .resume-card, .content-box, .book-card, .research-item,
.consultation-form, .insight-card, .news-card, .faq-list details, .video-card,
.article-card, .gallery-item, .cv-container, .cv-content-area,
.academic-documents-block, .academic-document-card, .custom-card,
.search-results, .search-result-item, .managed-library-card, .en-card,
input, select, textarea {
  background:#FFFDF8 !important; color:#2A2421 !important;
}
body, p, li, label, summary, .hero-description, .logo-sub, .footer-contact,
.footer-info, .research-details p, .book-info p, input, select, textarea {
  color:#2A2421 !important; -webkit-text-fill-color:#2A2421 !important;
}
h1, h2, h3, h4, .highlight-gold, .badge, .logo-text, .eyebrow, .content-tag,
.ticker-title { -webkit-text-fill-color: currentColor; }
input, select, textarea, button { color-scheme: only light !important; }

/* Explicitly repeat the same palette under OS dark preference so browser engines
   never get an opportunity to synthesize a dark page. */
@media (prefers-color-scheme: dark) {
  :root, html, body { color-scheme: only light !important; }
  html, body { background:#F8F1E3 !important; color:#2A2421 !important; }
  .main-header, .hero-section, .news-ticker, .site-footer, .nav-links.mobile-open { background:#F2E6D0 !important; color:#2A2421 !important; }
}

/* Unknown covers retain their publication titles without an unrelated image. */
#library [hidden] { display:none !important; }
.book-cover-unavailable { min-height:260px; display:flex; align-items:center; justify-content:center; padding:24px; text-align:center; color:var(--text-dark); background:#FFFDF8; border-bottom:3px solid var(--gold); font-size:1rem; }
