/* ============================================================
   Ø¬Ø§Ù…Ø¹Ø© Ø§Ù„Ø²Ù‡Ø±Ø§Ø¡ (Ø¹Ù„ÙŠÙ‡Ø§ Ø§Ù„Ø³Ù„Ø§Ù…) Ù„Ù„Ø¨Ù†Ø§Øª - Main Stylesheet
   Colors from Logo:
     Primary (Teal):    #0d7a6e
     Dark (Navy):       #2b3a4a
     Light Teal:        #e6f4f2
     Accent:            #16a093
   ============================================================ */

/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary:       #0d7a6e;
    --primary-dark:  #095f56;
    --primary-light: #1aa396;
    --secondary:     #2b3a4a;
    --secondary-light:#3d5166;
    --accent:        #16a093;
    --light-bg:      #f4faf9;
    --light-teal:    #e6f4f2;
    --text-dark:     #1e2a35;
    --text-muted:    #6b7a8d;
    --white:         #ffffff;
    --border-color:  #dde8e6;
    --shadow-sm:     0 2px 12px rgba(13,122,110,0.08);
    --shadow-md:     0 8px 32px rgba(13,122,110,0.12);
    --shadow-lg:     0 16px 48px rgba(13,122,110,0.18);
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     22px;
    --transition:    all 0.3s ease;
    --font:          'Vazirmatn', sans-serif;
    /* Section headers (skew bar + teal title) */
    --section-header-title:     #1a5e5e;
    --section-header-bar:       #e8f0f0;
    --section-header-subtitle:  #718096;
}

/* ==================== BASE ==================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.7;
    font-size: 15px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
.hover-underline:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.section-padding { padding: 90px 0; }
.bg-light-custom { background: var(--light-bg); }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--light-bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ==================== SECTION HEADERS ==================== */
.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.35;
    margin-bottom: 12px;
}
.section-title span { color: var(--primary); }

.section-desc {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 580px;
    margin: 0 auto;
}

/* Teal title + skew highlight bar + grey subtitle (use .text-center on the block when needed) */
.section-header .section-title {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    position: relative;
    z-index: 0;
    max-width: 100%;
    margin-bottom: 14px;
    padding-inline: 1rem;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--section-header-title);
}

.section-header .section-title .section-title-icon {
    font-size: 0.88em;
    color: var(--primary);
    opacity: 0.92;
    flex-shrink: 0;
    line-height: 1;
    display: none;
}

.section-header .section-title::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 3px;
    background: #39676a;
    border-radius: 1px;
    background: linear-gradient(to right, rgba(57, 103, 106, 0) 0%, rgb(57 103 106 / 79%) 50%, rgba(57, 103, 106, 0) 100%);
}

.section-header .section-title span {
    color: var(--primary);
}

.section-header .section-desc {
    color: var(--section-header-subtitle);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 0;
}

/* ==================== BUTTONS ==================== */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 18px rgba(13,122,110,0.28);
}
.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(13,122,110,0.38);
}

.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    padding: 11px 28px;
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--primary);
    transition: var(--transition);
}
.btn-outline-custom:hover {
    background: var(--primary);
    color: var(--white);
}

/* ==================== TOP BAR ==================== */
.top-bar {
    background: var(--secondary);
    padding: 9px 0;
    font-size: 13px;
}

.top-bar-link {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}
.top-bar-link:hover { color: var(--accent); }
.top-bar-link i { color: #cfd2d6; font-size: 12px; }
.dir-ltr { direction: ltr; } /* أرقام وروابط تبقى LTR */

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    transition: var(--transition);
}
.social-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* زر اللغة + قائمة منسدلة (مثل alzahraa.edu.iq) */
.top-bar-lang-dropdown { position: relative; }
.top-bar-lang {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    color: rgba(255,255,255,0.95);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    /* border: 1px solid rgba(255,255,255,0.3); */
    text-decoration: none;
    background: rgba(255,255,255,0.06);
}
.top-bar-lang .fa-globe { color: #cfd2d6; }
.top-bar-lang:hover .fa-globe,
.top-bar-lang:focus .fa-globe { color: #cfd2d6; }
.top-bar-lang:hover,
.top-bar-lang:focus {
    color: var(--white);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.45);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.top-bar-lang::after { display: none; }
.top-bar-lang-chevron {
    font-size: 10px;
    opacity: 0.9;
    transition: transform var(--transition);
}
.top-bar-lang-dropdown.show .top-bar-lang-chevron { transform: rotate(180deg); }

/* تثبيت موضع القائمة أسفل الزر دائماً لتفادي قفز Popper (فوق ثم تحت) */
.top-bar-lang-dropdown .dropdown-menu.top-bar-lang-menu {
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    margin-top: 6px;
    inset: auto !important;
    z-index: 1111;
    min-width: 145px;
}
[dir="rtl"] .top-bar-lang-dropdown .dropdown-menu.top-bar-lang-menu {
    left: 0 !important;
    right: auto !important;
}

.top-bar-lang-menu {
    min-width: 140px;
    padding: 6px 0;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(43,58,74,0.15);
}
.top-bar-lang-option {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.top-bar-lang-option:hover { background: var(--light-bg); color: var(--secondary); }
.top-bar-lang-option.active {
    background: rgba(43, 58, 74, 0.08);
    /* color: var(--secondary); */
    font-weight: 600;
}
[dir="rtl"] .top-bar-lang-menu { text-align: right; }

/* ----- Faculty top bar: تسجيل الدخول / حساب المستخدم ----- */
.top-bar.top-bar-faculty {
    padding: 8px 0;
}

.top-bar-faculty-inner {
    min-height: 32px;
}

.top-bar-faculty-inner .top-bar-lang-dropdown {
    flex-shrink: 0;
}

.top-bar-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.top-bar-auth-link i {
    font-size: 12px;
    opacity: 0.95;
}

.top-bar-auth-link--login {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.top-bar-auth-link--login:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.top-bar-auth-link--register {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 1px solid transparent;
    box-shadow: 0 2px 10px rgba(13, 122, 110, 0.35);
}

.top-bar-auth-link--register:hover {
    color: var(--white);
    filter: brightness(1.06);
    box-shadow: 0 4px 14px rgba(13, 122, 110, 0.45);
}

.top-bar-user-dropdown {
    position: relative;
}

.top-bar-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(100%, 280px);
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.top-bar-user-toggle:hover,
.top-bar-user-toggle:focus,
.top-bar-user-dropdown.show .top-bar-user-toggle {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
    outline: none;
}

.top-bar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.top-bar-user-name {
    flex: 1;
    min-width: 0;
    text-align: start;
}

.top-bar-user-chevron {
    font-size: 10px;
    opacity: 0.85;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.top-bar-user-dropdown.show .top-bar-user-chevron {
    transform: rotate(180deg);
}

.top-bar-user-dropdown .dropdown-menu.top-bar-user-menu {
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    margin-top: 8px;
    min-width: 220px;
    padding: 8px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1111;
}

[dir="rtl"] .top-bar-user-dropdown .dropdown-menu.top-bar-user-menu {
    left: 0 !important;
    right: auto !important;
}

.top-bar-user-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.top-bar-user-menu-link i {
    width: 1.1rem;
    text-align: center;
    color: var(--primary);
}

.top-bar-user-menu-link--danger {
    color: #c0392b;
}

.top-bar-user-menu-link--danger i {
    color: #c0392b;
}

.top-bar-user-menu-link:hover {
    background: var(--light-bg);
    color: var(--secondary);
}

.top-bar-user-menu-link--danger:hover {
    background: rgba(192, 57, 43, 0.08);
    color: #a93226;
}

/* ==================== NAVBAR ==================== */
.main-navbar {
    background: var(--white);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(43,58,74,0.08);
    transition: var(--transition);
    z-index: 1000;
}

.main-navbar.scrolled {
    padding: 8px 0;
    box-shadow: 0 4px 30px rgba(43,58,74,0.14);
}

.navbar-logo {
    height: 81px;
    width: auto;
    transition: var(--transition);
}
.main-navbar.scrolled .navbar-logo { height: 45px; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    margin-top: 6px;
}
.brand-name {
    font-size: 23px;
    font-weight: 800;
    color: var(--secondary);
}
.brand-sub {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    margin-top: 3px;
}

/* شريط اللوجو والبوابة (أعلى) */
.navbar-brand-bar {
    background: rgba(14, 102, 98, 0.03);
}
.navbar-brand-bar .navbar-collapse {
    justify-content: flex-end;
}

/* شريط القائمة (تحت اللوجو) - متوافق RTL و LTR */
[dir="rtl"] .navbar-menu-bar {
    background: linear-gradient(to left, rgb(57, 103, 106) 30%, rgb(43, 58, 74) 100%);
}
[dir="ltr"] .navbar-menu-bar {
    background: linear-gradient(to right, rgb(57, 103, 106) 30%, rgb(43, 58, 74) 100%);
}
.navbar-menu-bar .navbar-nav {
    margin-inline-end: auto;
}

.main-navbar .nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary);
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    color: #fff;
}
.main-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    inset-inline: 14px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #fff;
}
.main-navbar .nav-link:hover::after,
.main-navbar .nav-link.active::after {
    transform: scaleX(1);
    background: var(--accent);
}

/* التبويبات ذات القوائم الفرعية: سهم صغير + خط التحت الرقيق */
.main-navbar .nav-link.dropdown-toggle {
    padding-inline-end: 22px !important;
}
.main-navbar .nav-link.dropdown-toggle::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    transition: var(--transition);
}
.main-navbar .nav-link.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 4px;
    inset-inline: 14px;
    height: 2px;
    background: var(--accent);
    border: none;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s;
    vertical-align: unset;
    margin: 0;
    width: auto;
    opacity: 1;
}
.main-navbar .nav-link.dropdown-toggle:hover::after,
.main-navbar .nav-link.dropdown-toggle.show::after {
    transform: scaleX(1);
}
.main-navbar .nav-link.dropdown-toggle:hover::before,
.main-navbar .nav-link.dropdown-toggle.show::before {
    opacity: 1;
}

/* زر اللغة (AR | EN) بجانب البحث */
.nav-link-lang {
    padding: 8px 12px !important;
    color: #fff;
    flex-shrink: 0;
    margin-inline-start: 0.5rem;
    font-size: 14px;
    font-weight: 600;
}
.nav-link-lang::after {
    display: none !important;
}
.nav-link-lang:hover {
    opacity: 0.9;
    color: #fff;
}

/* أيقونة البحث في الهيدر (أقصى اليسار في RTL) */
.navbar-search-link {
    padding: 8px 12px !important;
    color: #fff;
    flex-shrink: 0;
    margin-inline-start: 0.5rem;
}
.navbar-search-link::after {
    display: none !important;
}
.nav-link-search i,
.navbar-search-link i {
    font-size: 1.1rem;
}
.nav-link-search:hover,
.navbar-search-link:hover {
    opacity: 0.9;
    color: #fff;
}
.navbar-menu-bar .navbar-collapse {
    flex-wrap: wrap;
}

/* Dropdown */
.dropdown-menu {
    background: #2B3A4A;
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: 3px;
    padding: 0px;
    min-width: 200px;
    animation: dropDown 0.2s ease;
}
@keyframes dropDown {
    from { opacity:0; transform: translateY(-8px); }
    to   { opacity:1; transform: translateY(0); }
}
.dropdown-item {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    border-radius: 3px;
    padding: 11px 14px;
    transition: var(--transition);
}

.navbar-menu-bar .dropdown-item {
    min-width: 240px;
    white-space: normal;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

/* Submenu (قائمة فرعية داخل القائمة) - تدعم RTL / LTR وغير محدودة التداخل */
.dropdown-submenu {
    position: relative;
}

[dir="rtl"] .dropdown-submenu > .dropdown-menu {
    top: 0;
    right: 100%;
    left: auto;
    margin-top: 0;
    margin-right: 0;
}

[dir="ltr"] .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    right: auto;
    margin-top: 0;
    margin-left: 0;
}

/* سهم صغير واحد فقط لعناصر القائمة التي تحتوي على قائمة فرعية (إلغاء سهم Bootstrap) */
.dropdown-menu .dropdown-toggle {
    position: relative;
    padding-inline-end: 26px;
}
.dropdown-menu .dropdown-toggle::after {
    display: none !important;
}

[dir="rtl"] .dropdown-menu .dropdown-toggle::before,
[dir="ltr"] .dropdown-menu .dropdown-toggle::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    transition: var(--transition);
}

[dir="rtl"] .dropdown-menu .dropdown-toggle::before {
    content: '\f104'; /* سهم لليسار يشير لافتتاح القائمة الفرعية */
    inset-inline-end: 10px;
}

[dir="ltr"] .dropdown-menu .dropdown-toggle::before {
    content: '\f105'; /* سهم لليمين يشير لافتتاح القائمة الفرعية */
    inset-inline-end: 10px;
}

.dropdown-menu .dropdown-toggle:hover::before,
.dropdown-menu .dropdown-toggle.show::before {
    opacity: 1;
}

.btn-portal {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white) !important;
    padding: 9px 22px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    box-shadow: 0 3px 14px rgba(13,122,110,0.25);
}
.btn-portal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(13,122,110,0.35);
    color: var(--white) !important;
}

/* تلميح زر البوابة الإلكترونية */
.tooltip.btn-portal-tooltip .tooltip-inner {
    max-width: 280px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    line-height: 1.45;
    background: #2b3a4a;
    box-shadow: var(--shadow-md);
}
.tooltip.btn-portal-tooltip .tooltip-arrow::before {
    border-top-color: #2b3a4a;
}

/* Toggler */
.navbar-toggler {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230d7a6e' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==================== CAROUSEL – ارتفاع ثابت ==================== */

#carouselLatestNews {
    height: 540px;
}
#carouselLatestNews .carousel-inner,
#carouselLatestNews .carousel-item {
    height: 100%;
}
#carouselLatestNews .carousel-item {
    position: relative;
}
#carouselLatestNews .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
/* خلفية سوداء شفافة (تدرج) فوق الصور لتحسين قراءة النص */
#carouselLatestNews .carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 45%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}
#carouselLatestNews .carousel-caption {
    z-index: 2;
}

#carouselLatestNews .carousel-caption h5:hover {
    text-decoration: underline;
}

#carouselLatestNews .carousel-caption p {
    color: #ffffffba;
}

@media (max-width: 767px) {
    #carouselLatestNews { height: 380px; }
}

/* ==================== Swiper – إصلاح الارتفاع الزائد ====================
 * المكتبة قد تمنح .swiper-wrapper ارتفاعاً محسوباً كبيراً؛ للتمرير الأفقي يكفي
 * أن يكون ارتفاع الـ wrapper تلقائياً حسب المحتوى.
 */
.swiper-wrapper {
    height: auto;
}

/* ==================== QUICK LINKS – كروت متحركة بعرض الصفحة ==================== */
.quick-links-section {
    padding: 65px 0 65px;
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: hidden;
}


.quick-links-inner {
    position: relative;
    width: 100%;
    padding: 0 24px;
}

.quick-links-swiper {
    width: 100%;
    overflow: visible;
}

.quick-links-swiper .swiper-wrapper {
    align-items: stretch;
}

.quick-links-swiper .swiper-slide {
    width: auto;
    min-width: 200px;
    max-width: 260px;
    height: auto;
    display: flex;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px 24px;
    width: 100%;
    min-height: 170px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    color: var(--secondary);
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-decoration: none;
    cursor: grab;
    user-select: none;
}

.quick-link-card:active {
    cursor: grabbing;
}

.quick-link-card:hover {
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.ql-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--light-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--primary);
    transition: var(--transition);
}

.quick-link-card:hover .ql-icon {
    background: var(--primary);
    color: var(--white);
}

@media (max-width: 767px) {
    .quick-links-inner { padding: 0 16px; }
    .quick-links-swiper .swiper-slide { min-width: 170px; max-width: 200px; }
    .quick-link-card { padding: 22px 20px; min-height: 150px; font-size: 14px; gap: 12px; }
    .ql-icon { width: 56px; height: 56px; font-size: 22px; }
}

/* ==================== STATS ==================== */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--secondary) 0%, #1a2a3a 100%);
    position: relative;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(13,122,110,0.3) 0%, transparent 70%);
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
    position: relative;
}

.stat-icon {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 14px;
    opacity: 0.85;
}

.stat-number {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
}

/* ==================== PRESIDENT WORD ==================== */


.president-word-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.president-photo {
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    border: 3px solid rgba(13,122,110,0.14);
    box-shadow: 0 10px 24px rgba(13,122,110,0.16);
    background: #f4fbf9;
    padding: 6px;
}

.president-info {
    margin-top: 12px;
}

.president-name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
}

.president-title {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.president-word-excerpt {
    color: var(--text-muted);
    font-size: 15.5px;
    line-height: 1.9;
    text-align: justify;
    margin-bottom: 16px;
}

.president-word-btn {
    display: inline-flex;
    align-items: center;
}

.president-word-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.president-academic-btn {
    display: inline-flex;
    align-items: center;
}

.president-profile-link-wrap {
    display: flex;
    justify-content: center;
}

.president-profile-link-wrap {
    display: flex;
    justify-content: center;
}

/* ==================== COLLEGE OVERVIEW SHOWCASE (بديل Tabs) ==================== */
.college-overview-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 12%, rgba(13, 122, 110, 0.08), transparent 32%),
        radial-gradient(circle at 88% 86%, rgba(15, 140, 128, 0.1), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfa 46%, #ffffff 100%);
}

.college-overview-showcase {
    display: grid;
    gap: clamp(1.15rem, 2vw, 1.7rem);
}

.overview-stack {
    display: grid;
    gap: 1rem;
}

.overview-pill-card {
    --ov-accent: #0d7a6e;
    position: relative;
    height: 100%;
    background: #ffffff;
    border: 1px solid rgba(13, 122, 110, 0.16);
    border-radius: 18px;
    padding: 1rem 1rem 1.05rem;
    box-shadow: 0 12px 28px rgba(10, 96, 86, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.overview-pill-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--ov-accent), rgba(13, 122, 110, 0.15));
}

.overview-pill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px rgba(10, 96, 86, 0.14);
    border-color: rgba(13, 122, 110, 0.28);
}

.overview-pill-card__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.overview-pill-card__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--ov-accent);
    background: rgba(13, 122, 110, 0.1);
    border: 1px solid rgba(13, 122, 110, 0.16);
}

.overview-pill-card__title {
    margin: 0;
    font-size: 1.02rem;
    color: var(--secondary);
    font-weight: 800;
    line-height: 1.5;
}

.overview-pill-card__content {
    color: #4b6863;
    line-height: 1.95;
    font-size: 0.95rem;
}

.overview-pill-card--vision {
    --ov-accent: #0d7a6e;
}

@media (min-width: 992px) {
    .overview-pill-card__content {
        margin-inline-start: calc(40px + 0.65rem);
    }
}

@media (max-width: 767.98px) {
    .overview-pill-card {
        border-radius: 14px;
    }
}

/* ==================== LEADERSHIP MESSAGE (عميد / رئيس قسم علمي — قابل لإعادة الاستخدام) ==================== */
.leadership-message-section {
    --lm-accent: var(--primary);
    --lm-accent-soft: rgba(13, 122, 110, 0.12);
    position: relative;
    overflow: hidden;
    /* background: linear-gradient(180deg, var(--white) 0%, var(--light-bg) 42%, var(--white) 100%); */
}

.leadership-message-section--scientific {
    --lm-accent: var(--accent);
    --lm-accent-soft: rgba(22, 160, 147, 0.14);
}

.leadership-message-section-header .section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 0;
}

.leadership-message-section-header .line {
    position: relative;
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 28px;
    padding-bottom: 8px;
}

.leadership-message-section-header .line::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 50%;
    width: min(280px, 70%);
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
    pointer-events: none;
}

.leadership-message-header-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 1.15rem;
    color: var(--lm-accent);
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--light-teal);
}

.leadership-message-layout {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.75rem);
    align-items: stretch;
    margin-inline: auto;
}

.leadership-message-aside {
    display: flex;
    justify-content: center;
}

@media (min-width: 992px) {
    .leadership-message-aside {
        justify-content: flex-end;
    }
    [dir='rtl'] .leadership-message-aside {
        justify-content: flex-start;
    }
}

.leadership-message-profile-card {
    width: 100%;
    max-width: 320px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    text-align: center;
    transition: var(--transition);
}

.leadership-message-profile-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 122, 110, 0.22);
}

.leadership-message-section--scientific .leadership-message-profile-card:hover {
    border-color: rgba(22, 160, 147, 0.28);
}

.leadership-message-photo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.leadership-message-photo-frame {
    border-radius: var(--radius-md);
    padding: 5px;
    background: linear-gradient(145deg, var(--light-teal), var(--white));
    box-shadow: 0 10px 28px var(--lm-accent-soft);
}

.leadership-message-photo {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: calc(var(--radius-md) - 3px);
    background: var(--light-bg);
}

.leadership-message-badge {
    position: absolute;
    bottom: -6px;
    inset-inline-end: -6px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    background: linear-gradient(135deg, var(--lm-accent), var(--primary-dark));
    box-shadow: 0 6px 18px rgba(13, 122, 110, 0.35);
    border: 3px solid var(--white);
}

.leadership-message-section--scientific .leadership-message-badge {
    box-shadow: 0 6px 18px rgba(22, 160, 147, 0.35);
}

.leadership-message-name {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.35;
}

.leadership-message-role {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.leadership-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.leadership-message-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--lm-accent);
    border: 2px solid var(--light-teal);
    background: var(--white);
    transition: var(--transition);
}

.leadership-message-icon-btn:hover {
    background: var(--light-teal);
    color: var(--primary-dark);
}

.leadership-message-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--lm-accent), var(--primary-dark));
    box-shadow: 0 4px 16px var(--lm-accent-soft);
}

.leadership-message-profile-btn:hover {
    color: var(--white);
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.leadership-message-main {
    min-width: 0;
}

.leadership-message-article {
    position: relative;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.35rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
    overflow: hidden;
}

.leadership-message-article::before {
    content: '\f10e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0.65rem;
    inset-inline-end: 1rem;
    font-size: clamp(2.5rem, 6vw, 3.25rem);
    color: var(--lm-accent-soft);
    line-height: 1;
    pointer-events: none;
}

.leadership-message-article-inner {
    position: relative;
    z-index: 1;
}

.leadership-message-greeting {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: var(--secondary);
}

.leadership-message-body {
    margin: 0 0 1.25rem;
    color: var(--text-dark);
    font-size: 1.02rem;
    line-height: 1.9;
    text-align: start;
}

.leadership-message-wishes {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.85;
    font-style: italic;
    text-align: start;
}

.leadership-message-signature {
    text-align: start;
    margin-top: 0.5rem;
}

.leadership-message-signature-line {
    width: 56px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 0.65rem;
    background: linear-gradient(90deg, var(--lm-accent), var(--accent));
}

.leadership-message-signature-name {
    margin: 0 0 0.2rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--secondary);
}

.leadership-message-signature-title {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.leadership-message-quote {
    position: absolute;
    z-index: 0;
    font-size: 1.35rem;
    color: rgba(13, 122, 110, 0.08);
    line-height: 1;
    pointer-events: none;
}

.leadership-message-section--scientific .leadership-message-quote {
    color: rgba(22, 160, 147, 0.1);
}

.leadership-message-quote--start {
    top: 0.85rem;
    inset-inline-start: 1rem;
}

.leadership-message-quote--end {
    bottom: 0.85rem;
    inset-inline-end: 1rem;
}

@media (max-width: 991px) {
    .leadership-message-layout {
        grid-template-columns: 1fr;
    }
    .leadership-message-aside {
        justify-content: center;
    }
    .leadership-message-profile-card {
        max-width: 360px;
    }
}

@media (max-width: 575px) {
    .leadership-message-photo {
        max-height: 240px;
    }
    .leadership-message-actions {
        flex-direction: column;
    }
    .leadership-message-profile-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== COLLEGES ==================== */
.college-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px 26px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.college-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    transition: height 0.4s ease;
    border-start-end-radius: var(--radius-lg);
}
.college-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.college-card:hover::before { height: 100%; }

/* حاوية لوجو الكلية */
.college-logo-wrap {
    width: 100%;
    min-height: 100px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    flex-shrink: 0;
}
.college-logo {
    max-width: 140px;
    max-height: 105px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}
.college-card:hover .college-logo {
    transform: scale(1.05);
}

.college-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.college-content h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
    text-align: center;
}
.college-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.7;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.college-content .college-link {
    margin-top: auto;
}

.college-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.college-meta span {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}
.college-meta span i { color: var(--primary); }

.college-link,
.ui-action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    background: var(--light-teal);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}
.college-link:hover,
.ui-action-link:hover {
    color: var(--white);
    background: var(--primary);
    gap: 12px;
}

.ui-action-link--fit {
    width: auto;
    display: inline-flex;
}

/* ==================== MODERN DEPARTMENTS ==================== */
.department-modern-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(145deg, var(--white) 0%, #f7fbfa 100%);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(11, 109, 91, 0.08);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.department-modern-card::before {
    content: "";
    position: absolute;
    top: -60px;
    inset-inline-end: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 109, 91, 0.15) 0%, rgba(11, 109, 91, 0) 72%);
    pointer-events: none;
}

.department-modern-card:hover {
    transform: translateY(-8px);
    border-color: rgba(11, 109, 91, 0.28);
    box-shadow: 0 18px 35px rgba(11, 109, 91, 0.14);
}

.department-modern-card__badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    box-shadow: 0 10px 20px rgba(11, 109, 91, 0.24);
}

.department-modern-card__content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.department-modern-card__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.department-modern-card__desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.department-modern-card__link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-radius: 14px;
    background: var(--light-teal);
    border: 1px solid transparent;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.department-modern-card__link:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    gap: 14px;
}

@media (max-width: 767px) {
    .department-modern-card {
        border-radius: 18px;
        padding: 18px;
    }

    .department-modern-card__title {
        font-size: 18px;
    }
}

.home-academic-departments-swiper .swiper-slide {
    height: auto;
}

.home-academic-departments-swiper .department-modern-card {
    margin: 2px;
}

/* ==================== UNIVERSITY RANKINGS ==================== */
.rankings-section {
    /* background: linear-gradient(180deg, #f9fcfb 0%, var(--white) 100%); */
}

.rankings-swiper .swiper-slide {
    height: auto;
}

.ranking-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.ranking-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.ranking-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.ranking-card-media {
    position: relative;
    overflow: hidden;
}

.ranking-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.ranking-card-media .ranking-year {
    position: absolute;
    top: 10px;
    background-color: rgba(0, 0, 0, 0.72);
    color: #fff;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ranking-year-ar {
    right: 10px;
}

.ranking-year-en {
    left: 10px;
}

.ranking-card-body {
    padding: 18px;
    text-align: center;
}

.ranking-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
}

.ranking-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.ranking-card-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    background: var(--light-teal);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

/* ==================== RANKING DETAIL PAGE ==================== */
.ranking-detail-page {
    background: linear-gradient(180deg, #f9fcfb 0%, var(--white) 28%);
}

.ranking-detail-hero {
    position: relative;
    padding: 28px 0 36px;
    overflow: hidden;
}

.ranking-detail-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 50% -20%, rgba(13, 122, 110, 0.14), transparent 55%),
        linear-gradient(180deg, rgba(240, 250, 248, 0.9) 0%, rgba(255, 255, 255, 0.96) 100%);
    pointer-events: none;
}

.ranking-detail-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: center;
}

@media (min-width: 768px) {
    .ranking-detail-head {
        grid-template-columns: minmax(200px, 280px) 1fr;
        gap: 2.25rem;
    }
}

.ranking-detail-head__media {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .ranking-detail-head__media {
        justify-content: flex-start;
    }
}

.ranking-detail-logo-frame {
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.25rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.ranking-detail-logo-frame img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ranking-detail-head__text {
    text-align: center;
}

@media (min-width: 768px) {
    .ranking-detail-head__text {
        text-align: start;
    }
}

.ranking-detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, rgba(13, 122, 110, 0.95), rgba(22, 160, 147, 0.95));
    box-shadow: 0 8px 20px rgba(13, 122, 110, 0.22);
    margin-bottom: 0.85rem;
}

.ranking-detail-title {
    font-size: clamp(1.45rem, 2.5vw, 2.05rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.35;
    margin: 0 0 1rem;
}

.ranking-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .ranking-detail-meta {
        justify-content: flex-start;
    }
}

.ranking-detail-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.ranking-detail-meta__item i {
    color: var(--accent);
    font-size: 14px;
}

.ranking-detail-body-section {
    padding-bottom: 3.5rem;
}

.ranking-detail-article {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.35rem, 3vw, 2.25rem);
}

.ranking-detail-lead + .ranking-detail-content {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
}

.ranking-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
    justify-content: center;
}

@media (min-width: 576px) {
    .ranking-detail-actions {
        justify-content: flex-start;
    }
}

.ranking-detail-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(13, 122, 110, 0.3);
}

.ranking-detail-actions .btn-primary:hover,
.ranking-detail-actions .btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-color: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 6px 22px rgba(13, 122, 110, 0.38);
}

.ranking-detail-actions .btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ranking-detail-actions .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--white);
    font-weight: 700;
}

.ranking-detail-actions .btn-outline-primary:hover,
.ranking-detail-actions .btn-outline-primary:focus {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.ranking-detail-actions .btn-light {
    background: var(--light-teal);
    border-color: var(--border-color);
    color: var(--secondary);
    font-weight: 700;
}

.ranking-detail-actions .btn-light:hover,
.ranking-detail-actions .btn-light:focus {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}

/* ==================== CATEGORY PAGE — NEWS CARDS ==================== */
.category-news-section {
    /* background: linear-gradient(180deg, var(--light-bg) 0%, var(--white) 42%); */
}

.category-search {
    max-width: 560px;
    margin-inline: auto;
}

.category-search__form .input-group {
    box-shadow: var(--shadow-sm);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--white);
    transition: var(--transition);
}

.category-search__form .input-group:focus-within {
    border-color: rgba(13, 122, 110, 0.45);
    box-shadow: 0 0 0 3px rgba(13, 122, 110, 0.12);
}

.category-search__form .form-control {
    border: none;
    padding: 14px 22px;
    height: 52px;
    font-size: 15px;
    background: transparent;
    box-shadow: none !important;
}

.category-search__form .form-control:focus {
    background: transparent;
}

.category-search__form .btn {
    border: none;
    border-radius: 0;
    padding: 0 22px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    font-weight: 600;
}

.category-search__form .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
}

[dir="rtl"] .category-search__form .input-group > .btn {
    border-radius: 999px 0 0 999px;
}

[dir="ltr"] .category-search__form .input-group > .btn {
    border-radius: 0 999px 999px 0;
}

[dir="rtl"] .category-search__form .form-control {
    border-radius: 0 999px 999px 0;
    text-align: right;
}

[dir="ltr"] .category-search__form .form-control {
    border-radius: 999px 0 0 999px;
    text-align: left;
}

.category-news-grid {
    --news-card-gap: 1.5rem;
}

.news-card--horizontal {
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card--horizontal:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(13, 122, 110, 0.28);
}

.news-card--horizontal .news-card__media,
.news-card__media--horizontal {
    position: relative;
    display: block;
    width: 42%;
    min-width: 42%;
    aspect-ratio: auto;
    overflow: hidden;
    background: linear-gradient(145deg, var(--light-teal), #eef8f6);
}

[dir="rtl"] .news-card--horizontal,
[dir="rtl"] .news-card--horizontal .news-card__media,
[dir="rtl"] .news-card__media--horizontal {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

[dir="ltr"] .news-card--horizontal,
[dir="ltr"] .news-card--horizontal .news-card__media,
[dir="ltr"] .news-card__media--horizontal {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.news-card--horizontal .news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-card--horizontal:hover .news-card__img {
    transform: scale(1.07);
}

.news-card--horizontal .news-card__media::after,
.news-card__media--horizontal::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(43, 58, 74, 0.62) 0%,
        transparent 55%
    );
    opacity: 0.75;
    transition: opacity 0.35s ease;
}

.news-card--horizontal:hover .news-card__media::after,
.news-card--horizontal:hover .news-card__media--horizontal::after {
    opacity: 0.95;
}

.news-card--horizontal .news-card__body,
.news-card__body--horizontal {
    width: 58%;
    padding: 1.1rem 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.45rem;
}

.news-card__badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--light-teal), #dff5f0);
    padding: 6px 13px;
    border-radius: 999px;
    line-height: 1.2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card__badge--over-media {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    margin: 0;
    box-shadow: 0 8px 18px rgba(43, 58, 74, 0.2);
    color: var(--white);
    background: linear-gradient(135deg, rgba(13, 122, 110, 0.96), rgba(22, 160, 147, 0.96));
}

[dir="rtl"] .news-card__badge--over-media {
    right: auto;
    left: 12px;
}

.news-card__title {
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 0;
}

.news-card__title a {
    color: inherit;
}

.news-card__title a:hover {
    color: var(--primary);
}

.news-card--horizontal .news-card__desc,
.news-card__desc--horizontal {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 14px;
    min-height: calc(1.75em * 3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card--horizontal .news-card__desc:empty,
.news-card__desc--horizontal:empty {
    display: block;
}

.news-card__footer {
    margin-top: auto;
    padding-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.news-card__meta time {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.news-card__meta i {
    color: var(--accent);
    font-size: 13px;
}

.news-card__views-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.news-card__views-inline i {
    font-size: 12px;
    color: var(--accent);
    color: #078073;
}

.category-news-pagination {
    margin-top: 2.5rem;
}

.category-news-pagination .pagination {
    justify-content: center;
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .news-card--horizontal {
        flex-direction: column;
    }
    .news-card--horizontal .news-card__media,
    .news-card__media--horizontal,
    .news-card--horizontal .news-card__body,
    .news-card__body--horizontal {
        width: 100%;
        min-width: 100%;
    }
    .news-card--horizontal .news-card__media,
    .news-card__media--horizontal {
        aspect-ratio: 16 / 10;
    }
    .news-card--horizontal .news-card__body,
    .news-card__body--horizontal {
        padding: 1.15rem 1.2rem 1.35rem;
    }
    .news-card__title {
        font-size: 1rem;
    }
}

/* ==================== POST SHOW PAGE ==================== */
.article-hero-section {
    position: relative;
    margin-top: 0;
}

.article-hero-image {
    min-height: 360px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 28, 41, 0.2) 0%, rgba(16, 28, 41, 0.85) 100%);
}

.article-hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 86px 0 48px;
    max-width: 860px;
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, rgba(13, 122, 110, 0.95), rgba(22, 160, 147, 0.95));
    box-shadow: 0 8px 20px rgba(13, 122, 110, 0.25);
}

.article-hero-title {
    margin: 16px 0 14px;
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    line-height: 1.45;
    font-weight: 800;
    color: var(--white);
}

.article-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
}

.article-hero-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 6px 12px;
}

.article-hero-meta .meta-item i {
    color: var(--accent);
}

.article-hero-meta .meta-divider {
    opacity: 0.45;
}

.post-show-page {
    background: linear-gradient(180deg, #f9fcfb 0%, var(--white) 35%);
}

.article-main-content {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.article-featured-image {
    position: relative;
    margin: 0;
    border-bottom: 1px solid #ebf2f0;
}

.article-featured-image a {
    display: block;
    position: relative;
}

.article-featured-image img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.featured-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(43, 58, 74, 0) 35%, rgba(43, 58, 74, 0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.featured-image-overlay i {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: rgba(13, 122, 110, 0.88);
    transform: translateY(8px);
    transition: var(--transition);
}

.article-featured-image a:hover .featured-image-overlay {
    opacity: 1;
}

.article-featured-image a:hover .featured-image-overlay i {
    transform: translateY(0);
}

.article-body {
    padding: 28px 30px 12px;
}

.article-body p,
.article-body li,
.article-body span {
    color: #334155;
    font-size: 16px;
    line-height: 2.02;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--secondary);
    margin: 1.3em 0 0.65em;
    font-weight: 800;
    line-height: 1.45;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem auto;
    display: block;
}

.article-gallery-section {
    padding: 14px 30px 24px;
}

.gallery-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 14px;
}

.article-gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid #e7efed;
    box-shadow: 0 3px 12px rgba(13, 122, 110, 0.08);
}

.article-gallery-item img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43, 58, 74, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item-overlay i {
    color: var(--white);
    font-size: 18px;
}

.article-gallery-item:hover img {
    transform: scale(1.08);
}

.article-gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.article-share-section,
.article-tags-section {
    margin: 8px 30px 24px;
    border: 1px solid #e7efed;
    border-radius: var(--radius-md);
    background: #fbfefd;
    padding: 16px;
}

.share-title,
.tags-section-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
}

.article-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    border: 1px solid #d8e8e4;
    background: var(--white);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #456;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
}

.share-btn:hover {
    border-color: rgba(13, 122, 110, 0.35);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.article-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--white);
    border: 1px solid #dceae6;
    color: #3e5a54;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.article-tag-item:hover {
    background: var(--light-teal);
    color: var(--primary-dark);
    border-color: #cde4dd;
}

.related-posts-section {
    margin-top: 0;
    width: 100%;
}

.related-posts-header {
    margin-bottom: 1rem;
}

.related-posts-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
}

.title-decoration {
    width: 70px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    margin-top: 0.4rem;
}

.related-post-link {
    text-decoration: none;
    color: inherit;
}

.related-post-card-new {
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: var(--transition);
}

.related-post-card-new:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.related-post-image-new {
    position: relative;
}

.related-post-image-new img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-post-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(43, 58, 74, 0.4);
    transition: var(--transition);
}

.related-post-overlay i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.related-post-card-new:hover .related-post-overlay {
    opacity: 1;
}

.related-post-content-new {
    padding: 12px;
}

.related-post-category-new {
    display: inline-flex;
    align-items: center;
    background: var(--light-teal);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
}

.related-post-title-new {
    margin: 10px 0 8px;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-date-new {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

@media (max-width: 991.98px) {
    .article-hero-image {
        min-height: 320px;
    }
    .article-body {
        padding: 22px 20px 8px;
    }
    .article-gallery-section {
        padding: 10px 20px 20px;
    }
    .article-share-section,
    .article-tags-section {
        margin: 8px 20px 20px;
    }
}

@media (max-width: 575.98px) {
    .article-hero-content {
        padding: 70px 0 34px;
    }
    .article-hero-meta .meta-divider {
        display: none;
    }
    .article-hero-meta {
        gap: 0.45rem;
    }
}

/* ==================== FLOATING EDIT (مسؤولو المحتوى) ==================== */
.floating-edit-btn {
    position: fixed;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    pointer-events: none;
}

.floating-edit-btn .edit-post-btn,
.floating-edit-btn .edit-page-btn {
    pointer-events: auto;
}

[dir="rtl"] .floating-edit-btn {
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: auto;
}

[dir="ltr"] .floating-edit-btn {
    right: max(1rem, env(safe-area-inset-right, 0px));
    left: auto;
}

.edit-post-btn,
.edit-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--white);
    background: linear-gradient(145deg, var(--primary), var(--primary-light));
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 10px 28px rgba(13, 122, 110, 0.42),
        0 0 0 1px rgba(13, 122, 110, 0.12);
    position: relative;
    overflow: visible;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.edit-post-btn:hover,
.edit-page-btn:hover {
    color: var(--white);
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 14px 36px rgba(13, 122, 110, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, var(--primary-dark), var(--primary));
}

.edit-post-btn:focus,
.edit-page-btn:focus {
    outline: none;
}

.edit-post-btn:focus-visible,
.edit-page-btn:focus-visible {
    outline: 3px solid rgba(22, 160, 147, 0.65);
    outline-offset: 4px;
}

.edit-post-btn i,
.edit-page-btn i {
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.edit-tooltip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* RTL: الزر غالبًا يسار الشاشة — التلميح يظهر يمين الزر نحو المحتوى */
[dir="rtl"] .edit-tooltip {
    left: calc(100% + 12px);
    right: auto;
}

/* LTR: الزر يمين الشاشة — التلميح يسار الزر */
[dir="ltr"] .edit-tooltip {
    right: calc(100% + 12px);
    left: auto;
}

.edit-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
}

[dir="rtl"] .edit-tooltip::after {
    right: 100%;
    left: auto;
    border-right-color: var(--secondary);
}

[dir="ltr"] .edit-tooltip::after {
    left: 100%;
    right: auto;
    border-left-color: var(--secondary);
}

.edit-post-btn:hover .edit-tooltip,
.edit-post-btn:focus-visible .edit-tooltip,
.edit-page-btn:hover .edit-tooltip,
.edit-page-btn:focus-visible .edit-tooltip {
    opacity: 1;
    visibility: visible;
}

[dir="rtl"] .edit-post-btn:hover .edit-tooltip,
[dir="rtl"] .edit-post-btn:focus-visible .edit-tooltip,
[dir="rtl"] .edit-page-btn:hover .edit-tooltip,
[dir="rtl"] .edit-page-btn:focus-visible .edit-tooltip {
    transform: translateY(-50%) translateX(4px);
}

[dir="ltr"] .edit-post-btn:hover .edit-tooltip,
[dir="ltr"] .edit-post-btn:focus-visible .edit-tooltip,
[dir="ltr"] .edit-page-btn:hover .edit-tooltip,
[dir="ltr"] .edit-page-btn:focus-visible .edit-tooltip {
    transform: translateY(-50%) translateX(-4px);
}

.edit-post-btn::before,
.edit-page-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--accent));
    z-index: -1;
    opacity: 0.45;
    animation: floatingEditPulse 2.2s ease-in-out infinite;
}

@keyframes floatingEditPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.45;
    }
    50% {
        transform: scale(1.12);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .edit-post-btn,
    .edit-page-btn,
    .edit-post-btn:hover,
    .edit-page-btn:hover,
    .edit-tooltip,
    .edit-post-btn:hover .edit-tooltip,
    .edit-post-btn:focus-visible .edit-tooltip,
    .edit-page-btn:hover .edit-tooltip,
    .edit-page-btn:focus-visible .edit-tooltip {
        transition: none;
        animation: none;
    }
    .edit-post-btn::before,
    .edit-page-btn::before {
        animation: none;
        opacity: 0;
    }
}

@media (max-width: 767.98px) {
    .edit-post-btn,
    .edit-page-btn {
        width: 50px;
        height: 50px;
    }
    .edit-post-btn i,
    .edit-page-btn i {
        font-size: 1.1rem;
    }
    .edit-tooltip {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .edit-post-btn,
    .edit-page-btn {
        width: 46px;
        height: 46px;
    }
}

/* ==================== GALLERY PAGE (معرض الصور / الفيديو) ==================== */
.gallery-page.gallery-categories-section {
    position: relative;
    padding: 56px 0 80px;
    overflow: hidden;
}

.gallery-page__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 122, 110, 0.14), transparent 55%),
        linear-gradient(180deg, #f9fcfb 0%, var(--white) 45%, #f4faf9 100%);
    z-index: 0;
}

.gallery-page .container {
    z-index: 1;
}

.gallery-category-card {
    display: block;
    height: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(13, 122, 110, 0.28);
}

.gallery-category-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, var(--light-teal), #eef8f6);
}

.gallery-category-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-category-card:hover .gallery-category-card__media img {
    transform: scale(1.08);
}

.gallery-category-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(43, 58, 74, 0.55) 0%,
        rgba(43, 58, 74, 0.12) 50%,
        transparent 100%
    );
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.gallery-category-card:hover .gallery-category-card__overlay {
    opacity: 0.9;
}

.gallery-category-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(145deg, rgba(13, 122, 110, 0.95), rgba(22, 160, 147, 0.95));
    box-shadow: 0 6px 16px rgba(13, 122, 110, 0.35);
    font-size: 15px;
    z-index: 2;
}

.gallery-category-card__caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 3;
    padding: 18px 14px 14px;
    background: linear-gradient(
        to top,
        rgba(22, 32, 44, 0.96) 0%,
        rgba(22, 32, 44, 0.72) 42%,
        rgba(22, 32, 44, 0) 100%
    );
}

.gallery-category-card__title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.45;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.gallery-category-card:hover .gallery-category-card__title {
    color: rgba(255, 255, 255, 0.98);
}

.gallery-category-card__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
}

.gallery-category-card__hint i {
    font-size: 10px;
    color: var(--accent);
    transition: transform 0.25s ease;
    display: inline-block;
}

.gallery-category-card:hover .gallery-category-card__hint i {
    transform: translateX(-4px);
}

[dir="ltr"] .gallery-category-card__hint i {
    transform: rotate(180deg);
}

[dir="ltr"] .gallery-category-card:hover .gallery-category-card__hint i {
    transform: rotate(180deg) translateX(-4px);
}

.gallery-page__empty {
    border-radius: var(--radius-md);
    padding: 2rem 1.25rem;
    background: var(--white);
}

@media (max-width: 575.98px) {
    .gallery-page.gallery-categories-section {
        padding: 40px 0 56px;
    }
    .gallery-category-card__badge {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* ==================== STATIC PAGE (عرض الصفحات الثابتة) a==================== */
.static-page {
    overflow-x: hidden;
}

.page-hero-section {
    position: relative;
    min-height: 300px;
    background-color: var(--secondary);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: stretch;
    background-attachment: fixed;
}

.page-hero-section.page-hero-section--no-banner {
    background-image: linear-gradient(
        135deg,
        var(--secondary) 0%,
        #1d2f3f 55%,
        rgba(13, 122, 110, 0.4) 100%
    );
}

.page-hero-overlay {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(16, 28, 41, 0.2) 0%, rgba(16, 28, 41, 0.9) 100%);
    background: linear-gradient(180deg, rgb(16 28 41 / 55%) 0%, rgba(16, 28, 41, 0.9) 100%);
}

.page-hero-content {
    padding: 20px 0;
    text-align: center;
    max-width: 920px;
    margin-inline: auto;
    color: var(--white);
}

.page-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.page-breadcrumb .breadcrumb-item,
.page-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 600;
}

.page-breadcrumb .breadcrumb-item a:hover {
    color: var(--white);
}

.page-breadcrumb .breadcrumb-item.active {
    color: var(--accent);
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.45);
}

.page-hero-title {
    margin: 0;
    font-size: clamp(1.55rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.4;
    color: var(--white);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.page-hero-meta {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 13px;
    font-weight: 600;
}

.page-hero-meta .meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.96);
}

.page-hero-meta .meta-item i {
    color: var(--accent);
}

.page-hero-meta .meta-divider {
    opacity: 0.4;
    color: var(--white);
}

.page-hero-meta .meta-item a {
    color: inherit;
}

.page-hero-meta .meta-item a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ==================== ADMINISTRATIVE UNIT SHOW PAGE ==================== */
.administrative-unit-page {
    overflow-x: hidden;
}

.administrative-unit-page .section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 0;
}

.administrative-unit-page .president-message-section {
    background: linear-gradient(180deg, var(--white) 0%, var(--light-bg) 42%, var(--white) 100%);
}

.administrative-unit-page .president-message-section .section-header .line i {
    background-color: var(--light-bg) !important;
}

.administrative-unit-page .manager-image-wrapper {
    display: inline-block;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(145deg, var(--light-teal), var(--white));
    box-shadow: var(--shadow-md);
}

.administrative-unit-page .manager-image-wrapper img {
    max-width: 170px;
    width: 100%;
    display: block;
    border: 3px solid var(--white);
}

.administrative-unit-page .president-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.35rem;
}

.administrative-unit-page .president-title {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 0;
}

.administrative-unit-page .president-message {
    margin-top: 0.5rem;
    padding: 1.75rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.administrative-unit-page .president-message::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -14px;
    inset-inline-end: 18px;
    font-size: 1.75rem;
    color: rgba(13, 122, 110, 0.12);
    line-height: 1;
}

.administrative-unit-page .manager-word-full {
    color: var(--text-dark);
    line-height: 1.85;
    text-align: start;
    font-size: 1.02rem;
}

.text-pre-wrap {
    white-space: pre-wrap;
}

/* Tabs + info cards (unit overview) */
.administrative-unit-page .college-overview-section {
    background: var(--white);
}

.administrative-unit-page .college-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: var(--white);
    border-radius: 60px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.administrative-unit-page .college-tabs-nav .nav-item {
    flex: 1;
    min-width: 140px;
}

.administrative-unit-page .college-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.administrative-unit-page .college-tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.administrative-unit-page .college-tab-btn:hover::before {
    opacity: 0.08;
}

.administrative-unit-page .college-tab-btn.active::before {
    opacity: 1;
}

.administrative-unit-page .college-tab-btn i,
.administrative-unit-page .college-tab-btn span {
    position: relative;
    z-index: 1;
}

.administrative-unit-page .college-tab-btn i {
    font-size: 22px;
    color: var(--primary);
    transition: var(--transition);
}

.administrative-unit-page .college-tab-btn:hover {
    transform: translateY(-2px);
    color: var(--primary-dark);
}

.administrative-unit-page .college-tab-btn.active {
    color: var(--white);
    box-shadow: 0 8px 22px rgba(13, 122, 110, 0.28);
}

.administrative-unit-page .college-tab-btn.active i {
    color: var(--white);
    transform: scale(1.08);
}

.administrative-unit-page .college-tab-content {
    animation: administrativeUnitTabFade 0.45s ease;
}

@keyframes administrativeUnitTabFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.administrative-unit-page .college-info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.administrative-unit-page .info-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 26px 32px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.administrative-unit-page .info-header-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.administrative-unit-page .info-header-icon i {
    font-size: 28px;
    color: var(--white);
}

.administrative-unit-page .info-card-title {
    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
    font-weight: 800;
    color: var(--white);
    margin: 0;
    line-height: 1.35;
}

.administrative-unit-page .info-card-body {
    padding: 32px 36px;
}

.administrative-unit-page .info-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-dark);
    text-align: start;
}

.administrative-unit-page .info-content a {
    color: var(--primary);
    text-decoration: underline;
}

.administrative-unit-page .info-content a:hover {
    color: var(--primary-dark);
}

.administrative-unit-page .gallery-section {
    background-color: var(--light-bg) !important;
}

.administrative-unit-page .videos-section {
    background-color: var(--white) !important;
}

.administrative-unit-news-section .section-desc {
    max-width: 640px;
}

@media (max-width: 767.98px) {
    .administrative-unit-page .college-tabs-nav {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .administrative-unit-page .college-tabs-nav .nav-item {
        width: 100%;
        min-width: auto;
    }

    .administrative-unit-page .college-tab-btn {
        flex-direction: row;
        justify-content: center;
        border-radius: var(--radius-md);
    }

    .administrative-unit-page .info-card-header {
        flex-direction: column;
        text-align: center;
        padding: 22px 20px;
    }

    .administrative-unit-page .info-card-body {
        padding: 24px 20px;
    }
}

.page-content-section {
    position: relative;
    padding: 48px 0 72px;
    background: linear-gradient(180deg, #f9fcfb 0%, var(--white) 28%);
}

.page-content-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-content-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
}

.page-content-bg-shapes .shape-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(13, 122, 110, 0.2), transparent 72%);
    top: -120px;
    inset-inline-end: -100px;
}

.page-content-bg-shapes .shape-2 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(43, 58, 74, 0.12), transparent 70%);
    bottom: 8%;
    inset-inline-start: -120px;
}

.page-content-bg-shapes .shape-3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(22, 160, 147, 0.22), transparent 72%);
    top: 38%;
    inset-inline-start: 12%;
}

.page-main-content {
    position: relative;
    z-index: 1;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-top: -40px;
}

.content-top-decoration,
.content-bottom-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 20px 0;
    background: linear-gradient(180deg, #f9fcfb, var(--white));
}

.content-bottom-decoration {
    padding: 0 20px 18px;
}

.decoration-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.9;
}

.decoration-line {
    flex: 1;
    max-width: 140px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

.page-content-body {
    padding: 0;
}

.page-content-body .content-wrapper {
    padding: 12px 18px 32px;
    max-width: 100%;
}

@media (min-width: 768px) {
    .page-content-body .content-wrapper {
        padding: 16px 32px 40px;
    }
}

.page-content-body .content-wrapper > *:first-child {
    margin-top: 0;
}

.page-content-body p,
.page-content-body li {
    font-size: 16px;
    line-height: 2.02;
    color: #334155;
}

.page-content-body h2,
.page-content-body h3,
.page-content-body h4 {
    color: var(--secondary);
    font-weight: 800;
    margin: 1.35em 0 0.65em;
    line-height: 1.45;
}

.page-content-body ul,
.page-content-body ol {
    padding-inline-start: 1.35rem;
}

.page-content-body blockquote {
    margin: 1.25rem 0;
    padding: 16px 20px;
    border-inline-start: 4px solid var(--primary);
    background: var(--light-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--secondary);
    font-weight: 500;
}

.page-content-body table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.page-content-body th,
.page-content-body td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.page-content-body th {
    background: var(--light-teal);
    color: var(--secondary);
    font-weight: 700;
}

.page-content-body tr:last-child td {
    border-bottom: none;
}

.page-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.page-content-body a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-content-body a:hover {
    color: var(--primary-dark);
}

.page-share-section {
    padding: 8px 18px 28px;
}

@media (min-width: 768px) {
    .page-share-section {
        padding: 8px 28px 36px;
    }
}

.page-share-section .share-container {
    border: 1px solid #e7efed;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fdfefe, #f4faf9);
    padding: 20px 20px 18px;
}

.page-share-section .share-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.page-share-section .share-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--primary), var(--primary-light));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(13, 122, 110, 0.3);
}

.page-share-section .share-text-wrapper {
    min-width: 0;
}

.page-share-section .share-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
}

.page-share-section .share-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.55;
}

.page-share-section .page-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 575.98px) {
    .page-hero-section {
        min-height: 260px;
    }
    .page-hero-content {
        padding: 32px 0 40px;
    }
    .page-main-content {
        margin-top: -28px;
    }
    .page-hero-meta .meta-divider {
        display: none;
    }
}

/* ==================== SIDEBAR WIDGETS (آخر الأخبار، التصنيفات، الوسوم) ==================== */
.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    margin: 0;
    padding: 16px 18px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
    background: linear-gradient(180deg, #f9fcfb 0%, #ffffff 100%);
    border-bottom: 1px solid #e8f0ed;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.widget-title i {
    color: var(--primary);
    font-size: 1.05rem;
    opacity: 0.95;
}

/* —— آخر الأخبار —— */
.recent-posts-list {
    list-style: none;
    margin: 0;
    padding: 6px 10px 12px;
}

.recent-post-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.recent-post-item + .recent-post-item {
    border-top: 1px solid #f0f5f3;
}

.recent-post-item:hover {
    background: var(--light-bg);
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 88px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #e7efec;
    background: linear-gradient(145deg, var(--light-teal), #eef8f6);
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.recent-post-item:hover .recent-post-thumb img {
    transform: scale(1.06);
}

.recent-post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-post-title {
    margin: 0;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--secondary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-title:hover {
    color: var(--primary);
}

.recent-post-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    color: #4f6275;
    padding: 5px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f4fbf9, #e9f6f2);
    border: 1px solid #d8ece6;
    box-shadow: 0 2px 8px rgba(13, 122, 110, 0.06);
}

.recent-post-date i {
    color: var(--accent);
    font-size: 11px;
}

/* —— التصنيفات —— */
.category-list {
    list-style: none;
    margin: 0;
    padding: 6px 8px 12px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 11px 10px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid #f0f5f3;
    transition: background 0.2s ease;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    background: var(--light-bg);
}

.category-item a {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
}

.category-item a:hover {
    color: var(--primary);
}

.category-count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--light-teal);
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.2;
}

/* —— الوسوم —— */
.tag-cloud {
    padding: 12px 14px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f4faf9;
    border: 1px solid #dceae6;
    color: #3e5a54;
    text-decoration: none;
    transition: var(--transition);
}

.tag-item:hover {
    background: var(--light-teal);
    color: var(--primary-dark);
    border-color: #cde4dd;
}

.show-all-tags-btn {
    width: 100%;
    border: none;
    background: linear-gradient(180deg, #fbfffe 0%, #f4faf9 100%);
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    border-top: 1px solid #e8f0ed;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.show-all-tags-btn:hover {
    background: var(--light-teal);
    color: var(--primary-dark);
}

.show-all-tags-btn i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

@media (max-width: 575.98px) {
    .recent-post-thumb {
        width: 80px;
        height: 66px;
    }
}

/* ==================== GALLERY ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 200px 200px;
    gap: 12px;
}
@media (max-width: 991px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; } }
@media (max-width: 575px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}
.gi-large {
    grid-column: span 2;
    grid-row: span 2;
}
@media (max-width: 991px) { .gi-large { grid-column: span 1; grid-row: span 1; } }

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.3);
    min-height: 180px;
}
.gallery-placeholder i { font-size: 36px; }
.gallery-placeholder span { font-size: 14px; color: rgba(255,255,255,0.5); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,122,110,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--white);
    font-size: 28px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ==================== HOME – معرض الصور (Swiper + نفس كاردات صفحة المعرض) ==================== */
.gallery-section__swiper-wrap {
    margin: 0 -8px;
    padding: 4px 8px 12px;
}

.gallery-section .home-gallery-section-swiper,
.video-gallery-section .home-video-gallery-section-swiper {
    overflow: hidden;
    padding: 6px 2px 4px;
}

.gallery-section .home-gallery-section-swiper .swiper-slide,
.video-gallery-section .home-video-gallery-section-swiper .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

.gallery-section .home-gallery-section-swiper .swiper-slide .gallery-category-card,
.video-gallery-section .home-video-gallery-section-swiper .swiper-slide .gallery-category-card {
    width: 100%;
    min-height: 0;
}

.gallery-section__empty {
    border-radius: var(--radius-md);
    max-width: 480px;
    margin-inline: auto;
    background: var(--white);
}

/* ==================== HOME – الأكاديميون (Swiper + بطاقات) ==================== */
.home-academic-faculty-section {
    background: var(--white);
}

.home-academic-faculty-section .home-academic-faculty-swiper {
    overflow: hidden;
    padding: 6px 2px 4px;
}

.home-academic-faculty-section .home-academic-faculty-swiper .swiper-slide {
    height: 100%;
    min-height: clamp(320px, 42vw, 360px);
    display: flex;
    box-sizing: border-box;
    align-items: stretch;
}

.home-faculty-card-link {
    color: inherit;
    min-height: 100%;
    height: 100%;
    flex: 1;
}

.home-faculty-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: clamp(320px, 42vw, 360px);
    height: clamp(320px, 42vw, 360px);
}

.home-faculty-card-link:hover .home-faculty-card {
    box-shadow: var(--shadow-md);
    border-color: rgba(13, 122, 110, 0.25);
    transform: translateY(-3px);
}

.home-faculty-card__photo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px 8px;
    background: var(--light-bg);
}

.home-faculty-card__photo img,
.home-faculty-card__placeholder {
    width: clamp(108px, 38vw, 148px);
    height: clamp(108px, 38vw, 148px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 4px 14px rgba(13, 122, 110, 0.14);
}

.home-faculty-card__photo img {
    object-fit: cover;
    display: block;
}

.home-faculty-card__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f6f7f8 0%, #e9edef 100%);
    color: #aeb7bf;
    font-size: clamp(34px, 9vw, 46px);
}

.home-faculty-card__body {
    padding: 16px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.home-faculty-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7rem; /* مساحة سطرين */
}

.home-faculty-card__degree {
    font-size: 0.8125rem;
    color: var(--primary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3rem;
}

.home-faculty-card__meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-faculty-card__meta i {
    color: var(--light-teal);
    margin: 0 4px;
}

.home-faculty-card__job {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 4px 0 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.1rem;
}

/* ==================== TESTIMONIALS ==================== */
.testimonials-section {
    background: var(--light-bg);
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    margin: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    inset-inline-end: 30px;
    font-size: 80px;
    line-height: 1;
    color: var(--light-teal);
    font-family: Georgia, serif;
    pointer-events: none;
}

.testi-stars { color: #f59e0b; margin-bottom: 16px; letter-spacing: 2px; }

.testimonial-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.testi-author {
    display: flex;
    align-items: center;
    gap: 14px;
}
.testi-avatar {
    font-size: 44px;
    color: var(--border-color);
}
.testi-author strong {
    display: block;
    font-size: 15px;
    color: var(--secondary);
}
.testi-author span {
    font-size: 13px;
    color: var(--primary);
}

.testimonials-swiper .swiper-pagination-bullet {
    background: var(--border-color);
    opacity: 1;
}
.testimonials-swiper .swiper-pagination-bullet-active {
    background: var(--primary);
    width: 22px;
    border-radius: 5px;
}

/* ==================== PARTNERS – بعرض الصفحة ولوجوهات الشركاء ==================== */
.partners-section {
    padding: 48px 0 40px;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    overflow: hidden;
}

.partners-swiper-wrap {
    width: 100%;
    padding: 0 16px;
}

.partners-swiper {
    width: 100%;
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
    min-height: 140px;
    border-radius: var(--radius-md);
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.partner-logo:hover {
    border-color: var(--primary);
    background: var(--light-teal);
}
.partner-logo img {
    max-width: 100%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.4);
    opacity: 0.9;
    transition: var(--transition);
}
.partner-logo:hover img {
    filter: grayscale(0);
    opacity: 1;
}
.partner-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.35;
    transition: var(--transition);
}
.partner-logo:hover .partner-name {
    color: var(--primary);
}

/* ==================== FRIENDLY LINKS PAGE – كاردات الروابط الصديقة ==================== */
.friendly-links-page {
    background: linear-gradient(180deg, var(--light-bg) 0%, var(--white) 28%);
}

.friendly-link-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.friendly-link-card:hover {
    border-color: rgba(13, 122, 110, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.friendly-link-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.friendly-link-card__external {
    position: absolute;
    inset-inline-end: 12px;
    top: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-muted);
    font-size: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(43, 58, 74, 0.06);
}

.friendly-link-card:hover .friendly-link-card__external {
    color: var(--primary);
    border-color: rgba(13, 122, 110, 0.25);
    background: var(--light-teal);
}

.friendly-link-card__media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 132px;
    padding: 28px 20px 20px;
    background: linear-gradient(180deg, var(--light-teal) 0%, var(--light-bg) 100%);
    border-bottom: 1px solid var(--border-color);
}

.friendly-link-card__logo {
    max-width: 100%;
    max-height: 76px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.35);
    opacity: 0.92;
    transition: var(--transition);
}

.friendly-link-card:hover .friendly-link-card__logo {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.03);
}

.friendly-link-card__body {
    padding: 18px 16px 20px;
    text-align: center;
}

.friendly-link-card__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--secondary);
    margin: 0;
    transition: var(--transition);
}

.friendly-link-card:hover .friendly-link-card__title {
    color: var(--primary);
}

@media (max-width: 575px) {
    .friendly-link-card__media {
        min-height: 118px;
        padding: 22px 16px 16px;
    }
    .friendly-link-card__logo {
        max-height: 64px;
    }
    .friendly-link-card__title {
        font-size: 14px;
    }
}

/* ==================== CONTACT ==================== */
.contact-info-card {
    background: linear-gradient(145deg, var(--secondary), #1d2f3f);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    color: var(--white);
    height: 100%;
}
.contact-info-card h4 { color: var(--white); font-weight: 800; }

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.contact-info-item:last-of-type { border-bottom: none; }

.ci-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(13,122,110,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-info-item div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.contact-info-item strong {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
}
.contact-info-item span {
    font-size: 14.5px;
    color: var(--white);
}

.contact-social { display: flex; gap: 10px; }

.cs-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    transition: var(--transition);
}
.cs-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.contact-form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.contact-form-card h4 { color: var(--secondary); font-weight: 800; }

.form-group-custom {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.form-group-custom label {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
}
.form-control-custom {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    resize: vertical;
}
.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,122,110,0.12);
}
.form-control-custom::placeholder { color: #aab0b8; }

/* خريطة جوجل — صفحة اتصل بنا (عرض كامل تحت النموذج) */
.contact-page-map {
    width: 100%;
    max-width: 100%;
    margin-top: 3rem;
    line-height: 0;
}
.contact-page-map__iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}
@media (max-width: 767.98px) {
    .contact-page-map__iframe {
        height: 300px;
    }
}

/* ==================== FOOTER ==================== */
.main-footer { background: var(--secondary); }

.footer-top { padding: 70px 0 50px; }

.footer-brand img.footer-logo {
    height: 70px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1) opacity(0.85);
}
.footer-brand h5 {
    font-size: 15px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 13.5px;
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: var(--transition);
}
.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-widget-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links a {
    font-size: 13.5px;
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.footer-links a::before {
    font-size: 11px;
    color: var(--primary);
    transition: var(--transition);
}
[dir="rtl"] .footer-links a::before { content: '\2190'; transform: translateX(5px); }
[dir="ltr"] .footer-links a::before { content: '\2192'; transform: translateX(-5px); }
.footer-links a:hover {
    color: var(--accent);
    padding-inline-end: 4px;
}
[dir="rtl"] .footer-links a:hover::before,
[dir="ltr"] .footer-links a:hover::before { opacity: 1; transform: translateX(0); }

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    color: rgba(255,255,255,0.6);
}
.footer-contact li i {
    color: var(--accent);
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.12);
    transition: var(--transition);
    color: var(--white);
}
.app-btn:hover {
    background: rgba(13,122,110,0.3);
    border-color: var(--primary);
    color: var(--white);
}
.app-btn i { font-size: 22px; color: var(--accent); }
.app-btn div { display: flex; flex-direction: column; line-height: 1.3; }
.app-btn small { font-size: 10px; opacity: 0.65; }
.app-btn span   { font-size: 13px; font-weight: 700; }

.footer-bottom {
    background: rgba(0,0,0,0.25);
    padding: 18px 0;
}
.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin: 0;
}
.footer-bottom a {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    transition: var(--transition);
}
.footer-bottom a:hover { color: var(--accent); }

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    inset-inline-start: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 18px rgba(13,122,110,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 9999;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(13,122,110,0.55);
}

/* ==================== سايدبار الموبايل (أقسام + فرعية + رجوع) ==================== */
/* يظهر فقط على شاشات أصغر من lg ويدعم RTL/LTR */
@media (max-width: 991px) {
    /* شريط الموبايل: اسم الموقع + زر القائمة. RTL: زر يسار واسم يمين. LTR: اسم يسار وزر يمين */
    .navbar-menu-bar .mobile-navbar-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
    }
    .mobile-navbar-site-name {
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 54px);
        flex: 1;
        min-width: 0;
    }
    .mobile-navbar-site-name:hover {
        color: #fff;
        opacity: 0.95;
    }
    [dir="rtl"] .mobile-navbar-site-name { order: 1; }
    [dir="rtl"] .mobile-sidebar-trigger { order: 2; }
    [dir="ltr"] .mobile-navbar-site-name { order: 1; }
    [dir="ltr"] .mobile-sidebar-trigger { order: 2; }

    .mobile-sidebar-trigger {
        flex-shrink: 0;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        border-radius: 12px;
        background: rgba(255,255,255,0.12);
        color: #fff;
        transition: var(--transition);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    .mobile-sidebar-trigger:hover {
        background: rgba(255,255,255,0.22);
        color: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        transform: translateY(-1px);
    }
    .mobile-sidebar-trigger:active {
        transform: translateY(0);
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }
    .mobile-sidebar-trigger:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
    }
    .mobile-sidebar-trigger i {
        font-size: 1.2rem;
        font-weight: 600;
    }
    .mobile-sidebar-trigger[aria-expanded="true"] {
        background: rgba(255,255,255,0.25);
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .mobile-sidebar-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        background: linear-gradient(180deg, var(--secondary) 0%, var(--secondary-light) 100%);
        z-index: 1050;
        box-shadow: -4px 0 24px rgba(0,0,0,0.2);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        overflow: hidden;
    }
    [dir="rtl"] .mobile-sidebar {
        right: 0;
        left: auto;
        transform: translateX(100%);
        box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    }
    [dir="ltr"] .mobile-sidebar {
        left: 0;
        right: auto;
        transform: translateX(-100%);
    }
    .mobile-sidebar.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* direction: ltr لترتيب اللوحات ثابتاً (0، 1، 2...) حتى يعمل التحويل صحيحاً في RTL و LTR */
    .mobile-sidebar-panels {
        display: flex;
        direction: ltr;
        height: 100%;
        width: 100%;
        transition: transform 0.3s ease;
        will-change: transform;
    }
    .mobile-sidebar-panel {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: inherit;
        overflow: hidden;
    }
    .mobile-sidebar-panel .mobile-sidebar-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 18px 20px;
        background: rgba(0,0,0,0.15);
        color: rgba(255,255,255,0.95);
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }
    [dir="rtl"] .mobile-sidebar-panel .mobile-sidebar-header {
        flex-direction: row-reverse;
    }
    .mobile-sidebar-panel .mobile-sidebar-header i {
        font-size: 1.1rem;
        opacity: 0.9;
    }
    /* زرّا اللغة في القائمة الجانبية */
    .mobile-sidebar-lang {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 20px;
        background: rgba(0,0,0,0.1);
        flex-shrink: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    [dir="rtl"] .mobile-sidebar-lang { flex-direction: row-reverse; }
    .mobile-sidebar-lang-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 18px;
        border-radius: 8px;
        background: rgba(255,255,255,0.12);
        color: rgba(255,255,255,0.95);
        font-size: 14px;
        font-weight: 600;
        transition: var(--transition);
    }
    .mobile-sidebar-lang-btn:hover {
        background: rgba(255,255,255,0.22);
        color: #fff;
    }
    .mobile-sidebar-lang-btn.active {
        background: rgba(255,255,255,0.25);
        color: #fff;
    }
    .mobile-sidebar-back-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        background: rgba(0,0,0,0.12);
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        border: none;
        width: 100%;
        cursor: pointer;
        transition: var(--transition);
        text-align: inherit;
        font-family: var(--font);
    }
    .mobile-sidebar-back-row:hover {
        background: rgba(0,0,0,0.25);
        color: #fff;
    }
    /* في RTL: كلمة "رجوع" والأيقونة على اليمين */
    [dir="rtl"] .mobile-sidebar-back-row {
        flex-direction: row-reverse;
        /* justify-content: flex-end; */
    }
    [dir="rtl"] .mobile-sidebar-back-row .back-arrow { transform: scaleX(-1); }
    [dir="ltr"] .mobile-sidebar-back-row .back-arrow { margin-right: 8px; }
    [dir="rtl"] .mobile-sidebar-back-row .back-arrow { margin-left: 8px; }

    .mobile-sidebar-list {
        list-style: none;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-sidebar-item {
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .mobile-sidebar-item a,
    .mobile-sidebar-item .mobile-sidebar-item-inner {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 20px;
        color: rgba(255,255,255,0.95);
        font-size: 15px;
        font-weight: 600;
        transition: var(--transition);
        text-decoration: none;
        width: 100%;
        text-align: inherit;
        border: none;
        background: transparent;
        cursor: pointer;
        font-family: var(--font);
    }
    /* في RTL: الأيقونة والنص على اليمين، السهم على اليسار (في RTL الـ start يمين فـ order:1 يمين و order:3 يسار) */
    [dir="rtl"] .mobile-sidebar-item a,
    [dir="rtl"] .mobile-sidebar-item .mobile-sidebar-item-inner {
        direction: rtl;
    }
    [dir="rtl"] .mobile-sidebar-item .mobile-sidebar-item-icon { order: 1; }
    [dir="rtl"] .mobile-sidebar-item .mobile-sidebar-item-text { order: 2; }
    [dir="rtl"] .mobile-sidebar-item .mobile-sidebar-item-arrow { order: 3; }
    .mobile-sidebar-item a:hover,
    .mobile-sidebar-item .mobile-sidebar-item-inner:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }
    .mobile-sidebar-item-icon {
        width: 24px;
        text-align: center;
        flex-shrink: 0;
        opacity: 0.9;
    }
    .mobile-sidebar-item-text { flex: 1; }
    .mobile-sidebar-item-arrow {
        font-size: 12px;
        opacity: 0.8;
    }
    [dir="rtl"] .mobile-sidebar-item-arrow.has-children::before { content: '\f104'; }
    [dir="ltr"] .mobile-sidebar-item-arrow.has-children::before { content: '\f105'; }
    .mobile-sidebar-item-arrow.has-children::before {
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
    }
}
@media (min-width: 992px) {
    .mobile-sidebar-backdrop,
    .mobile-sidebar { display: none !important; }
}

/* ==================== FACULTY HOME — PAGE HERO ==================== */
.faculty-home-hero {
    position: relative;
    z-index: 0;
    overflow: hidden;
    padding: clamp(3.25rem, 6vw, 5.5rem) 1.25rem;
    text-align: center;
    background: linear-gradient(
        115deg,
        #1a7d72 0%,
        #0d5c54 38%,
        #083d38 72%,
        #062a26 100%
    );
    color: var(--white);
}

.faculty-home-hero-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 1;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px, 14px 14px;
    background-position: 0 0, 12px 18px;
}

.faculty-home-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 42rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.faculty-home-hero-logo {
    width: clamp(5.5rem, 14vw, 7.25rem);
    height: clamp(5.5rem, 14vw, 7.25rem);
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.35),
        0 0 48px rgba(255, 255, 255, 0.35),
        0 12px 40px rgba(0, 0, 0, 0.28);
}

.faculty-home-hero-logo img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.faculty-home-hero-title {
    margin: 1.35rem 0 0;
    font-size: clamp(1.5rem, 4vw, 2.125rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--white);
    letter-spacing: 0.01em;
}

.faculty-home-hero-subtitle {
    margin: 0.85rem 0 0;
    font-size: clamp(0.95rem, 2.2vw, 1.125rem);
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    max-width: 36rem;
}

/* ==================== FACULTY DIRECTORY — PAGE LAYOUT & CARDS ==================== */
.faculty-directory-page {
    background: var(--light-bg);
}

.faculty-directory-main {
    position: relative;
    z-index: 1;
    margin-top: -1.75rem;
    padding-top: 3rem;
    padding-bottom: clamp(3rem, 6vw, 5rem);
    background: linear-gradient(180deg, #f2f9f8 0%, var(--white) 28%, var(--light-bg) 100%);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -16px 48px rgba(6, 42, 38, 0.07);
}

.faculty-directory-block {
    margin-bottom: 0;
}

.faculty-directory-block--spaced {
    margin-top: 3.25rem;
    padding-top: 0.25rem;
}

.faculty-directory-block__head {
    text-align: center;
    max-width: 44rem;
    margin-inline: auto;
}

.faculty-directory-block__title {
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 800;
    color: var(--secondary);
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.faculty-directory-block__sub {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-muted);
    margin: 0 0 1.35rem;
    line-height: 1.65;
}

.faculty-directory-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.faculty-directory-rule__line {
    flex: 1;
    max-width: 120px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.faculty-directory-rule__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--light-teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.05rem;
    box-shadow: var(--shadow-sm);
}

.faculty-directory-page .faculty-directory-empty {
    grid-column: 1 / -1;
    max-width: 32rem;
    margin-inline: auto;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.faculty-directory-page .teacher-card-link-wrapper {
    text-decoration: none !important;
    color: inherit;
    display: block;
    height: 100%;
}

.faculty-directory-page .teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
    gap: 1.75rem;
    margin-top: 1.75rem;
}

.faculty-directory-page .teachers-grid.leadership-grid {
    grid-template-columns: repeat(3, 1fr);
    /* max-width: 1180px; */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 992px) {
    .faculty-directory-page .teachers-grid.leadership-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .faculty-directory-main {
        margin-top: -1rem;
        border-radius: 20px 20px 0 0;
        padding-top: 2.25rem;
    }

    .faculty-directory-page .teachers-grid.leadership-grid,
    .faculty-directory-page .teachers-grid {
        grid-template-columns: 1fr;
    }
}

.faculty-directory-page .teacher-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.faculty-directory-page .teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 122, 110, 0.22);
}

.faculty-directory-page .teacher-card-header {
    position: relative;
    height: 118px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, #063530 100%);
    overflow: hidden;
}

.faculty-directory-page .teacher-card-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 16px 16px;
}

.faculty-directory-page .teacher-card-img-container {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    overflow: hidden;
    margin: -74px auto 14px;
    border: 5px solid var(--white);
    box-shadow: 0 12px 28px rgba(13, 122, 110, 0.18);
    position: relative;
    z-index: 2;
}

.faculty-directory-page .teacher-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.faculty-directory-page .teacher-card:hover .teacher-card-img {
    transform: scale(1.05);
}

.faculty-directory-page .teacher-card-body {
    padding: 0 1.35rem 1.65rem;
    text-align: center;
}

.faculty-directory-page .teacher-card-name {
    font-size: 1.14rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: var(--secondary);
    line-height: 1.35;
}

.faculty-directory-page .teacher-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 0.5rem;
    line-height: 1.45;
}

.faculty-directory-page .faculty-card-divider {
    position: relative;
    margin: 1.1rem 0 0.85rem;
    padding-top: 0.5rem;
}

.faculty-directory-page .faculty-card-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 52%;
    max-width: 200px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.faculty-directory-page .faculty-card-divider i {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: -19px auto 0;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-size: 0.82rem;
    box-shadow: var(--shadow-sm);
}

.faculty-directory-page .teacher-card-college,
.faculty-directory-page .teacher-card-department {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.faculty-directory-page .teacher-card-job-title {
    font-size: 0.86rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

/* ==================== FACULTY PUBLIC PROFILE PAGE ==================== */
.faculty-profile-page {
    background: var(--light-bg);
    min-height: 60vh;
}

.faculty-profile-page .profile-hero-section {
    position: relative;
    z-index: 0;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(5.5rem, 12vw, 8.5rem);
    background: linear-gradient(
        115deg,
        #1a7d72 0%,
        #0d5c54 38%,
        #083d38 72%,
        #062a26 100%
    );
}

.faculty-profile-page .profile-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px, 14px 14px;
    background-position: 0 0, 12px 18px;
}

.faculty-profile-page .profile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.28) 100%);
    pointer-events: none;
}

.faculty-profile-page .profile-hero-content {
    position: relative;
    z-index: 2;
}

.faculty-profile-page .profile-hero-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

@media (min-width: 992px) {
    .faculty-profile-page .profile-hero-top {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: clamp(2rem, 4vw, 3.25rem);
    }

    [dir="rtl"] .faculty-profile-page .profile-hero-top {
        flex-direction: row-reverse;
    }
}

.faculty-profile-page .profile-image-large {
    width: clamp(9.5rem, 22vw, 12.5rem);
    height: clamp(9.5rem, 22vw, 12.5rem);
    margin: 0;
    position: relative;
    flex-shrink: 0;
}

.faculty-profile-page .profile-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.faculty-profile-page .profile-image-large:hover img {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.45);
}

.faculty-profile-page .profile-verified-badge {
    position: absolute;
    bottom: 10px;
    inset-inline-end: 10px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1fa87a, #0d7a6e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--white);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.faculty-profile-page .profile-verified-badge i {
    color: var(--white);
    font-size: 1.1rem;
}

.faculty-profile-page .profile-hero-info {
    color: var(--white);
    text-align: center;
    flex: 1;
    min-width: 0;
    max-width: 40rem;
}

@media (min-width: 992px) {
    .faculty-profile-page .profile-hero-top .profile-hero-info {
        text-align: start;
    }

    .faculty-profile-page .profile-hero-top .profile-hero-department,
    .faculty-profile-page .profile-hero-top .profile-hero-email {
        justify-content: flex-start;
    }

    .faculty-profile-page .profile-hero-top .profile-actions {
        justify-content: flex-start;
    }
}

.faculty-profile-page .profile-hero-info .scientific-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.faculty-profile-page .profile-hero-name {
    font-size: clamp(1.65rem, 4.5vw, 2.35rem);
    font-weight: 800;
    color: var(--white);
    margin: 0 0 0.65rem;
    line-height: 1.25;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.faculty-profile-page .profile-hero-position {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.75rem;
}

.faculty-profile-page .profile-hero-department {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.65rem;
    flex-wrap: wrap;
}

.faculty-profile-page .profile-hero-department .separator {
    opacity: 0.45;
}

.faculty-profile-page .profile-hero-email {
    font-size: 0.95rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.faculty-profile-page .profile-hero-email a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 0.45rem 1.1rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.faculty-profile-page .profile-hero-email a:hover {
    background: rgba(255, 255, 255, 0.22);
    color: var(--white);
}

.faculty-profile-page .profile-actions {
    margin-top: 1.35rem;
    display: flex;
    justify-content: center;
}

.faculty-profile-page .profile-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(13, 122, 110, 0.45);
    transition: var(--transition);
}

.faculty-profile-page .profile-download-btn:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(13, 122, 110, 0.5);
}

.faculty-profile-page .profile-download-btn:active {
    transform: translateY(0);
}

.faculty-profile-page .academic-social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    margin-top: 2rem;
}

.faculty-profile-page .academic-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: var(--transition);
}

.faculty-profile-page .academic-link:hover {
    background: rgba(255, 255, 255, 0.26);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.faculty-profile-page .academic-link i {
    font-size: 1.05rem;
    opacity: 0.95;
}

.faculty-profile-page .profile-content-section {
    position: relative;
    z-index: 3;
    margin-top: -4.5rem;
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.faculty-profile-page .profile-content-section .container {
    position: relative;
}

.faculty-profile-page .academic-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 767px) {
    .faculty-profile-page .academic-info-cards {
        grid-template-columns: 1fr;
    }
}

.faculty-profile-page .academic-card {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.35rem 1.4rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.faculty-profile-page .academic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 122, 110, 0.18);
}

.faculty-profile-page .academic-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 8px 22px rgba(13, 122, 110, 0.28);
}

.faculty-profile-page .academic-card-icon i {
    font-size: 1.25rem;
    color: var(--white);
}

.faculty-profile-page .academic-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.35rem;
}

.faculty-profile-page .academic-card-value {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
    line-height: 1.55;
}

.faculty-profile-page .profile-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.faculty-profile-page .profile-content-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.faculty-profile-page .profile-content-card:hover {
    box-shadow: var(--shadow-lg);
}

.faculty-profile-page .content-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, #063530 100%);
}

.faculty-profile-page .content-card-header i {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.95);
}

.faculty-profile-page .content-card-header h3 {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 800;
    color: var(--white);
    margin: 0;
    line-height: 1.35;
}

.faculty-profile-page .content-card-body {
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
    overflow-x: auto;
}

.faculty-profile-page .biography-content {
    font-size: 0.98rem;
    line-height: 1.85;
    color: var(--text-dark);
}

.faculty-profile-page .biography-content p {
    margin-bottom: 0.85rem;
}

.faculty-profile-page .biography-content p:last-child {
    margin-bottom: 0;
}

.faculty-profile-page .biography-content ul,
.faculty-profile-page .biography-content ol {
    margin-bottom: 0.85rem;
    padding-inline-start: 1.35rem;
}

.faculty-profile-page .biography-content li {
    margin-bottom: 0.4rem;
}

.faculty-profile-page .biography-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faculty-profile-page .biography-content a:hover {
    color: var(--primary-dark);
}

.faculty-profile-page .research-interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.15rem 0;
}

.faculty-profile-page .research-interest-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--light-teal);
    border: 1px solid rgba(13, 122, 110, 0.25);
    box-shadow: var(--shadow-sm);
}

.faculty-profile-page .research-interest-tag i {
    font-size: 0.8rem;
    color: var(--primary);
    opacity: 0.9;
}

@media (max-width: 767px) {
    .faculty-profile-page .profile-hero-section {
        padding-bottom: 5rem;
    }

    .faculty-profile-page .profile-hero-department {
        flex-direction: column;
    }

    .faculty-profile-page .academic-link span {
        display: none;
    }

    .faculty-profile-page .academic-link {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .faculty-profile-page .academic-link i {
        font-size: 1.15rem;
    }

    .faculty-profile-page .academic-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .faculty-profile-page .profile-content-section {
        margin-top: -3rem;
    }

    .faculty-profile-page .profile-hero-email {
        flex-direction: column;
    }
}

@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .faculty-profile-page .profile-hero-section {
        background: var(--white) !important;
        padding: 1.5rem 0 2rem;
        box-shadow: none;
    }

    .faculty-profile-page .profile-hero-section::before,
    .faculty-profile-page .profile-hero-overlay {
        display: none !important;
    }

    .faculty-profile-page .profile-hero-name,
    .faculty-profile-page .profile-hero-position,
    .faculty-profile-page .profile-hero-department,
    .faculty-profile-page .profile-hero-info .scientific-title {
        color: var(--text-dark) !important;
        text-shadow: none !important;
    }

    .faculty-profile-page .profile-hero-email a {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        color: #000 !important;
    }

    .faculty-profile-page .profile-download-btn,
    .faculty-profile-page .profile-actions,
    .faculty-profile-page .academic-social-links {
        display: none !important;
    }

    .faculty-profile-page .profile-content-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    .faculty-profile-page .content-card-header {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    .faculty-profile-page .content-card-header h3,
    .faculty-profile-page .content-card-header i {
        color: #000 !important;
    }
}

/* ==================== FACULTY SEARCH PAGE ==================== */
.faculty-search-page .faculty-search-main {
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.faculty-search-filters,
.faculty-search-results {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1.75rem;
}

.faculty-search-results {
    margin-bottom: 0;
}

.faculty-search-card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    font-weight: 800;
    color: var(--secondary);
    margin: 0 0 1.35rem;
    line-height: 1.35;
}

.faculty-search-card-title i {
    color: var(--primary);
    font-size: 1.05em;
}

.faculty-search-filter-group .form-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.faculty-search-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    font-size: 0.95rem;
}

.faculty-search-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 122, 110, 0.15);
}

.faculty-search-table-wrap {
    margin: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faculty-search-results .faculty-dt-toolbar label,
.faculty-search-results .faculty-dt-footer .dataTables_info,
.faculty-search-results .faculty-dt-footer .dt-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.faculty-search-results .faculty-dt-toolbar .dataTables_length select,
.faculty-search-results .faculty-dt-toolbar .dt-length select {
    min-width: 5rem;
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    padding: 0.35rem 2rem 0.35rem 0.65rem;
    font-size: 0.9rem;
}

.faculty-search-results .faculty-dt-toolbar .dataTables_filter input,
.faculty-search-results .faculty-dt-toolbar .dt-search input {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    margin-inline-start: 0.35rem;
}

.faculty-search-results .faculty-dt-toolbar .dataTables_filter input:focus,
.faculty-search-results .faculty-dt-toolbar .dt-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 122, 110, 0.12);
    outline: none;
}

.faculty-datatable-table {
    margin-bottom: 0 !important;
    font-size: 0.92rem;
}

.faculty-datatable-table thead th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, #063530 100%);
    color: var(--white) !important;
    font-weight: 800;
    font-size: 0.86rem;
    text-transform: none;
    letter-spacing: 0.02em;
    border-bottom: none !important;
    padding: 0.85rem 0.75rem !important;
    vertical-align: middle;
    white-space: nowrap;
}

.faculty-datatable-table thead th.sorting,
.faculty-datatable-table thead th.sorting_asc,
.faculty-datatable-table thead th.sorting_desc {
    padding-inline-end: 1.75rem !important;
}

.faculty-datatable-table tbody td {
    padding: 0.75rem !important;
    vertical-align: middle;
    border-color: var(--border-color) !important;
    color: var(--text-dark);
}

.faculty-datatable-table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(230, 244, 242, 0.35);
}

.faculty-datatable-table.table-hover > tbody > tr:hover > * {
    background-color: rgba(13, 122, 110, 0.08) !important;
}

.faculty-search-col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: center !important;
}

.faculty-search-action-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0 !important;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #1a8f9e, var(--primary)) !important;
    color: var(--white) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(13, 122, 110, 0.35);
    transition: var(--transition);
}

.faculty-search-action-btn:hover,
.faculty-search-action-btn:focus {
    color: var(--white) !important;
    background: linear-gradient(135deg, var(--primary-dark), #063530) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 122, 110, 0.4);
}

.faculty-search-action-btn i {
    font-size: 0.85rem;
}

.faculty-search-results .dataTables_paginate,
.faculty-search-results .dt-paging {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem;
}

[dir="rtl"] .faculty-search-results .dataTables_paginate,
[dir="rtl"] .faculty-search-results .dt-paging {
    justify-content: flex-start;
}



.faculty-search-results .dataTables_processing,
.faculty-search-results .dt-processing {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
}

@media (max-width: 767px) {
    .faculty-search-results .faculty-dt-toolbar .dataTables_length,
    .faculty-search-results .faculty-dt-toolbar .dataTables_filter,
    .faculty-search-results .faculty-dt-toolbar .dt-length,
    .faculty-search-results .faculty-dt-toolbar .dt-search {
        text-align: center !important;
        justify-content: center;
    }

    .faculty-search-results .faculty-dt-toolbar .dataTables_filter input,
    .faculty-search-results .faculty-dt-toolbar .dt-search input {
        width: 100%;
        margin-top: 0.35rem;
        margin-inline-start: 0;
    }

    .faculty-datatable-table thead th,
    .faculty-datatable-table tbody td {
        font-size: 0.85rem;
        padding: 0.55rem !important;
    }
}

/* ==================== FACULTY AUTH (login / signup / verify) ==================== */
.faculty-auth-page {
    background: var(--light-bg);
    min-height: 50vh;
}

.faculty-auth-page .faculty-auth-hero {
    padding: clamp(2rem, 5vw, 2.75rem) 1rem clamp(2.5rem, 6vw, 3.25rem);
}

.faculty-auth-page .faculty-auth-hero .faculty-home-hero-logo {
    width: clamp(4.25rem, 12vw, 5.25rem);
    height: clamp(4.25rem, 12vw, 5.25rem);
    padding: 0.5rem;
}

.faculty-auth-page .faculty-auth-hero .faculty-home-hero-title {
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    margin-top: 1rem;
}

.faculty-auth-page .faculty-auth-hero .faculty-home-hero-subtitle {
    font-size: clamp(0.88rem, 2vw, 1rem);
    margin-top: 0.5rem;
}

.faculty-auth-page .faculty-auth-main {
    margin-top: -2rem;
    padding-top: 0;
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(180deg, #f2f9f8 0%, var(--light-bg) 35%, var(--white) 100%);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(6, 42, 38, 0.06);
}

.faculty-auth-card {
    max-width: 440px;
    margin-inline: auto;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.faculty-auth-card--wide {
    max-width: 520px;
}

.faculty-auth-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.faculty-auth-card-title {
    font-size: clamp(1.2rem, 2.8vw, 1.45rem);
    font-weight: 800;
    color: var(--secondary);
    margin: 0 0 0.4rem;
    line-height: 1.3;
}

.faculty-auth-card-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}

.faculty-auth-form .form-floating > label {
    color: var(--text-muted);
    font-weight: 600;
}

.faculty-auth-form .form-floating > label i {
    margin-inline-end: 0.35rem;
    color: var(--primary);
    opacity: 0.9;
}

.faculty-auth-form .form-control,
.faculty-auth-form .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    min-height: calc(3.5rem + 2px);
}

.faculty-auth-form .form-control:focus,
.faculty-auth-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 122, 110, 0.12);
}

.faculty-auth-field--password {
    position: relative;
}

.faculty-auth-field--password .form-control {
    padding-inline-end: 3rem;
}

.faculty-auth-form .password-toggle {
    position: absolute;
    inset-inline-end: 0.65rem;
    bottom: 0.85rem;
    z-index: 6;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(13, 122, 110, 0.08);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.faculty-auth-form .password-toggle:hover {
    background: rgba(13, 122, 110, 0.16);
    color: var(--primary);
}

.faculty-auth-form .custom-checkbox .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.faculty-auth-form .custom-checkbox .form-check-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.faculty-auth-forgot-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
}

.faculty-auth-forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.faculty-auth-submit-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white) !important;
    box-shadow: 0 6px 22px rgba(13, 122, 110, 0.35);
    transition: var(--transition);
}

.faculty-auth-submit-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(13, 122, 110, 0.4);
    color: var(--white) !important;
}

.faculty-auth-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.faculty-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.faculty-auth-divider::before,
.faculty-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.faculty-auth-footer-text {
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
}

.faculty-auth-alt-link {
    font-weight: 700;
    color: var(--primary);
    margin-inline-start: 0.25rem;
}

.faculty-auth-alt-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.faculty-auth-hint {
    border: 1px solid rgba(13, 122, 110, 0.2);
    background: var(--light-teal);
    color: var(--text-dark);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    padding: 0.85rem 1rem;
    text-align: start;
}

.faculty-auth-hint-icon {
    color: var(--primary);
    margin-inline-end: 0.35rem;
    vertical-align: middle;
}

.faculty-auth-hint-list {
    margin: 0.5rem 0 0;
    padding-inline-start: 1.2rem;
    line-height: 1.55;
}

.faculty-auth-recaptcha .g-recaptcha {
    display: flex;
    justify-content: center;
}

.faculty-auth-recaptcha small {
    font-size: 0.8rem;
}

/* Verify email */
.faculty-auth-page .verify-section {
    min-height: calc(70vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0 3rem;
}

.faculty-auth-page .verify-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    max-width: 500px;
    width: 100%;
    margin-inline: auto;
    text-align: center;
}

.faculty-auth-page .verify-icon {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--white);
    box-shadow: 0 10px 28px rgba(13, 122, 110, 0.3);
}

.faculty-auth-page .verify-title {
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.65rem;
}

.faculty-auth-page .verify-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.65;
}

.faculty-auth-page .verify-email {
    color: var(--primary-dark);
    font-weight: 700;
    word-break: break-all;
}

.faculty-auth-page .code-input-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    direction: ltr;
}

.faculty-auth-page .code-input {
    width: 2.85rem;
    height: 3.35rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--secondary);
}

.faculty-auth-page .code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 122, 110, 0.15);
    outline: none;
}

.faculty-auth-page .code-input.error {
    border-color: #dc3545;
    animation: faculty-auth-shake 0.5s ease;
}

@keyframes faculty-auth-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.faculty-auth-page .verify-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    box-shadow: 0 6px 20px rgba(13, 122, 110, 0.32);
}

.faculty-auth-page .verify-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.faculty-auth-page .verify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.faculty-auth-page .resend-container {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.faculty-auth-page .resend-text {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
}

.faculty-auth-page .resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.faculty-auth-page .resend-btn:hover:not(:disabled) {
    color: var(--primary-dark);
    text-decoration: underline;
}

.faculty-auth-page .resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.faculty-auth-page .timer {
    display: inline-block;
    color: var(--primary-dark);
    font-weight: 700;
    margin-inline-start: 0.35rem;
}

.faculty-auth-page .verify-card .alert {
    border-radius: var(--radius-md);
    text-align: start;
}

@media (max-width: 575px) {
    .faculty-auth-page .code-input {
        width: 2.45rem;
        height: 2.95rem;
        font-size: 1.15rem;
    }

    .faculty-auth-page .faculty-auth-main {
        margin-top: -1.25rem;
        border-radius: 18px 18px 0 0;
    }
}

/* ==================== FACULTY PROFILE EDIT ==================== */
.faculty-profile-edit-inner {
    max-width: 920px;
    margin-inline: auto;
}

.faculty-profile-edit-intro {
    text-align: center;
    max-width: 40rem;
    margin-inline: auto;
}

.faculty-profile-edit-page-title {
    font-size: clamp(1.2rem, 2.8vw, 1.5rem);
    font-weight: 800;
    color: var(--secondary);
    margin: 0 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.faculty-profile-edit-page-title i {
    color: var(--primary);
}

.faculty-profile-edit-intro-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.faculty-profile-edit-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.faculty-profile-edit-avatar-wrap {
    position: relative;
    width: clamp(7.5rem, 22vw, 9.5rem);
    height: clamp(7.5rem, 22vw, 9.5rem);
    border-radius: 50%;
    box-shadow: 0 12px 36px rgba(6, 42, 38, 0.15);
}

.faculty-profile-edit-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white);
    background: var(--light-bg);
}

.faculty-profile-edit-avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(6, 42, 38, 0.45);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: none;
}

.faculty-profile-edit-avatar-wrap:hover .faculty-profile-edit-avatar-overlay,
.faculty-profile-edit-avatar-wrap:focus-within .faculty-profile-edit-avatar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.faculty-profile-edit-avatar-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-dark);
    cursor: pointer;
    margin: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.faculty-profile-edit-avatar-upload:hover {
    transform: scale(1.06);
    color: var(--primary);
}

.faculty-profile-edit-avatar-hint {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.92rem;
}

.faculty-profile-edit-avatar-meta {
    color: var(--text-muted);
}

.faculty-profile-edit-static-alert {
    pointer-events: none;
}

.faculty-profile-edit-hint {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(184, 134, 11, 0.4);
    background: rgba(255, 248, 225, 0.85);
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

.faculty-profile-edit-hint > i {
    color: #b8860b;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.faculty-profile-edit-form .profile-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: var(--white);
}

.faculty-profile-edit-form .profile-card .card-body {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.faculty-profile-edit-form .section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid rgba(13, 122, 110, 0.2);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.faculty-profile-edit-form .section-title i {
    color: var(--primary);
}

.faculty-profile-edit-form .form-floating > label {
    font-weight: 600;
    color: var(--text-muted);
}

.faculty-profile-edit-form .form-control,
.faculty-profile-edit-form .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
}

.faculty-profile-edit-form .form-control:focus,
.faculty-profile-edit-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 122, 110, 0.12);
}

.faculty-profile-edit-form .password-toggle-wrapper {
    position: relative;
}

.faculty-profile-edit-form .password-toggle-wrapper .form-floating > .form-control {
    padding-inline-end: 3rem;
}

.faculty-profile-edit-form .password-toggle-icon {
    position: absolute;
    inset-inline-end: 0.85rem;
    bottom: 1rem;
    z-index: 6;
    cursor: pointer;
    color: var(--primary-dark);
    font-size: 1rem;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.faculty-profile-edit-form .password-toggle-icon:hover {
    color: var(--primary);
    background: rgba(13, 122, 110, 0.08);
}

.faculty-profile-edit-form .social-input-group .input-group-text {
    background: var(--light-teal);
    color: var(--primary-dark);
    border-color: var(--border-color);
    min-width: 3rem;
    justify-content: center;
}

.faculty-profile-edit-form .social-input-group .form-floating .form-control {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

.faculty-profile-edit-form .social-input-group .form-floating > label {
    padding-inline-start: 0.5rem;
}

.faculty-profile-edit-page .note-editor.note-frame {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    overflow: hidden;
}

.faculty-profile-edit-page .note-toolbar {
    background: linear-gradient(180deg, var(--light-teal), rgba(13, 122, 110, 0.06));
    border-bottom: 1px solid var(--border-color);
}

.faculty-profile-edit-page .note-btn-group .note-btn {
    color: var(--secondary);
}

.faculty-profile-edit-page .note-editable {
    background: var(--white);
    color: var(--text-dark);
}

.faculty-profile-edit-page .tagify {
    --tags-border-color: var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.5rem;
    min-height: calc(3.5rem + 2px);
    align-items: center;
}

.faculty-profile-edit-page .tagify:hover {
    border-color: rgba(13, 122, 110, 0.45);
}

.faculty-profile-edit-page .tagify__tag {
    background: rgba(13, 122, 110, 0.12);
    color: var(--primary-dark);
    border-radius: var(--radius-sm);
}

.faculty-profile-edit-page .tagify__tag__removeBtn {
    color: var(--primary-dark);
}

.faculty-profile-edit-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.75rem 0 0.25rem;
}

.faculty-profile-edit-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: min(100%, 240px);
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white) !important;
    box-shadow: 0 6px 22px rgba(13, 122, 110, 0.35);
    transition: var(--transition);
}

.faculty-profile-edit-save-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(13, 122, 110, 0.4);
    color: var(--white) !important;
}

.faculty-profile-edit-save-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Cropper modal (profile image) */
.faculty-cropper-modal {
    position: fixed;
    inset: 0;
    z-index: 10850;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(6, 42, 38, 0.78);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.faculty-cropper-modal.active {
    opacity: 1;
    visibility: visible;
}

.faculty-cropper-modal .cropper-container-wrapper {
    width: 100%;
    max-width: min(640px, 100%);
    max-height: min(90vh, 720px);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.faculty-cropper-modal .cropper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--light-teal);
    border-bottom: 1px solid var(--border-color);
}

.faculty-cropper-modal .cropper-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.faculty-cropper-modal .cropper-close {
    border: none;
    background: rgba(255, 255, 255, 0.85);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.faculty-cropper-modal .cropper-close:hover {
    background: var(--white);
    color: var(--primary-dark);
}

.faculty-cropper-modal .cropper-image-container {
    flex: 1;
    min-height: 280px;
    max-height: 50vh;
    background: #0d1f1c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faculty-cropper-modal .cropper-image-container img {
    max-width: 100%;
    max-height: 50vh;
    display: block;
}

.faculty-cropper-modal .cropper-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
}

.faculty-cropper-modal .cropper-controls button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.faculty-cropper-modal .cropper-controls button:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: rgba(13, 122, 110, 0.06);
}

.faculty-cropper-modal .cropper-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    justify-content: flex-end;
}

.faculty-cropper-modal .crop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(13, 122, 110, 0.3);
}

.faculty-cropper-modal .crop-btn:hover {
    filter: brightness(1.05);
}

.faculty-cropper-modal .cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    background: var(--white);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.faculty-cropper-modal .cancel-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

@media (max-width: 575px) {
    .faculty-profile-edit-form .password-toggle-icon {
        bottom: 0.85rem;
        inset-inline-end: 0.65rem;
    }

    .faculty-cropper-modal .cropper-actions {
        justify-content: stretch;
    }

    .faculty-cropper-modal .cropper-actions .crop-btn,
    .faculty-cropper-modal .cropper-actions .cancel-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .section-padding { padding: 65px 0; }
    .main-navbar .navbar-collapse {
        background: var(--white);
        padding: 16px;
        border-end-start-radius: var(--radius-md);
        border-end-end-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        margin-top: 10px;
    }
    .navbar-actions { margin-top: 12px; }
    .president-word-card { padding: 22px; }
}

@media (max-width: 767px) {
    .top-bar:not(.top-bar-faculty) { display: none; }
    .top-bar.top-bar-faculty {
        display: block !important;
        padding: 7px 0;
    }
    .top-bar-faculty-inner {
        justify-content: center !important;
    }
    .president-word-card { padding: 18px; }
    .ranking-card-image { height: 160px; }
    .contact-info-card { margin-bottom: 0; }
}

/* إزالة الفراغ الجانبي الناتج عن هامش الـ row السالب في Bootstrap (جميع الشاشات) */
.row {
    margin-left: -8px !important;
    margin-right: -8px !important;
}

.row>* {
    padding-left: 8px;
    padding-right: 8px;
}

@media (max-width: 575px) {
    .stat-number { font-size: 2rem; }
}

/* ==================== AOS OVERRIDES ==================== */
[data-aos] { will-change: transform, opacity; }

/* Views counter in page/post hero meta */
.article-hero-meta .meta-item.meta-views i,
.page-hero-meta .meta-item.meta-views i {
    color: var(--accent);
}
