/*
    UniWeb · Responsive layer (موبايل وتابلت) — يُحمّل بعد كل الأنماط.
    إصلاحات ظهرت بفحص الصفحات على 375px و820px لكل الستايلات (الرئيسية، الكليات، البوابات، الصفحات).
*/

/* ───── السلايدر (موبايل وتابلت): المحتوى أولاً بعرض كامل، وعناصر الكولاج الزخرفية تختفي حتى لا تغطي العنوان والأزرار ───── */
@media (max-width:991.98px){
    .uni-slider-root .uni-slider-slide{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"content"!important}
    .uni-slider-root .uni-slider-unihub-collage,
    .uni-slider-root .uni-slider-unihub-help-card,
    .uni-slider-root .uni-slider-unihub-spark{display:none!important}
    .uni-slider-root .uni-slider-content-wrap{grid-area:content!important;width:100%!important;max-width:none!important;margin:0!important;inset:auto!important}
    .uni-slider-root .uni-slider-content{width:100%!important;max-width:none!important}
}

/* ───── الرئيسية: بطاقات الكليات عمودين على الموبايل بدل بطاقة كبيرة لكل كلية ───── */
@media (max-width:575.98px){
    html body .uw-home-colleges-flip-section .uw-home-college-flip-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
    html body .uw-home-colleges-flip-section .uw-home-college-flip-grid .uw-home-college-flip-card,
    html body .uw-home-colleges-flip-section .uw-home-college-flip-grid .uw-home-college-flip-inner,
    html body .uw-home-colleges-flip-section .uw-home-college-flip-grid .uw-home-college-flip-face{min-height:200px!important;height:200px!important}
    html body .uw-home-colleges-flip-section .uw-home-college-flip-face{padding:12px!important}
    html body .uw-home-colleges-flip-section .uw-home-college-logo-wrap{height:100%!important;width:100%!important;padding:6px!important}
    html body .uw-home-colleges-flip-section .uw-home-college-logo-wrap img{width:100%!important;height:100%!important;max-height:170px;object-fit:contain!important}
    html body .uw-home-colleges-flip-section .uw-home-college-flip-grid > :last-child:nth-child(odd){grid-column:1 / -1;justify-self:center;width:calc(50% - 6px)}
    html body .uw-home-colleges-flip-section .uw-home-college-flip-back p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:.8rem}
}

/* ───── قوالب الكليات (ucx): علامة الاقتباس الزخرفية لا تمنع الضغط على زر «اقرأ الكلمة كاملة» ───── */
.ucx-dean-quote{pointer-events:none}

/* ───── الرئيسية: أسهم شريط البطاقات تحت البطاقات على الموبايل بدل ما تغطي النص ───── */
@media (max-width:767.98px){
    html body .uw-home-feature-rail{padding-bottom:58px!important}
    html body .uw-home-feature-rail .uw-home-feature-rail__arrow{top:auto!important;bottom:6px!important;transform:none!important;margin:0!important}
    html body .uw-home-feature-rail .uw-home-feature-rail__arrow--prev{right:calc(50% - 46px)!important;left:auto!important}
    html body .uw-home-feature-rail .uw-home-feature-rail__arrow--next{left:calc(50% - 46px)!important;right:auto!important}
}

/* ───── الهيدر العام: الشريط العلوي بسطر واحد على الموبايل (كان سطرين ويأخذ ارتفاع كبير) ───── */
@media (max-width:575.98px){
    html body .uw-top-strip .uw-top-strip-row{flex-wrap:nowrap!important;gap:6px!important;justify-content:space-between!important;min-height:0!important}
    html body .uw-top-strip .uw-top-strip-left,
    html body .uw-top-strip .uw-top-strip-right{width:auto!important;flex:0 1 auto!important;min-width:0!important;gap:2px!important}
    html body .uw-top-strip .uw-header-socials{gap:2px!important}
    html body .uw-top-strip .uni-outline-btn{padding-inline:.6rem!important;white-space:nowrap}
}

/* ───── أرشيف أخبار الكلية: هوية الكلية فوق العنوان على الموبايل (كانت تنضغط بعرض 38px ويتداخل النص) ───── */
@media (max-width:575.98px){
    html body .uw-news-archive-heading{flex-direction:column!important;align-items:stretch!important;gap:14px!important}
    html body .uw-news-archive-heading .uw-news-college-identity{flex-direction:row!important;align-items:center!important;width:auto!important;max-width:100%!important;align-self:flex-start!important;gap:10px!important;padding:8px 12px!important}
    html body .uw-news-archive-heading .uw-news-college-identity .uw-news-college-logo{width:48px!important;height:48px!important;flex:0 0 48px!important}
    html body .uw-news-archive-heading .uw-news-college-identity > span:last-child{width:auto!important;min-width:0!important}
    html body .uw-news-archive-heading .uw-news-archive-title-block{width:100%!important}
}
/* أيقونة البحث داخل الحقل لا تغطي النص */
html body .uw-news-search-field input{padding-inline-start:46px!important}

/* ───── دليل الهيئة التدريسية: بطاقة أفقية مختصرة على الموبايل (الصورة كانت بعرض الشاشة وارتفاع 220px لكل أستاذ) ───── */
@media (max-width:575.98px){
    html body article.fd-member-card{display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;align-items:start!important;gap:0 12px!important;padding:12px!important;position:relative}
    html body article.fd-member-card .fd-member-visual{width:96px!important;height:auto!important;min-height:0!important;padding:0!important;margin:0!important;position:static!important}
    html body article.fd-member-card .fd-member-photo{width:96px!important;height:116px!important;min-height:0!important;max-height:116px!important;aspect-ratio:auto!important;border-radius:16px!important;overflow:hidden}
    html body article.fd-member-card .fd-member-photo img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center top!important}
    html body article.fd-member-card .fd-photo-placeholder{width:100%!important;height:100%!important;min-height:0!important}
    html body article.fd-member-card .fd-photo-placeholder small{display:none!important}
    html body article.fd-member-card .fd-save-person{position:absolute!important;top:10px!important;inset-inline-end:10px!important;margin:0!important;z-index:2}
    html body article.fd-member-card .fd-member-body{padding:0!important;min-width:0}
    html body article.fd-member-card .fd-member-topline{padding-inline-end:36px;flex-wrap:wrap}
}

/* ───── صفحة الدخول: لوحة الهوية مختصرة على الموبايل حتى يظهر النموذج مباشرة (كانت تأخذ شاشة كاملة) ───── */
@media (max-width:767.98px){
    html body .uw-auth-shell .uw-auth-stage{min-height:0!important;padding:20px!important;gap:12px!important}
    html body .uw-auth-shell .uw-auth-emblem-card{width:84px!important;height:84px!important;flex:0 0 auto!important}
    html body .uw-auth-shell .uw-auth-emblem-card .uw-auth-logo-hero{width:84px!important;height:84px!important;max-width:84px!important}
    html body .uw-auth-shell .uw-auth-emblem-card .uw-auth-logo-hero img{width:100%!important;height:100%!important;object-fit:contain}
    html body .uw-auth-shell .uw-auth-emblem-glow{width:110px!important;height:110px!important}
}


/* ───── ترقيم الأخبار المختصر: 1 … 4 5 [6] 7 8 … 96 ───── */
.uw-news-pagination{align-items:center!important}
.uw-news-pagination .uw-news-page-numbers{flex-wrap:nowrap;align-items:center}
.uw-news-pagination .uw-news-page-gap{display:inline-grid;place-items:center;min-width:26px;align-self:stretch;color:#8aa0b5;font-weight:800;letter-spacing:1px;user-select:none}
@media (max-width:575.98px){
    .uw-news-pagination{flex-direction:row!important;flex-wrap:nowrap!important;justify-content:center!important;gap:4px!important;padding:12px 8px!important}
    .uw-news-pagination .uw-news-page-numbers{gap:3px!important}
    .uw-news-pagination .uw-news-page-numbers a.is-far{display:none!important}
    .uw-news-pagination .uw-news-page-gap{min-width:18px}
    .uw-news-pagination .uw-news-page-numbers a,
    .uw-news-pagination .uw-news-page-nav{min-width:34px!important;width:auto!important;height:36px!important;padding-inline:6px!important;font-size:.85rem!important;flex:0 0 auto!important}
    .uw-news-pagination .uw-news-page-nav{font-size:0!important}
    .uw-news-pagination .uw-news-page-nav i{font-size:1rem!important}
}

/* ── رؤوس الجداول: لون واحد ثابت حسب قالب الصفحة بدل تدرّج مكرر في كل خلية ── */
#uwPageTop { --uwt-head: #075e67; --uwt-head-text: #ffffff; }
#uwPageTop.ucx { --uwt-head: var(--ucx-c-deep, var(--ucx-c, #075e67)); }
#uwPageTop.uw-quality-assurance-portal-mode { --uwt-head: var(--qc-ink, #0c1b33); }
#uwPageTop:is(.uw-sustainability-microsite-mode, .uw-continuing-education-portal-mode, .uw-incubator-portal-mode) { --uwt-head: var(--sh-forest, #1f4a3a); }
#uwPageTop table thead th,
#uwPageTop table.uw-smart-table thead th,
#uwPageTop table thead th.pro-sortable {
    background-color: var(--uwt-head) !important;
    background-image: none !important;
    color: var(--uwt-head-text) !important;
    -webkit-text-fill-color: var(--uwt-head-text) !important;
    border-color: color-mix(in srgb, var(--uwt-head) 80%, #fff) !important;
    box-shadow: none !important;
}
#uwPageTop table thead th :is(strong, b, span, a, i, small) {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    background: none !important;
}
#uwPageTop table thead th .pro-sort-ic { opacity: .55; }
#uwPageTop table thead th.pro-sortable:hover { background-color: color-mix(in srgb, var(--uwt-head) 86%, #000) !important; }
#uwPageTop table thead th.pro-sortable:is(.is-asc, .is-desc, [aria-sort="ascending"], [aria-sort="descending"]) .pro-sort-ic { opacity: 1; }
