/* ═══════════════════════════════════════════════════════════════
   دليلي الجامعي — نظام التصميم (Royal Scholarly)
   إعادة تصميم واجهة كاملة بهوية جامعية مستقلة: نيلي ملكي + نحاسي
   على خلفية ورقية دافئة. Premium · Minimal · Clean.
   ملاحظة: أسماء الفئات مطابقة للأصل حتى لا تتأثر أي وظيفة JavaScript.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy-900: #10162F;
  --navy-800: #17203F;
  --navy-700: #1F2C54;
  --navy-600: #2C3D6E;
  --navy-500: #3D5290;
  --navy-100: #E4E8F3;
  --navy-50:  #F0F3FA;
  --brass-600: #A67C33;
  --brass-500: #C69A48;
  --brass-400: #DAB56A;
  --brass-100: #F5EAD3;
  --paper:     #F6F4EF;
  --surface:   #FFFFFF;
  --surface-2: #FBFAF7;
  --ink:       #141721;
  --ink-muted: #565C6E;
  --ink-soft:  #868C9C;
  --line:      #EAE7DF;
  --line-2:    #DFDBD1;
  --sh-xs: 0 1px 2px rgba(16,22,47,0.04);
  --sh-sm: 0 1px 3px rgba(16,22,47,0.04), 0 4px 16px -6px rgba(16,22,47,0.10);
  --sh-md: 0 4px 14px -4px rgba(16,22,47,0.08), 0 16px 40px -16px rgba(16,22,47,0.14);
  --sh-lg: 0 10px 28px -8px rgba(16,22,47,0.12), 0 30px 64px -24px rgba(16,22,47,0.22);
  --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.18s var(--ease); --t-med: 0.32s var(--ease); --t-slow: 0.6s var(--ease);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--navy-100); color: var(--navy-800); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  font-family: "Segoe UI", "Tahoma", "Cairo", system-ui, sans-serif;
  direction: rtl; text-align: right; background: var(--paper); color: var(--ink);
  line-height: 1.75; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2.5px solid var(--navy-500); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 26px; }

/* الهيدر */
.site-header {
  background: rgba(246,244,239,0.82);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(145deg, var(--navy-600), var(--navy-800));
  display: grid; place-items: center; font-size: 22px; flex-shrink: 0; color: #fff; position: relative;
  box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255,255,255,0.14);
}
.brand-logo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 30% 25%, rgba(218,181,106,0.45), transparent 55%); }
.brand-text b { font-size: 1.16rem; display: block; line-height: 1.15; color: var(--navy-800); font-weight: 700; letter-spacing: -0.02em; }
.brand-text span { font-size: 0.72rem; color: var(--ink-soft); font-weight: 500; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-2); color: var(--navy-700); font-size: 1.4rem; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; line-height: 1; transition: background var(--t-fast); }
.nav-toggle:hover { background: var(--navy-50); }
.main-nav ul { list-style: none; display: flex; gap: 3px; align-items: center; }
.main-nav a { display: block; padding: 9px 15px; border-radius: 11px; font-size: 0.92rem; font-weight: 500; color: var(--ink-muted); transition: color var(--t-fast), background var(--t-fast); }
.main-nav a:hover { background: var(--navy-50); color: var(--navy-700); }
.main-nav a.active { background: var(--navy-700); color: #fff; }

/* الهيرو */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-700) 55%, var(--navy-600) 100%); color: #fff; padding: 96px 0 104px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 55% at 78% 12%, rgba(198,154,72,0.22), transparent 60%), radial-gradient(50% 50% at 15% 90%, rgba(61,82,144,0.5), transparent 60%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%); mask-image: linear-gradient(to bottom, #000, transparent 75%); }
.hero .container { position: relative; z-index: 1; }
.hero .badge, .hero h1, .hero p, .hero-actions { animation: rise 0.6s var(--ease) both; }
.hero h1 { animation-delay: 0.06s; }
.hero p { animation-delay: 0.12s; }
.hero-actions { animation-delay: 0.18s; }
.hero .badge { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); padding: 8px 18px; border-radius: 999px; font-size: 0.84rem; font-weight: 500; margin-bottom: 26px; color: #eef1f8; backdrop-filter: blur(6px); }
.hero .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brass-400); box-shadow: 0 0 0 4px rgba(218,181,106,0.25); }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin-bottom: 18px; background: linear-gradient(120deg, #fff 40%, var(--brass-400)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #cdd4e6; max-width: 620px; margin: 0 auto; font-weight: 400; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-actions .btn { padding: 13px 26px; font-size: 0.98rem; border-radius: 14px; }
.btn-hero-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(6px); }
.btn-hero-ghost:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.hero .wave { position: absolute; bottom: -1px; left: 0; right: 0; z-index: 1; line-height: 0; }
.hero .wave svg { width: 100%; height: 54px; display: block; }

/* الأقسام */
.section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 44px; max-width: 640px; margin-inline: auto; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); color: var(--navy-800); font-weight: 800; letter-spacing: -0.03em; position: relative; display: inline-block; }
.section-head h2::after { content: ""; display: block; width: 52px; height: 3px; margin: 14px auto 0; background: linear-gradient(90deg, var(--brass-500), var(--brass-400)); border-radius: 2px; }
.section-head p { color: var(--ink-muted); margin-top: 14px; font-size: 1.02rem; }
.section-head .eyebrow, .eyebrow { display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-600); margin-bottom: 10px; }

/* الشبكات */
.grid { display: grid; gap: 20px; }
.grid-home { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* البطاقة الأساسية */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-sm); transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med); position: relative; overflow: hidden; }
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: var(--navy-100); }

/* بطاقة الرئيسية */
.home-card { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 208px; padding: 30px 22px; }
.home-card .ic { font-size: 1.85rem; width: 66px; height: 66px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 20px; background: var(--navy-50); color: var(--navy-700); box-shadow: inset 0 0 0 1px rgba(44,61,110,0.06); transition: transform var(--t-med), background var(--t-med); }
.home-card:hover .ic { transform: scale(1.08) translateY(-2px); background: var(--navy-100); }
.home-card h3 { font-size: 1.1rem; color: var(--navy-800); font-weight: 700; letter-spacing: -0.02em; }
.home-card p { font-size: 0.88rem; color: var(--ink-muted); line-height: 1.5; }
.home-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--brass-500), var(--brass-400)); transform: scaleX(0); transform-origin: center; transition: transform var(--t-med); }
.home-card:hover::before { transform: scaleX(1); }

/* الأزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all var(--t-fast); font-family: inherit; }
.btn-primary { background: var(--navy-700); color: #fff; box-shadow: var(--sh-xs); }
.btn-primary:hover { background: var(--navy-800); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.btn-gold { background: var(--brass-500); color: #fff; box-shadow: var(--sh-xs); }
.btn-gold:hover { background: var(--brass-600); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-50); border-color: var(--navy-100); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* بطاقة الخطوة */
.step-card { display: flex; gap: 18px; align-items: flex-start; text-align: right; padding: 24px; }
.step-card .num { flex-shrink: 0; width: 50px; height: 50px; border-radius: 15px; background: linear-gradient(145deg, var(--navy-600), var(--navy-800)); color: #fff; display: grid; place-items: center; font-size: 1.25rem; font-weight: 700; box-shadow: var(--sh-sm); }
.step-card h3 { font-size: 1.1rem; color: var(--navy-800); margin-bottom: 5px; font-weight: 700; }
.step-card p { font-size: 0.92rem; color: var(--ink-muted); }

/* بطاقة المرفق */
.facility-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.facility-img { height: 138px; margin-bottom: 0; border-radius: 0; background: radial-gradient(120% 120% at 80% 0%, rgba(198,154,72,0.25), transparent 55%), linear-gradient(150deg, var(--navy-700), var(--navy-900)); display: grid; place-items: center; color: rgba(255,255,255,0.92); font-size: 2.6rem; position: relative; }
.facility-img::after { content: ""; position: absolute; inset: 0; opacity: 0.4; background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px); background-size: 16px 16px; }
.facility-card h3 { color: var(--navy-800); font-size: 1.12rem; font-weight: 700; padding: 20px 22px 0; }
.facility-card .b-no { font-size: 0.76rem; color: var(--brass-600); font-weight: 700; letter-spacing: 0.02em; margin: 6px 22px 0; display: inline-block; padding: 3px 10px; background: var(--brass-100); border-radius: 999px; width: fit-content; }
.facility-card .desc { font-size: 0.9rem; color: var(--ink-muted); flex-grow: 1; padding: 10px 22px 0; }
.facility-card .btn-row { padding: 0 22px 22px; margin-top: 16px; }

/* الخدمات */
.service-card { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
.service-card .ic { font-size: 1.5rem; flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-700); transition: transform var(--t-med), background var(--t-med); }
.service-card:hover .ic { transform: scale(1.06); background: var(--navy-100); }
.service-card h3 { font-size: 1.06rem; color: var(--navy-800); font-weight: 700; }
.service-card p { font-size: 0.86rem; color: var(--ink-muted); }
.service-card .go { margin-inline-start: auto; color: var(--navy-500); font-size: 1.1rem; flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--navy-50); transition: transform var(--t-fast), background var(--t-fast); }
.service-card:hover .go { background: var(--navy-700); color: #fff; transform: translateX(-3px); }

/* الكليات */
.college-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; overflow: hidden; box-shadow: var(--sh-xs); transition: box-shadow var(--t-med), border-color var(--t-med); }
.college-item:hover { box-shadow: var(--sh-sm); }
.college-item.open { box-shadow: var(--sh-md); border-color: var(--navy-100); }
.college-head { width: 100%; text-align: right; background: transparent; border: 0; cursor: pointer; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; font-family: inherit; font-size: 1.12rem; font-weight: 700; color: var(--navy-800); transition: background var(--t-fast); }
.college-head:hover { background: var(--navy-50); }
.college-head .chev { transition: transform var(--t-med); color: var(--brass-600); flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--brass-100); font-size: 0.9rem; }
.college-item.open .college-head .chev { transform: rotate(180deg); }
.college-body { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.college-item.open .college-body { max-height: 640px; }
.college-body-inner { padding: 4px 24px 24px; }
.college-body-inner h4 { color: var(--brass-600); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin: 18px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--navy-50); color: var(--navy-700); padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 500; border: 1px solid var(--navy-100); }

/* هيئة التدريس + البحث */
.search-box { position: relative; max-width: 520px; margin: 0 auto 34px; }
.search-box input { width: 100%; padding: 15px 50px 15px 18px; border-radius: 15px; border: 1px solid var(--line-2); font-family: inherit; font-size: 1rem; background: var(--surface); color: var(--ink); box-shadow: var(--sh-xs); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.search-box input::placeholder { color: var(--ink-soft); }
.search-box input:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 4px rgba(61,82,144,0.12); }
.search-box .s-ic { position: absolute; top: 50%; right: 18px; transform: translateY(-50%); color: var(--ink-soft); }
.faculty-card { padding: 26px; }
.faculty-card h3 { color: var(--navy-800); font-size: 1.1rem; font-weight: 700; }
.faculty-card .dept { color: var(--brass-600); font-size: 0.8rem; font-weight: 700; margin: 6px 0 14px; display: inline-block; padding: 3px 11px; background: var(--brass-100); border-radius: 999px; }
.faculty-card .row { display: flex; gap: 8px; font-size: 0.88rem; color: var(--ink-muted); margin-top: 8px; align-items: baseline; }
.faculty-card .row b { color: var(--navy-800); font-weight: 600; flex-shrink: 0; }
.no-result { text-align: center; color: var(--ink-soft); padding: 50px; grid-column: 1 / -1; font-size: 1rem; }

/* المرشد الذكي */
.advisor-wrap { max-width: 840px; margin: 0 auto; }
.advisor-input { display: flex; gap: 12px; margin-bottom: 22px; }
.advisor-input input { flex: 1; padding: 15px 20px; border-radius: 15px; border: 1px solid var(--line-2); font-family: inherit; font-size: 1rem; background: var(--surface); color: var(--ink); box-shadow: var(--sh-xs); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.advisor-input input:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 4px rgba(61,82,144,0.12); }
.quick-q { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; }
.quick-q button { background: var(--surface); border: 1px solid var(--line-2); color: var(--navy-700); padding: 9px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: all var(--t-fast); }
.quick-q button:hover { background: var(--navy-700); color: #fff; border-color: var(--navy-700); transform: translateY(-1px); }
.advisor-answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--sh-sm); min-height: 140px; position: relative; overflow: hidden; }
.advisor-answer::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 4px; background: linear-gradient(var(--brass-500), var(--brass-400)); opacity: 0; }
.advisor-answer:has(.a-a)::before { opacity: 1; }
.advisor-answer .a-q { color: var(--brass-600); font-weight: 700; margin-bottom: 10px; font-size: 0.98rem; }
.advisor-answer .a-a { color: var(--ink); line-height: 1.95; }
.advisor-answer .placeholder { color: var(--ink-soft); text-align: center; padding: 26px; }

/* التواصل */
.contact-card { text-align: center; padding: 30px 24px; }
.contact-card .ic { font-size: 1.8rem; width: 68px; height: 68px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 20px; background: var(--navy-50); color: var(--navy-700); transition: transform var(--t-med), background var(--t-med); }
.contact-card:hover .ic { transform: scale(1.07); background: var(--navy-100); }
.contact-card h3 { color: var(--navy-800); font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }

/* التقويم */
.timeline { max-width: 780px; margin: 0 auto; position: relative; padding-right: 34px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; right: 9px; width: 2px; background: linear-gradient(var(--navy-100), var(--line-2)); }
.tl-item { position: relative; padding: 0 34px 30px 0; }
.tl-item::before { content: ""; position: absolute; right: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brass-500); transform: translateX(50%); box-shadow: 0 0 0 4px var(--paper); }
.tl-item .tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; box-shadow: var(--sh-xs); transition: transform var(--t-med), box-shadow var(--t-med); }
.tl-item .tl-card:hover { transform: translateX(-4px); box-shadow: var(--sh-sm); }
.tl-item h3 { color: var(--navy-800); font-size: 1.06rem; font-weight: 700; }
.tl-item .date { color: var(--brass-600); font-size: 0.82rem; font-weight: 700; margin: 4px 0 7px; }
.tl-item p { font-size: 0.92rem; color: var(--ink-muted); }

/* الفوتر */
.site-footer { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #c7cee1; padding: 56px 0 40px; text-align: center; margin-top: 20px; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0; opacity: 0.4; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(60% 100% at 50% 0%, #000, transparent); mask-image: radial-gradient(60% 100% at 50% 0%, #000, transparent); }
.site-footer .container { position: relative; z-index: 1; }
.site-footer b { color: #fff; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.site-footer .f-slogan { color: var(--brass-400); margin-top: 8px; font-size: 0.95rem; font-weight: 500; }

/* عنوان الصفحة الداخلية */
.page-hero { background: linear-gradient(160deg, var(--navy-800), var(--navy-600)); color: #fff; padding: 66px 0 58px; text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 60% at 80% 10%, rgba(198,154,72,0.2), transparent 60%); }
.page-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.4; background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 20px 20px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; }
.page-hero p { color: #c7cee1; margin-top: 10px; font-size: 1.05rem; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #fff; margin-top: 20px; font-size: 0.88rem; font-weight: 500; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); transition: background var(--t-fast); }
.back-link:hover { background: rgba(255,255,255,0.18); }

/* حركة الظهور */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.grid > *, .timeline > *, .college-item { animation: rise 0.5s var(--ease) both; }
.grid > *:nth-child(2) { animation-delay: 0.04s; }
.grid > *:nth-child(3) { animation-delay: 0.08s; }
.grid > *:nth-child(4) { animation-delay: 0.12s; }
.grid > *:nth-child(5) { animation-delay: 0.16s; }
.grid > *:nth-child(6) { animation-delay: 0.2s; }
.grid > *:nth-child(7) { animation-delay: 0.24s; }
.grid > *:nth-child(8) { animation-delay: 0.28s; }

/* التجاوب */
@media (max-width: 1024px) {
  .grid-home { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav { position: absolute; top: 74px; right: 0; left: 0; background: rgba(246,244,239,0.98); backdrop-filter: blur(16px); max-height: 0; overflow: hidden; transition: max-height var(--t-med); border-bottom: 1px solid var(--line); }
  .main-nav.open { max-height: 460px; }
  .main-nav ul { flex-direction: column; padding: 12px 26px 20px; gap: 3px; }
  .main-nav a { padding: 13px 14px; border-radius: 10px; }
  .main-nav a.active { background: var(--navy-700); }
  .grid-home { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 84px; }
  .section { padding: 56px 0; }
  .advisor-input { flex-direction: column; }
  .advisor-input .btn { width: 100%; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .grid-home { grid-template-columns: 1fr; }
  .home-card { min-height: 180px; }
  .service-card { flex-wrap: wrap; }
  .service-card .go { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════════════════════════════════════════════════════════════
   المرشد الذكي — تحسينات تنظيم المعلومات وتجربة المستخدم (إضافية)
   بنفس هوية المنصة (نيلي + نحاسي)؛ لا تغيّر منطق البحث.
   ═══════════════════════════════════════════════════════════════ */

/* مربع البحث الرئيسي (أبرز عنصر) */
.advisor-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 8px 8px 8px 20px; box-shadow: var(--sh-md); margin-bottom: 24px;
  transition: box-shadow var(--t-med), border-color var(--t-med);
}
.advisor-search:focus-within { border-color: var(--navy-500); box-shadow: 0 0 0 4px rgba(61,82,144,0.12), var(--sh-md); }
.advisor-search .advisor-search-ic { color: var(--ink-soft); display: grid; place-items: center; flex-shrink: 0; }
.advisor-search .advisor-search-ic svg { width: 21px; height: 21px; }
.advisor-search input {
  flex: 1; border: 0; outline: 0; background: transparent; font-family: inherit;
  font-size: 1rem; color: var(--ink); padding: 12px 0; min-width: 0;
}
.advisor-search input::placeholder { color: var(--ink-soft); }
.advisor-search .btn { border-radius: 999px; padding: 12px 26px; flex-shrink: 0; }

/* كتل التنظيم */
.advisor-block { margin-top: 30px; }
.advisor-block-title { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-600); margin-bottom: 14px; }

/* بطاقة الإجابة — رأس وإجراءات */
.advisor-answer .a-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.advisor-answer .a-ic {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brass-100); font-size: 1.15rem;
}
.advisor-answer .a-q { color: var(--navy-800); font-weight: 700; font-size: 1.04rem; margin: 0; padding-top: 7px; }
.advisor-answer .a-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.advisor-answer .a-actions .btn { padding: 9px 16px; font-size: 0.86rem; }
/* حركة ظهور ناعمة للإجابة */
.advisor-answer.is-fading { animation: rise 0.4s var(--ease) both; }
/* مؤشر تحميل */
.advisor-answer .a-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-muted); padding: 28px; font-size: 0.95rem; }
.a-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--navy-100); border-top-color: var(--navy-600); animation: a-spin 0.7s linear infinite; }
@keyframes a-spin { to { transform: rotate(360deg); } }

/* مجموعات مصنّفة (Accordion) */
.advisor-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 12px; overflow: hidden; box-shadow: var(--sh-xs); transition: box-shadow var(--t-med), border-color var(--t-med); }
.advisor-group.open { box-shadow: var(--sh-sm); border-color: var(--navy-100); }
.advisor-group-head { width: 100%; text-align: right; background: transparent; border: 0; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; font-family: inherit; font-size: 1.04rem; font-weight: 700; color: var(--navy-800); transition: background var(--t-fast); }
.advisor-group-head:hover { background: var(--navy-50); }
.advisor-group-label { display: inline-flex; align-items: center; gap: 8px; }
.advisor-group-label em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--brass-600); background: var(--brass-100); padding: 2px 9px; border-radius: 999px; }
.advisor-group-chev { color: var(--brass-600); transition: transform var(--t-med); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--brass-100); font-size: 0.85rem; }
.advisor-group.open .advisor-group-chev { transform: rotate(180deg); }
.advisor-group-body { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.advisor-group.open .advisor-group-body { max-height: 720px; }
.advisor-group-inner { padding: 4px 14px 14px; }
.advisor-q-item { width: 100%; text-align: right; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; padding: 13px 16px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: inherit; font-size: 0.92rem; font-weight: 500; color: var(--navy-700); transition: all var(--t-fast); }
.advisor-q-item:hover { background: var(--navy-50); border-color: var(--navy-100); transform: translateX(-3px); }
.advisor-q-item svg { width: 16px; height: 16px; color: var(--brass-500); flex-shrink: 0; }

@media (max-width: 480px) {
  .advisor-search { flex-wrap: nowrap; padding: 6px 6px 6px 16px; }
  .advisor-search .btn { padding: 10px 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   المرشد الجامعي الذكي — خط Times New Roman في كل الموقع
   (تعديل بصري مطلوب صراحةً؛ لا يؤثّر على أي وظيفة)
   ═══════════════════════════════════════════════════════════════ */
body, .btn, input, textarea, select, button,
h1, h2, h3, h4, h5, h6,
.brand-text b, .hero h1, .section-head h2, .advisor-answer, .advisor-q-item,
.advisor-group-head, .card, .home-card, .faculty-card, .contact-card {
  font-family: "Times New Roman", "Times", "Georgia", serif !important;
}

/* ═══════════════════════════════════════════════════════════════
   الصفحة الرئيسية الجديدة (منصة معرفية) — بحث في المنتصف
   ═══════════════════════════════════════════════════════════════ */
.kb-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
  color: #fff; padding: 90px 0 84px; text-align: center;
}
.kb-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 78% 12%, rgba(198,154,72,0.22), transparent 60%), radial-gradient(50% 50% at 15% 90%, rgba(61,82,144,0.5), transparent 60%); }
.kb-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%); mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.kb-hero .container { position: relative; z-index: 1; }
.kb-badge { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); padding: 8px 18px; border-radius: 999px; font-size: 0.86rem; margin-bottom: 22px; color: #eef1f8; }
.kb-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brass-400); box-shadow: 0 0 0 4px rgba(218,181,106,0.25); }
.kb-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 16px;
  background: linear-gradient(120deg, #fff 45%, var(--brass-400)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kb-hero p { font-size: clamp(1.02rem, 2vw, 1.25rem); color: #cdd4e6; max-width: 620px; margin: 0 auto 34px; }

/* مربع البحث الكبير (العنصر الرئيسي) */
.kb-search { display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 0 auto;
  background: var(--surface); border-radius: 999px; padding: 9px 9px 9px 22px; box-shadow: var(--sh-lg); }
.kb-search .kb-ic { color: var(--ink-soft); display: grid; place-items: center; flex-shrink: 0; }
.kb-search .kb-ic svg { width: 23px; height: 23px; }
.kb-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.08rem; color: var(--ink); padding: 14px 0; min-width: 0; }
.kb-search input::placeholder { color: var(--ink-soft); }
.kb-search .btn { border-radius: 999px; padding: 14px 30px; flex-shrink: 0; font-size: 1rem; }

/* اقتراحات تحت البحث */
.kb-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 20px; }
.kb-examples .lbl { color: #b9c0d6; font-size: 0.86rem; align-self: center; }
.kb-examples button { background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.18); color: #eef1f8; padding: 7px 15px; border-radius: 999px; font-size: 0.85rem; cursor: pointer; transition: background .2s; font-family: inherit; }
.kb-examples button:hover { background: rgba(255,255,255,0.18); }

/* إجابة مباشرة على الرئيسية */
.kb-answer-wrap { max-width: 820px; margin: -40px auto 0; position: relative; z-index: 5; padding: 0 22px; }
.kb-answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--sh-lg); }
.kb-answer .a-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.kb-answer .a-ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brass-100); font-size: 1.2rem; }
.kb-answer .a-q { color: var(--navy-800); font-weight: 700; font-size: 1.1rem; padding-top: 7px; }
.kb-answer .a-cat { display: inline-block; font-size: 0.74rem; font-weight: 700; color: var(--brass-600); background: var(--brass-100); padding: 3px 12px; border-radius: 999px; margin-bottom: 12px; }
.kb-answer .a-a { color: var(--ink); line-height: 1.95; font-size: 1.02rem; }
.kb-answer .a-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.kb-answer.is-fading { animation: rise 0.4s var(--ease) both; }

/* أقسام المحتوى */
.kb-section { padding: 56px 0; }
.kb-section-head { margin-bottom: 26px; text-align: center; }
.kb-section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--navy-800); font-weight: 800; }
.kb-section-head h2::after { content: ""; display: block; width: 48px; height: 3px; margin: 12px auto 0; background: linear-gradient(90deg, var(--brass-500), var(--brass-400)); border-radius: 2px; }

/* شبكة الأسئلة الشائعة */
.kb-qgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.kb-qcard { text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: var(--sh-xs); transition: all var(--t-med); font-family: inherit; }
.kb-qcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--navy-100); }
.kb-qcard span { font-weight: 700; color: var(--navy-800); font-size: 0.98rem; }
.kb-qcard .arrow { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); }

/* تصنيفات */
.kb-cats { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; }
.kb-cat { display: inline-flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 11px 20px; cursor: pointer; font-weight: 700; color: var(--navy-700); font-size: 0.95rem; box-shadow: var(--sh-xs); transition: all var(--t-fast); font-family: inherit; }
.kb-cat:hover { background: var(--navy-700); color: #fff; border-color: var(--navy-700); transform: translateY(-2px); }
.kb-cat em { font-style: normal; font-size: 0.72rem; background: var(--brass-100); color: var(--brass-600); padding: 2px 9px; border-radius: 999px; }
.kb-cat:hover em { background: rgba(255,255,255,0.2); color: #fff; }

/* عمودان: آخر الأسئلة + الأكثر استخدامًا */
.kb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.kb-list-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm); }
.kb-list-panel h3 { font-size: 1.1rem; color: var(--navy-800); font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.kb-list-item { width: 100%; text-align: right; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin-bottom: 9px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-family: inherit; font-size: 0.92rem; font-weight: 600; color: var(--navy-700); transition: all var(--t-fast); }
.kb-list-item:hover { background: var(--navy-50); border-color: var(--navy-100); transform: translateX(-3px); }
.kb-list-item .rank { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--brass-100); color: var(--brass-600); font-weight: 800; font-size: 0.8rem; }

@media (max-width: 768px) {
  .kb-qgrid, .kb-two { grid-template-columns: 1fr; }
  .kb-search { flex-wrap: nowrap; padding: 7px 7px 7px 16px; }
  .kb-search .btn { padding: 12px 18px; }
  .kb-search input { font-size: 1rem; }
}
