/* ============================================================================
 * IMC Brand Palette — sourced from imc-design-system.css (the canonical brand-
 * book bundle: navy #00274D + cool gray #B3B3B6 only, NO third hue).
 *
 * This file imports the canonical tokens and then ALIASES the DDS namespace
 * (--dda-primary-NN, --dda-secondary-NN) so existing DDA Web Components pick
 * up the IMC palette without further changes.
 * ========================================================================== */
@import url("./imc-design-system.css");

:root {
  /* ---- DDS primary namespace -> IMC navy ramp (canonical) ---- */
  --dda-primary-0:   var(--imc-primary-0);
  --dda-primary-4:   var(--imc-primary-4);
  --dda-primary-5:   var(--imc-primary-6);   /* nearest */
  --dda-primary-6:   var(--imc-primary-6);
  --dda-primary-10:  var(--imc-primary-10);
  --dda-primary-12:  var(--imc-primary-12);
  --dda-primary-17:  var(--imc-primary-17);
  --dda-primary-20:  var(--imc-primary-20);  /* IMC navy #00274D — Pantone 5395 C */
  --dda-primary-22:  var(--imc-primary-22);
  --dda-primary-24:  var(--imc-primary-25);  /* nearest */
  --dda-primary-25:  var(--imc-primary-25);
  --dda-primary-30:  var(--imc-primary-30);
  --dda-primary-35:  var(--imc-primary-35);
  --dda-primary-40:  var(--imc-primary-40);
  --dda-primary-50:  var(--imc-primary-20);  /* keep brand surfaces deeply navy */
  --dda-primary-60:  var(--imc-primary-60);
  --dda-primary-70:  var(--imc-primary-70);
  --dda-primary-80:  var(--imc-primary-80);
  --dda-primary-87:  var(--imc-primary-87);
  --dda-primary-90:  var(--imc-primary-90);
  --dda-primary-92:  var(--imc-primary-92);
  --dda-primary-94:  var(--imc-primary-94);
  --dda-primary-95:  var(--imc-primary-95);
  --dda-primary-96:  var(--imc-primary-96);
  --dda-primary-98:  var(--imc-primary-98);
  --dda-primary-99:  var(--imc-primary-99);
  --dda-primary-100: var(--imc-primary-100);

  /* ---- DDS secondary namespace -> IMC secondary (desaturated companion) ---- */
  --dda-secondary-10: var(--imc-secondary-10);
  --dda-secondary-20: var(--imc-secondary-20);
  --dda-secondary-30: var(--imc-secondary-30);
  --dda-secondary-40: var(--imc-secondary-40);
  --dda-secondary-50: var(--imc-secondary-50);
  --dda-secondary-60: var(--imc-secondary-60);
  --dda-secondary-70: var(--imc-secondary-70);
  --dda-secondary-80: var(--imc-secondary-80);
  --dda-secondary-90: var(--imc-secondary-90);
  --dda-secondary-95: var(--imc-secondary-95);
  --dda-secondary-99: var(--imc-secondary-99);

  /* ---- Legacy aliases used by older imcgovae CSS (kept for back-compat) ---- */
  --imc-navy:        var(--imc-primary-20);
  --imc-navy-dark:   var(--imc-primary-10);
  --imc-navy-light:  var(--imc-primary-40);
  --imc-bg-light:    var(--imc-neutral-95);
  --imc-bg-section:  var(--imc-neutral-98);
  --imc-text-dark:   var(--imc-neutral-10);
  --imc-text-muted:  var(--imc-neutral-variant-30);
  /* NOTE: --imc-teal / --imc-gold removed — brand spec is navy + gray only,
     "no third hue" (per IMC Brand Identity Guideline Book p.8). */
}

:root {
  /* Legacy font-family token — Dubai Font is canonical per brand book; Cairo + Tajawal kept as Arabic fallbacks */
  --font-family-main: "Dubai", "Cairo", "Tajawal", system-ui, sans-serif !important;
}

body {
  font-family: "Dubai", "Cairo", "Tajawal", system-ui, sans-serif !important;
}

/* .home-slider::before {
  display: none;
} */

/* dda-home-banner uses its own internal slide styling via dda-home-banner-slide / dda-slide-contant-wrap classes; no overrides needed here. */

.home-intro {
  position: relative;
  height: calc(100vh - 64px);
  box-shadow: 0 0px 15px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.table_tableWrapper__zr7LC {
  animation: table_detect-scroll__IZtP9 linear;
  animation-timeline: scroll(self x);
  --border-radius-if-can-scroll: var(--can-scroll) 0.375rem;
  --border-radius-if-cant-scroll: 0;
  border-radius: var(
    --border-radius-if-can-scroll,
    var(--border-radius-if-cant-scroll)
  );
  --border-width-if-can-scroll: var(--can-scroll) 1px;
  --border-width-if-cant-scroll: 0;
  border-width: var(
    --border-width-if-can-scroll,
    var(--border-width-if-cant-scroll)
  );
  position: relative;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-color: rgb(var(--tint-6));
}

.table_columnHeader__PGmsy {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: rgb(var(--tint-12));
}

.table_row__LpfCG {
  display: flex;
  border-color: rgb(var(--tint-6));
  transition-property:
    color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.15s;
}

.table_row__LpfCG:hover {
  background-color: rgb(var(--tint-4));
}

.table_rowGroup__IKtSP {
  margin-bottom: 0.25rem;
  flex-direction: column;
  border-radius: 0.5rem;
  border-width: 1px;
  background-color: rgb(var(--tint-3));
}

.table_cell__X_gFM,
.table_rowGroup__IKtSP {
  display: flex;
  border-color: rgb(var(--tint-6));
}

.table_cell__X_gFM {
  position: relative;
  height: 100%;
  flex: 1 1 0%;
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.table_cell__X_gFM:not(:last-child) {
  border-right-width: 1px;
}

.quick-links .link-item:hover::after {
  display: none !important;
}

/* 
.dda-accessibility-wrap {
  display: none !important;
} */

spinner {
  position: fixed;
  z-index: 999;
  background: #fff;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

spinner .loader {
  width: 48px;
  height: 48px;
  border: 5px solid #eee;
  border-bottom-color: blue;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}
@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}



/*Custom popup*/
.dda-popup-wrap{
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.dda-popup-container{
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
}
.dda-popup-close{
  position: absolute;
  top: 10px; right: 15px;
  cursor: pointer;
  font-size: 20px;
}

/* === Megamenu wrap fix — DDS shadow DOM inherits white-space from the host,
       so forcing nowrap on dda-header keeps each top-level item on one line
       and produces an even row height across all items. */
dda-header,
dda-header * {
  white-space: nowrap;
}

/* === Hero size cap — keep the dda-home-banner photograph at a comfortable
       height so it doesn't dominate the viewport. Brand book §VISUAL
       FOUNDATIONS prefers generous white space; we reserve full-bleed
       imagery for event collateral, not the homepage hero. */
.home-intros dda-home-banner {
  display: block;
  max-height: 60vh;
  min-height: 360px;
  overflow: hidden;
}
.home-intros dda-home-banner .dda-home-banner-slide {
  max-height: 60vh;
  min-height: 360px;
}
.home-intros dda-home-banner img {
  object-fit: cover;
  width: 100%;
  max-height: 60vh;
}
@media (max-width: 991.98px) {
  .home-intros dda-home-banner,
  .home-intros dda-home-banner .dda-home-banner-slide {
    max-height: 50vh;
    min-height: 280px;
  }
}

/* Mobile: keep hero CTAs inside the viewport — DDA's banner-slide content
   sits flush to the edge by default, clipping "تواصل معنا" in RTL.
   Add side padding + stack buttons vertically so they don't overflow.
   DDA hides .dda-slide-contant on small screens by default; force it back
   so visitors still see "مرحبا بكم" + the two CTA buttons. */
@media (max-width: 768px) {
  .home-intros .dda-slide-contant-wrap,
  .home-intros .dda-slide-contant,
  .home-intros .dda-slide-contant > div {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .home-intros .dda-slide-contant-wrap {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex !important;
    align-items: center;
    padding: 1.25rem !important;
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(0,39,77,0.65) 0%, rgba(0,39,77,0.25) 70%, rgba(0,39,77,0) 100%);
  }
  .home-intros .dda-slide-contant {
    padding-inline: 0 !important;
    width: 100%;
  }
  .home-intros .dda-slide-contant h1 {
    font-size: 1.75rem !important;
  }
  .home-intros .dda-slide-contant .d-flex.gap-4 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem !important;
  }
  .home-intros .dda-slide-contant dda-button {
    max-width: 100%;
  }
}

/* === Quick-links tiles (homepage 8-tile grid) ===
   Brand-book layout: deep navy panel as a "platform" behind elevated white
   cards. Matches the Digital Dubai card-row pattern in feel: white surfaces
   floating on a contained navy band with soft shadow. */
.home-intros .quick-links-wrap {
  background-color: var(--imc-primary-20);  /* canonical IMC navy #00274D */
  position: relative;
  z-index: 2;
  padding-block: var(--sp-10, 40px) var(--sp-12, 48px);
  margin-block-end: var(--sp-12, 48px);
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
}

.home-intros .quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

@media (max-width: 991.98px) {
  .home-intros .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .home-intros .quick-links {
    grid-template-columns: 1fr;
  }
}

.home-intros .quick-links .link-item {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #fff;
  padding: 2rem 1.25rem !important;
  min-height: 180px;
  justify-content: center;
  transition: filter 0.2s ease, transform 0.2s ease;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
}

.home-intros .quick-links .link-item:first-child {
  border-inline-start: 0;
}

.home-intros .quick-links .link-item:nth-child(8n + 1) { background-color: var(--dda-primary-50); }
.home-intros .quick-links .link-item:nth-child(8n + 2) { background-color: var(--dda-primary-40); }
.home-intros .quick-links .link-item:nth-child(8n + 3) { background-color: var(--dda-primary-50); }
.home-intros .quick-links .link-item:nth-child(8n + 4) { background-color: var(--dda-primary-40); }
.home-intros .quick-links .link-item:nth-child(8n + 5) { background-color: var(--dda-primary-60); }
.home-intros .quick-links .link-item:nth-child(8n + 6) { background-color: var(--dda-primary-50); }
.home-intros .quick-links .link-item:nth-child(8n + 7) { background-color: var(--dda-primary-60); }
.home-intros .quick-links .link-item:nth-child(8n)     { background-color: var(--dda-primary-50); }

.home-intros .quick-links .link-item:hover,
.home-intros .quick-links .link-item:focus {
  filter: brightness(1.18);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.home-intros .quick-links .link-item i {
  font-size: 2.5rem !important;
  color: #fff !important;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.home-intros .quick-links .link-item .title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: #fff;
  line-height: 1.3;
}

.home-intros .quick-links .link-item .subtitle {
  display: block;
  font-size: 0.825rem;
  line-height: 1.4;
  opacity: 0.88;
  color: rgba(255, 255, 255, 0.95);
}

/* === Highlights section (homepage "أبرز الأحداث") === */
.imc-highlights .highlight-link {
  transition: transform 0.2s ease;
}
.imc-highlights .highlight-link:hover {
  transform: translateY(-4px);
}

.imc-highlights .highlight-card {
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
}
.imc-highlights .highlight-card i.material-icons {
  font-size: 5rem;
  color: #fff;
}
.imc-highlights .highlight-card::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  border: 16px solid transparent;
  border-top-color: inherit;
}
.imc-highlights .highlight-card-1 {
  background-color: #8bc34a;
  border-top-color: #8bc34a;
}
.imc-highlights .highlight-card-2 {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-top-color: #fff;
}
.imc-highlights .highlight-card-2 i.material-icons {
  color: #8e24aa;
}
.imc-highlights .highlight-card-3 {
  background-color: #4db6ac;
  border-top-color: #4db6ac;
}
.imc-highlights .highlight-card-4 {
  background-color: #ffd54f;
  border-top-color: #ffd54f;
}
.imc-highlights .highlight-card-4 i.material-icons {
  color: var(--dda-primary-50);
}

/* === Dark news section === */
.imc-news-dark {
  background-color: var(--dda-primary-50);
}
.imc-news-dark h2 {
  color: #fff;
}

/* === Newsletter strip === */
.imc-newsletter {
  background-color: var(--dda-primary-40);
  color: #fff;
}
.imc-newsletter-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.75rem 1rem;
}
.imc-newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.imc-newsletter-input:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #ffd54f;
  color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(255, 213, 79, 0.25);
}

/* === Quick-links carousel (dda-home-carousel + dda-banner-card tiles) ===
   The carousel sits on the navy panel above; tiles render as white surfaces
   with subtle shadow and hover lift, echoing the Digital Dubai pattern. */
.imc-quicklinks {
  display: block;
  margin-block: 1rem;
}

/* Banner cards used as quick-links tiles — refine surface, shadow, padding,
   typographic hierarchy. Content is centered (icon → title → description). */
.imc-quicklinks dda-banner-card,
.home-intros dda-banner-card {
  --card-bg: #fff;
  --card-radius: var(--radius-md, 8px);
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 6px rgba(0, 39, 77, 0.10), 0 12px 24px -8px rgba(0, 39, 77, 0.14);
  transition: transform 200ms var(--ease-out, cubic-bezier(.22,1,.36,1)),
              box-shadow 200ms var(--ease-out, cubic-bezier(.22,1,.36,1));
  /* Equal heights + centered content */
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.imc-quicklinks dda-banner-card:hover,
.home-intros dda-banner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 39, 77, 0.12), 0 18px 32px -10px rgba(0, 39, 77, 0.20);
}

/* Icon img: smaller, softer, in a circular tint badge — centered. */
.imc-quicklinks dda-banner-card img,
.home-intros dda-banner-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 12px;
  border-radius: 999px;
  background: rgba(0, 39, 77, 0.06);
  box-sizing: content-box;
  margin-inline: auto !important;
  display: block;
}

/* Reserve 2-line height for titles so all cards align (1-line titles occupy
   the same vertical slot as 2-line wraps). Center the text inside. */
.imc-quicklinks dda-banner-card [slot="card_title"],
.imc-quicklinks dda-banner-card .card_title,
.home-intros dda-banner-card [slot="card_title"],
.home-intros dda-banner-card .card_title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  min-height: calc(1.3em * 2);
  text-align: center;
}

/* Belt-and-suspenders: any direct slotted content inside the card is centered.
   Targets both light-DOM children and slotted Shadow-DOM content via inheritance. */
.imc-quicklinks dda-banner-card > *,
.home-intros dda-banner-card > * {
  text-align: center !important;
  margin-inline: auto !important;
}

/* Section eyebrow above the tile row — gives the navy panel context */
.home-intros .quick-links-wrap::before {
  content: "خدمات سريعة";
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  margin-bottom: var(--sp-6, 24px);
}

/* === CEO message preview placeholder (homepage) === */
.ceo-message-preview .ceo-photo-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dda-primary-40), var(--dda-primary-70));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(28, 48, 138, 0.18);
}

.ceo-message-preview .ceo-photo-placeholder i.material-icons {
  font-size: 6rem;
  color: #fff;
}

@media (max-width: 991.98px) {
  .ceo-message-preview .ceo-photo-placeholder {
    width: 160px;
    height: 160px;
  }
  .ceo-message-preview .ceo-photo-placeholder i.material-icons {
    font-size: 4.5rem;
  }
}

/* ============================================================
   Page-builder additions (about-us, academics, admissions,
   media, research, student-affairs)
   ============================================================ */

/* --- Anchor scroll offset for sticky dda-header ---
   Every page uses megamenu hash links (#vision, #ceo, #governance,
   #strategy, #bachelor-sharia, #josoor, etc.). Without an offset the
   sticky header covers the section heading after a hash jump. */
html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;
}
:target {
  scroll-margin-top: 100px;
}

/* --- Secondary nav (the strip of utility links under the header) ---
   Used in all 6 pages with only Bootstrap utility classes.
   Adds polish: hover/focus states, line-height, sticky-friendly z. */
.imc-secondary-nav {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
}
.imc-secondary-nav ul {
  row-gap: 0.5rem;
}
.imc-secondary-nav a {
  transition: color 0.15s ease;
  padding: 0.25rem 0;
}
.imc-secondary-nav a:hover,
.imc-secondary-nav a:focus-visible {
  color: var(--dda-primary-50) !important;
  text-decoration: none;
}
.imc-secondary-nav a:focus-visible {
  outline: 2px solid var(--dda-primary-50);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- dda-card wrapper rules ---
   cards.css is not linked in any page, but .dda-card is used 40+ times
   across the new pages as a content container. Provide the same visual
   contract (white surface, soft border, rounded, subtle shadow). */
.dda-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid rgba(28, 48, 138, 0.08);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dda-card.border-primary {
  border-color: var(--dda-primary-50);
}
a.dda-card:hover,
.dda-card.is-hoverable:hover {
  box-shadow: 0 6px 18px rgba(28, 48, 138, 0.10);
  transform: translateY(-2px);
}

/* --- Tab content panel rhythm ---
   .tabsbody is the JS-toggled tab content wrapper used on about-us,
   academics, admissions, student-affairs. Add top padding so tab
   content doesn't sit flush against the tab bar. */
.tabsbody {
  padding-top: 1.5rem;
}

/* --- Main content wrapper ---
   The .maincontent div appears on most pages but has no padding rules.
   Provide a subtle min-height so short pages don't leave a blank
   footer gap, without overriding the inner container-xxl spacing. */
.maincontent {
  min-height: 50vh;
}

/* --- Page hero (h1 + .lead at the top of each page) ---
   The 6 pages all begin with: breadcrumb, then h1, then p.lead.
   Tighten the lead so it pairs visually with the h1. */
.maincontent > .container-xxl > h1,
.maincontent .container-xxl > h1 {
  margin-bottom: 0.5rem;
}
.maincontent .lead {
  color: #4a4a5b;
  max-width: 75ch;
}

/* --- Section spacing for in-page anchor sections ---
   Pages like admissions/research use plain <section id="..."> blocks
   between tabs and full-width sections. Ensure they breathe. */
section[id] {
  scroll-margin-top: 100px;
}

/* --- Breadcrumb spacing under sticky header ---
   The breadcrumb is the first content on every page. */
dda-breadcrumb {
  display: block;
}

/* --- RTL: align icon-prefix lists inside cards ---
   Pages use <ul class="ps-3"> inside RTL cards. In RTL, that left
   padding becomes start-padding via Bootstrap RTL build, but
   bullet lists with material-icons need a touch of inline-end gap. */
[dir="rtl"] .dda-card ul {
  padding-inline-start: 1rem;
}
[dir="rtl"] .dda-card ul:not(.list-unstyled):not(.list-group) li {
  margin-bottom: 0.25rem;
}

/* --- Tab bar bottom spacing inside cards ---
   When dda-tabs is followed immediately by .tabsbody, prevent the
   tab underline from kissing the first card. */
dda-tabs + .tabsbody,
dda-tabs + script + .tabsbody {
  margin-top: 0.5rem;
}

/* --- Generic responsive helper for icon-tile grids ---
   Used on admissions/about-us where the agents wrote
   <div class="row g-3"><div class="col-md-6 col-lg-4">
       <div class="p-3 bg-light rounded">...</div>
     </div></div>
   This guarantees equal height + readable hover state. */
.maincontent .bg-light.rounded {
  transition: background-color 0.15s ease;
}

/* --- Print: hide chrome when window.print() is invoked
   (academics.html ./org-chart triggers window.print()) --- */
@media print {
  dda-header,
  dda-footer,
  dda-sticky-footer,
  .imc-secondary-nav,
  dda-breadcrumb,
  spinner {
    display: none !important;
  }
  html, body { background: #fff !important; }
}

/* ============================================================================
 * IMC brand surface overrides
 * ========================================================================== */

/* Secondary nav strip — IMC navy (brand-book conformant).
   Stays above the hero with z-index so it doesn't get covered by the
   dda-home-banner's full-bleed image. */
.imc-secondary-nav {
  background: var(--imc-primary-20) !important;
  border-color: var(--imc-primary-10) !important;
  position: relative;
  z-index: 5;
  padding-block: 0.5rem;
}
.imc-secondary-nav ul {
  gap: 1.75rem !important;
  justify-content: flex-end;
}
.imc-secondary-nav a,
.imc-secondary-nav a:hover,
.imc-secondary-nav a:focus {
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.92;
  transition: opacity 150ms ease;
}
.imc-secondary-nav a:hover {
  opacity: 1;
  text-decoration: none;
}
/* Force icon color white regardless of inline style */
.imc-secondary-nav .material-icons,
.imc-secondary-nav i.material-icons[style] {
  color: #fff !important;
  font-size: 1rem !important;
  opacity: 0.85;
}

/* Anchor/link defaults — use IMC navy (brand book: link tokens are
   --color-link / --color-link-hover) */
.page-body a:not([class]),
.page-content a:not([class]) {
  color: var(--imc-primary-40);
  text-decoration: underline;
}
.page-body a:not([class]):hover,
.page-content a:not([class]):hover {
  color: var(--imc-primary-20);
}

/* Page heading colors — navy throughout (brand book §VISUAL FOUNDATIONS) */
.maincontent h1,
.page-content > header > h1,
.section-intro h2,
.maincontent h2,
.page-content > header h2,
.page-body h2 {
  color: var(--imc-primary-20);
}

/* Section-index banner cards: brand the icons */
dda-banner-card {
  --card-accent: var(--imc-primary-20);
}

/* Bootstrap btn-primary fallback — IMC navy with M3 hover/press states.
   Brand book: hover lightens 8% toward blue-700; press darkens 6% toward
   blue-900. */
.btn-primary {
  background-color: var(--imc-primary-20) !important;
  border-color: var(--imc-primary-20) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--imc-primary-30) !important;
  border-color: var(--imc-primary-30) !important;
}
.btn-primary:active {
  background-color: var(--imc-primary-10) !important;
  border-color: var(--imc-primary-10) !important;
}
.btn-outline-primary {
  border-color: var(--imc-primary-20) !important;
  color: var(--imc-primary-20) !important;
}
.btn-outline-primary:hover {
  background-color: var(--imc-primary-95) !important;
  color: var(--imc-primary-20) !important;
}
.btn-outline-primary:active {
  background-color: var(--imc-primary-90) !important;
}

/* Breadcrumb separators + active item — subtle navy */
dda-breadcrumb {
  --breadcrumb-color: var(--imc-primary-20);
}

/* Subtle alternating section background on long pages */
.page-content section + section {
  background-color: transparent;
}

/* Hero / banner overlay accent — navy */
.imc-hero-overlay,
.program-hero {
  --hero-accent: var(--imc-primary-20);
}

/* Body font — Dubai Font is canonical (brand book: removes Helvetica Neue +
   Simplified Arabic; one family for Arabic+Latin) */
body {
  font-family: "Dubai", "Cairo", "Tajawal", system-ui, sans-serif;
}

/* Card hover lift */
dda-banner-card:hover,
.dda-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(28, 58, 107, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hide DDA megamenu icons (the `sentiment_satisfied` smiley fallback that DDA
   v3.9.7 renders for any quick-link without a quickLinksIcon — and that we
   don't want even when icons are provided). The wrapper class is the same
   whether the per-item icon is set or not, so one rule kills all of them. */
.dda-mega-menu-icon { display: none !important; }
.dda-mega-menu-link { padding-inline-start: 0 !important; }

/* Hide login + language switch in the dda-header. Login is removed for now;
   English (language switch) is commented out until the EN locale ships.
   To restore: remove the rules below + re-add the login-link/language_text
   attributes on dda-header. */
.dda-header .login-btn,
.dda-header [class*="login"],
.dda-header [class*="language"],
.dda-header [aria-label*="Login"],
.dda-header [aria-label*="تسجيل"],
.dda-header [aria-label*="Language"],
.dda-header [aria-label*="اللغة"] {
  display: none !important;
}

/* News card image fallback — see the JS handler at the bottom of
   ar/index.html. CSS just ensures consistent card height regardless of
   whether the real image or the placeholder is shown. */
.imc-news-dark dda-banner-card img,
.imc-news-dark dda-banner-card .dda-banner-card-image {
  min-height: 200px;
  width: 100%;
  object-fit: cover;
  background: var(--imc-primary-20, #00274D);
}

/* Give the news cards room so the description doesn't get clipped at the
   bottom — the dda-banner-card defaults to a fixed height that crops the
   last line. */
.imc-news-dark dda-banner-card {
  min-height: 460px;
  display: block;
}
.imc-news-dark dda-banner-card .dda-banner-card-content,
.imc-news-dark dda-banner-card [class*="banner-card-text"] {
  padding-bottom: 1.5rem;
}
.imc-news-dark dda-banner-card .dda-banner-card-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* DDA paints a 250px-tall decorative gradient via `.dda-header::before` when
   the body has `transparent` (used for hero-overlay pages). That pseudo had
   pointer-events: auto, so it ate clicks on anything within 250px of the top
   — including the breadcrumb. The gradient is purely visual; let clicks pass. */
.dda-header::before { pointer-events: none !important; }

/* Section-index card grid (auto-generated landing pages). dda-banner-card was
   broken (button-only, image_src instead of icon, undefined-title aria) so we
   render plain Bootstrap cards wrapped in <a> for the whole-card click target. */
.imc-section-card {
  border: 1px solid var(--imc-secondary-90, #e5e5e7);
  border-radius: 12px;
  background: var(--imc-primary-100, #ffffff);
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.imc-section-card:hover,
.imc-section-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--imc-primary-50, #4a6c92);
  box-shadow: 0 8px 18px rgba(0, 39, 77, 0.10);
}
.imc-section-card-icon {
  font-size: 1.75rem;
  color: var(--imc-primary-20, #00274D);
  flex-shrink: 0;
  line-height: 1;
}
.imc-section-group-title {
  color: var(--imc-primary-20, #00274D);
  border-bottom: 1px solid var(--imc-secondary-90, #e5e5e7);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

/* Leaf-page typography: subsection headers should be compact, NOT hero-
   sized. DDA's stylesheet bumps H2 to ~2.5rem; we override with !important
   to win and drop to a comfortable subsection size. */
.page-content h1.entry-title,
.page-content h1 {
  font-size: 1.75rem !important;
  line-height: 1.3 !important;
}
.page-body h2 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--imc-primary-20, #00274D) !important;
  margin: 1.75rem 0 0.6rem !important;
  padding-inline-start: 0.7rem !important;
  border-inline-start: 3px solid var(--imc-primary-20, #00274D) !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}
.page-body h2:first-child { margin-top: 0.25rem !important; }
.page-body h3 {
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  color: var(--imc-primary-20, #00274D) !important;
  margin: 1.25rem 0 0.4rem !important;
  line-height: 1.4 !important;
}
.page-body p { line-height: 1.85; color: #2c3e50; }
.page-body blockquote {
  border-inline-start: 3px solid var(--imc-primary-50, #4a6c92);
  background: var(--imc-primary-99, #f5f7fa);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 8px 8px 0;
}

/* Download lists used in leaf pages — mirrors the original IMC site's
   "list-group + glyphicon-download" pattern but with our brand tokens. */
.imc-download-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  border: 1px solid var(--imc-secondary-90, #e5e5e7);
  border-radius: 10px;
  overflow: hidden;
  background: var(--imc-primary-100, #fff);
  box-shadow: 0 1px 2px rgba(0, 39, 77, 0.04);
}
.imc-download-list li + li { border-top: 1px solid var(--imc-secondary-90, #e5e5e7); }
.imc-download-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.25rem;
  color: var(--imc-primary-20, #00274D);
  text-decoration: none;
  background: transparent;
  transition: background 0.15s ease, padding 0.15s ease;
  min-height: 56px;
}
.imc-download-list a:hover,
.imc-download-list a:focus-visible {
  background: var(--imc-primary-99, #f5f7fa);
  color: var(--imc-primary-20, #00274D);
  outline: none;
}
.imc-download-list a > span {
  flex: 1;
  font-weight: 500;
  font-size: 0.97rem;
  line-height: 1.5;
}
.imc-download-list a > i.material-icons:first-child {
  color: #c0392b;          /* PDF red signal */
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.imc-download-list .imc-download-arrow {
  font-size: 1.4rem;
  color: var(--imc-primary-50, #4a6c92);
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.imc-download-list a:hover .imc-download-arrow,
.imc-download-list a:focus-visible .imc-download-arrow {
  opacity: 1;
  transform: translateY(2px);
}

/* Program page (UAEU-style side tabs).
   RTL layout: tab rail sits on the right edge (visual leading), content fills
   the left. On narrow screens collapses to stacked layout. */
.program-header {
  border-bottom: 1px solid var(--imc-secondary-90, #e5e5e7);
  padding-bottom: 1.25rem;
}
.program-level-badge {
  display: inline-block;
  background: var(--imc-primary-99, #f0f4f9);
  color: var(--imc-primary-20, #00274D);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.program-title {
  color: var(--imc-primary-20, #00274D);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}
.program-subtitle {
  font-size: 1rem;
  margin: 0;
}

.program-tabs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}
.program-tabs-rail {
  position: sticky;
  top: 170px;            /* clear the fixed dda-header */
  align-self: start;
}
.program-tab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--imc-secondary-90, #e5e5e7);
  border-radius: 12px;
  overflow: hidden;
  background: var(--imc-primary-100, #fff);
}
.program-tab-list li + li {
  border-top: 1px solid var(--imc-secondary-90, #e5e5e7);
}
.program-tab-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 0;
  text-align: start;
  color: var(--imc-primary-20, #00274D);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.program-tab-button:hover,
.program-tab-button:focus-visible {
  background: var(--imc-primary-99, #f5f7fa);
  outline: none;
}
.program-tab-button.active {
  background: var(--imc-primary-20, #00274D);
  color: var(--imc-primary-100, #fff);
}
.program-tab-button .material-icons {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.program-tabs-content {
  min-width: 0;          /* let tables / wide content overflow gracefully */
}
.program-tab-header h2 {
  color: var(--imc-primary-20, #00274D);
  font-weight: 700;
  border-bottom: 2px solid var(--imc-primary-20, #00274D);
  padding-bottom: 0.5rem;
  display: inline-block;
}

@media (max-width: 768px) {
  .program-tabs-layout { grid-template-columns: 1fr; }
  .program-tabs-rail { position: static; }
}

/* Big primary CTA button used in the Apply-Now tab (and reusable elsewhere) */
.program-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 2.5rem;
  background: var(--imc-primary-20, #00274D);
  color: #fff !important;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 39, 77, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  margin: 1rem 0 1.5rem;
}
.program-cta-button:hover,
.program-cta-button:focus-visible {
  transform: translateY(-2px);
  background: var(--imc-primary-30, #1c3a6b);
  box-shadow: 0 8px 20px rgba(0, 39, 77, 0.25);
  outline: none;
}
.program-cta-button .material-icons {
  font-size: 1.5rem;
}
