/* ==========================================================================
   ScholarshipsGateway — Design System
   Mobile-first, accessible (WCAG 2.1 AA), RTL-ready
   ========================================================================== */

/* ─── Custom Properties ─────────────────────────────────────────────────────── */
:root {
  --color-primary:       #0A4C7F;   /* Deep academic blue */
  --color-primary-dark:  #083D66;
  --color-primary-light: #1A6FAD;
  --color-accent:        #F5820D;   /* Warm amber — energy, approachability */
  --color-accent-dark:   #D46B08;
  --color-success:       #2E7D32;
  --color-warning:       #ED6C02;
  --color-error:         #C62828;
  --color-text:          #1A1A2E;
  --color-text-muted:    #555570;
  --color-text-light:    #888899;
  --color-bg:            #FFFFFF;
  --color-bg-alt:        #F7F9FC;
  --color-bg-dark:       #0A1628;
  --color-border:        #DDE3EC;
  --color-border-light:  #EEF2F8;

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic:  'Cairo', 'Noto Naskh Arabic', 'Amiri', serif;
  --font-urdu:    'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Web Naskh', serif;
  --font-hindi:   'Noto Sans Devanagari', sans-serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-card: 0 2px 16px rgba(10,76,127,.08);

  --transition: 0.2s ease;
  --max-width: 1280px;
  --header-height: 72px;
}

/* ─── RTL Support ──────────────────────────────────────────────────────────── */
[dir="rtl"] {
  --font-sans: 'Cairo', 'Noto Naskh Arabic', 'Amiri', sans-serif;
}
[lang="ur"] {
  --font-sans: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
  font-size: 1.1em;
  line-height: 2;
}
[lang="hi"] {
  --font-sans: 'Noto Sans Devanagari', sans-serif;
}

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--color-text); }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
p  { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; }
[dir="rtl"] ul, [dir="rtl"] ol { padding-left: 0; padding-right: 1.5rem; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }
.section  { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.row      { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.col-auto { flex: 1 1 0; min-width: 200px; }

/* ─── Announcement block (admin-entered HTML) ───────────────────────────────── */
.announcement-block { max-width: 100%; overflow-x: auto; }
.announcement-block img,
.announcement-block video,
.announcement-block iframe { max-width: 100% !important; height: auto; }
.announcement-block table { max-width: 100%; border-collapse: collapse; }
@media (max-width: 640px) {
  .announcement-block table { display: block; overflow-x: auto; width: 100%; }
  .announcement-block td,
  .announcement-block th { white-space: normal; }
  .announcement-block [style*="width"] { max-width: 100% !important; width: auto !important; min-width: 0 !important; }
}

/* Grid utilities */
.grid     { display: grid; gap: 1.5rem; }
.grid-2   { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3   { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4   { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 640px) {
  .grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}

/* ─── Header / Navbar ──────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 1.5rem;
}
.logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; white-space: nowrap;
}
.logo img { height: 48px; width: auto; display: block; flex-shrink: 0; }
.logo-text {
  display: flex; flex-direction: column; justify-content: center;
  line-height: 1; gap: 1px;
}
.logo-line1 {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-primary);
}
.logo-line2 {
  font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--color-accent); line-height: 1;
}

/* Navigation */
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 0.25rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 500; color: var(--color-text);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none; background: none;
}
.nav-link:hover, .nav-link.active {
  background: #dce8f3; color: var(--color-primary);
  text-decoration: none;
}
.nav-link svg { width: 14px; height: 14px; opacity: 0.6; }

/* Dropdown — mega style */
.dropdown {
  position: absolute; top: calc(100% + 8px);
  left: 0; min-width: 460px;
  background: #fff;
  border: 1px solid #d8e4ef;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(10,76,127,.13), 0 2px 8px rgba(0,0,0,.06);
  padding: 1rem; display: none; z-index: 200;
}
[dir="rtl"] .dropdown { left: auto; right: 0; }
.nav-item:hover .dropdown { display: block; }
.dropdown.open { display: block; }
.nav-item.open > .nav-link svg { transform: rotate(180deg); }

.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .125rem; }
.dd-col {}
.dd-section-label {
  font-size: .6875rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: #8899aa;
  padding: .25rem .625rem .5rem; display: block;
}
.dd-divider { border: none; border-top: 1px solid #eef1f5; margin: .625rem 0; }
.dd-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .625rem .75rem; border-radius: 10px;
  text-decoration: none; color: inherit; transition: background .15s;
  white-space: normal;
}
.dd-item:hover { background: #dce8f3; text-decoration: none; color: inherit; }
.dd-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: #eef3f8; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background .15s;
}
.dd-item:hover .dd-icon { background: #c8ddef; }
.dd-body { flex: 1; min-width: 0; }
.dd-title { display: block; font-size: .875rem; font-weight: 700; color: #0d1b2a; line-height: 1.25; }
.dd-desc  { display: block; font-size: .75rem; color: #6b7280; margin-top: .2rem; line-height: 1.45; }

/* keep old dropdown-divider/label as fallback aliases */
.dropdown-divider { border: none; border-top: 1px solid #eef1f5; margin: .625rem 0; }
.dropdown-label { font-size:.6875rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:#8899aa;padding:.25rem .625rem .5rem;display:block; }

/* Header CTA */
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-whatsapp {
  display: flex; align-items: center; gap: 0.375rem;
  background: #25D366; color: #fff; padding: 0.5rem 1rem;
  border-radius: var(--radius-full); font-size: 0.875rem; font-weight: 600;
  text-decoration: none; transition: background var(--transition);
  white-space: nowrap;
}
.btn-whatsapp:hover { background: #1EBE5A; color: #fff; text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 0.5rem; border-radius: var(--radius-md); color: var(--color-text);
}
.nav-toggle:hover { background: var(--color-bg-alt); }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: var(--header-height); left: 0; right: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 1rem; box-shadow: var(--shadow-lg); gap: 0.125rem;
    max-height: calc(100vh - var(--header-height)); overflow-y: auto;
  }
  .nav-toggle { display: flex; }
  .dropdown { position: static; box-shadow: none; border: 1px solid var(--color-border-light); background: #f8fafc; display: block; margin-top: 0.25rem; border-radius: 10px; padding: .5rem; min-width: 0 !important; width: 100%; box-sizing: border-box; }
  .dd-grid { grid-template-columns: 1fr; }
  .dd-item { padding: .5rem .625rem; }
  .dd-desc { display: none; }
  .dd-section-label { padding: .375rem .625rem .25rem; }
  .header-actions .btn-whatsapp { display: none; }
}

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: #fff; padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('/public/images/hero-pattern.svg') repeat;
  opacity: 0.05;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; margin-bottom: 1.25rem; }
.hero p   { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center; margin-top: 3rem; }
.hero-stat  { text-align: center; }
.hero-stat-number { font-size: 2rem; font-weight: 800; color: var(--color-accent); line-height: 1; }
.hero-stat-label  { font-size: 0.875rem; opacity: 0.85; margin-top: 0.25rem; }

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6875rem 1.5rem; border-radius: var(--radius-full);
  font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap; line-height: 1.3;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--color-primary); border-color: #fff; }
.btn-secondary:hover { background: var(--color-bg-alt); color: var(--color-primary); text-decoration: none; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.btn-outline-white.saved { background: #fff; color: var(--color-primary); border-color: #fff; font-weight: 700; }
.btn-outline-white.saved:hover { background: #f0f4f8; color: var(--color-primary-dark); }
.btn-ghost { background: transparent; color: var(--color-text); border-color: transparent; }
.btn-ghost:hover { background: var(--color-bg-alt); text-decoration: none; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-bg); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden; transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-body  { padding: 1.25rem; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.375rem; }
.card-meta  { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.card-footer { padding: 0.875rem 1.25rem; border-top: 1px solid var(--color-border-light); background: var(--color-bg-alt); }

/* ─── University card ───────────────────────────────────────────────────────── */
.uni-card {
  display: flex; flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none !important;
  color: var(--color-text);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.uni-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
  text-decoration: none;
}
/* Light header that holds the logo */
.uni-card__head {
  background: linear-gradient(160deg, #EBF4FF 0%, #F5F9FF 100%);
  border-top: 3px solid var(--color-primary);
  border-bottom: 1px solid var(--color-border-light);
  padding: 1.375rem 1.25rem .875rem;
  display: flex; align-items: center; justify-content: center;
  min-height: 96px; position: relative;
}
.uni-card:hover .uni-card__head {
  background: linear-gradient(160deg, #DCF0FF 0%, #EBF5FF 100%);
}
/* Logo box */
.uni-card__logo,
.uni-card-logo {
  width: 72px; height: 72px;
  background: #fff;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  padding: 8px; flex-shrink: 0;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 2px 8px rgba(10,76,127,.12);
}
.uni-card__logo img,
.uni-card-logo img { width: 100%; height: 100%; object-fit: contain; }
/* Initials fallback (no logo) */
.uni-card__initials {
  width: 72px; height: 72px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.625rem; font-weight: 800; color: #fff;
  box-shadow: 0 3px 10px rgba(10,76,127,.25);
  letter-spacing: -.5px;
}
/* Card body — name + tags */
.uni-card__body,
.uni-card-body {
  padding: 1rem 1.125rem .625rem;
  flex: 1; display: flex; flex-direction: column; gap: .375rem;
}
.uni-card__name,
.uni-card-name {
  font-size: .9375rem; font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0; line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.uni-card__tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .125rem; }
.uni-card__tag {
  font-size: .6875rem; font-weight: 600; line-height: 1;
  padding: .25rem .5rem; border-radius: var(--radius-full);
  background: var(--color-bg-alt); color: var(--color-text-muted);
  border: 1px solid var(--color-border-light);
}
.uni-card__tag--public  { background: #EBF4FF; color: #0A4C7F; border-color: #BDD7F0; }
.uni-card__tag--private { background: #FFF3E0; color: #BF360C; border-color: #FFCC80; }
.uni-card__tag--ranking { background: #F3E5F5; color: #6A1B9A; border-color: #CE93D8; }
/* Card footer CTA */
.uni-card__foot {
  padding: .625rem 1.125rem;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg-alt);
  font-size: .8125rem; font-weight: 600; color: var(--color-primary);
  display: flex; align-items: center; justify-content: space-between;
}
.uni-card:hover .uni-card__foot { color: var(--color-primary-dark); }
/* Legacy aliases kept for backward compat */
.uni-card__meta,
.uni-card-city { font-size: .8125rem; color: var(--color-text-muted); }
.uni-card-footer { display: none; }

/* ─── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; letter-spacing: .02em;
}
.badge-state       { background: #E8F4FD; color: #0A4C7F; }
.badge-foundation  { background: #FFF3E0; color: #E65100; }
.badge-full        { background: #E8F5E9; color: #2E7D32; }
.badge-partial     { background: #FFF8E1; color: #F57F17; }
.badge-government  { background: #E8EAF6; color: #283593; }
.badge-new         { background: #FCE4EC; color: #880E4F; }
.badge-active      { background: #E8F5E9; color: #2E7D32; }
.badge-english     { background: #E3F2FD; color: #0D47A1; }
.badge-turkish     { background: #FFF9C4; color: #F57F17; }

/* ─── Search & Filters ─────────────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 0.5rem; background: var(--color-bg);
  border: 2px solid var(--color-border); border-radius: var(--radius-full);
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.search-bar input {
  flex: 1; border: none; outline: none; font-size: 0.9375rem;
  background: transparent; color: var(--color-text);
}
.search-bar:focus-within { border-color: var(--color-primary); }

.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 0.375rem; }

/* ─── Form Elements ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem;
  color: var(--color-text);
}
.form-label .required { color: var(--color-error); margin-left: 0.25rem; }
.form-control {
  width: 100%; padding: 0.6875rem 0.875rem;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  font-size: 0.9375rem; font-family: var(--font-sans); color: var(--color-text);
  background: var(--color-bg); transition: border-color var(--transition);
  appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10,76,127,.12);
}
.form-control::placeholder { color: var(--color-text-light); }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }
[dir="rtl"] select.form-control { background-position: left 0.875rem center; padding-right: 0.875rem; padding-left: 2.5rem; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.25rem; }
.form-error { color: var(--color-error); font-size: 0.8125rem; margin-top: 0.25rem; }

/* Honeypot field — visually hidden */
.hp-field { position: absolute; opacity: 0; pointer-events: none; z-index: -1; }

/* ─── Tabs (University profile) ─────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--color-border); overflow-x: auto; gap: 0; margin-bottom: 2rem; }
.tab-btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.875rem 1.125rem; border: none; background: none;
  font-size: 0.875rem; font-weight: 600; color: var(--color-text-muted);
  cursor: pointer; white-space: nowrap; position: relative;
  border-bottom: 2.5px solid transparent; margin-bottom: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--transition), background-color var(--transition);
}
.tab-btn:hover  { color: #fff; background-color: var(--color-accent); }
.tab-btn.active { color: #fff; background-color: var(--color-accent); border-bottom-color: var(--color-accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.375rem; flex-wrap: wrap; align-items: center; justify-content: center; }
.page-btn {
  min-width: 38px; height: 38px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--color-border); background: var(--color-bg);
  font-size: 0.875rem; font-weight: 500; color: var(--color-text);
  text-decoration: none; cursor: pointer; transition: all var(--transition);
}
.page-btn:hover     { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.page-btn.active    { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.page-btn.disabled  { opacity: 0.4; pointer-events: none; }

/* ─── Alert / Flash messages ─────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1.125rem; border-radius: var(--radius-md);
  margin-bottom: 1.25rem; font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 0.625rem;
}
.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.alert-error   { background: #FFEBEE; color: #B71C1C; border: 1px solid #EF9A9A; }
.alert-warning { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }
.alert-info    { background: #E3F2FD; color: #0D47A1; border: 1px solid #90CAF9; }

/* ─── Section headers ─────────────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p  { font-size: 1.0625rem; color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }
.section-label {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.625rem;
}

/* ─── University profile ───────────────────────────────────────────────────── */
.uni-header {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff; padding: 3rem 0 2rem;
}
.uni-header-inner { display: flex; align-items: flex-start; gap: 2rem; }
.uni-logo-wrap {
  width: 100px; height: 100px; background: #fff;
  border-radius: var(--radius-lg); padding: 0.75rem;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.uni-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.uni-header-info { flex: 1; }
.uni-header-info h1 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 0.5rem; }
.uni-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.uni-meta   { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.875rem; opacity: 0.9; }
.uni-meta-item { display: flex; align-items: center; gap: 0.375rem; }

/* ─── Stats strip ──────────────────────────────────────────────────────────── */
.stats-strip { background: var(--color-primary); color: #fff; padding: 1.5rem 0; }
.stats-grid  { display: flex; flex-wrap: wrap; gap: 0; justify-content: center; }
.stat-item   { text-align: center; padding: 0.5rem 2rem; border-right: 1px solid rgba(255,255,255,.2); }
.stat-item:last-child { border-right: none; }
[dir="rtl"] .stat-item { border-right: none; border-left: 1px solid rgba(255,255,255,.2); }
[dir="rtl"] .stat-item:last-child { border-left: none; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--color-accent); line-height: 1; }
.stat-label  { font-size: 0.8125rem; opacity: 0.85; }
@media (max-width: 480px) { .stat-item { border: none; padding: 0.5rem 1rem; } }

/* ─── CTA strip ────────────────────────────────────────────────────────────── */
.cta-strip {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff; text-align: center; padding: 4rem 0;
}
.cta-strip h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-strip p  { opacity: 0.9; margin-bottom: 2rem; font-size: 1.0625rem; }

/* ─── Sticky inquiry widget ────────────────────────────────────────────────── */
.inquiry-widget {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-md);
}
.inquiry-widget h3 { font-size: 1rem; margin-bottom: 1rem; }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: var(--color-bg-dark); color: rgba(255,255,255,.75); }
.footer-main { padding: 4rem 0 3rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo { color: #fff; font-size: 1.2rem; font-weight: 800; margin-bottom: 1rem; display: flex; align-items: center; text-decoration: none; }
.footer-logo img  { height: 38px; width: auto; }
.footer-logo span { color: var(--color-accent); }
.footer-about { font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75); transition: background var(--transition);
}
.footer-social a:hover { background: var(--color-accent); color: #fff; text-decoration: none; }
.footer-col-title { font-size: 0.8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: rgba(255,255,255,.7); font-size: 0.875rem; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0; font-size: 0.8125rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: rgba(255,255,255,.9); }

/* ─── Language switcher ────────────────────────────────────────────────────── */
.lang-switcher {
  display: flex; align-items: center; gap: 0.25rem;
  position: relative;
}
.lang-current {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.625rem; border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border); background: var(--color-bg);
  font-size: 0.8125rem; font-weight: 600; cursor: pointer; color: var(--color-text);
  transition: border-color var(--transition);
}
.lang-current:hover { border-color: var(--color-primary); }
.lang-dropdown {
  position: absolute; top: calc(100% + 4px);
  right: 0; min-width: 180px; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 0.5rem; display: none; z-index: 300;
}
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown { display: block; }
.lang-option {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-md);
  font-size: 0.875rem; color: var(--color-text); cursor: pointer;
  text-decoration: none;
}
.lang-option:hover { background: var(--color-bg-alt); text-decoration: none; }
.lang-option.active { font-weight: 700; color: var(--color-primary); }
.lang-flag { font-size: 1.125rem; }

/* ─── Cookie banner — bottom bar only, never a modal ───────────────────────── */
.cookie-banner {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
  background: #1a2a3a; color: rgba(255,255,255,.88);
  padding: .875rem 1.5rem; align-items: center; gap: 1.5rem;
  flex-wrap: wrap; font-size: 0.875rem;
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 -4px 20px rgba(0,0,0,.18);
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner a  { color: var(--color-accent); }
.cookie-banner p  { margin: 0; flex: 1; min-width: 200px; }
.cookie-actions   { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ─── WhatsApp floating button ─────────────────────────────────────────────── */
.float-whatsapp {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 98;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
[dir="rtl"] .float-whatsapp { right: auto; left: 1.5rem; }
.float-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,.5);
  color: #fff; text-decoration: none;
}
.float-whatsapp svg { width: 30px; height: 30px; }

/* ─── Loading / skeleton ────────────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes sgw-pop { 0% { transform: scale(.88); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ─── Misc utilities ────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-muted  { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.fw-bold      { font-weight: 700; }
.mt-auto      { margin-top: auto; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.img-cover { object-fit: cover; width: 100%; height: 100%; }

/* ─── Admin panel overrides ─────────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--color-bg-dark); color: rgba(255,255,255,.75);
  padding: 1.5rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-main  { flex: 1; overflow-x: hidden; }
.admin-header {
  background: var(--color-bg); border-bottom: 1px solid var(--color-border);
  padding: 0.875rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 10;
}
.admin-content { padding: 2rem 1.5rem; max-width: 1400px; width: 100%; }
.admin-dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) {
  .admin-dash-grid { grid-template-columns: 1fr; }
  .admin-sidebar   { width: 220px; }
}
@media (max-width: 768px) {
  .admin-sidebar   { display: none; }
  .admin-content   { padding: 1.25rem 1rem; }
}
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 1.25rem; font-size: 0.875rem; color: rgba(255,255,255,.7);
  border-radius: var(--radius-md); margin: 0 0.75rem; text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,.08); color: #fff; text-decoration: none;
}
.sidebar-section {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.35); padding: 1rem 1.25rem 0.375rem;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--color-bg-alt); font-size: 0.75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted);
  padding: 0.625rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border);
}
[dir="rtl"] .admin-table th { text-align: right; }
.admin-table td {
  padding: 0.875rem 1rem; font-size: 0.875rem; color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
}
.admin-table tr:hover td { background: var(--color-bg-alt); }
.kpi-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.kpi-card  { background: var(--color-bg); border: 1px solid var(--color-border-light); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-card); }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--color-primary); }
.kpi-label { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* Rich text content (from HTML fields) */
.rich-content { line-height: 1.8; }
.rich-content h1,.rich-content h2,.rich-content h3 { margin: 1.5rem 0 0.75rem; }
.rich-content ul,.rich-content ol { margin-bottom: 1rem; }
.rich-content li { margin-bottom: 0.375rem; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.rich-content th,.rich-content td { padding: 0.625rem 0.875rem; border: 1px solid var(--color-border); }
.rich-content th { background: var(--color-bg-alt); font-weight: 600; }
.rich-content iframe { max-width: 100%; aspect-ratio: 16/9; }

/* ─── Policy pages ──────────────────────────────────────────────────────────── */
.policy-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff; padding: 3rem 0 2.5rem;
}
.policy-hero h1,.policy-hero h2,.policy-hero h3 { color: #fff; }
.policy-hero h1 { margin: .5rem 0 .25rem; font-size: 2.125rem; }
.page-hero h1,.page-hero h2,.page-hero h3 { color: #fff; }
.policy-hero .breadcrumb, .policy-hero .breadcrumb a { color: rgba(255,255,255,.7); }
.policy-meta { font-size: .8125rem; opacity: .65; margin: 0; }

.policy-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding-top: 2.5rem;
  padding-bottom: 5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .policy-layout { grid-template-columns: 1fr; }
  .policy-toc { display: none; }
}

.policy-toc-inner {
  position: sticky; top: calc(var(--header-height) + 1.5rem);
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 1.25rem 1rem;
}
.policy-toc-heading { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--color-text-muted); margin: 0 0 .75rem; }
.policy-toc ol { margin: 0; padding-left: 1.25rem; }
.policy-toc li { margin-bottom: .4rem; font-size: .8125rem; line-height: 1.4; }
.policy-toc a { color: var(--color-text-muted); text-decoration: none; }
.policy-toc a:hover { color: var(--color-primary); }

.policy-body h2 { font-size: 1.25rem; color: var(--color-primary); margin: 2.25rem 0 .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--color-border-light); scroll-margin-top: calc(var(--header-height) + 1.5rem); }
.policy-body h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
.policy-body p, .policy-body li { line-height: 1.8; color: var(--color-text); }
.policy-body ul, .policy-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.policy-body li { margin-bottom: .375rem; }

.policy-notice {
  background: #eff6ff; border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.75rem; font-size: .9375rem; line-height: 1.7;
}
.policy-contact-box {
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin-top: 1rem;
  font-size: .9375rem; line-height: 1.8;
}

/* ─── Responsive page layouts ────────────────────────────────────────────────── */

/* University / scholarships listing: filter sidebar + results grid */
.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .search-layout { grid-template-columns: 1fr; }
}

/* University detail page: main tab content + inquiry sidebar */
.uni-content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .uni-content-layout { grid-template-columns: 1fr; }
}

/* Student dashboard: content + account sidebar */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* Dashboard quick-action 4-button row */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .quick-actions-grid { grid-template-columns: 1fr; }
}

/* Two-column form sections (apply form panels) */
.two-col-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .two-col-form-grid { grid-template-columns: 1fr; }
  .two-col-form-grid [style*="grid-column:span 2"] { grid-column: span 1 !important; }
}

/* Two-column text layout (contact page: form + info) */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 768px) {
  .two-col-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Story split layout (about page: text left + stats grid right) */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 768px) {
  .story-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* University header CTA buttons: column on desktop → row on mobile */
.uni-header-ctas {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
@media (max-width: 768px) {
  .uni-header-inner { flex-wrap: wrap; gap: 1.25rem; }
  .uni-header-ctas  { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; }
}

/* Header: hide the Free Consultation button on mobile to prevent header overflow */
@media (max-width: 640px) {
  .header-actions .btn-outline { display: none; }
}
@media (max-width: 480px) {
  .logo-text { display: none; }
}

/* Auth pages: reveal mobile logo when brand panel is hidden */
@media (max-width: 768px) {
  .mobile-logo { display: block !important; }
}

/* ─── Print ─────────────────────────────────────────────────────────────────── */
@media print {
  .header,.footer,.float-whatsapp,.cookie-banner,.inquiry-widget { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
