/* Specialized-programs hero based on the supplied reference artwork. */
.specialized-reference-hero {
  position: relative;
  display: grid;
  min-height: max(760px, 100svh);
  align-items: center;
  overflow: hidden;
  padding: 136px 0 72px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(178, 202, 122, 0.42), transparent 34%),
    linear-gradient(90deg, #48a7a5 0%, #68aa8d 54%, #91ab72 100%);
}

.specialized-reference-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 188, 96, 0.2) 2px, transparent 2px),
    linear-gradient(90deg, rgba(201, 188, 96, 0.2) 2px, transparent 2px),
    radial-gradient(circle at 22% 46%, transparent 0 245px, rgba(201, 188, 96, 0.2) 247px 249px, transparent 251px 435px, rgba(201, 188, 96, 0.15) 437px 439px, transparent 441px),
    radial-gradient(circle at 84% 50%, transparent 0 230px, rgba(201, 188, 96, 0.17) 232px 234px, transparent 236px);
  background-size: 320px 320px, 320px 320px, 100% 100%, 100% 100%;
  opacity: 0.9;
}

.specialized-reference-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(31, 133, 137, 0.14), transparent 42%, rgba(228, 218, 137, 0.06));
}

.specialized-reference-grid {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1480px, calc(100% - 64px));
  grid-template-columns: minmax(0, 0.94fr) minmax(520px, 1.06fr);
  gap: clamp(52px, 6vw, 104px);
  align-items: center;
}

.specialized-reference-copy {
  display: grid;
  min-width: 0;
  max-width: 760px;
  gap: 1.15rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: right;
}

.specialized-reference-copy::after {
  display: none;
}

.specialized-reference-copy h1 {
  margin: 0 0 0.8rem;
  color: #fbbb3f;
  font-family: var(--font-display, "IBM Plex Sans Arabic", sans-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 28px rgba(39, 103, 90, 0.15);
}

.specialized-reference-copy p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.97);
  font-size: clamp(1.02rem, 1.35vw, 1.23rem);
  font-weight: 500;
  line-height: 1.95;
  text-wrap: pretty;
}

.specialized-reference-copy .hero-related-actions {
  margin-top: 0.8rem;
}

.specialized-reference-copy .hero-related-link {
  color: #245f55;
  background: #fbbb3f;
  border-color: #fbbb3f;
}

.specialized-reference-copy .hero-related-link:hover {
  color: #fff;
  background: #ef7358;
  border-color: #ef7358;
}

.specialized-reference-mark {
  display: grid;
  width: min(100%, 710px);
  aspect-ratio: 1.38 / 1;
  grid-template-columns: minmax(0, 0.48fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.45vw, 24px);
  justify-self: center;
  align-self: start;
  margin-top: 40px;
  direction: ltr;
  filter: drop-shadow(0 28px 46px rgba(45, 106, 93, 0.13));
}

.specialized-reference-piece {
  display: block;
  min-width: 0;
  min-height: 0;
  background: #fbbb3f;
}

.specialized-reference-piece-1 {
  border-radius: 0 0 100% 0;
}

.specialized-reference-piece-2 {
  border-radius: 100% 0 0 0;
}

.specialized-reference-piece-3 {
  border-radius: 0 100% 0 0;
}

.specialized-reference-piece-4 {
  border-radius: 100% 0 0 0;
}

body.dark-theme .specialized-reference-hero,
[data-theme="dark"] .specialized-reference-hero {
  background:
    radial-gradient(circle at 88% 16%, rgba(156, 181, 100, 0.34), transparent 34%),
    linear-gradient(90deg, #246c6d 0%, #397662 54%, #657c52 100%);
}

@media (max-width: 1080px) {
  .specialized-reference-grid {
    grid-template-columns: minmax(0, 1fr) minmax(410px, 0.95fr);
    gap: 38px;
  }

  .specialized-reference-copy h1 {
    font-size: clamp(3.25rem, 6.8vw, 5.7rem);
  }
}

@media (max-width: 880px) {
  .specialized-reference-hero {
    min-height: 0;
    padding: 122px 0 68px;
  }

  .specialized-reference-grid {
    width: min(100% - 36px, 740px);
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .specialized-reference-copy {
    max-width: none;
  }

  .specialized-reference-copy h1 {
    font-size: clamp(3.4rem, 13vw, 6.2rem);
  }

  .specialized-reference-mark {
    width: min(92vw, 650px);
  }
}

@media (max-width: 560px) {
  .specialized-reference-hero {
    padding: 108px 0 52px;
  }

  .specialized-reference-grid {
    width: min(100% - 28px, 520px);
    gap: 2.25rem;
  }

  .specialized-reference-copy {
    gap: 0.9rem;
  }

  .specialized-reference-copy h1 {
    margin-bottom: 0.55rem;
    font-size: clamp(2.8rem, 14vw, 4.4rem);
    line-height: 1.12;
  }

  .specialized-reference-copy p {
    font-size: 1rem;
    line-height: 1.85;
  }

  .specialized-reference-mark {
    width: min(94vw, 470px);
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .specialized-reference-copy .hero-related-link {
    transition: none;
  }
}

/* SLOGAN VISIBILITY OVERRIDE */
.site-header.premium-header .logo-slogan,
.premium-header .logo-slogan,
.logo-slogan {
    display: block !important;
    font-size: 11px !important;
    color: #7c9494 !important;
    font-weight: 500 !important;
    white-space: normal !important;
    margin-top: 2px !important;
}

.footer-slogan {
    display: block !important;
    font-weight: 700 !important;
    color: #faba3d !important;
    margin: 0.35rem 0 0.55rem !important;
}


/* ==========================================================================
   GLOBAL MOBILE HERO TEXT REDUCTION (ALL PAGES)
   ========================================================================== */
@media (max-width: 991px) {
  body .hero h1,
  body .hero-copy h1,
  body .page-hero-copy h1,
  body .hero-showcase .hero-copy h1,
  body .hero-homepage .hero-copy h1,
  body .course-header h1,
  body .post-header h1,
  body .page-header h1,
  body .hero-content h1,
  body .section-hero h1,
  body h1.hero-title,
  body h1.page-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
    max-width: 100% !important;
  }
  
  body .hero p,
  body .hero-copy p,
  body .page-hero-copy p,
  body .hero-showcase .hero-copy p,
  body .hero-homepage .hero-copy p,
  body .page-header p,
  body .hero-content p,
  body .section-hero p,
  body p.hero-subtitle {
    font-size: clamp(0.9rem, 4.5vw, 1.1rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
    max-width: 100% !important;
  }
}



/* ==========================================================================
   CENTERED MOBILE HEADER SLOGAN - V4 (ABSOLUTE CENTERING)
   ========================================================================== */
@media (max-width: 991px) {
  /* 1. Ensure header-shell is the relative parent */
  body .site-header .header-shell,
  body .site-header.premium-header .header-shell {
    position: relative !important;
  }
  
  /* 2. Remove any relative positioning from brand link and its wrappers */
  body .site-header .brand,
  body .site-header.premium-header .brand,
  html[dir="rtl"] body .site-header.premium-header .brand,
  body a.brand,
  body a.brand-saas {
    position: static !important;
  }

  /* 3. Absolute position the slogan in the exact center of header-shell */
  body .site-header .brand .logo-slogan,
  body .site-header.premium-header .brand .logo-slogan,
  body .site-header.premium-header .brand-saas .logo-slogan,
  body a.brand span.logo-slogan,
  html[dir="rtl"] body .site-header.premium-header a.brand span.logo-slogan,
  html[dir="rtl"] body .site-header a.brand span.logo-slogan {

    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    /* 4. Formatting */
    width: 125px !important;
    max-width: 130px !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    color: var(--color-text-muted, rgba(255, 255, 255, 0.7)) !important;
    direction: rtl !important;
  }
}


/* ==========================================================================
   MOBILE MENU CONTAINER OVERFLOW FIX - V7 (ALLOW FULL TEXT)
   ========================================================================== */
@media (max-width: 991px) {
  /* Remove overflow-x: hidden from parent containers that clip the text */
  body .premium-header .site-nav.site-nav-saas .drawer-content,
  body .premium-header .site-nav.site-nav-saas .navigation-container,
  body .site-nav .drawer-content,
  body .site-nav .navigation-container {
    overflow-x: visible !important;
    overflow: visible !important;
  }

  /* nav-panel must allow overflow too */
  body .premium-header .site-nav.site-nav-saas .nav-panel {
    overflow-x: visible !important;
  }

  /* nav-list items should not clip */  
  body .premium-header .site-nav.site-nav-saas .nav-list,
  body .nav-list {
    overflow: visible !important;
  }

  /* nav-item-dropdown should not clip */
  body .nav-item-dropdown,
  body .premium-header .nav-item-dropdown {
    overflow: visible !important;
  }

  /* open dropdown menu must show all content */
  body .premium-header .site-nav.site-nav-saas .nav-item-dropdown.open .nav-dropdown-menu,
  body .nav-item-dropdown.open .nav-dropdown-menu {
    overflow: visible !important;
    max-height: 2500px !important;
  }

  /* Force dropdown links to wrap text */
  body .nav-dropdown-link,
  body .premium-header .nav-dropdown-link,
  body .site-nav .nav-dropdown-link {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: unset !important;
    overflow: visible !important;
    display: block !important;
    height: auto !important;
    line-height: 1.5 !important;
  }
}



/* ==========================================================================
   MOBILE MENU DROPDOWN FIX - V8 (ACCORDION STYLE FOR MOBILE)
   ========================================================================== */
@media (max-width: 991px) {
  body .premium-header .nav-dropdown-menu,
  body .site-header .nav-dropdown-menu,
  body .site-nav-saas .nav-dropdown-menu,
  body .site-header.premium-header .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    inset-inline-start: 0 !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 0.5rem !important;
    min-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
