/* ===== Munjaz Academic — Design System ===== */
:root {
  --teal: #0E6B66;
  --teal-dark: #0B4F4B;
  --teal-light: #E7F2F1;
  --gold: #B97A12;
  --gold-dark: #8A5A0A;
  --gold-soft: #F6E9CF;
  --ink: #17302E;
  --muted: #55706D;
  --line: #D3E3E1;
  --white: #fff;
  --danger: #B3261E;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(10, 79, 75, .10);
  --shadow-lg: 0 18px 50px rgba(10, 79, 75, .22);
  --font: "Noto Kufi Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.8;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; color: var(--teal-dark); }
p { margin: 0 0 1em; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; inset-inline-start: 1rem; background: var(--teal-dark); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: .5rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; transition: .2s; line-height: 1.4;
}
.btn-sm { padding: .4rem 1rem; font-size: .92rem; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-gold { background: var(--teal); color: #fff; }
.btn-gold:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-outline { background: #fff; color: var(--teal-dark); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal-light); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #FCEDEC; }
.btn-telegram { background: var(--teal); color: #fff; width: 100%; }
.btn-telegram:hover { background: var(--teal-dark); }
.btn-telegram-hero { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-telegram-hero:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; transform: translateY(-1px); }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--teal-dark); color: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; background: var(--teal); border-radius: 12px; border: 2px solid var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.25rem; }
.brand-text small { font-size: .72rem; opacity: .75; letter-spacing: .08em; }
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a { color: #E7F2F1; text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Gateway ===== */
.gateway { background: var(--teal-light); border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.gateway-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem; }
.gateway-title { margin: 0; font-size: 1.2rem; color: var(--teal-dark); }
.gateway-title span { display: block; font-size: .88rem; font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  background: #fff; border: 2px solid var(--line); color: var(--teal-dark);
  padding: .45rem 1rem; border-radius: 999px; font-weight: 700; cursor: pointer; transition: .2s;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-checked="true"] { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(14, 107, 102, .3); }
.audience-banner {
  margin-top: .9rem; background: #fff; border-inline-start: 5px solid var(--gold);
  border-radius: 10px; padding: .8rem 1.1rem; box-shadow: var(--shadow);
}
.audience-banner strong { color: var(--teal-dark); display: block; }
.audience-banner p { margin: .2rem 0 .4rem; color: var(--muted); font-size: .95rem; }
.banner-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.banner-links a { font-size: .9rem; font-weight: 700; background: var(--gold-soft); color: var(--gold-dark); padding: .15rem .8rem; border-radius: 999px; text-decoration: none; }
.banner-links a:hover { background: var(--teal); color: #fff; }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%); color: #fff; padding: 4rem 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 480px; height: 480px; inset-inline-start: -160px; bottom: -240px; border-radius: 50%; background: radial-gradient(circle, rgba(185, 122, 18, .35), transparent 70%); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.25fr minmax(280px, 360px); gap: 1.8rem; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .35); padding: .35rem 1.15rem; border-radius: 999px; font-size: .98rem; font-weight: 700; color: #fff; margin-bottom: 1.1rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.eyebrow-dot { width: 9px; height: 9px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .35); animation: pulse-green 2s infinite ease-in-out; }
@keyframes pulse-green { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: 0.8; } }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: #F2CC85; }
.lead { font-size: 1.12rem; color: #DCEDEB; max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.hero-points li { display: flex; gap: 1rem; align-items: center; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .32); border-radius: var(--radius); padding: .95rem 1.2rem; backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(7, 47, 44, .22); transition: transform .2s, background .2s, border-color .2s; }
.hero-points li:hover { background: rgba(255, 255, 255, .18); border-color: rgba(233, 193, 108, .55); transform: translateY(-2px); }
.point-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(233, 193, 108, .35); display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.hero-points strong { display: block; font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.hero-points small { color: rgba(255, 255, 255, .88); font-size: .96rem; line-height: 1.45; display: block; }

/* ===== Sections ===== */
.section { padding: 4rem 0; }
.section-tint { background: var(--teal-light); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 2.2rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); position: relative; padding-bottom: .6rem; }
.section-head h2::after { content: ""; position: absolute; bottom: 0; inset-inline: 0; margin-inline: auto; width: 60px; height: 4px; border-radius: 2px; background: var(--gold); }
.section-head p { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 1rem; }

/* ===== Service cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.3rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s; animation: pop .35s ease both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--teal-light); display: grid; place-items: center; font-size: 1.7rem; margin-bottom: .8rem; }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .96rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.tag { font-size: .78rem; background: var(--gold-soft); color: var(--gold-dark); padding: 0 .65rem; border-radius: 999px; font-weight: 700; }
.tag.on { background: var(--teal); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

[hidden] { display: none !important; }

/* ===== Category picker (الواجهة الرئيسية) ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.cat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; text-align: start;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
  cursor: pointer; box-shadow: var(--shadow); transition: .2s;
}
.cat-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-icon { font-size: 2rem; width: 58px; height: 58px; display: grid; place-items: center; background: var(--teal-light); border-radius: 16px; }
.cat-card strong { font-size: 1.2rem; color: var(--teal-dark); }
.cat-card small { color: var(--muted); font-size: .92rem; line-height: 1.6; flex: 1; }
.cat-count { color: var(--gold-dark); font-weight: 800; font-size: .95rem; }

/* ===== Services panel (مبوّبة داخل الفئة) ===== */
.panel-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding: .8rem 1.2rem; background: var(--teal-light); border-radius: var(--radius); border-inline-start: 5px solid var(--gold); }
.panel-bar h3 { margin: 0; font-size: 1.3rem; }
.svc-group { margin-bottom: 2rem; }
.svc-group-title { font-size: 1.15rem; color: var(--teal-dark); padding-bottom: .4rem; margin-bottom: 1rem; border-bottom: 2px dashed var(--line); }

/* ===== Tools ===== */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: start; }
.tool { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--line); transition: opacity .2s; }
.tool-wide { grid-column: 1 / -1; }
.tool.dim { opacity: .55; }
.tool.dim:hover, .tool.dim:focus-within { opacity: 1; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.tool-head h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.badge-rec { background: var(--teal); color: #fff; font-size: .78rem; font-weight: 700; padding: 0 .75rem; border-radius: 999px; }
.tool-note { font-size: .9rem; color: var(--muted); background: var(--teal-light); border-radius: 8px; padding: .5rem .8rem; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.span-2 { grid-column: span 2; }
.tool:not(.tool-wide) .form-grid { grid-template-columns: repeat(2, 1fr); }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .7rem; }
.form-grid .field { margin-bottom: 0; }
.field > span { font-size: .9rem; font-weight: 700; color: var(--teal-dark); }
.field-btn { justify-content: flex-end; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: .6rem .8rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 107, 102, .18); }
textarea { resize: vertical; min-height: 130px; }
.form-msg { min-height: 1.5em; color: var(--danger); font-size: .9rem; margin: .4rem 0; font-weight: 700; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .95rem; }
.data-table th, .data-table td { padding: .55rem .8rem; text-align: start; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--teal); color: #fff; }
.data-table tbody tr:nth-child(even) { background: #F5FAF9; }
.data-table tfoot th { background: var(--gold-soft); color: var(--gold-dark); font-size: 1.05rem; }
.row-del { background: none; border: 0; cursor: pointer; color: var(--danger); font-size: 1.1rem; padding: .2rem .5rem; border-radius: 6px; }
.row-del:hover { background: #FCEDEC; }
.target-row { display: grid; grid-template-columns: 260px 1fr; gap: 1.2rem; align-items: end; margin-top: 1rem; }
.progress { height: 14px; background: var(--teal-light); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .4s; }
.progress-block p { margin: .3rem 0 0; font-size: .92rem; color: var(--muted); }
.tool-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .5rem 0; }
.stats div { background: var(--teal-light); border-radius: 10px; padding: .5rem; text-align: center; }
.stats dt { font-size: .8rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--teal-dark); }
.limit-msg { font-weight: 700; min-height: 1.5em; margin: .3rem 0 0; }
.limit-msg.ok { color: var(--teal); }
.limit-msg.over { color: var(--danger); }

.result-box { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: #fff; border-radius: var(--radius); padding: 1rem; text-align: center; margin-top: 1rem; }
.result-box span { display: block; opacity: .85; font-size: .92rem; }
.result-box strong { display: block; font-size: 2.3rem; line-height: 1.3; color: #F2CC85; }
.result-box small { display: block; color: #DCEDEB; min-height: 1.4em; }

.gpa-rows { display: grid; gap: .5rem; }
.gpa-row { display: grid; grid-template-columns: 1.6fr .8fr .8fr auto; gap: .5rem; align-items: center; }
.gpa-row input { padding: .5rem .6rem; }

/* ===== Steps ===== */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; box-shadow: var(--shadow); }
.step-num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: .6rem; }
.steps p { color: var(--muted); margin: 0; }

/* ===== Integrity strip ===== */
.integrity { background: var(--teal-dark); color: #fff; padding: 3rem 0; }
.integrity h2 { color: #F2CC85; }
.integrity-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.integrity p { margin: 0; max-width: 46em; color: #DCEDEB; }
.integrity strong { color: #fff; }

/* ===== Footer ===== */
.site-footer { background: #072F2C; color: #BFD8D5; padding: 1.8rem 0; }
.site-footer strong { color: #fff; font-size: 1.1rem; }
.site-footer p { margin: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.copy { font-size: .9rem; }

/* ===== Floating Telegram ===== */
.telegram-float { position: fixed; bottom: 1.2rem; inset-inline-start: 1.2rem; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #229ED9; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); transition: transform .2s; }
.telegram-float:hover { transform: scale(1.08); }

/* ===== Upgraded Professional Tool Modals ===== */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(800px, 100% - 1.5rem);
  max-height: 92vh;
  margin: auto;
  overflow: visible;
}
.modal::backdrop {
  background: rgba(6, 48, 44, .75);
  backdrop-filter: blur(4px);
}
.modal[open] .modal-box {
  animation: pop .3s cubic-bezier(.2,.8,.2,1) both;
}
.modal-box {
  position: relative;
  background: #ffffff;
  border-radius: 22px;
  padding: 2.2rem 2rem;
  max-height: 90vh;
  overflow-y: auto;
  border: 1.5px solid rgba(185, 122, 18, .3);
  box-shadow: 0 25px 60px rgba(6, 48, 44, .28), 0 0 0 1px rgba(255, 255, 255, .8) inset;
}
.modal-box::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 18%;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #0E6B66, #B97A12, #0E6B66);
  pointer-events: none;
}
.modal-close {
  position: absolute;
  top: 1rem;
  inset-inline-start: 1rem;
  border: 1px solid rgba(14, 107, 102, .2);
  background: #F0F7F6;
  color: #06302C;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: all .2s ease;
  z-index: 10;
}
.modal-close:hover {
  background: #0E6B66;
  color: #fff;
  border-color: #0E6B66;
  transform: rotate(90deg);
}

/* Tool Header */
.tool-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(14, 107, 102, .12);
}
.tool-head-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 100%);
  border: 1.5px solid #E9C16C;
  box-shadow: 0 4px 12px rgba(6, 48, 44, .18);
  display: grid;
  place-items: center;
  color: #E9C16C;
}
.tool-head h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #06302C;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.tool-head .badge-tag {
  font-size: .75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0E6B66, #0B4F4B);
  color: #fff;
  padding: .2rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(233, 193, 108, .4);
}

/* Upgraded Result Box */
.result-box {
  background: linear-gradient(135deg, #06302C 0%, #0B4F4B 55%, #0E6B66 100%);
  color: #fff;
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  text-align: center;
  margin-top: 1.25rem;
  border: 1.5px solid #E9C16C;
  box-shadow: 0 10px 24px rgba(6, 48, 44, .22), inset 0 1px 0 rgba(255, 255, 255, .2);
  position: relative;
  overflow: hidden;
}
.result-box::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(233, 193, 108, .25);
  border-radius: 11px;
  pointer-events: none;
}
.result-box span {
  display: block;
  font-size: .95rem;
  font-weight: 600;
  color: #D6EDE9;
  margin-bottom: .35rem;
}
.result-box strong {
  display: block;
  font-size: 2.5rem;
  line-height: 1.2;
  color: #F2CC85;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: .3rem;
}
.result-box small {
  display: block;
  color: #E6F3F1;
  font-size: .88rem;
  line-height: 1.5;
}

.modal h2 { margin-inline-start: 2.5rem; }
.modal-lead { color: var(--muted); }
.charter-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.charter-col { border-radius: 12px; padding: 1rem 1.2rem; }
.charter-col h3 { font-size: 1.05rem; }
.charter-col ul { margin: 0; padding-inline-start: 1.2rem; font-size: .95rem; }
.charter-col li { margin-bottom: .3rem; }
.charter-col.yes { background: var(--teal-light); border: 1px solid #B9D8D5; }
.charter-col.no { background: #FDF1EF; border: 1px solid #F0C9C4; }
.charter-col.no h3 { color: var(--danger); }
.modal-foot { background: var(--gold-soft); border-radius: 10px; padding: .8rem 1rem; color: #5A3C05; font-size: .95rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; inset-inline: 0; background: var(--teal-dark);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1rem;
    display: none; border-top: 1px solid rgba(255, 255, 255, .15);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .7rem .2rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .main-nav .btn { margin-top: .8rem; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 2.8rem 0; }
  .hero { padding: 2.6rem 0; }
  .form-grid, .tool:not(.tool-wide) .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .target-row { grid-template-columns: 1fr; }
  .charter-cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gpa-row { grid-template-columns: 1fr 1fr; }
  .gpa-row .g-name { grid-column: 1 / -1; }
  .modal-box { padding: 1.4rem 1.1rem; }
  .chip { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== Tool tiles (الأدوات كأيقونات) ===== */
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem; }
.tool-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1rem 1.3rem;
  cursor: pointer; box-shadow: var(--shadow); transition: .2s;
}
.tool-tile:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile-icon { width: 72px; height: 72px; display: grid; place-items: center; font-size: 2.2rem; border-radius: 20px; background: linear-gradient(135deg, var(--teal-dark), var(--teal)); margin-bottom: .4rem; }
.tool-tile strong { color: var(--teal-dark); font-size: 1.1rem; }
.tool-tile small { color: var(--muted); font-size: .88rem; }
.tool-tile .badge-rec { position: absolute; top: .6rem; inset-inline-end: .6rem; }

/* ===== Modals: tools & auth ===== */
.modal-lg { width: min(980px, 100% - 1.5rem); }
.modal-sm { width: min(460px, 100% - 1.5rem); }
.modal .tool { box-shadow: none; border: 0; padding: 0; background: transparent; }
.modal .tool-head h3 { margin-inline-start: 2.5rem; font-size: 1.4rem; }
.modal .tool:not(.tool-wide) .form-grid { grid-template-columns: repeat(2, 1fr); }

.btn-light-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-light-outline:hover { background: rgba(255, 255, 255, .15); }
.btn-block { width: 100%; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; background: var(--teal-light); padding: .3rem; border-radius: 999px; margin-bottom: 1rem; }
.auth-tabs button { border: 0; background: transparent; padding: .5rem; border-radius: 999px; font-weight: 700; cursor: pointer; color: var(--teal-dark); }
.auth-tabs button[aria-pressed="true"] { background: var(--teal); color: #fff; }
#authForm .field { margin-bottom: .8rem; }
.link-btn { display: block; margin: .8rem auto 0; background: none; border: 0; color: var(--teal); text-decoration: underline; cursor: pointer; font-weight: 700; }
.auth-note { margin: 1rem 0 0; font-size: .85rem; color: var(--muted); background: var(--gold-soft); border-radius: 8px; padding: .5rem .8rem; }
.form-msg.ok { color: var(--teal); }
.account-card { display: flex; align-items: center; gap: 1rem; background: var(--teal-light); border-radius: var(--radius); padding: 1rem; margin-bottom: .6rem; }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.account-card strong { display: block; color: var(--teal-dark); font-size: 1.1rem; }
.account-card small { display: block; color: var(--muted); }

/* ===== M1 Tools Styles ===== */
.tool-code { font-size: .75rem; font-weight: 800; color: var(--gold-dark); background: var(--gold-soft); padding: 1px 8px; border-radius: 6px; letter-spacing: .05em; margin-bottom: .2rem; display: inline-block; }
.badge-tag { font-size: .8rem; font-weight: 700; color: #fff; background: var(--teal); padding: 2px 10px; border-radius: 999px; }

/* Mode Tabs for GPA */
.mode-tabs { display: flex; gap: .5rem; background: var(--teal-light); padding: .4rem; border-radius: 12px; margin-bottom: 1.2rem; flex-wrap: wrap; }
.mode-tab { border: 0; background: transparent; padding: .5rem 1.1rem; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--teal-dark); transition: .2s; }
.mode-tab.active { background: var(--teal); color: #fff; box-shadow: 0 2px 8px rgba(14, 107, 102, .25); }
.res-sub { display: block; font-size: .9rem; opacity: .9; margin-top: 4px; }
.regulatory-note { background: #FFF9ED; border: 1px solid #F0DCB0; color: #6D4C0A; padding: .8rem 1rem; border-radius: 10px; font-size: .9rem; margin-top: 1rem; line-height: 1.6; }

/* DOI & Citations Tool */
.doi-fetch-box { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; background: var(--teal-light); padding: 1rem; border-radius: 12px; }
.citation-preview-box { background: #FAFDFD; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; margin: 1.2rem 0; }
.cite-block { margin-bottom: 1rem; }
.cite-block:last-child { margin-bottom: 0; }
.cite-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.cite-content { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; font-family: monospace; font-size: .95rem; line-height: 1.6; word-break: break-all; }
.style-switcher { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.btn-group { display: inline-flex; gap: .4rem; }
.saved-refs-list { padding-inline-start: 1.5rem; line-height: 1.8; font-size: .95rem; }
.saved-refs-list li { margin-bottom: .6rem; }

/* Units Converter Tool */
.units-grid { display: grid; grid-template-columns: 1fr 1fr auto 1fr; gap: .8rem; align-items: end; }
.swap-col { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.btn-swap { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; color: var(--teal); transition: .2s; }
.btn-swap:hover { background: var(--teal-light); border-color: var(--teal); }

/* Quiz Tool */
.quiz-steps-nav { display: flex; gap: .8rem; border-bottom: 2px solid var(--line); padding-bottom: .8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.q-step { font-size: .95rem; font-weight: 700; color: var(--muted); padding: .3rem .6rem; border-radius: 6px; }
.q-step.active { color: var(--teal); background: var(--teal-light); }
.quiz-play-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; gap: .8rem; }
.question-card { background: #FAFDFD; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; margin-bottom: 1.2rem; }
.q-title { font-size: 1.2rem; margin: 0 0 1.2rem; color: var(--teal-dark); line-height: 1.5; }
.q-options { display: grid; gap: .7rem; }
.q-opt { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: .2s; font-weight: 500; text-align: start; }
.q-opt:hover { border-color: var(--teal); background: var(--teal-light); }
.q-opt.selected { border-color: var(--teal); background: var(--teal-light); color: var(--teal-dark); font-weight: 700; }
.quiz-nav-actions { display: flex; justify-content: space-between; gap: .8rem; }
.quiz-detailed-list { display: grid; gap: 1rem; }
.q-detail-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; text-align: start; }
.q-detail-card.correct { border-inline-start: 5px solid #1E8E4E; }
.q-detail-card.incorrect { border-inline-start: 5px solid var(--danger); }
.q-explain { font-size: .92rem; color: var(--muted); background: var(--teal-light); padding: .6rem .8rem; border-radius: 8px; margin-top: .6rem; }

/* Assistant & Library Sections */
.assistant-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; }
.assist-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: .2s; }
.assist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.assist-icon { font-size: 2rem; margin-bottom: .6rem; display: block; }
.assist-card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.assist-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.assist-action { margin-top: 1rem; }

.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.3rem; }
.resource-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.resource-badge { align-self: flex-start; font-size: .78rem; font-weight: 700; background: var(--gold-soft); color: var(--gold-dark); padding: 2px 10px; border-radius: 999px; margin-bottom: .7rem; }
.resource-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.resource-card p { color: var(--muted); font-size: .94rem; flex: 1; }
.resource-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.resource-link, .resource-link-btn { font-weight: 700; color: var(--teal); text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-size: .9rem; }
.resource-link:hover, .resource-link-btn:hover { text-decoration: underline; color: var(--teal-dark); }

@media (max-width: 640px) {
  .units-grid { grid-template-columns: 1fr; }
  .swap-col { display: none; }
}

/* ===== Print: حاسبة الترقية فقط ===== */
@media print {
  #dlg-promotion[open] { display: block !important; position: static !important; width: 100%; max-height: none; margin: 0; }
  #dlg-promotion .modal-box { max-height: none; overflow: visible; box-shadow: none; border-top: 0; padding: 0; }
  #dlg-promotion .modal-close { display: none; }
  #dlg-promotion .tool-actions, #dlg-promotion #promoForm, #dlg-promotion .target-row, #dlg-promotion .row-del, #dlg-promotion .tool-note { display: none !important; }
}


/* ===== News ticker — premium design ===== */
.news-ticker[hidden] { display: none; }
.news-ticker { position: relative; min-height: 76px; overflow: hidden; direction: rtl; color: #fff;
  background: linear-gradient(90deg, #06302C 0%, #0E6B66 32%, #0E6B66 68%, #06302C 100%);
  border-bottom: 2px solid #B97A12;
  box-shadow: 0 4px 18px rgba(6, 48, 44, .35); }
.news-ticker::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, #F5D67B 25%, #F5D67B 75%, transparent); opacity: .8; }
.news-ticker-inner { display: flex; align-items: stretch; height: 100%; min-width: 0; }
.news-ticker h2 { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: .65rem;
  margin: 0; padding: 0 1.6rem 0 2rem; font-size: 1.05rem; font-weight: 800; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, #D69E2E 0%, #A86A0E 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  clip-path: polygon(0 50%, 15px 0, 100% 0, 100% 100%, 15px 100%); }
.news-ticker h2 .dot { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: #fff; }
.news-ticker h2 .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7); animation: ticker-ping 1.8s ease-out infinite; }
@keyframes ticker-ping { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.news-ticker-viewport { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.official-news-list { display: flex; align-items: center; width: max-content; list-style: none; margin: 0; padding: 0;
  animation: munjaz-news-scroll 80s linear infinite; }
.official-news-list li { position: relative; display: flex; align-items: center; gap: .8rem;
  white-space: nowrap; padding-inline: 1.9rem; }
.official-news-list li + li::before { content: "\25C6"; position: absolute; inset-inline-start: -.4rem; top: 50%;
  transform: translateY(-50%); color: #E9B949; font-size: .65rem; text-shadow: 0 0 8px rgba(233, 185, 73, .7); }
.official-news-list a { color: #fff; font-size: 1.12rem; font-weight: 600; text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: color .2s; }
.official-news-list a:hover { color: #F5D67B; }
.ticker-source { font-size: .72rem; font-weight: 700; color: #06302C; white-space: nowrap;
  background: linear-gradient(180deg, #F5D67B, #E9B949); border-radius: 999px; padding: .22rem .8rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.ticker-state { padding-inline: 1.5rem; }
.ticker-loading { color: rgba(255, 255, 255, .75); animation: ticker-pulse 1.4s ease-in-out infinite; }
.ticker-error { color: #F5D67B; font-weight: 600; }
@keyframes ticker-pulse { 50% { opacity: .4; } }
.official-news-list .news-summary { display: none; }
.news-ticker:hover .official-news-list, .news-ticker:focus-within .official-news-list { animation-play-state: paused; }
@keyframes munjaz-news-scroll { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) {
  .official-news-list { animation: none; }
  .news-ticker-viewport { overflow-x: auto; }
  .news-ticker h2 .dot::after, .ticker-loading { animation: none; } }

/* الأسئلة الشائعة والشريط السفلي: مساحة مستقلة عن محتوى الصفحة. */
/* ===== FAQ section (branded) ===== */
.faq-section { background: linear-gradient(180deg, #f8fdfc 0%, #fff 100%); }
.faq-container { max-width: 820px; margin: 0 auto; }
.faq-list { display: grid; gap: .75rem; }
.faq-item { background: #fff; border: 1.5px solid #e6f0ee; border-radius: 14px; padding: 0; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item:hover { border-color: #0E6B66; }
.faq-item[open] { border-color: #0E6B66; box-shadow: 0 4px 16px rgba(14,107,102,.1); }
.faq-item summary { cursor: pointer; font-weight: 700; color: #06302C; padding: 1.1rem 1.4rem; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '◀'; color: #B97A12; font-size: .85rem; transition: transform .2s; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(-90deg); }
.faq-item summary:hover { color: #0E6B66; }
.faq-item .faq-answer { padding: 0 1.4rem 1.2rem; color: #555; line-height: 1.9; border-top: 1px dashed #e6f0ee; margin-top: .2rem; padding-top: 1rem; }
.mobile-request-bar { display: none; }
@media (max-width: 640px) {
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .mobile-request-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 89; height: calc(82px + env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; }
  .mobile-request-bar .btn { width: 100%; }
  body:has(.telegram-float) .mobile-request-bar { padding-inline-start: 88px; }
  .telegram-float { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 16px; }
  .hero-points { margin-bottom: 1rem; }
}

/* ===== Higher-education news windows ===== */
.news-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 1.5rem; }
.news-tab {
  font-family: inherit; font-size: .88rem; cursor: pointer;
  padding: .45rem 1.1rem; border-radius: 999px;
  border: 1px solid rgba(14, 107, 102, .35); background: #fff; color: var(--teal-dark);
  transition: background .2s, color .2s;
}
.news-tab:hover { background: rgba(14, 107, 102, .08); }
.news-tab[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.news-card {
  background: #fff; border: 1px solid rgba(14, 107, 102, .15); border-radius: 14px;
  padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.news-card h3 { font-size: 1.02rem; margin: 0; line-height: 1.7; }
.news-card h3 a { color: inherit; text-decoration: none; }
.news-card h3 a:hover { color: var(--teal); text-decoration: underline; }
.news-summary {
  color: #5a5a5a; font-size: .9rem; margin: 0; line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta { font-size: .8rem; color: #888; margin-top: auto; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.news-chip {
  align-self: flex-start; font-size: .74rem; white-space: nowrap;
  background: rgba(14, 107, 102, .1); color: var(--teal-dark);
  padding: .18rem .75rem; border-radius: 999px;
}
.news-featured {
  border: 2px solid var(--gold); border-radius: 16px; background: #fff;
  padding: 1.5rem; margin-bottom: 1.75rem; position: relative;
  box-shadow: 0 4px 18px rgba(185, 122, 18, .12);
}
.news-featured-badge {
  position: absolute; top: -14px; inset-inline-start: 1.25rem;
  background: var(--teal); color: #fff; font-size: .78rem; font-weight: 700;
  padding: .25rem .95rem; border-radius: 999px;
}
.news-featured-card { border: 0; box-shadow: none; padding: 0; }
.news-featured-card h3 { font-size: 1.3rem; }
.news-empty { text-align: center; color: #888; padding: 2.5rem 1rem; grid-column: 1 / -1; }
.news-more { text-align: center; margin-top: 2rem; }
.news-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.news-search, .news-select {
  font-family: inherit; font-size: .92rem; padding: .6rem .95rem;
  border: 1px solid rgba(14, 107, 102, .3); border-radius: 10px; background: #fff; color: inherit;
}
.news-search { flex: 1 1 220px; }
.news-count { font-size: .88rem; color: #888; margin-inline-start: auto; }
@media (max-width: 560px) {
  .news-featured-card h3 { font-size: 1.12rem; }
}

/* ===== Featured researchers carousel (shared: index + defenses) ===== */
.featured-wrap { max-width: 720px; margin: 2.5rem auto; text-align: center; }
.featured-title { font-size: 1.4rem; color: #0E6B66; margin-bottom: 1.5rem; }
.featured-card { background: #fff; border-radius: 20px; box-shadow: 0 8px 30px rgba(14,107,102,.15); padding: 2.5rem 2rem; border: 3px solid #B97A12; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; transition: opacity .5s; }
.featured-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 5px solid #B97A12; box-shadow: 0 4px 15px rgba(0,0,0,.15); }
.featured-photo.placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0E6B66, #06302C); color: #fff; font-size: 4rem; }
.featured-name { font-size: 1.5rem; font-weight: 800; color: #06302C; margin: 0; }
.featured-degree { display: inline-block; font-size: .85rem; font-weight: 700; border-radius: 999px; padding: .3rem 1rem; background: #FFF3D6; color: #8a5a00; }
.featured-univ { color: #0E6B66; font-weight: 700; }
.featured-thesis { font-style: italic; color: #444; }
.featured-summary { color: #555; line-height: 1.9; max-width: 560px; }
.featured-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 1.25rem; }
.featured-dot { width: 12px; height: 12px; border-radius: 50%; background: #ccc; border: none; cursor: pointer; padding: 0; }
.featured-dot.active { background: #B97A12; transform: scale(1.2); }

/* ===== Defenses preview (homepage) ===== */
.defenses-preview-list { display: grid; gap: .9rem; }
.defense-preview-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 1rem 1.25rem; border-right: 4px solid #B97A12; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .2s, box-shadow .2s; }
.defense-preview-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.defense-preview-card h3 { margin: 0 0 .4rem; font-size: 1rem; line-height: 1.6; }
.defense-preview-card h3 a { color: #06302C; text-decoration: none; }
.defense-preview-card h3 a:hover { color: #0E6B66; }
.defense-preview-card .meta { font-size: .82rem; color: #888; }
/* ===== Job seekers form ===== */
.job-form { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 2rem; box-shadow: 0 6px 24px rgba(14,107,102,.12); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.form-grid label { display: flex; flex-direction: column; gap: .4rem; font-weight: 700; color: #06302C; font-size: .95rem; }
.form-grid label.full-width { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { padding: .7rem .9rem; border: 1.5px solid #d5d5d5; border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fafafa; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: #0E6B66; background: #fff; box-shadow: 0 0 0 3px rgba(14,107,102,.12); }
.form-note { font-size: .85rem; color: #888; margin: 1rem 0; }
.form-status { margin-top: 1rem; font-weight: 700; }
.form-status.ok { color: #0E6B66; }
.form-status.err { color: #c0392b; }
.job-form .btn { margin-top: .5rem; }

/* ===== Side-by-side duo (defenses + jobs) ===== */
.duo-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.duo-wrap .duo-col { padding: 2.5rem 0; }
.duo-wrap .duo-col .container { max-width: 100%; padding: 0; }
.duo-wrap .section-head { text-align: right; margin-bottom: 1.5rem; }
.duo-wrap .section-head h2 { font-size: 1.3rem; }
.duo-wrap .section-head p { font-size: .95rem; }
@media (max-width: 900px) {
  .duo-wrap { grid-template-columns: 1fr; gap: 0; }
}

/* ===== Embedded Google Form ===== */
.job-form-embed { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(14,107,102,.1); border: 1px solid #e8e8e8; }
.job-form-embed iframe { display: block; border: none; width: 100%; height: 900px; }

/* ===== Portal card (jobs gateway) ===== */
.portal-card { background: #fff; border-radius: 20px; padding: 3rem 2rem; text-align: center; box-shadow: 0 8px 30px rgba(14,107,102,.12); border: 2px solid #0E6B66; max-width: 480px; margin: 0 auto; }
.portal-icon { font-size: 4rem; margin-bottom: 1rem; }
.portal-card h3 { color: #06302C; font-size: 1.3rem; margin: 0 0 1rem; }
.portal-card p { color: #666; line-height: 1.9; margin-bottom: 1.5rem; }
.portal-card .btn-lg { font-size: 1.1rem; padding: .9rem 2.5rem; }

/* ===== Professional layout system ===== */
:root {
  --section-pad: clamp(3rem, 6vw, 5rem);
  --section-gap: 1.5rem;
}
.section { padding: var(--section-pad) 0; }
.section-head { margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: .8rem; }
.section-head p { font-size: 1.05rem; max-width: 640px; margin-inline: auto; }

/* Duo: balanced professional grid */
.duo-wrap { gap: 2.5rem; align-items: stretch; }
.duo-wrap .duo-col { display: flex; flex-direction: column; }
.duo-wrap .duo-col .container { flex: 1; display: flex; flex-direction: column; }
.duo-wrap .section-head { margin-bottom: 1.75rem; }

/* FAQ: compact professional */
.faq-section { padding: calc(var(--section-pad) * .8) 0; }
.faq-container { max-width: 780px; }
.faq-list { gap: .6rem; }
.faq-item summary { padding: .95rem 1.25rem; font-size: 1.02rem; }
.faq-item .faq-answer { padding: 0 1.25rem 1.1rem; }
.faq-item .faq-answer p { margin: 0; font-size: .97rem; }

/* Hero: tighter */
.hero { padding: 3.5rem 0 3rem; }

/* Footer spacing */
footer.site-footer { padding: 2.5rem 0 1.5rem; }

/* Consistent card rhythm */
.defense-preview-card, .portal-card, .faq-item { scroll-margin-top: 1rem; }

/* Mobile: tighter spacing */
@media (max-width: 768px) {
  :root { --section-pad: 2.5rem; }
  .section-head { margin-bottom: 1.75rem; }
  .duo-wrap { gap: 1.5rem; }
}



/* ===== Job listings ===== */
.job-listings-wrap { max-width: 860px; margin: 0 auto 3rem; }
.job-listings-wrap h3 { color: #06302C; font-size: 1.25rem; margin-bottom: 1.25rem; text-align: center; }
.job-listings { display: grid; gap: 1.25rem; }
.job-listing-card { background: #fff; border: 1.5px solid #e6f0ee; border-radius: 16px; padding: 1.5rem 1.75rem; border-right: 4px solid #0E6B66; box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.job-listing-card:hover { border-color: #0E6B66; box-shadow: 0 6px 20px rgba(14,107,102,.12); }
.job-listing-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.job-listing-head h4 { margin: 0; color: #06302C; font-size: 1.15rem; }
.job-listing-univ { background: #FFF3D6; color: #8a5a00; font-weight: 700; font-size: .85rem; padding: .3rem .9rem; border-radius: 999px; }
.job-listing-card > p { color: #555; line-height: 1.8; margin: 0 0 1rem; }
.job-listing-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .9rem; color: #0E6B66; font-weight: 600; margin-bottom: 1rem; }
.job-listing-card details { margin-bottom: 1rem; background: #f8fdfc; border-radius: 10px; padding: .75rem 1rem; }
.job-listing-card summary { cursor: pointer; font-weight: 700; color: #06302C; font-size: .95rem; }
.job-listing-card details p { margin: .75rem 0 0; font-size: .92rem; color: #555; line-height: 1.9; }
.job-listing-link { color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.job-listing-link:hover { text-decoration: underline; }

/* ===== Refined icon system: compact & professional ===== */
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.portal-icon { font-size: 2.8rem; margin-bottom: .75rem; }
.section-head { margin-bottom: 1.75rem; }
.section-head p { font-size: .98rem; margin-top: .5rem; }
.duo-wrap .section-head h2 { font-size: 1.25rem; }
.job-listing-meta span { font-size: .85rem; }
.featured-wrap { margin: 1.5rem auto; }
.featured-title { font-size: 1.2rem; margin-bottom: 1rem; }
.featured-card { padding: 1.75rem 1.5rem; min-height: 380px; }
.featured-photo { width: 150px; height: 150px; }
.featured-photo.placeholder { font-size: 3rem; }
.featured-name { font-size: 1.25rem; }
.job-listings-wrap h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.job-listing-card { padding: 1.2rem 1.4rem; }
.job-listing-head h4 { font-size: 1.05rem; }
.portal-card { padding: 2rem 1.75rem; }
.portal-card h3 { font-size: 1.15rem; }
.portal-card p { font-size: .95rem; margin-bottom: 1.25rem; }

/* ===== Geometric icon system ===== */
/* Unified geometric header: diamond accent + centered */
.section-head h2 {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
}
.section-head h2::before {
  content: ""; width: 10px; height: 10px; background: var(--gold);
  transform: rotate(45deg); flex-shrink: 0;
}
.section-head h2::after {
  content: ""; width: 10px; height: 10px; background: var(--gold);
  transform: rotate(45deg); flex-shrink: 0;
  position: static; margin: 0;
}
/* Geometric card icons: consistent hex-like shape */
.cat-icon, .portal-icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-light) 0%, #fff 100%);
  border: 2px solid var(--teal); border-radius: 18px;
  font-size: 1.8rem; position: relative;
}
.cat-icon::after, .portal-icon::after {
  content: ""; position: absolute; inset: -6px;
  border: 1px dashed var(--gold); border-radius: 22px; opacity: .5;
}
/* Portal icon centered */
.portal-card .portal-icon { margin: 0 auto 1rem; font-size: 2rem; }
/* Geometric section dividers */
.section { position: relative; }
.section:not(.hero):not(.duo-wrap)::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .4;
}
/* Duo columns: geometric balance */
.duo-wrap .duo-col { position: relative; }
.duo-wrap .duo-col:first-child::after {
  content: ""; position: absolute; top: 10%; bottom: 10%; inset-inline-end: -1.25rem;
  width: 1px; background: linear-gradient(180deg, transparent, var(--line), transparent);
}
/* Job listing: geometric left accent */
.job-listing-card { position: relative; overflow: hidden; }
.job-listing-card::before {
  content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0;
  width: 4px; background: linear-gradient(180deg, var(--teal), var(--gold));
}
/* FAQ: geometric numbering feel */
.faq-item { position: relative; }
.faq-item summary { padding-inline-start: 1.25rem; }
/* Featured: geometric frame */
.featured-card { position: relative; }
.featured-card::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px solid var(--gold); border-radius: 14px; opacity: .3; pointer-events: none;
}
.featured-photo { position: relative; z-index: 1; }

/* ===== Balanced icon sizing system ===== */
/* Headers: no emojis, geometric diamonds only */
.section-head h2 { font-size: clamp(1.35rem, 2.8vw, 1.8rem); letter-spacing: 0; }
/* Portal icon: fixed balanced size */
.portal-card .portal-icon { width: 72px; height: 72px; margin: 0 auto 1.25rem; }
.portal-card .portal-icon span { font-size: 2rem; line-height: 1; }
/* Category icons: uniform */
.cat-icon { width: 60px; height: 60px; font-size: 1.7rem; }
/* Nav icons: subtle */
.main-nav a { font-size: .95rem; }
/* Buttons: no oversized icons */
.btn { font-size: 1rem; }
/* Featured: balanced photo */
.featured-photo { width: 140px; height: 140px; }
.featured-photo.placeholder { font-size: 2.8rem; }
/* Job meta icons: tiny */
.job-listing-meta span { font-size: .85rem; }
/* Ensure visual rhythm */
.section-head h2::before, .section-head h2::after { width: 8px; height: 8px; }

/* ===== Trio: three equal columns ===== */
.trio-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: stretch; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.trio-wrap .trio-col { display: flex; flex-direction: column; padding: 2.5rem 0; }
.trio-wrap .trio-col .container { flex: 1; display: flex; flex-direction: column; max-width: 100%; padding: 0; }
.trio-wrap .section-head { margin-bottom: 1.5rem; }
.trio-wrap .section-head h2 { font-size: 1.2rem; }
/* Equal height cards */
.trio-wrap .portal-card, .trio-wrap .featured-wrap { flex: 1; display: flex; flex-direction: column; }
.trio-wrap .portal-card { justify-content: center; }
/* Remove old duo styles */
.duo-wrap { display: none; }
@media (max-width: 1000px) {
  .trio-wrap { grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0 1rem; }
  .trio-wrap .trio-col { padding: 1.5rem 0; }
  .trio-wrap .section-head h2 { font-size: 1rem; }
  .trio-wrap .section-head p { font-size: .85rem; }
  .trio-wrap .portal-card { padding: 1.25rem 1rem; }
  .trio-wrap .portal-icon { width: 52px; height: 52px; }
  .trio-wrap .portal-icon span { font-size: 1.5rem; }
  .trio-wrap .portal-card h3 { font-size: 1rem; }
  .trio-wrap .portal-card p { font-size: .85rem; }
  .trio-wrap .portal-card .btn-lg { font-size: .9rem; padding: .7rem 1.5rem; }
}
@media (max-width: 640px) {
  .trio-wrap { grid-template-columns: 1fr; gap: .75rem; padding: 0 .75rem; }
  .trio-wrap .section-head h2 { font-size: .95rem; }
  .trio-wrap .section-head p { display: none; }
}

/* ===== Tools: compact 2-row grid ===== */
#tools .tool-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 1000px; margin: 0 auto; }
#tools .tool-tile { padding: 1.25rem .9rem; }
#tools .tool-tile .tile-icon svg { width: 26px; height: 26px; }
#tools .tool-tile strong { font-size: .98rem; }
#tools .tool-tile small { font-size: .8rem; }
#tools .tool-tile .tool-code { font-size: .7rem; }
@media (max-width: 800px) {
  #tools .tool-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  #tools .tool-tiles { grid-template-columns: 1fr; }
}

/* ===== Services: balanced horizontal ===== */
#services .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 1080px; margin: 0 auto; }
#services .cat-card { text-align: center; align-items: center; padding: 2rem 1.5rem; }
#services .cat-card .cat-icon { margin: 0 auto .75rem; }
#services .cat-card strong { font-size: 1.1rem; margin-bottom: .5rem; }
#services .cat-card small { text-align: center; font-size: .92rem; }
#services .cat-card .cat-count { margin-top: .75rem; }
#services .academic-overview-action { text-align: center; margin-top: 2rem; }
@media (max-width: 800px) {
  #services .cat-grid { grid-template-columns: 1fr; max-width: 480px; }
}

/* ===== Clickable cards ===== */
.clickable-card { cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.portal-card { text-decoration: none; color: inherit; }
.clickable-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(14,107,102,.18); border-color: var(--gold); }
.clickable-card:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.clickable-card .btn { pointer-events: none; }

/* ===== Researcher modal ===== */
.researcher-modal[hidden] { display: none; }
.researcher-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; }
.researcher-modal-backdrop { position: absolute; inset: 0; background: rgba(6,48,44,.6); backdrop-filter: blur(4px); }
.researcher-modal-content { position: relative; background: #fff; border-radius: 20px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 2.5rem 2rem; border: 3px solid #B97A12; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 1rem; inset-inline-end: 1rem; background: #f0f0f0; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; color: #06302C; }
.modal-close:hover { background: #e0e0e0; }
.modal-photo { text-align: center; margin-bottom: 1.25rem; }
.modal-photo img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 4px solid #B97A12; }
.modal-avatar { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; color: #fff; font-size: 2.5rem; font-weight: 800; background: linear-gradient(135deg, #0E6B66, #06302C); border: 4px solid #B97A12; }
.researcher-modal-content h3 { text-align: center; color: #06302C; font-size: 1.4rem; margin: 0 0 .5rem; }
.modal-degree { text-align: center; display: inline-block; background: #FFF3D6; color: #8a5a00; font-weight: 700; padding: .3rem 1rem; border-radius: 999px; font-size: .9rem; margin: 0 auto 1rem; display: table; }
.modal-univ { text-align: center; color: #0E6B66; font-weight: 700; margin-bottom: 1rem; }
.modal-thesis { text-align: center; font-style: italic; color: #555; margin-bottom: 1rem; line-height: 1.8; }
.modal-summary { color: #555; line-height: 1.9; margin-bottom: 1.5rem; }
.researcher-modal-content .btn { display: table; margin: 0 auto; }
/* Featured card clickable hint */
#featuredCardHome { cursor: pointer; transition: transform .2s; }
#featuredCardHome:hover { transform: scale(1.02); }

/* ===== Strict equal icon sizes ===== */
.trio-wrap .portal-icon {
  width: 64px !important; height: 64px !important;
  min-width: 64px; min-height: 64px;
  display: grid !important; place-items: center;
  margin: 0 auto 1rem !important;
  font-size: 2rem !important; line-height: 1 !important;
}
.trio-wrap .portal-icon span {
  font-size: 2rem !important; line-height: 1 !important;
  display: block; width: 32px; height: 32px;
  text-align: center;
}
/* SVG icons: geometrically identical by construction */
.trio-wrap .portal-icon svg {
  width: 32px !important; height: 32px !important;
  display: block; color: #0E6B66; flex-shrink: 0;
}
/* Equal card heights */
.trio-wrap .portal-card {
  min-height: 320px;
  display: flex; flex-direction: column; justify-content: center;
}

/* ===== Equal icons + clickable cards (final) ===== */
.trio-wrap .portal-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 1rem; }
.trio-wrap .portal-icon span { font-size: 2rem; line-height: 1; display: block; }
.portal-card.clickable-card { cursor: pointer; transition: transform .2s, box-shadow .2s; }
.portal-card.clickable-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(14,107,102,.15); }
.portal-card.clickable-card .btn { pointer-events: none; }
/* Avatar initials */
.featured-photo.avatar-initials { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; font-weight: 800; text-shadow: 0 2px 4px rgba(0,0,0,.3); }

/* ===== How we work: compact ===== */
#how .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; max-width: 1000px; margin: 0 auto; list-style: none; padding: 0; }
#how .steps li { background: #fff; border: 1px solid #e0e8e6; border-radius: 16px; padding: 1.5rem 1.25rem; text-align: center; }
#how .steps h3 { font-size: 1.05rem; color: #06302C; margin: 0 0 .5rem; }
#how .steps p { font-size: .9rem; color: #666; margin: 0; line-height: 1.7; }
#how .section-head { margin-bottom: 1.5rem; }
@media (max-width: 700px) {
  #how .steps { grid-template-columns: 1fr; max-width: 420px; }
}


/* ===== Ticker vertical centering ===== */
.news-ticker, .ticker-wrap { display: flex; align-items: center; }
.ticker-track { display: flex; align-items: center; }
.ticker-item { display: flex; align-items: center; line-height: 1.4; }

/* ===== Service icons matching free-tools identity ===== */
.cat-icon.tools-style {
  width: 72px; height: 72px; display: grid; place-items: center;
  border-radius: 20px; background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  border: none; box-shadow: none; margin: 0 auto .75rem;
}
.cat-icon.tools-style::after { display: none; }
.cat-icon.tools-style svg { display: block; }

/* ===== Defenses photo balanced with neighbors ===== */
.trio-wrap .featured-photo { width: 110px; height: 110px; border-width: 4px; }
.trio-wrap .featured-photo.avatar-initials { font-size: 1.8rem; }
.trio-wrap .featured-name { font-size: 1.1rem; }
.trio-wrap .featured-card { min-height: 300px; padding: 1.5rem 1rem; }

/* ===== Researcher badge ===== */
.featured-photo-wrap { position: relative; display: inline-block; margin: 0 auto; }
.researcher-badge {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #0E6B66, #0B4F4B); color: #fff;
  font-size: .75rem; font-weight: 800; padding: .25rem .9rem; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); white-space: nowrap;
  border: 2px solid #fff;
}
.trio-wrap .featured-photo-wrap { margin-bottom: .5rem; }
/* Distinctive photo */
.trio-wrap .featured-photo {
  border: 4px solid #B97A12;
  box-shadow: 0 6px 20px rgba(185,122,18,.3);
}

/* ===== Unified Trio Cards & Icons (Soft Identity Gradient + Equal Size + Auto 3D Flip) ===== */
.trio-wrap .trio-col,
.trio-wrap .trio-col.section-tint {
  background: transparent !important;
}
.trio-wrap .trio-col::before {
  display: none !important;
}
.trio-wrap .section-head,
.trio-wrap .trio-col:nth-child(2) .section-head {
  text-align: center;
  height: 108px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 1.25rem !important;
  padding: 0 .5rem .85rem !important;
  background: transparent;
  border-radius: 0;
  border-bottom: 2px solid rgba(14, 107, 102, .16);
  box-sizing: border-box;
}
.trio-wrap .section-head h2 {
  font-size: 1.15rem; font-weight: 800; color: #0E6B66;
  margin: 0 0 .45rem; display: flex; align-items: center; justify-content: center; gap: .6rem;
}
.trio-wrap .section-head h2::before,
.trio-wrap .section-head h2::after {
  content: ""; width: 8px; height: 8px; background: #B97A12; transform: rotate(45deg); flex-shrink: 0;
}
.trio-wrap .section-head p { font-size: .88rem; color: #4A6663; margin: 0; line-height: 1.55; }

.trio-wrap .featured-wrap {
  margin: 0 !important;
  max-width: 100% !important;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.trio-wrap .portal-card,
.trio-wrap .featured-card {
  position: relative;
  overflow: hidden;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0 !important;
  padding: 2.15rem 1.6rem 1.85rem !important;
  border-radius: 22px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  perspective: 900px;
  /* Rich Visual Identity Gradient replacing dominant white */
  background:
    radial-gradient(circle at 50% -10%, rgba(185, 122, 18, .22) 0%, rgba(14, 107, 102, .20) 45%, transparent 74%),
    linear-gradient(160deg, #BFE2DF 0%, #D6EDE9 48%, #EFE0BE 100%) !important;
  border: 2px solid rgba(14, 107, 102, .55);
  box-shadow: 0 12px 32px rgba(10, 79, 75, .15), inset 0 1px 0 rgba(255, 255, 255, .75);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.trio-wrap .featured-card {
  border-color: rgba(185, 122, 18, .75);
}
/* Inner golden hairline frame on all 3 cards */
.trio-wrap .portal-card::before,
.trio-wrap .featured-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 122, 18, .38);
  border-radius: 15px;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}
/* Top decorative identity bar on all 3 cards */
.trio-wrap .portal-card::after,
.trio-wrap .featured-card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 22%;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #0E6B66, #B97A12, #0E6B66);
  pointer-events: none;
  z-index: 1;
}
.trio-wrap .portal-card:hover,
.trio-wrap .featured-card:hover {
  transform: translateY(-5px);
  border-color: #B97A12;
  box-shadow: 0 18px 40px rgba(10, 79, 75, .24), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.trio-wrap .portal-card > *,
.trio-wrap .featured-card > * {
  position: relative;
  z-index: 1;
}
.trio-wrap .portal-card h3,
.trio-wrap .featured-name {
  color: #06302C;
  font-size: 1.18rem;
  font-weight: 800;
  margin: .2rem 0 .45rem;
}
.trio-wrap .portal-card p {
  color: #264441;
  font-size: .92rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
}
/* Styled Visual-Identity Pill Buttons at bottom of all 3 cards */
.trio-wrap .portal-card .btn-lg,
.trio-wrap .featured-card .btn-lg,
.trio-wrap .btn-primary {
  font-size: .95rem;
  font-weight: 700;
  padding: .68rem 1.65rem;
  margin-top: 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0B4F4B 0%, #0E6B66 100%);
  color: #fff !important;
  border: 1.5px solid #E9C16C;
  box-shadow: 0 6px 18px rgba(11, 79, 75, .22);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.trio-wrap .portal-card:hover .btn-lg,
.trio-wrap .featured-card .btn-lg:hover {
  background: linear-gradient(135deg, #06302C 0%, #0B4F4B 100%);
  border-color: #B97A12;
  box-shadow: 0 8px 22px rgba(185, 122, 18, .28);
}
.trio-wrap .portal-icon,
.trio-wrap .portal-icon.tools-theme {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  box-sizing: border-box;
  display: grid !important;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 58%, #B97A12 135%);
  border: 2px solid #E9C16C;
  box-shadow: 0 0 0 6px rgba(185, 122, 18, .18), 0 10px 22px rgba(6, 48, 44, .24), inset 0 1px 2px rgba(255, 255, 255, .3);
  margin: 0 auto 1rem !important;
}
.trio-wrap .portal-icon.tools-theme::after { display: none; }

/* Enhanced Defense Photo Stage & Visual Identity Medallion */
.trio-wrap .featured-card {
  perspective: 1200px;
}
.featured-photo-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto .65rem;
}
.defense-live-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 700;
  color: #0E6B66;
  background: rgba(14, 107, 102, .1);
  border: 1px solid rgba(14, 107, 102, .24);
  padding: .15rem .65rem;
  border-radius: 999px;
  margin-bottom: .45rem;
  letter-spacing: .01em;
}
.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .7);
  animation: pulseDefenseDot 2s infinite;
}
@keyframes pulseDefenseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.photo-aura-ring {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #B97A12, #E9C16C, #0E6B66);
  box-shadow: 0 0 0 4px rgba(185, 122, 18, .16), 0 8px 22px rgba(6, 48, 44, .25);
  animation: photoAuraPulse 3.6s ease-in-out infinite alternate;
  overflow: hidden;
}
@keyframes photoAuraPulse {
  0% { box-shadow: 0 0 0 3px rgba(185, 122, 18, .18), 0 8px 18px rgba(6, 48, 44, .22); }
  100% { box-shadow: 0 0 0 6px rgba(185, 122, 18, .32), 0 10px 24px rgba(185, 122, 18, .35); }
}
.photo-aura-ring .featured-photo {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
}
.defense-sheen {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-25deg);
  pointer-events: none;
  animation: defenseSheen 4.2s ease-in-out infinite;
}
@keyframes defenseSheen {
  0%, 60% { left: -120%; }
  85%, 100% { left: 160%; }
}
.trio-wrap .researcher-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.2;
  padding: .18rem .75rem;
  color: #fff;
  background: linear-gradient(135deg, #0E6B66, #0B4F4B);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
  white-space: nowrap;
}
.featured-card-body {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .25s ease, filter .25s ease;
}
.featured-card-body.flip-out {
  transform: rotateY(-80deg) scale(.92);
  opacity: 0;
  filter: blur(2px);
}
.featured-card-body.flip-in {
  animation: researcherFlipIn .45s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes researcherFlipIn {
  0% { transform: rotateY(80deg) scale(.92); opacity: 0; filter: blur(2px); }
  65% { transform: rotateY(-4deg) scale(1.02); opacity: 1; filter: blur(0); }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; filter: blur(0); }
}
.trio-wrap .featured-univ {
  color: #0E6B66;
  font-weight: 700;
  font-size: .88rem;
  text-align: center;
  max-width: 100%;
}
.trio-wrap .featured-thesis {
  color: #2D4C48;
  font-size: .86rem;
  line-height: 1.6;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: .2rem;
}
.featured-card-footer {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
}
/* Visual Identity Progress & Dots */
.featured-progress {
  width: 120px;
  height: 4px;
  background: rgba(14, 107, 102, .14);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.featured-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0E6B66, #B97A12, #E9C16C);
  border-radius: 999px;
}
.featured-progress-bar.running {
  animation: defenseProgress 4.2s linear forwards;
}
@keyframes defenseProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}
.featured-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 0;
}
.featured-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(14, 107, 102, .25);
  border: 1px solid rgba(14, 107, 102, .45);
  cursor: pointer;
  transition: all .25s cubic-bezier(.2, .8, .2, 1);
  padding: 0;
}
.featured-dot:hover {
  background: #B97A12;
  border-color: #B97A12;
  transform: scale(1.25);
}
.featured-dot.active {
  width: 26px;
  background: linear-gradient(90deg, #0E6B66, #B97A12);
  border-color: #B97A12;
  box-shadow: 0 2px 6px rgba(185, 122, 18, .4);
}
}
@media (max-width: 900px) {
  .trio-wrap { grid-template-columns: 1fr; max-width: 480px; }
  .trio-wrap .section-head,
  .trio-wrap .trio-col:nth-child(2) .section-head { height: auto; min-height: auto; }
  .trio-wrap .portal-card, .trio-wrap .featured-card { min-height: 360px; }
}

/* ===== FAQ compact 2-column ===== */
#faq .faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; max-width: 900px; margin: 0 auto; }
#faq .faq-item { margin: 0; }
#faq .faq-item summary { padding: .9rem 1.1rem; font-size: .95rem; }
#faq .faq-item:nth-child(5) { grid-column: 1 / -1; max-width: 440px; margin: 0 auto; width: 100%; }
#faq .section-head { margin-bottom: 1.25rem; }
@media (max-width: 700px) {
  #faq .faq-list { grid-template-columns: 1fr; }
  #faq .faq-item:nth-child(5) { max-width: 100%; }
}

/* ===== Qalam Hur: Unified Full-Width Animated Symbolic Banner Card ===== */
.qalam-section {
  max-width: 1280px;
  margin: .25rem auto 1.5rem;
  padding: 0 1.5rem;
}
.qalam-banner-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 22px;
  background: linear-gradient(125deg, #06302C 0%, #0B4F4B 48%, #0E6B66 100%);
  border: 2px solid #B97A12;
  box-shadow: 0 12px 34px rgba(6, 48, 44, .18);
  padding: 1.55rem 2.2rem;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.qalam-banner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 42px rgba(6, 48, 44, .26);
  border-color: #E9C16C;
}
/* Inner gold geometric frame matching .featured-card::before */
.qalam-banner-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(233, 193, 108, .32);
  border-radius: 16px;
  pointer-events: none;
  z-index: 1;
}
/* Subtle animated golden shimmer across the banner */
.qalam-banner-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(233, 193, 108, .09), transparent);
  transform: skewX(-20deg);
  animation: qalamShimmer 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes qalamShimmer {
  0% { right: -45%; }
  60%, 100% { right: 115%; }
}

/* Symbolic Animated SVG Backdrop */
.qalam-symbolic-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.qalam-wave-path {
  stroke-dasharray: 900;
  stroke-dashoffset: 0;
  animation: qalamWaveFlow 9s ease-in-out infinite alternate;
}
.qalam-wave-2 {
  stroke-dasharray: 8 10;
  animation: qalamDashMove 14s linear infinite;
}
@keyframes qalamWaveFlow {
  0% { transform: translateY(0); opacity: .75; }
  100% { transform: translateY(-6px); opacity: 1; }
}
@keyframes qalamDashMove {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -180; }
}
.qalam-manuscript {
  animation: qalamBookFloat 6s ease-in-out infinite;
}
@keyframes qalamBookFloat {
  0%, 100% { transform: translate(250px, 22px); }
  50% { transform: translate(250px, 16px); }
}
.qalam-write-line {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: qalamLineWrite 4.8s ease-in-out infinite;
}
.qw-1 { animation-delay: 0s; }
.qw-2 { animation-delay: .5s; }
.qw-3 { animation-delay: 1s; }
.qw-4 { animation-delay: 1.5s; }
.qw-5 { animation-delay: 2s; }
.qw-6 { animation-delay: 2.5s; }
@keyframes qalamLineWrite {
  0% { stroke-dashoffset: 60; opacity: .2; }
  35%, 75% { stroke-dashoffset: 0; opacity: .85; }
  100% { stroke-dashoffset: 60; opacity: .2; }
}
.qalam-diamond {
  animation: qalamDiamondPulse 4s ease-in-out infinite;
}
.qd-2 { animation-delay: 1.3s; }
.qd-3 { animation-delay: 2.6s; }
@keyframes qalamDiamondPulse {
  0%, 100% { opacity: .18; }
  50% { opacity: .55; }
}

/* Inner Horizontal Layout */
.qalam-banner-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.65rem;
}

/* Unified 76x76 Emblem Icon matching Trio Icons */
.qalam-emblem-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qalam-banner-icon {
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .13), rgba(185, 122, 18, .18));
  border: 2px solid #E9C16C;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
  position: relative;
}
.qalam-banner-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px dashed rgba(233, 193, 108, .55);
  border-radius: 24px;
  pointer-events: none;
}
.qalam-nib-pen {
  transform-origin: 14px 22px;
  animation: qalamNibWrite 3.2s ease-in-out infinite;
}
.qalam-nib-ink {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: qalamNibInk 3.2s ease-in-out infinite;
}
@keyframes qalamNibWrite {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  35% { transform: rotate(-7deg) translate(-2px, -1px); }
  70% { transform: rotate(5deg) translate(2px, 0); }
}
@keyframes qalamNibInk {
  0% { stroke-dashoffset: 24; opacity: .3; }
  50%, 80% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 24; opacity: .3; }
}
.qalam-emblem-badge {
  margin-top: -8px;
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #0E6B66, #0B4F4B);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  padding: .14rem .7rem;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  white-space: nowrap;
}

/* Center Text & Live Symbolic Bar */
.qalam-banner-text {
  flex: 1;
  min-width: 0;
}
.qalam-title-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.qalam-banner-text h2 {
  color: #fff;
  font-size: 1.55rem;
  margin: 0;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.qalam-banner-text h2::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #E9C16C;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.qalam-subtitle-pill {
  font-size: .76rem;
  font-weight: 700;
  color: #F2CC85;
  background: rgba(233, 193, 108, .15);
  border: 1px solid rgba(233, 193, 108, .38);
  padding: .15rem .75rem;
  border-radius: 999px;
}
.qalam-desc {
  color: rgba(255, 255, 255, .9);
  margin: 0 0 .7rem;
  font-size: .94rem;
  line-height: 1.65;
}
.qalam-live-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  background: rgba(6, 48, 44, .48);
  border: 1px solid rgba(233, 193, 108, .28);
  border-radius: 12px;
  padding: .42rem .75rem;
}
.qalam-pillars {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.qalam-pillar {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: .15rem .68rem;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .22s ease;
}
.qalam-pillar:hover {
  background: rgba(233, 193, 108, .22);
  color: #fff;
}
.qalam-pillar.active {
  background: linear-gradient(135deg, #0E6B66, #0B4F4B);
  color: #fff;
  border-color: #E9C16C;
  box-shadow: 0 2px 8px rgba(185, 122, 18, .35);
}
.qalam-rotator {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 1;
  min-width: 200px;
}
.qalam-rotator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E9C16C;
  box-shadow: 0 0 0 3px rgba(233, 193, 108, .25);
  flex-shrink: 0;
  animation: pulse-green 2s infinite ease-in-out;
}
.qalam-rotator-text {
  color: #F6E9CF;
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.45;
  transition: opacity .22s ease, transform .22s ease;
}
.qalam-rotator-text.qalam-fade-out {
  opacity: 0;
  transform: translateY(4px);
}
.qalam-rotator-link {
  color: #F6E9CF;
  text-decoration: none;
  font-weight: 700;
}
.qalam-rotator-link:hover {
  text-decoration: underline;
  color: #fff;
}

/* Action Buttons on Left */
.qalam-banner-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex-shrink: 0;
}
.qalam-banner-card .qalam-banner-actions .btn {
  pointer-events: auto;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, #0E6B66, #0B4F4B);
  color: #fff;
  border: 1px solid #E9C16C;
  box-shadow: 0 4px 14px rgba(185, 122, 18, .35);
}
.btn-gold:hover {
  filter: brightness(1.08);
  color: #fff;
}
.btn-outline-light {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border: 1.5px solid rgba(233, 193, 108, .55);
  font-size: .88rem;
  padding: .5rem 1.2rem;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, .16);
  border-color: #fff;
  color: #fff;
}

/* Keep article page styles */
.qalam-cats { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.qalam-cat { display: inline-block; background: #FFF3D6; color: #8a5a00; font-size: .78rem; font-weight: 700; padding: .2rem .8rem; border-radius: 999px; }
.qalam-articles { display: grid; gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.qalam-full { background: #fff; border: 1px solid #e0e8e6; border-radius: 16px; padding: 2rem; }
.qalam-full h3 { color: #06302C; font-size: 1.3rem; margin: .75rem 0; }
.qalam-full .qalam-meta { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; display: flex; gap: 1rem; font-size: .82rem; color: #0E6B66; font-weight: 700; }
.qalam-body { line-height: 2; color: #444; }
.qalam-card h4 { margin: .5rem 0; font-size: 1.02rem; }
.qalam-card h4 a { color: #06302C; text-decoration: none; }
.qalam-excerpt { color: #666; font-size: .9rem; line-height: 1.8; margin: .5rem 0; }
.qalam-meta { display: flex; gap: 1rem; font-size: .8rem; color: #0E6B66; font-weight: 700; }
@media (max-width: 900px) {
  .qalam-section { max-width: 480px; }
  .qalam-banner-card { padding: 1.5rem 1.25rem; }
  .qalam-banner-inner { flex-direction: column; text-align: center; gap: 1.1rem; }
  .qalam-title-row { justify-content: center; }
  .qalam-live-bar { justify-content: center; text-align: center; }
  .qalam-pillars { justify-content: center; }
  .qalam-rotator { justify-content: center; }
  .qalam-banner-actions { flex-direction: row; width: 100%; justify-content: center; flex-wrap: wrap; }
}

/* ===== Scholarships directory ===== */
.schol-filters { display: flex; gap: .8rem; max-width: 640px; margin: 1.5rem auto 2rem; }
.schol-filters input, .schol-filters select { flex: 1; padding: .8rem 1rem; border: 2px solid #dfe8e6; border-radius: 12px; font-size: .95rem; }
.schol-filters input:focus, .schol-filters select:focus { border-color: #0E6B66; outline: none; }
.schol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; max-width: 1000px; margin: 0 auto; }
.schol-card { background: #fff; border: 1px solid #e0e8e6; border-radius: 16px; padding: 1.5rem; }
.schol-card h3 { color: #06302C; font-size: 1.1rem; margin: 0 0 .3rem; }
.schol-country { color: var(--teal-dark); font-weight: 700; font-size: .88rem; margin-bottom: 1rem; }
.schol-card dl { margin: 0 0 1.25rem; display: grid; gap: .6rem; }
.schol-card dl > div { display: grid; grid-template-columns: 70px 1fr; gap: .5rem; font-size: .9rem; }
.schol-card dt { color: #0E6B66; font-weight: 700; }
.schol-card dd { margin: 0; color: #555; line-height: 1.7; }
@media (max-width: 750px) { .schol-grid { grid-template-columns: 1fr; } .schol-filters { flex-direction: column; } }

/* ===== Academic Services (#services) & Homepage Cards: Rich Visual Identity Touch ===== */
#services .cat-grid {
  max-width: 1280px;
  padding: 0 1.5rem;
  gap: 1.85rem;
  align-items: stretch;
}
#services .cat-card {
  position: relative;
  overflow: hidden;
  min-height: 315px;
  padding: 2.2rem 1.65rem 1.85rem !important;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  /* Rich Emerald-Teal & Warm-Amber Identity Gradient replacing dominant white */
  background:
    radial-gradient(circle at 50% -10%, rgba(185, 122, 18, .24) 0%, rgba(14, 107, 102, .20) 45%, transparent 74%),
    linear-gradient(160deg, #BFE2DF 0%, #D6EDE9 48%, #EFE0BE 100%) !important;
  border: 2px solid rgba(14, 107, 102, .55) !important;
  box-shadow: 0 12px 32px rgba(10, 79, 75, .15), inset 0 1px 0 rgba(255, 255, 255, .75);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#services .cat-card:first-child {
  border-color: rgba(185, 122, 18, .75) !important;
}
/* Inner golden hairline frame on all 3 Academic Services cards */
#services .cat-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 122, 18, .38);
  border-radius: 15px;
  pointer-events: none;
  z-index: 0;
}
/* Top decorative identity crown bar */
#services .cat-card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 22%;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #0E6B66, #B97A12, #0E6B66);
  pointer-events: none;
  z-index: 1;
}
#services .cat-card:hover {
  transform: translateY(-5px);
  border-color: #B97A12 !important;
  box-shadow: 0 18px 40px rgba(10, 79, 75, .24), inset 0 1px 0 rgba(255, 255, 255, .9);
}
#services .cat-card > * {
  position: relative;
  z-index: 1;
}
/* Upgraded 76x76 Emerald-to-Gold Medallion Icons for Academic Services */
#services .cat-card .cat-icon,
#services .cat-card .cat-icon.tools-style {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  display: grid !important;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 58%, #B97A12 135%) !important;
  border: 2px solid #E9C16C !important;
  box-shadow: 0 0 0 6px rgba(185, 122, 18, .18), 0 10px 22px rgba(6, 48, 44, .24), inset 0 1px 2px rgba(255, 255, 255, .3) !important;
  margin: 0 auto 1.1rem !important;
  transition: transform .25s ease, box-shadow .25s ease;
}
#services .cat-card:hover .cat-icon {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 0 7px rgba(185, 122, 18, .25), 0 12px 26px rgba(6, 48, 44, .30) !important;
}
#services .cat-card strong {
  color: #06302C;
  font-size: 1.16rem;
  font-weight: 800;
  margin: .15rem 0 .45rem;
}
#services .cat-card small {
  color: #264441;
  font-size: .92rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
}
/* Pill Button for "4 خدمات ←" / "5 خدمات ←" / "6 خدمات ←" */
#services .cat-card .cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .93rem;
  font-weight: 700;
  padding: .62rem 1.55rem;
  margin-top: auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #0B4F4B 0%, #0E6B66 100%);
  color: #fff !important;
  border: 1.5px solid #E9C16C;
  box-shadow: 0 6px 18px rgba(11, 79, 75, .22);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
#services .cat-card:hover .cat-count {
  background: linear-gradient(135deg, #06302C 0%, #0B4F4B 100%);
  border-color: #B97A12;
  box-shadow: 0 8px 22px rgba(185, 122, 18, .28);
}

/* Harmonized visual-identity touch for Free Tools tiles (#tools .tool-tile) */
#tools .tool-tile {
  background:
    radial-gradient(circle at 50% -15%, rgba(185, 122, 18, .18) 0%, rgba(14, 107, 102, .16) 48%, transparent 75%),
    linear-gradient(160deg, #C7E6E3 0%, #DDF0ED 50%, #F2E3C4 100%) !important;
  border: 1.5px solid rgba(14, 107, 102, .45) !important;
  box-shadow: 0 8px 24px rgba(10, 79, 75, .12), inset 0 1px 0 rgba(255, 255, 255, .75);
}
#tools .tool-tile:hover {
  border-color: #B97A12 !important;
  box-shadow: 0 14px 32px rgba(10, 79, 75, .20);
}
#tools .tool-tile .tile-icon {
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 58%, #B97A12 135%) !important;
  border: 2px solid #E9C16C !important;
  box-shadow: 0 0 0 4px rgba(185, 122, 18, .16), 0 6px 16px rgba(6, 48, 44, .22) !important;
}

/* ===== AI Research Assistant (#assistant) & Library (#library): Rich Visual Identity Touch ===== */
#assistant .assist-card,
#library .resource-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 2.1rem 1.55rem 1.75rem !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Rich Emerald-Teal & Warm-Amber Identity Gradient replacing dominant white */
  background:
    radial-gradient(circle at 50% -10%, rgba(185, 122, 18, .22) 0%, rgba(14, 107, 102, .20) 45%, transparent 74%),
    linear-gradient(160deg, #BFE2DF 0%, #D6EDE9 48%, #EFE0BE 100%) !important;
  border: 2px solid rgba(14, 107, 102, .55) !important;
  box-shadow: 0 12px 32px rgba(10, 79, 75, .14), inset 0 1px 0 rgba(255, 255, 255, .75);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#assistant .assist-card {
  align-items: center;
  text-align: center;
}
/* Inner golden hairline frame on Assistant & Library cards */
#assistant .assist-card::before,
#library .resource-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 122, 18, .36);
  border-radius: 15px;
  pointer-events: none;
  z-index: 0;
}
/* Top decorative identity crown bar */
#assistant .assist-card::after,
#library .resource-card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 22%;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #0E6B66, #B97A12, #0E6B66);
  pointer-events: none;
  z-index: 1;
}
#assistant .assist-card:hover,
#library .resource-card:hover {
  transform: translateY(-5px);
  border-color: #B97A12 !important;
  box-shadow: 0 18px 40px rgba(10, 79, 75, .22), inset 0 1px 0 rgba(255, 255, 255, .9);
}
#assistant .assist-card > *,
#library .resource-card > * {
  position: relative;
  z-index: 1;
}
/* Emerald-to-Gold Medallion Icons for #assistant and #library */
#assistant .assist-icon,
#library .resource-icon {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
  display: grid !important;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 58%, #B97A12 135%) !important;
  border: 2px solid #E9C16C !important;
  box-shadow: 0 0 0 5px rgba(185, 122, 18, .17), 0 8px 20px rgba(6, 48, 44, .22), inset 0 1px 2px rgba(255, 255, 255, .3) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}
#assistant .assist-icon {
  margin: 0 auto 1rem !important;
}
#assistant .assist-card:hover .assist-icon,
#library .resource-card:hover .resource-icon {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 0 6px rgba(185, 122, 18, .24), 0 10px 24px rgba(6, 48, 44, .28) !important;
}
#assistant .assist-card h3,
#library .resource-card h3 {
  color: #06302C;
  font-size: 1.12rem;
  font-weight: 800;
  margin: .15rem 0 .5rem;
}
#assistant .assist-card p,
#library .resource-card p {
  color: #264441;
  font-size: .91rem;
  line-height: 1.75;
  margin-bottom: 1.15rem;
}
/* Pill Buttons inside #assistant */
#assistant .assist-action {
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: center;
}
#assistant .assist-action .btn {
  font-size: .88rem;
  font-weight: 700;
  padding: .58rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0B4F4B 0%, #0E6B66 100%) !important;
  color: #fff !important;
  border: 1.5px solid #E9C16C !important;
  box-shadow: 0 6px 16px rgba(11, 79, 75, .20);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
#assistant .assist-card:hover .assist-action .btn {
  background: linear-gradient(135deg, #06302C 0%, #0B4F4B 100%) !important;
  border-color: #B97A12 !important;
  box-shadow: 0 8px 20px rgba(185, 122, 18, .26);
}

/* Library Card Header & Footer Layout */
#library .resource-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  margin-bottom: .9rem;
}
#library .resource-badge {
  background: linear-gradient(135deg, #0E6B66, #0B4F4B) !important;
  color: #fff !important;
  border: 1px solid #E9C16C;
  font-size: .78rem;
  font-weight: 800;
  padding: .28rem .9rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(185, 122, 18, .24);
  margin: 0 !important;
}
#library .resource-meta {
  margin-top: auto;
  padding-top: .95rem;
  border-top: 1px solid rgba(14, 107, 102, .22) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
}
#library .resource-type {
  font-size: .82rem;
  font-weight: 700;
  color: #0B4F4B;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(14, 107, 102, .25);
  padding: .22rem .7rem;
  border-radius: 999px;
}
#library .resource-link,
#library .resource-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .86rem;
  font-weight: 700;
  padding: .48rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0B4F4B 0%, #0E6B66 100%) !important;
  color: #fff !important;
  border: 1.5px solid #E9C16C !important;
  box-shadow: 0 5px 14px rgba(11, 79, 75, .20);
  text-decoration: none !important;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
#library .resource-card:hover .resource-link,
#library .resource-card:hover .resource-link-btn {
  background: linear-gradient(135deg, #06302C 0%, #0B4F4B 100%) !important;
  border-color: #B97A12 !important;
  box-shadow: 0 7px 18px rgba(185, 122, 18, .26);
}

/* How We Work (#how .steps li) & FAQ (#faq .faq-item): Harmonized Identity Touch */
#how .steps li {
  background:
    radial-gradient(circle at 50% -15%, rgba(185, 122, 18, .18) 0%, rgba(14, 107, 102, .16) 48%, transparent 75%),
    linear-gradient(160deg, #C7E6E3 0%, #DDF0ED 50%, #F2E3C4 100%) !important;
  border: 1.5px solid rgba(14, 107, 102, .48) !important;
  box-shadow: 0 8px 24px rgba(10, 79, 75, .12), inset 0 1px 0 rgba(255, 255, 255, .75);
}
.faq-section .faq-item {
  background: linear-gradient(160deg, #D2EAE7 0%, #E6F4F2 52%, #F4E6C9 100%) !important;
  border: 1.5px solid rgba(14, 107, 102, .42) !important;
}

/* ========================================================
   الأدوات الأكاديمية المجانية - ترقية الهوية والوظائف المتقدمة
   ======================================================== */

/* Promotion Rank Selection Pills */
.promo-ranks-wrap {
  margin: 1rem 0 1.2rem;
  background: rgba(14, 107, 102, .04);
  border: 1px solid rgba(14, 107, 102, .15);
  border-radius: 14px;
  padding: .85rem 1rem;
}
.promo-ranks-label {
  font-size: .88rem;
  font-weight: 700;
  color: #06302C;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.promo-ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .65rem;
}
.promo-rank-btn {
  background: #ffffff;
  border: 1.5px solid rgba(14, 107, 102, .22);
  border-radius: 10px;
  padding: .65rem .85rem;
  text-align: right;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.promo-rank-btn:hover {
  border-color: #B97A12;
  background: #FAFCFB;
  transform: translateY(-1px);
}
.promo-rank-btn.active {
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 100%);
  border-color: #E9C16C;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 107, 102, .25);
}
.promo-rank-btn.active .rank-pts {
  background: rgba(233, 193, 108, .2);
  color: #F2CC85;
  border-color: #E9C16C;
}
.promo-rank-title {
  font-weight: 700;
  font-size: .86rem;
}
.promo-rank-btn.active .promo-rank-title {
  color: #ffffff;
}
.rank-pts {
  align-self: flex-start;
  font-size: .74rem;
  font-weight: 700;
  color: #0E6B66;
  background: rgba(14, 107, 102, .08);
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 107, 102, .18);
}

/* Word Counter: Advanced Academic Stats Grid */
.word-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .8rem;
  margin: 1.2rem 0;
}
.word-stat-card {
  background: #FAFCFB;
  border: 1.5px solid rgba(14, 107, 102, .14);
  border-radius: 12px;
  padding: .9rem .75rem;
  text-align: center;
  transition: border-color .2s ease, transform .2s ease;
}
.word-stat-card:hover {
  border-color: #B97A12;
  transform: translateY(-2px);
}
.word-stat-card .stat-icon {
  width: 24px;
  height: 24px;
  margin: 0 auto .35rem;
  color: #0E6B66;
  display: block;
}
.word-stat-card .stat-num {
  font-size: 1.55rem;
  font-weight: 800;
  color: #06302C;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.word-stat-card .stat-title {
  font-size: .78rem;
  font-weight: 700;
  color: #555;
  margin-top: .2rem;
}
.word-stat-card .stat-sub {
  font-size: .7rem;
  color: #777;
  margin-top: .1rem;
}

/* Keyword Density Analysis Box */
.keywords-box {
  background: #F4F9F8;
  border: 1px dashed rgba(14, 107, 102, .25);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-top: 1rem;
}
.keywords-box-head {
  font-size: .84rem;
  font-weight: 700;
  color: #06302C;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.keywords-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.kw-chip {
  background: #ffffff;
  border: 1px solid rgba(14, 107, 102, .2);
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  color: #0B4F4B;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.kw-chip strong {
  background: #0E6B66;
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  padding: 0 .4rem;
  min-width: 18px;
  text-align: center;
}

/* Sample Size: Ready Thesis Methodology Box */
.academic-quote-box {
  background: linear-gradient(135deg, rgba(242, 227, 196, .28) 0%, rgba(221, 240, 237, .38) 100%);
  border: 1.5px solid rgba(185, 122, 18, .35);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-top: 1.2rem;
  position: relative;
}
.academic-quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  gap: .6rem;
  flex-wrap: wrap;
}
.academic-quote-title {
  font-size: .88rem;
  font-weight: 800;
  color: #06302C;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.academic-quote-text {
  font-size: .88rem;
  line-height: 1.8;
  color: #1A302E;
  background: #ffffff;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(14, 107, 102, .18);
  font-style: normal;
  display: block;
}

/* References Styling & BibTeX */
.citation-tabs {
  display: flex;
  gap: .4rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.citation-tab-btn {
  background: #FAFCFB;
  border: 1.5px solid rgba(14, 107, 102, .2);
  color: #06302C;
  font-size: .82rem;
  font-weight: 700;
  padding: .4rem .95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
}
.citation-tab-btn:hover {
  border-color: #B97A12;
  color: #B97A12;
}
.citation-tab-btn.active {
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 100%);
  border-color: #E9C16C;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(14, 107, 102, .2);
}
.cite-content i,
.saved-refs-list i {
  font-style: italic !important;
  color: #0B4F4B;
  font-weight: 600;
}
.bibtex-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
  background: #06302C;
  color: #D6EDE9;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #E9C16C;
  overflow-x: auto;
}

/* Tool Action Buttons with SVG Icons */
.btn-svg-inline {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.btn-svg-inline svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

/* ========================================================
   منظومة الاختبارات: رفع الملفات وتوليد الامتحانات الرسمية للأستاذ
   ======================================================== */

/* File Upload Drag & Drop Zone */
.quiz-upload-zone {
  border: 2px dashed rgba(14, 107, 102, .35);
  background: rgba(14, 107, 102, .03);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all .2s ease;
  margin-bottom: 1.1rem;
  cursor: pointer;
}
.quiz-upload-zone:hover,
.quiz-upload-zone.dragover {
  border-color: #B97A12;
  background: rgba(185, 122, 18, .07);
  transform: translateY(-1px);
}
.quiz-upload-zone .upload-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto .4rem;
  background: linear-gradient(135deg, rgba(14, 107, 102, .12), rgba(185, 122, 18, .12));
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0E6B66;
}
.quiz-upload-zone .upload-text strong {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: #06302C;
  margin-bottom: .25rem;
}
.quiz-upload-zone .upload-text span {
  display: block;
  font-size: .78rem;
  color: #666;
  margin-bottom: .75rem;
}
.quiz-file-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(135deg, #06302C, #0E6B66);
  color: #fff;
  padding: .35rem .95rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  margin-top: .6rem;
  border: 1px solid #E9C16C;
  box-shadow: 0 4px 12px rgba(6, 48, 44, .18);
}
.quiz-file-badge .file-size {
  color: #F2CC85;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.quiz-file-badge button {
  background: rgba(255, 255, 255, .25);
  border: none;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .75rem;
  transition: background .2s ease;
}
.quiz-file-badge button:hover {
  background: #B97A12;
}

/* Professor / Student Quiz Mode Switcher */
.quiz-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1.15rem;
}
.quiz-role-btn {
  background: #FAFCFB;
  border: 1.5px solid rgba(14, 107, 102, .22);
  border-radius: 10px;
  padding: .75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  font-weight: 700;
  font-size: .88rem;
  color: #06302C;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.quiz-role-btn:hover {
  border-color: #B97A12;
}
.quiz-role-btn.active {
  background: linear-gradient(135deg, #06302C 0%, #0E6B66 100%);
  border-color: #E9C16C;
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 107, 102, .22);
}

/* Exam Paper Container (ورقة الامتحان الرسمية) */
.exam-paper-container {
  background: #ffffff;
  color: #111111;
  border: 2px solid #06302C;
  border-radius: 12px;
  padding: 2.2rem 2.4rem;
  margin-top: 1.4rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
  font-family: inherit;
  line-height: 1.7;
}
.exam-header {
  border-bottom: 2px solid #06302C;
  padding-bottom: 1.1rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.exam-header-side {
  font-size: .88rem;
  font-weight: 700;
  color: #111;
  line-height: 1.6;
}
.exam-header-center {
  text-align: center;
  flex: 1;
}
.exam-header-center h4 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #06302C;
  margin: 0 0 .3rem;
}
.exam-header-center p {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
}
.exam-student-box {
  background: #fcfcfc;
  border: 1.5px solid #333;
  border-radius: 6px;
  padding: .75rem 1rem;
  margin-bottom: 1.3rem;
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr;
  gap: .8rem;
  font-size: .84rem;
  font-weight: 700;
}
.exam-instructions-box {
  background: #F8F9FA;
  border-inline-start: 4px solid #0E6B66;
  padding: .65rem 1rem;
  font-size: .82rem;
  color: #333;
  margin-bottom: 1.4rem;
}
.exam-question-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px dashed #ccc;
}
.exam-question-item:last-child {
  border-bottom: none;
}
.exam-question-title {
  font-size: .96rem;
  font-weight: 800;
  color: #06302C;
  display: flex;
  justify-content: space-between;
  margin-bottom: .6rem;
}
.exam-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .6rem;
  margin-inline-start: 1rem;
}
.exam-opt-cell {
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.exam-opt-letter {
  font-weight: bold;
  color: #06302C;
}
.exam-answer-key-box {
  background: #F4FAF8;
  border: 1.5px solid #0E6B66;
  border-radius: 8px;
  padding: 1.2rem;
  margin-top: 1.5rem;
}
.exam-key-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0E6B66;
  padding-bottom: .6rem;
  margin-bottom: 1rem;
  color: #06302C;
}
.exam-key-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.exam-key-table th, .exam-key-table td {
  border: 1px solid #CBD5E0;
  padding: .5rem .75rem;
  text-align: start;
}
.exam-key-table th {
  background: #E6F4F1;
  color: #06302C;
  font-weight: 800;
}
.exam-footer-note {
  text-align: center;
  font-weight: 700;
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px dashed #CBD5E0;
  color: #4A5568;
  font-size: .9rem;
}

/* -----------------------------------------------------
   نظام استمارة التظليل الإلكتروني (ببل شيت - Bubble Sheet OMR)
   ----------------------------------------------------- */
.exam-view-tabs .btn.active {
  background: #0E6B66;
  color: #fff;
  border-color: #0E6B66;
  font-weight: 800;
}

.bubble-sheet-container {
  background: #fff;
  color: #111;
  border: 2px solid #222;
  border-radius: 6px;
  padding: 1.6rem 2rem 2.8rem;
  position: relative;
  font-family: 'Simplified Arabic', 'Traditional Arabic', 'Arial', sans-serif;
  margin-top: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

/* علامات المحاذاة الضوئية للماسح (OMR Registration Corner Marks) */
.omr-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  background: #000;
}
.omr-corner.omr-tl { top: 10px; inset-inline-start: 10px; }
.omr-corner.omr-tr { top: 10px; inset-inline-end: 10px; }
.omr-corner.omr-bl { bottom: 10px; inset-inline-start: 10px; }
.omr-corner.omr-br { bottom: 10px; inset-inline-end: 10px; }

.omr-timing-top {
  height: 9px;
  background: repeating-linear-gradient(90deg, #000 0, #000 12px, transparent 12px, transparent 20px);
  margin: 0 35px 12px;
  border-radius: 2px;
}

/* ترويسة ورقة الببل شيت */
.bubble-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 14px;
  gap: 1rem;
  flex-wrap: wrap;
}
.bsh-right, .bsh-left {
  font-size: .82rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
.bsh-center {
  text-align: center;
  flex: 1;
}
.bsh-title-badge {
  font-size: .74rem;
  font-weight: 800;
  background: #06302C;
  color: #fff;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.bsh-title {
  font-size: 1.22rem;
  font-weight: 900;
  color: #000;
  margin: 2px 0 4px;
  letter-spacing: .5px;
}
.bsh-session {
  font-size: .85rem;
  font-weight: 700;
  color: #333;
}
.omr-barcode-box {
  margin-top: 4px;
  text-align: center;
}
.fake-barcode {
  font-family: monospace;
  font-size: 1.2rem;
  letter-spacing: 3px;
  font-weight: 900;
  line-height: 1;
}
.omr-barcode-box small {
  font-size: .65rem;
  color: #555;
  letter-spacing: 1px;
}

/* شبكة بيانات الطالب ونموذج الأسئلة */
.bubble-sheet-meta-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 860px) {
  .bubble-sheet-meta-grid {
    grid-template-columns: 1fr;
  }
}
.bs-box {
  border: 1.5px solid #333;
  padding: 8px 10px;
  font-size: .8rem;
  border-radius: 4px;
  background: #fdfdfd;
}
.bs-box-title {
  font-weight: 800;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  margin-bottom: 6px;
  font-size: .82rem;
  text-align: center;
  background: #f1f3f4;
  border-radius: 2px;
  color: #06302C;
}
/* تصميم صندوق بيانات الطالب المطور بخانات واضحة */
.omr-student-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .76rem;
  margin-top: 2px;
}
.omr-student-table td {
  border: 1px solid #CBD5E1;
  padding: 4px 6px;
  vertical-align: middle;
}
.omr-student-table .st-lbl {
  background: #F1F5F9;
  font-weight: 800;
  color: #0F172A;
  font-size: .72rem;
  text-align: right;
  white-space: nowrap;
}
.omr-student-table .st-val {
  background: #FFFFFF;
}
.st-digit-cells {
  display: flex;
  gap: 3px;
  direction: ltr;
}
.st-digit-cells span {
  display: inline-block;
  width: 15px;
  height: 18px;
  border: 1px solid #94A3B8;
  background: #FFF;
  border-radius: 2px;
}

/* أعمدة شبكة الخيارات والأسئلة الحديثة المنسقة هندسياً */
.omr-table-col {
  width: 100%;
  border-collapse: collapse;
  direction: ltr; /* لضمان ترتيب Q# ثم A ثم B ثم C ثم D */
}
.omr-table-col th {
  background: #1E293B;
  color: #FFFFFF;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 2px;
  text-align: center;
  border: 1px solid #0F172A;
}
.omr-table-col td {
  padding: 3px 2px;
  text-align: center;
  border-bottom: 1px solid #E2E8F0;
  vertical-align: middle;
}
.omr-table-col tr:nth-child(even) td {
  background: #F8FAFC;
}
.omr-table-col .td-qnum {
  background: #E2E8F0 !important;
  font-weight: 800;
  font-size: .75rem;
  color: #0F172A;
  border-inline-end: 1.5px solid #CBD5E1;
  min-width: 28px;
}

/* دوائر نموذج الأسئلة والإرشادات */
.omr-model-bubbles {
  display: flex;
  justify-content: space-around;
  margin: 6px 0 10px;
}
.omr-bubble-model {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 26px;
  border-radius: 999px;
  border: 1.5px solid #111;
  font-weight: 800;
  font-size: .76rem;
  background: #fff;
}
.omr-guide-box {
  border-top: 1px dashed #ccc;
  padding-top: 6px;
  font-size: .74rem;
}
.guide-icons-row {
  display: flex;
  gap: 8px;
  justify-content: space-around;
  margin: 6px 0;
}
.guide-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
}
.guide-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #333;
  font-size: .65rem;
  font-weight: 800;
}
.guide-circle.filled {
  background: #000;
  border-color: #000;
}
.guide-item.ok {
  color: #1E8E4E;
  font-weight: 800;
}
.guide-item.bad {
  color: #c53030;
  font-weight: 700;
}
.guide-text {
  display: block;
  font-size: .68rem;
  color: #555;
  line-height: 1.4;
  margin-top: 4px;
}

/* شبكة دوائر التظليل للأسئلة (Response Bubbles Grid) */
.bubble-grid-container {
  border: 1.8px solid #000;
  border-radius: 4px;
  padding: 10px 14px;
  background: #fff;
  margin-bottom: 12px;
}
.bubble-grid-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.bubble-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-inline-end: 1px dashed #bbb;
  padding-inline-end: 12px;
}
.bubble-col:last-child {
  border-inline-end: none;
}
.bubble-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: .8rem;
  border-bottom: 1px solid #f0f0f0;
}
.bubble-row:nth-child(even) {
  background: #F7FAF9;
}
.bubble-q-num {
  font-weight: 800;
  min-width: 32px;
  text-align: center;
  background: #E2E8F0;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: .75rem;
  color: #06302C;
}
.bubble-options {
  display: flex;
  gap: 6px;
  align-items: center;
}
.omr-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.6px solid #222;
  font-size: .7rem;
  font-weight: 800;
  color: #111;
  background: #fff;
  cursor: pointer;
  transition: all .15s ease;
}
/* تظليل مفتاح الإجابة النموذجي للأستاذ (Master Key Shading) */
.omr-bubble.shaded-key {
  background: #06302C !important;
  color: #fff !important;
  border-color: #06302C !important;
  box-shadow: 0 0 0 2px #E9C16C;
}

.bubble-sheet-footer {
  border-top: 1.5px solid #000;
  padding-top: 8px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  text-align: center;
}
.bsf-alert {
  font-size: .74rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}
.omr-calib-line {
  letter-spacing: 6px;
  font-size: .85rem;
  font-weight: 900;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

/* -----------------------------------------------------
   منظومة الببل شيت والتصحيح الضوئي الذكي (OMR Tool)
   ----------------------------------------------------- */
.omr-main-tabs {
  display: flex;
  gap: .5rem;
  background: #E8F3F1;
  border-radius: 8px;
  padding: .35rem;
  margin: 1rem 0 1.4rem;
  flex-wrap: wrap;
}
.omr-main-tab {
  flex: 1;
  min-width: 220px;
  padding: .65rem .9rem;
  border: none;
  background: transparent;
  color: #06302C;
  font-weight: 700;
  font-size: .88rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}
.omr-main-tab.active {
  background: #06302C;
  color: #fff;
  box-shadow: 0 2px 8px rgba(6, 48, 44, .25);
}

/* شبكة ضبط مفتاح الإجابة (Master Key Grid) */
.omr-key-box {
  background: #F8FBFA;
  border: 1.5px solid #0E6B66;
  border-radius: 8px;
  padding: 1rem 1.2rem;
}
.omr-key-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #CBD5E0;
  padding-bottom: .6rem;
  margin-bottom: .8rem;
  flex-wrap: wrap;
  gap: .6rem;
}
.omr-key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .6rem;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}
.omr-key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #CBD5E0;
  border-radius: 6px;
  padding: .35rem .6rem;
}
.omr-key-item strong {
  font-size: .78rem;
  color: #06302C;
}
.omr-key-btns {
  display: flex;
  gap: 3px;
}
.key-opt-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.2px solid #718096;
  background: #fff;
  font-size: .68rem;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all .15s ease;
}
.key-opt-btn.active {
  background: #06302C;
  color: #fff;
  border-color: #06302C;
  box-shadow: 0 0 0 2px #E9C16C;
}

/* واجهة كاميرا الموبايل التفاعلية */
.omr-camera-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: .8rem;
}
.omr-viewport-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.omr-viewport-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.omr-cam-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.omr-target-frame {
  width: 80%;
  height: 75%;
  border: 2px dashed rgba(233, 193, 108, .8);
  border-radius: 8px;
  position: relative;
}
.omr-target-frame .corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #E9C16C;
  border-style: solid;
}
.omr-target-frame .corner.tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.omr-target-frame .corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.omr-target-frame .corner.bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.omr-target-frame .corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E9C16C, #25D366, transparent);
  animation: scanAnim 2.5s ease-in-out infinite;
}
@keyframes scanAnim {
  0% { top: 0%; opacity: .4; }
  50% { top: 96%; opacity: 1; }
  100% { top: 0%; opacity: .4; }
}
.omr-cam-hint {
  margin-top: .6rem;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.omr-cam-controls {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* كرت نتيجة الورقة الفردية */
.omr-single-result-card {
  width: 100%;
  max-width: 580px;
  background: #fff;
  border: 1.5px solid #0E6B66;
  border-radius: 10px;
  padding: 1.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}
.student-score-badge {
  font-size: 1.4rem;
  font-weight: 900;
  color: #06302C;
}
.student-pct-badge {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1E8E4E;
  background: #E6F4F1;
  padding: .2rem .6rem;
  border-radius: 6px;
}
.student-name-field {
  flex: 1;
  min-width: 200px;
}
.student-name-field input {
  width: 100%;
  padding: .35rem .6rem;
  border: 1px solid #CBD5E0;
  border-radius: 6px;
  font-size: .88rem;
}
.result-breakdown-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1rem 0;
  max-height: 140px;
  overflow-y: auto;
  padding: 4px;
  background: #F8FBFA;
  border-radius: 6px;
}
.res-q-chip {
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.res-q-chip.correct {
  background: #E6F4F1;
  color: #0E6B66;
  border: 1px solid #A8D5C8;
}
.res-q-chip.incorrect {
  background: #FDE8E8;
  color: #9B1C1C;
  border: 1px solid #F8B4B4;
}
.result-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: .8rem;
  border-top: 1px solid #E2E8F0;
  padding-top: .8rem;
}

/* رفع حزمة السكنر (Batch Scanner Upload) */
.omr-batch-upload-box {
  background: #F8FBFA;
  border: 2px dashed #0E6B66;
  border-radius: 10px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
}
.omr-batch-upload-box:hover, .omr-batch-upload-box.dragover {
  background: #E8F3F1;
  border-color: #06302C;
}

/* كروت الإحصاءات الذكية */
.omr-stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.omr-stat-box {
  background: #F8FBFA;
  border: 1.5px solid #0E6B66;
  border-radius: 8px;
  padding: .9rem 1rem;
  text-align: center;
}
.omr-stat-box .stat-title {
  display: block;
  font-size: .8rem;
  color: #4A5568;
  font-weight: 700;
  margin-bottom: 2px;
}
.omr-stat-box .stat-val {
  display: block;
  font-size: 1.4rem;
  font-weight: 900;
  color: #06302C;
  margin-bottom: 2px;
}
.omr-stat-box small {
  font-size: .75rem;
  color: #718096;
}

/* جدول كشف الدرجات للدفعة */
.omr-grade-table {
  width: 100%;
  border-collapse: collapse;
}
.omr-grade-table th {
  background: #06302C;
  color: #fff;
  padding: .6rem .8rem;
  font-size: .85rem;
  text-align: center;
}
.omr-grade-table td {
  padding: .5rem .8rem;
  font-size: .85rem;
  border-bottom: 1px solid #E2E8F0;
  text-align: center;
}
.omr-grade-table tr:nth-child(even) {
  background: #F8FBFA;
}

/* أنماط الطباعة المخصصة لورقة الامتحان والببل شيت وكشف الدرجات */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  dialog[open] {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  dialog[open] .modal-box {
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    visibility: visible !important;
  }
  dialog:not([open]) {
    display: none !important;
  }
  body * {
    visibility: hidden;
  }
  .exam-paper-container,
  .exam-paper-container *,
  #omrPrintableGradebookTable,
  #omrPrintableGradebookTable * {
    visibility: visible !important;
  }
  .exam-paper-container {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #omrPrintableGradebookTable {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .bubble-sheet-container {
    border: 2px solid #000 !important;
    box-shadow: none !important;
    padding: 10px 14px 18px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .bubble-sheet-container * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .omr-bubble.shaded-key {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
  }
  .bsh-title-badge {
    background: #000 !important;
    color: #fff !important;
  }
  .bs-box-title {
    background: #e2e8f0 !important;
    color: #000 !important;
    border-bottom: 1px solid #718096 !important;
  }
  .bubble-q-num {
    background: #e2e8f0 !important;
    color: #000 !important;
  }
  .omr-corner {
    background: #000 !important;
  }
  .no-print,
  .tool-actions,
  .modal-close,
  .quiz-steps-nav,
  .quiz-upload-zone,
  .quiz-role-tabs,
  .exam-view-tabs,
  .omr-main-tabs,
  .omr-key-box,
  .omr-cam-controls {
    display: none !important;
  }
}





