/* === CLS responsive shell (loads after app.css) === */
/* Change Autocomplete background color to match design / prevent default light blue */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: inherit !important;
}

/* Breakpoints: 480 / 640 / 768 / 1024 / 1200 — align with --bp-* below */
:root {
  --bp-sm: 480px;
  --bp-md: 640px;
  --bp-lg: 768px;
  --bp-xl: 1024px;
  --bp-2xl: 1200px;
  --bp-wide: 1440px;
  --layout-pad-x: clamp(1rem, 4vw, 3.75rem);
  --layout-hero-pad: clamp(1.25rem, 5vw, 5rem);
  --font-hero: clamp(1.75rem, 5vw, 3.5rem);
  --z-header: 1000;
  --z-mobile-menu: 2000;
  --z-preloader: 3000;
  --header-height: 73px;
  /* Header bar: edge + elevation (navy-tinted, matches search / UI chrome) */
  --header-border-color: rgba(20, 73, 121, 0.12);
  --header-shadow:
    0 2px 10px rgba(20, 73, 121, 0.08),
    0 1px 3px rgba(15, 23, 42, 0.06);
  /* Primary nav: horizontal space between links (desktop) */
  --header-nav-link-gap: clamp(1.125rem, 2.4vw, 2.125rem);
  /* Home hero “card” corners (Figma ~20–28px) */
  --hero-border-radius: clamp(1.25rem, 2.2vw, 1.75rem);
  /* Home hero band width (desktop + mobile/tablet); centered with auto margins */
  --hero-container-width: 99%;
  /* Mobile/tablet hero: gap under fixed header + bottom margin (match desktop rhythm) */
  --mobile-hero-below-header: clamp(0.5rem, 2vw, 1rem);
  --mobile-hero-margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}

/* --- Site preloader --- */
#site-preloader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  z-index: var(--z-preloader);
  opacity: 1;
  visibility: visible;
  transition: opacity 450ms ease, visibility 0s linear 450ms;
}

#site-preloader img {
  width: min(240px, 60vw);
  height: auto;
}

#site-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

body.preloader-lock {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  #site-preloader {
    transition: none;
  }
}

/* --- Global responsive baseline (mobile-first additions) --- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html {
  overflow-x: clip;
}

[dir='rtl'] body {
  font-family: 'Cairo', 'Poppins', sans-serif;
}

/* Ensure Arabic typography wins over per-component font-family rules */
[dir='rtl'] :where(h1, h2, h3, h4, h5, h6, p, a, span, li, label, button, input, select, textarea) {
  font-family: inherit;
}

/* Kicker labels like "— Popular Choice" or "🔥 Hot Programs" */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

[dir='rtl'] .section-kicker {
  flex-direction: row-reverse;
}

/*
 * RTL header: normal row + inherited direction: rtl.
 * row-reverse wrongly placed the first child (logo) on the left; with dir=rtl,
 * flex row places inline-start (logo) on the right and actions on the left.
 */
[dir='rtl'] .header {
  flex-direction: row;
}

[dir='rtl'] .header .header-actions {
  flex-direction: row;
}

/* Keep primary nav reading order in RTL */
[dir='rtl'] .header .nav {
  direction: rtl;
}

/* Hero: solid fallback behind CSS background-image so refresh doesn’t flash empty/neutral */
.hero {
  background-color: #0f1419;
}

/* Nextstep / inner heroes: tone matches gradient until background photo paints */
.heroone {
  background-color: #0c253b;
}

/* UI/UX course hero image frame */
.hero-imgfou {
  background-color: #1a2332;
}

/* In-page anchors: offset for fixed header */
#course-categories {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

a.scroll-btn {
  text-decoration: none;
  cursor: pointer;
}

a.scroll-btn:focus-visible {
  outline: 2px solid var(--color-navy-header, #144979);
  outline-offset: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Scroll wide content blocks without breaking table semantics */
.cls-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

table {
  max-width: 100%;
}

/* --- Fluid typography (overrides fixed px in app.css) --- */
.section-header h2,
.section-headerr h2,
.section-headerrs h2,
.section-headerrx h2,
.section-headerx h2,
.section-headerele h2 {
  font-size: clamp(1.125rem, 3.2vw, 1.6rem);
}

.section-header span,
.small-title span {
  font-size: clamp(1rem, 2.8vw, 1.75rem);
}

.hero-content h1,
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.leftfou h1 {
  font-size: clamp(1.5rem, 4.5vw, 3rem);
}

.page-headertreefo h2 {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: #144979;
}

/* --- Subscribe (home): remove fixed 1090px / offset --- */
.subscribe-wrapper {
  width: 100%;
  max-width: min(1090px, 100%);
  margin-left: auto;
  margin-right: auto;
  /* Reduce the large gap above/below subscribe block (app.css sets margin: 80px auto). */
  margin-block: clamp(1.5rem, 3.5vw, 2.75rem);
  padding-inline: var(--layout-pad-x);
  box-sizing: border-box;
}

.subscribe-card {
  width: 100% !important;
  max-width: min(1090px, 100%);
  box-sizing: border-box;
}

@media (max-width: 320px) {
  .subscribe-card {
    padding: 2rem 1.25rem;
    border-radius: 16px;
  }

  .subscribe-card::before,
  .subscribe-card::after {
    transform: scale(0.65);
    transform-origin: center;
  }
}

/* --- Desktop hides for mobile carousels --- */
.home-categories-mobile-swiper,
.courses-mobile-swiper,
.testimonials-mobile-swiper {
  display: none !important;
}

/* --- Home category grid: stack on small / tablet (avoid fixed inner widths) --- */
@media (max-width: 1024px) {
  .category-section {
    padding: 40px 0 !important;
  }

  .category-section .section-header,
  .category-section .explore {
    padding-inline: var(--layout-pad-x) !important;
  }

  .home-categories {
    width: var(--hero-container-width, 99%) !important;
    margin-inline: auto !important;
  }

  .category-section .home-categories__grid {
    display: none !important;
  }

  .home-categories-mobile-swiper {
    display: block !important;
    width: var(--hero-container-width, 99%) !important;
    margin-inline: auto !important;
    padding-bottom: 50px !important;
    overflow: hidden;
    position: relative;
  }

  .home-categories-mobile-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
  }

  .home-categories-mobile-swiper .home-categories__card {
    height: 240px !important;
    max-width: min(380px, 92vw);
    width: 100%;
  }

  /* Swiper active bullet styling */
  .home-categories-mobile-swiper .swiper-pagination-bullet-active,
  .courses-mobile-swiper .swiper-pagination-bullet-active {
    background: var(--color-orange-main, #f47429) !important;
  }

  /* Courses mobile Swiper rules */
  .trendingfi .cardsfi {
    display: none !important;
  }

  .courses-mobile-swiper {
    display: block !important;
    width: 100% !important;
    padding-bottom: 50px !important;
    overflow: hidden;
    position: relative;
  }

  .courses-mobile-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    padding-inline: 12px;
    box-sizing: border-box;
  }

  .courses-mobile-swiper .course-cardfi {
    max-width: min(385px, 92vw) !important;
    width: 100% !important;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .left-column,
  .right-column {
    height: auto !important;
    min-height: 0;
  }

  .bottom-grid .row {
    flex-direction: column;
    gap: 1rem;
  }

  .row .horizontal {
    width: 100% !important;
    max-width: 100%;
    flex: 1 1 auto !important;
  }

  .bottom-grid .horizontal:hover,
  .bottom-grid .horizontal {
    transform: none;
  }
}

/* Tablet: two-column category grid (641–1024px); overrides 1fr from block below */
@media (min-width: 641px) and (max-width: 1024px) {
  .category-grid:not(.category-grid--left-only) {
    grid-template-columns: 1fr 1fr;
  }

  .left-column {
    height: auto !important;
  }
}

/* --- Neutralise large negative margins / fixed cards (overflow on narrow) --- */
@media (max-width: 1024px) {
  .explore {
    margin-inline: 0;
  }

  .hero-content {
    margin-top: 0;
  }

  .simv {
    margin-top: 0;
  }

  .leftv h1 {
    margin-bottom: 1rem;
    white-space: normal;
  }

  .abovev {
    margin-top: 0;
  }

  .video-card p {
    margin-top: 0.5rem;
  }

  .sma img {
    margin-left: 0;
    margin-top: 0;
  }

  .sma h4 {
    margin-top: 0;
    margin-left: 0;
  }

  .cardi.smalli img {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .cardi.smalli h4 {
    margin-top: 0.5rem;
    margin-left: 0;
  }

  .cardi.smalli p {
    margin-left: 0;
  }

  .right-cards {
    margin-left: 0;
  }

  .left-cards {
    margin-right: 0;
  }

  .cardi,
  .cardi.largei,
  .cardi.smalli {
    width: 100% !important;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .accordion-contentsev ul {
    margin-left: 0 !important;
  }

  .contenti {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .video-card {
    width: 100%;
    max-width: 380px;
  }

  .best-sellersr {
    padding: 40px var(--layout-pad-x);
  }

  .containerr {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-inline: 0;
  }

  .best-sellersrx,
  .best-sellersrs {
    padding: 40px var(--layout-pad-x);
  }

  .containerrx,
  .containerrs {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-inline: 0;
  }

  .card-topr h3,
  .card-toprs h3,
  .card-toprx h3 {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
  }

  .email-field {
    min-width: 0;
    width: 100%;
  }
}

/* --- Skill pages: course cards + trending grids --- */
.cardfo,
.cardfi {
  height: auto;
  min-height: 0;
}

.cardfo img,
.cardfi img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .cardstreefo {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .cardsfi {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .cardstreefo {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .cardsfi {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* --- Listing: sidebar + main --- */
/* Desktop: avoid fixed-width overflow (not RTL-specific) */
.containertreefo {
  width: 100%;
  max-width: 1500px;
  margin-inline: auto;
  height: auto !important;
  box-sizing: border-box;
}

/*
 * Default grid min-width is "auto", so the 1fr main track won't shrink below card-grid
 * intrinsic width — horizontal overflow + html { overflow-x: clip } hides the last column(s)
 * in LTR. RTL already set min-width: 0 on .maintreefo; apply for all directions.
 */
.containertreefo>.maintreefo {
  min-width: 0;
}

.containertreefo>.maintreefo .cardstreefo {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* --- Courses AJAX smooth transitions --- */
[data-courses-root] [data-page-header],
[data-courses-root] [data-courses-grid],
[data-courses-root] [data-courses-pagination] {
  transition: opacity 220ms ease, transform 220ms ease;
  will-change: opacity, transform;
}

[data-courses-root].courses-is-loading [data-page-header],
[data-courses-root].courses-is-loading [data-courses-grid],
[data-courses-root].courses-is-loading [data-courses-pagination] {
  opacity: 0.35;
  transform: translateY(4px);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .containertreefo {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    padding: var(--layout-pad-x);
    box-sizing: border-box;
  }

  .sidebar {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
  }

  .search-boxth {
    max-width: 100%;
  }

  .search-boxth input {
    width: 100% !important;
  }

  .sidebar-header,
  .section-title,
  .menu,
  .dropdown,
  .tags {
    max-width: 100%;
  }

  .maintreefo {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .containertreefo {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar {
    padding: 16px;
  }

  .sidebar,
  .maintreefo {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  .menu li {
    white-space: normal;
    gap: 10px;
  }

  .dropdown {
    white-space: normal;
    gap: 10px;
  }
}

/* --- UI/UX course page: 1500px section + hero image --- */
@media (max-width: 768px) {
  .course-sectionfou {
    width: 100% !important;
    max-width: 100%;
    flex-direction: column;
    padding-inline: var(--layout-pad-x);
    gap: 1.5rem;
    box-sizing: border-box;
  }

  .leftfou,
  .rightfou {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-imgfou img {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
  }
}

/* --- Nextstep booking --- */
.booking-wrappertin {
  flex-wrap: nowrap;
  max-width: 100%;
  padding-inline: var(--layout-pad-x);
  box-sizing: border-box;
  overflow-x: visible;
  gap: clamp(1.5rem, 4vw, 5rem);
}

.form-sidetin,
.summary-sidetin {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.section-titletin {
  width: 100% !important;
  max-width: 100%;
}

@media (max-width: 1200px) {
  .booking-wrappertin {
    flex-wrap: wrap;
  }

  .form-sidetin,
  .summary-sidetin {
    flex: 1 1 480px;
  }
}

@media (max-width: 768px) {
  .booking-wrappertin {
    flex-direction: column;
    align-items: stretch;
  }

  .form-cardtin {
    padding: 1.5rem 1rem;
  }

  .summary-cardtin {
    height: auto !important;
    min-height: 0;
  }
}

/* Course detail: Figma layout rules by breakpoint */
@media (max-width: 1200px) {

  /* Tablet / small desktop: keep hero and course card side-by-side. */
  .courses-theme .course-sectionfou {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 940px !important;
    gap: 22px !important;
  }

  .courses-theme .leftfou {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  .courses-theme .rightfou {
    flex: 0 0 320px !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .courses-theme .hero-imgfou img,
  .courses-theme .hero-imgfou video {
    width: 100% !important;
    max-width: 560px !important;
    height: clamp(280px, 28vw, 380px) !important;
    object-fit: cover !important;
  }
}

@media (max-width: 320px) {
  .courses-theme .course-sectionfou {
    flex-direction: column !important;
  }

  .courses-theme .rightfou {
    flex: 1 1 auto !important;
    width: 100% !important;
  }
}

@media (min-width: 1201px) {

  /* Large desktop: restore wide Figma-like layout. */
  .courses-theme .course-sectionfou {
    max-width: 100% !important;
    width: 100% !important;
    margin-inline: 0 !important;
    padding-inline: var(--layout-pad-x, 16px) !important;
    gap: 12px !important;
  }

  .courses-theme .rightfou {
    flex: 1 !important;
  }

  .courses-theme .hero-imgfou img,
  .courses-theme .hero-imgfou video {
    height: 560px !important;
  }

  /* Rebuilt course page: hero media must fill the left column (no max-width clamp). */
  .courses-theme [data-course-page] .hero-imgfou img,
  .courses-theme [data-course-page] .hero-imgfou video {
    max-width: none !important;
    width: 100% !important;
  }
}

/* --- Footer --- */
@media (max-width: 768px) {
  footer.footer {
    height: auto !important;
    min-height: 0;
    padding: 2rem var(--layout-pad-x) 2.5rem !important;
  }

  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
  }

  .footer-col-1,
  .footer-col-2,
  .footer-col-3 {
    flex: 1 1 auto !important;
    width: 100%;
    max-width: 100% !important;
  }

  .footer-links {
    columns: 2;
  }

  .footer-links li {
    white-space: normal;
  }

  .newsletter-form {
    max-width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  footer.footer {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* --- Pagination --- */
.paginationfo {
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ========== Header / mobile nav (existing) ========== */
#site-mobile-menu.site-mobile-menu {
  box-sizing: border-box;
}

@media (min-width: 1025px) {
  .header .burger {
    display: none !important;
  }

  #site-mobile-menu.site-mobile-menu {
    display: none !important;
  }
}

@media (max-width: 1024px) {

  /* Figma-style drawer: white panel, navy + orange “CLS Menu”, grey list rows */
  #site-mobile-menu.site-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    background: var(--color-white, #ffffff);
    color: var(--color-navy-text, #1f3b63);
    transition: right 0.35s ease;
    z-index: var(--z-mobile-menu);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 40px rgba(15, 39, 66, 0.08);
  }

  #site-mobile-menu.site-mobile-menu.active {
    right: 0;
  }

  /* RTL: slide from the left instead of the right */
  [dir='rtl'] #site-mobile-menu.site-mobile-menu {
    left: -100%;
    right: auto;
    transition: left 0.35s ease;
    box-shadow: 8px 0 40px rgba(15, 39, 66, 0.08);
  }

  [dir='rtl'] #site-mobile-menu.site-mobile-menu.active {
    left: 0;
  }

  .site-mobile-menu__inner {
    padding: clamp(1rem, 4vw, 1.5rem) clamp(1rem, 4vw, 1.25rem) 2rem;
    width: 100%;
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .site-mobile-menu__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .site-mobile-menu__logo {
    display: block;
    line-height: 0;
    flex-shrink: 0;
  }

  .site-mobile-menu__logo img {
    display: block;
    height: clamp(32px, 8vw, 40px);
    width: auto;
    max-width: min(200px, 55vw);
    object-fit: contain;
  }

  .site-mobile-menu-close {
    background: transparent;
    border: none;
    padding: 10px;
    margin: -6px -6px -6px 0;
    color: var(--color-navy-text-sofi, #1f3c88);
    cursor: pointer;
    line-height: 1;
    font-size: 1.35rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .site-mobile-menu-close:hover {
    background: rgba(31, 59, 99, 0.06);
    color: var(--color-navy-header, #144979);
  }

  [dir='rtl'] .site-mobile-menu-close {
    margin: -6px 0 -6px -6px;
  }

  .site-mobile-menu__heading {
    margin: 0 0 1.25rem;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.65rem, 6.5vw, 2.125rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: start;
    letter-spacing: -0.02em;
  }

  [dir='rtl'] .site-mobile-menu__heading {
    font-family: 'Cairo', 'Poppins', sans-serif;
  }

  .site-mobile-menu__heading-brand {
    font-weight: 800;
  }

  .site-mobile-menu__heading-c,
  .site-mobile-menu__heading-s {
    color: var(--color-navy-text-sofi, #1f3c88);
  }

  .site-mobile-menu__heading-l {
    color: var(--color-orange-main, #f47429);
  }

  .site-mobile-menu__heading-rest {
    color: var(--color-navy-text, #1f3b63);
    font-weight: 700;
  }

  #site-mobile-menu .menu-links {
    display: block;
    width: 100%;
  }

  #site-mobile-menu .site-mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  #site-mobile-menu .site-mobile-menu__list>li {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--color-gray-line, #e0e0e0);
  }

  #site-mobile-menu .site-mobile-menu__list>li:first-child {
    border-top: 1px solid var(--color-gray-line, #e0e0e0);
  }

  #site-mobile-menu .menu-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    padding: 0.85rem 0;
    text-decoration: none;
    color: var(--color-text-muted, #6c757d);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
  }

  #site-mobile-menu .menu-item:active {
    background: rgba(31, 59, 99, 0.04);
  }

  #site-mobile-menu .menu-item__icon {
    flex-shrink: 0;
    width: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-navy-text, #1f3b63);
    font-size: 1.2rem;
    opacity: 0.92;
  }

  #site-mobile-menu .menu-item__icon i {
    display: block;
    line-height: 1;
  }

  #site-mobile-menu .menu-item__label {
    flex: 1 1 auto;
    text-align: start;
    min-width: 0;
    color: var(--color-text-muteds, #555555);
  }

  #site-mobile-menu .menu-item__chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--color-text-halfypy, #6b7280);
    margin-inline-start: 0.25rem;
  }

  /* RTL: mirror chevron direction (FontAwesome doesn't auto-flip icons) */
  [dir='rtl'] #site-mobile-menu .menu-item__chevron {
    transform: scaleX(-1);
    margin-inline-start: 0;
    margin-inline-end: 0.25rem;
  }
}

body {
  overflow-x: clip;
  max-width: 100%;
}

body.site-mobile-menu-open {
  overflow: hidden;
}

/* --- Site header: bottom border + soft shadow (fixed bar above content) --- */
.header {
  border-bottom: 1px solid var(--header-border-color);
  box-shadow: var(--header-shadow);
}

/* --- Language switcher (LaravelLocalization) --- */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.language-switcher__link {
  color: var(--color-navy-header, #144979);
  text-decoration: none;
  font-weight: 600;
  padding-inline: 0.25rem;
  line-height: 1;
}

.language-switcher__link.is-active {
  color: var(--color-orange-main, #f47429);
}

/* --- Header (desktop): globe opens AR / EN dropdown --- */
.language-switcher--header {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  bottom: 4px;
}

.language-switcher__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--color-navy-header, #144979);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
  font-size: 1.2rem;
  line-height: 1;
  box-sizing: border-box;
}

/* Single child: center Font Awesome glyph (avoids baseline drift) */
.language-switcher__trigger>.fa-solid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
  margin: 0;
  line-height: 1;
  font-size: 1.15rem;
}

.language-switcher__trigger:hover {
  background: rgba(20, 73, 121, 0.08);
}

.language-switcher__trigger:focus-visible {
  outline: 2px solid var(--color-orange-main, #f47429);
  outline-offset: 2px;
}

.language-switcher--header.is-open .language-switcher__trigger {
  background: rgba(20, 73, 121, 0.1);
}

.language-switcher__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 7.75rem;
  padding: 0.35rem;
  margin: 0;
  background: var(--color-white, #fff);
  border: 1px solid rgba(20, 73, 121, 0.12);
  border-radius: 12px;
  box-shadow:
    0 4px 14px rgba(15, 39, 66, 0.12),
    0 0 1px rgba(15, 39, 66, 0.08);
  z-index: 1100;
}

.language-switcher__dropdown[hidden] {
  display: none !important;
}

.language-switcher__dropdown-link {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-navy-text-sofi, #1f3c88);
  text-decoration: none;
  text-align: center;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.language-switcher__dropdown-link:hover {
  background: rgba(20, 73, 121, 0.06);
}

.language-switcher__dropdown-link:focus-visible {
  outline: 2px solid var(--color-orange-main, #f47429);
  outline-offset: 0;
}

.language-switcher__dropdown-link.is-active {
  color: var(--color-orange-main, #f47429);
  background: rgba(244, 116, 41, 0.1);
}

/*
 * Mobile drawer: segmented “EN / AR” control (replaces plain links under CLS Menu title).
 * Header bar still uses .language-switcher--header (hidden ≤1024px in app.css).
 */
#site-mobile-menu .language-switcher--drawer {
  display: flex;
  width: 100%;
  max-width: min(14.5rem, 100%);
  margin: 0 auto 0.95rem;
  padding: 0.18rem;
  gap: 0.18rem;
  box-sizing: border-box;
  align-items: stretch;
  background: rgba(20, 73, 121, 0.07);
  border: 1px solid rgba(20, 73, 121, 0.12);
  border-radius: 999px;
}

#site-mobile-menu .language-switcher--drawer .language-switcher__link {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-navy-text-sofi, #1f3c88);
  text-decoration: none;
  line-height: 1.2;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

#site-mobile-menu .language-switcher--drawer .language-switcher__link:not(.is-active):hover,
#site-mobile-menu .language-switcher--drawer .language-switcher__link:not(.is-active):focus-visible {
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-navy-header, #144979);
}

#site-mobile-menu .language-switcher--drawer .language-switcher__link:focus-visible {
  outline: 2px solid var(--color-orange-main, #f47429);
  outline-offset: 2px;
}

#site-mobile-menu .language-switcher--drawer .language-switcher__link.is-active {
  background: var(--color-white, #ffffff);
  color: var(--color-orange-main, #f47429);
  box-shadow:
    0 1px 3px rgba(15, 39, 66, 0.08),
    0 4px 12px rgba(31, 59, 99, 0.1);
}

[dir='rtl'] #site-mobile-menu .language-switcher--drawer {
  direction: rtl;
}

@media (max-width: 1024px) {
  .header .logo {
    margin-inline-end: auto;
  }
}

/* --- Site header: desktop fluid row (≥1025px) --- */
@media (min-width: 1025px) {
  .header {
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: 1rem;
    padding-left: max(env(safe-area-inset-left, 0px), var(--layout-pad-x));
    padding-right: max(env(safe-area-inset-right, 0px), var(--layout-pad-x));
    box-sizing: border-box;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    align-items: center;
  }

  .header .logo {
    max-width: min(180px, 40vw);
    width: auto;
    height: auto;
    min-width: 0;
    flex-shrink: 0;
    top: auto;
    left: auto;
  }

  .header .logo img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 40px;
    object-fit: contain;
  }

  .header .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    /* row-gap when wrapped; column-gap = space between items (replaces tiny 0.35rem) */
    gap: 0.5rem var(--header-nav-link-gap);
    flex: 1 1 auto;
    min-width: 0;
  }

  .header .nav a {
    margin: 0;
    padding-inline: 0.125rem;
    white-space: nowrap;
    font-size: clamp(0.8125rem, 1.05vw, 1rem);
  }

  .header .header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: clamp(0.5rem, 1.5vw, 1.25rem);
  }

  /* Globe: same vertical band as 40px search + register row; icon +4% vs 1.15rem */
  .header .language-switcher--header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    align-self: center;
  }

  .header .language-switcher__trigger {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    line-height: 1;
    position: relative;
    top: -3px;
    /* Visual nudge up to match search/register text midline */
  }

  .header .language-switcher__trigger>.fa-solid {
    font-size: 1.55rem;
    width: 1.2em;
    height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header .header-courses-search {
    width: 100%;
    max-width: min(312px, 28vw);
    min-width: 0;
    position: relative;
  }

  /* Dropdown: 40% of viewport wide, anchored to trailing edge of the search field */
  .header .header-courses-search .courses-autocomplete--header-popover {
    z-index: 1200;
    left: auto;
    right: auto;
    inset-inline-start: auto;
    inset-inline-end: 0;
    width: 40vw;
    max-width: min(560px, 90vw);
    min-width: 100%;
  }

  /*
   * Header search pill: outer border lives on `.search-box` (flex container).
   * Flex `align-items: center` keeps the gradient chip vertically centered —
   * absolute positioning tied to `.search-box` drifted vs the bordered `<input>`
   * from global `app.css` (different box model).
   */
  .header .search-box {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    padding-inline-start: 12px;
    padding-inline-end: 4px;
    direction: ltr;
    overflow: visible;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-navy-header, #144979);
    border-radius: 25px;
    box-shadow: 0 0 5px var(--color-navy-header, #144979);
  }

  .header .search-box:focus-within {
    outline: 2px solid var(--color-orange-main, #f47429);
    outline-offset: 2px;
  }

  .header .search-box input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: auto;
    align-self: stretch;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    box-sizing: border-box;
    line-height: 1.25;
  }

  /* Rectangle 6450.svg is 69×40 — height 32 ⇒ ~4px inset top/bottom in a 40px row */
  .header .search-box button.search-img.header-search__submit {
    position: relative;
    flex: 0 0 auto;
    top: auto;
    inset-inline: auto;
    transform: none;
    box-sizing: border-box;
    height: 32px;
    width: calc(32px * 69 / 40);
    min-width: calc(32px * 69 / 40);
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    appearance: none;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    margin: 0;
    transition: transform 0.2s ease;
  }

  .header .search-box button.search-img.header-search__submit:hover {
    transform: scale(1.05);
  }

  .header .search-box button.search-img.header-search__submit:active {
    transform: scale(0.96);
  }

  .header .search-box button.search-img .header-search__chip {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: #003F7D;
    border-radius: 999px;
    transition: filter 0.2s ease;
  }

  .header .search-box button.search-img.header-search__submit:hover .header-search__chip {
    filter: brightness(1.15);
  }

  .header .search-box button.search-img .header-search__icon {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--color-white, #ffffff);
  }

  .header .search-box button.search-img .header-search__icon svg {
    display: block;
    flex-shrink: 0;
  }

  html[dir='rtl'] .header .search-box input {
    direction: ltr;
    text-align: left;
  }
}

@media (min-width: 1025px) and (max-width: 1200px) {
  .header .nav a {
    font-size: 0.8125rem;
  }

  .header .header-courses-search {
    max-width: min(260px, 24vw);
  }

  .header .register-btn {
    padding: 10px 16px;
    font-size: 0.875rem;
  }
}

/* Arabic: compact “سجّل” in header on desktop only (burger layouts hide this control). */
.register-btn__txt--short {
  display: none !important;
}

@media (min-width: 1025px) {
  html[dir='rtl'] .header .register-btn .register-btn__txt--full {
    display: none !important;
  }

  html[dir='rtl'] .header .register-btn .register-btn__txt--short {
    display: inline !important;
  }
}

@media (min-width: 1201px) and (max-width: 1320px) {
  .header .header-courses-search {
    max-width: min(300px, 26vw);
  }
}

/* --- Site header: mobile tap targets + safe area (≤1024px) --- */
@media (max-width: 1024px) {
  .header {
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    padding-top: max(0.9375rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(0.9375rem, env(safe-area-inset-bottom, 0px));
  }

  /* Mobile: ensure desktop nav collapses regardless of other CSS order */
  .header .nav {
    display: none !important;
  }

  .header .burger {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- Home hero desktop (≥1025px): fluid offsets under fixed header --- */
@media (min-width: 1025px) {
  .hero {
    --hero-gap-under-header: clamp(0.5rem, 1.5vw, 1rem);
    --hero-margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
    height: auto;
    /* override app.css 100vh so min-height + margins control layout */
    width: var(--hero-container-width);
    margin-top: calc(var(--header-height) + var(--hero-gap-under-header));
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--hero-margin-bottom);
    border-radius: var(--hero-border-radius);
    overflow: hidden;
    min-height: calc(100vh - var(--header-height) - var(--hero-gap-under-header) - var(--hero-margin-bottom));
    min-height: calc(100dvh - var(--header-height) - var(--hero-gap-under-header) - var(--hero-margin-bottom));
    /* Header cleared by margin-top; inner offset only */
    padding-top: clamp(1rem, 3vh, 2.25rem);
    box-sizing: border-box;
  }

  .hero .hero-content {
    /* Shift headline block slightly up vs prior centering (Figma alignment) */
    margin-top: clamp(-13rem, -18vh, -4.5rem);
    /* % is of .hero; scales with 99% hero band on desktop + medium widths */
    max-width: min(700px, min(90%, 40rem));
    padding-inline: var(--layout-pad-x);
    box-sizing: border-box;
  }

  .hero .stats {
    left: var(--layout-pad-x);
    top: clamp(10rem, 24vh, 15.625rem);
  }

  .hero .partners {
    left: var(--layout-pad-x);
    width: auto;
    max-width: min(400px, calc(100% - 2 * var(--layout-pad-x)));
  }

  .hero .moving-strip {
    left: var(--layout-pad-x);
  }

  /* Same horizontal anchor as student pill so right edges line up (Figma) */
  .hero .buttom-right {
    right: clamp(1.75rem, 7vw, 7.75rem);
    max-width: 24.9375rem;
    /* 420px * 0.95 */
    width: min(24.9375rem, calc(100% - 3rem));
    text-align: right;
    font-size: clamp(0.83125rem, 1.2825vw, 1.009375rem);
    /* ~5% smaller */
    line-height: 1.55;
    box-sizing: border-box;
    margin: 0 0 clamp(0.75rem, 1.5vh, 1.125rem) 0;
    /* override .hero p spacing */
  }

  .hero .right-bottom-section {
    right: clamp(1.75rem, 7vw, 7.75rem);
    /* Anchor absolutely-positioned avatars (app.css) */
    min-height: 2.5rem;
  }

  /*
   * Hero student stack: fixed 40px circles, overlap by horizontal offset; images fill the circle (no ring border).
   */
  .hero .right-bottom-section .man,
  .hero .right-bottom-section .girl,
  .hero .right-bottom-section .black {
    bottom: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
    display: block;
  }

  .hero .right-bottom-section .man {
    z-index: 2;
  }

  .hero .right-bottom-section .girl {
    z-index: 3;
  }

  .hero .right-bottom-section .black {
    z-index: 4;
  }

  .hero .right-bottom-section .hero-avatar-accent {
    position: absolute;
    right: 115px;
    bottom: 0;
    z-index: 5;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    box-sizing: border-box;
    background: var(--color-orange-main, #f47429);
    overflow: hidden;
  }

  /* Plus: centered in orange ring (40×40); max ~56% ≈ prior ~22px glyph in circle */
  .hero .right-bottom-section .hero-avatar-accent__plus {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 56%;
    max-height: 56%;
    object-fit: contain;
    object-position: center;
    display: block;
  }
}

/* Medium desktop: scale right cluster for fit (width: 99% from base ≥1025px rule) */
@media (min-width: 1025px) and (max-width: 1200px) {
  .hero .right-sec {
    transform: scale(0.9);
    transform-origin: bottom right;
  }

  .hero .buttom-right {
    max-width: min(22rem, min(34vw, 100% - 2rem));
    font-size: 0.9rem;
  }
}

@media (min-width: 1201px) and (max-width: 1400px) {
  .hero .right-sec {
    transform: scale(0.95);
    transform-origin: bottom right;
  }
}

/* --- Home tablet/phone hero (≤1024px): one .hero, full content, reflowed (no duplicate mobile-hero) --- */
@media (max-width: 1024px) {
  .hero {
    /* override app.css: 100vh + center flex + padding-top:100px */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    min-height: 0;
    width: var(--hero-container-width);
    margin-left: auto;
    margin-right: auto;
    margin-top: calc(var(--header-height) + var(--mobile-hero-below-header));
    margin-bottom: var(--mobile-hero-margin-bottom);
    border-radius: var(--hero-border-radius);
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.75rem) clamp(0.875rem, 3.5vw, 1.25rem) clamp(1.5rem, 5vw, 2.75rem);
    box-sizing: border-box;
    gap: clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    position: relative;
    /* Reading order: copy → stats → strip → partners → right cluster → scroll */
    --hero-pad-x: clamp(0.875rem, 3.5vw, 1.25rem);
  }

  .hero .overlay {
    z-index: 0;
  }

  .hero .hero-content {
    order: 1;
    position: relative;
    z-index: 2;
    margin-top: 0;
    max-width: 100%;
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--hero-pad-x);
    box-sizing: border-box;
  }

  .hero .hero-content>p:first-of-type {
    font-size: clamp(0.9375rem, 3.5vw, 1.125rem);
    margin-bottom: 0.5rem;
  }

  .hero .stats {
    order: 2;
    position: static;
    z-index: 2;
    top: auto;
    left: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    width: 100%;
    padding-inline: var(--hero-pad-x);
    box-sizing: border-box;
  }

  .hero .stats>div {
    flex: 1 1 calc(33.333% - 1rem);
    min-width: 5.5rem;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
  }

  .hero .stats h3 {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
  }

  .hero .stats p {
    font-size: clamp(0.6875rem, 2.2vw, 0.875rem);
    margin-bottom: 0;
  }

  .hero .moving-strip {
    order: 3;
    position: static;
    left: auto;
    bottom: auto;
    align-self: center;
    max-width: min(100%, 36rem);
    white-space: normal;
    text-align: center;
    padding: 0.65rem 1.1rem;
    z-index: 2;
  }

  .hero .partners {
    order: 4;
    position: static;
    left: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    z-index: 2;
    opacity: 0.85;
  }

  .hero .partners-track {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero .right-sec {
    order: 5;
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: min(28rem, 100%);
    margin-inline: auto;
    padding-inline: var(--hero-pad-x);
    z-index: 2;
    box-sizing: border-box;
  }

  .hero .buttom-right {
    position: static;
    right: auto;
    bottom: auto;
    margin: 0;
    max-width: 100%;
    text-align: center;
    font-size: clamp(0.875rem, 3.1vw, 1.009375rem);
    line-height: 1.5;
  }

  .hero .right-bottom-section {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 0.25rem;
    text-align: center;
  }

  .hero .right-bottom-section .man,
  .hero .right-bottom-section .girl,
  .hero .right-bottom-section .black {
    position: static;
    right: auto;
    left: auto;
    bottom: auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 -6px;
    z-index: 1;
  }

  .hero .right-bottom-section .hero-avatar-accent {
    position: static;
    right: auto;
    left: auto;
    bottom: auto;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 -6px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }

  .hero .right-bottom-section .hero-avatar-accent__plus {
    position: static;
    transform: none;
    max-width: 56%;
    max-height: 56%;
  }

  .hero .right-bottom-section .text-image {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 0.5rem;
    order: 10;
    font-size: clamp(0.8125rem, 2.8vw, 0.9375rem);
  }

  .hero .scroll-btn {
    order: 6;
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    align-self: center;
    margin-top: 0.25rem;
    z-index: 2;
  }

  .hero .buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: min(22rem, 100%);
    margin-inline: auto;
  }

  .hero .buttons :where(.btn-solid, .btn-outline) {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero .stats>div {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero .hero-content>p:not(.buttons):not(:first-of-type) {
    font-size: 0.875rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) and (max-width: 1024px) {
  .hero {
    min-height: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 0.5rem;
  }

  .hero .stats {
    margin-bottom: 0;
  }

  .hero .hero-content h1 {
    margin-bottom: 0.5rem;
  }

  .hero .hero-content>p:not(.buttons) {
    margin-bottom: 0.75rem;
  }
}

/* --- Skill One hero --- */
@media (max-width: 1200px) {

  /* Medium screens: prevent fixed 500x800 hero image from breaking layout */
  .hero-righttwo {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    height: auto;
  }

  .hero-righttwo .persontwo {
    width: min(340px, 55vw) !important;
    aspect-ratio: 657 / 597 !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: top center !important;
    max-width: 100%;
  }

  /*
   * Reflow the floating cards so they never overflow on medium widths.
   * (app.css positions them absolute with fixed coordinates)
   */
  .hero-righttwo .cardtwo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0.35rem auto !important;
    max-width: min(320px, 92vw);
    display: block;
  }
}

@media (max-width: 1024px) {
  .herotwo {
    flex-direction: column;
    text-align: center;
    padding: calc(73px + var(--layout-hero-pad)) var(--layout-pad-x) var(--layout-hero-pad);
    min-height: auto;
  }

  .hero-contenttwo {
    width: 100%;
    max-width: 42rem;
    margin-inline: auto;
  }

  .hero-contenttwo p {
    max-width: 60ch;
    margin-inline: auto;
  }

  .hero-contenttwo h1 {
    font-size: var(--font-hero);
  }

  .hero-righttwo {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    height: auto;
    margin-top: 2rem;
    padding: 1.25rem 0 0.25rem;
    overflow: visible;

    /* Reflow hero artwork + cards for tablet */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    justify-items: center;
    align-items: start;
  }

  .hero-righttwo .persontwo {
    grid-column: 1 / -1;
    width: min(320px, 70vw) !important;
    aspect-ratio: 657 / 597 !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: top center !important;
    max-width: 100%;
    position: relative !important;
    inset: auto !important;
    margin: 0 auto 0.5rem;
  }

  /* On tablet/mobile: simplify the decorative shapes (avoid overflow) */
  .hero-righttwo .shape-bluetwo,
  .hero-righttwo .shape-orangetwo {
    display: none !important;
  }

  .hero-righttwo .shape-bluetwo {
    width: min(85vw, 360px);
    height: min(85vw, 360px);
    max-width: 100%;
  }

  .hero-righttwo .shape-orangetwo {
    width: min(55vw, 220px);
    height: min(55vw, 220px);
    max-width: 100%;
    border-width: 20px;
  }

  .hero-righttwo .cardtwo {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 100%;
    max-width: min(340px, 92vw);
    display: block;
  }

  /* Reset per-card positional offsets from app.css */
  .hero-righttwo .studentstwo,
  .hero-righttwo .besttwo,
  .hero-righttwo .coursetwo,
  .hero-righttwo .congratstwo {
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }

  /* skillone & legacy heroes: single .search-boxtwo wrapper (input+btn inside) */
  .hero-contenttwo>.search-boxtwo {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .hero-righttwo {
    grid-template-columns: 1fr !important;
  }

  .hero-righttwo .cardtwo {
    max-width: min(360px, 92vw);
  }

  .search-boxtwo {
    max-width: 100%;
  }

  .categoriestwo {
    gap: 10px;
    justify-content: center;
  }

  .categoriestwo button {
    min-height: 44px;
    padding: 10px 14px;
    flex: 1 1 auto;
    min-width: 9.5rem;
  }

  .hero-contenttwo h1 {
    font-size: clamp(1.5rem, 7vw, 2.25rem);
  }
}

/* --- Courses hero search: desktop = original position; center on small --- */
.courses-hero-search {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
}

.courses-hero-search .search-boxtwo {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  height: 56px;
}

.courses-hero-search .search-boxtwo input {
  flex: 1 1 auto;
  width: auto;
  padding-inline-start: 16px;
  padding-inline-end: 16px;
  height: 100%;
}

.courses-hero-search__btn {
  width: 64px;
  height: 56px;
  border: none;
  background: var(--color-navy-text-sofi);
  color: var(--color-white);
  font-size: 18px;
  cursor: pointer;
  border-radius: 14px;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 39, 66, 0.12);
}

.courses-hero-search__btn i {
  line-height: 1;
}

@media (max-width: 1024px) {

  /*
   * Courses index (tablet / mobile): keep input + search button adjacent (same gap as desktop)
   * and center the whole row. The outer bar is capped wide enough that the input can grow;
   * flex:1 on .search-boxtwo fills space up to the icon — no huge empty strip between them.
   */
  .courses-hero-search {
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    width: min(100%, 38rem);
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
  }

  .courses-hero-search .search-boxtwo {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
  }

  .courses-hero-search__btn {
    flex: 0 0 64px;
  }
}

@media (max-width: 768px) {
  .courses-hero-search {
    width: min(100%, 38rem);
    padding-inline: var(--layout-pad-x, 16px);
  }
}

/* --- Courses brand blue theme --- */
.courses-theme {
  --brand-blue: #003F7D;

  /* Override existing “navy/blue” tokens used across the CSS */
  --color-navy-header: var(--brand-blue);
  --color-navy-text-sofi: var(--brand-blue);
  --color-blue-btns: var(--brand-blue);
  --color-navy-text-dark: var(--brand-blue);
  --color-navy-text-soft: var(--brand-blue);
  --color-navy-main: var(--brand-blue);
}

/* Patch a few places that used hard-coded blues */
.courses-theme .page-headertreefo h2 {
  color: var(--brand-blue);
}

@media (max-width: 480px) {
  .hero-righttwo {
    grid-template-columns: 1fr;
  }

  .hero-righttwo .persontwo {
    width: min(280px, 78vw) !important;
    aspect-ratio: 657 / 597 !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: top center !important;
    margin-bottom: 0.25rem;
  }

  .hero-righttwo .cardtwo {
    max-width: min(360px, 92vw);
    padding: 12px 14px;
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  .accordion-contentsev ul {
    margin-left: 0;
  }
}

/* --- Direction gallery --- */
@media (max-width: 1024px) {
  .gallery-section .gallery-grid {
    min-width: 0;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 12px;
  }

  .gallery-section .big {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-section .filter-menu {
    flex-wrap: wrap;
    gap: 12px 16px;
    justify-content: center;
    padding: 0 8px;
  }

  .gallery-section .main-title {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    padding: 0 var(--layout-pad-x);
  }

  .gallery-section .slider-track {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .gallery-section .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-section .big {
    grid-column: 1;
    grid-row: auto;
  }
}

/* --- Direction courses grid --- */
@media (max-width: 768px) {
  .coursesdi {
    grid-template-columns: 1fr;
    width: min(92%, 1200px);
  }

  .course-carddi {
    height: auto;
    min-height: 220px;
  }

  .course-contentdi p {
    max-width: 60ch;
  }
}

/* --- Nextstep hero --- */
@media (max-width: 1024px) {
  .heroone {
    flex-direction: column;
    height: auto;
    min-height: auto;
    padding: calc(73px + 2rem) var(--layout-pad-x) 3rem;
  }

  .hero-contentone {
    width: 100%;
  }

  .hero-statsone {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .hero-imageone {
    width: 100%;
    max-width: 100%;
  }

  .hero-imageone img {
    width: 100%;
    height: auto;
  }
}

.testimonials-empty {
  margin: 0 auto;
  max-width: 36rem;
  padding: 0 0.5rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-navy-text-soft, #1f4e79);
}

/*
 * Small + medium (max 1279px): stacked cards, centered copy, full text on every card.
 * Large (min 1280px): original horizontal strip from app.css; scroll when row exceeds viewport.
 */
/* --- Home TESTIMONIALS: stacked cards (small / medium only) --- */
@media (max-width: 1279px) {

  /* Kicker: compact uppercase — only below xl; xl+ uses app.css .section-small */
  .testimonials .section-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    font-size: clamp(0.72rem, 2.6vw, 0.8125rem);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-navy-text-soft, #1f4e79);
    margin: 0;
  }

  @media (min-width: 768px) {
    .testimonials .section-small {
      font-size: clamp(0.828rem, 2.99vw, 0.934375rem);
    }
  }

  @media (min-width: 1024px) {
    .testimonials .section-small {
      font-size: clamp(0.936rem, 3.38vw, 1.05625rem);
    }
  }

  .testimonials .section-small .dash {
    width: 22px;
    height: 3px;
    flex-shrink: 0;
    background: var(--color-orange-alt, #ff8c42);
    border-radius: 2px;
  }

  .testimonials {
    padding: 2.75rem var(--layout-pad-x) 3rem;
    text-align: center;
    overflow-x: clip;
  }

  .testimonials .container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  /* Mobile testimonials title: prior clamp, then −12%; orange matches desktop */
  .testimonials .section-title {
    font-size: clamp(1.198rem, 4.448vw, 1.604rem);
    font-weight: 700;
    line-height: 1.22;
    margin-top: 0.65rem;
    margin-bottom: 1.75rem;
    padding-inline: 0.5rem;
    color: var(--color-orange-main, #f47429);
  }

  .testimonials .testimonial-cards {
    display: none !important;
  }

  .testimonials-mobile-swiper {
    display: block !important;
    width: 100% !important;
    max-width: min(600px, 100%);
    margin-inline: auto !important;
    padding-bottom: 50px !important;
    overflow: hidden;
    position: relative;
  }

  .testimonials-mobile-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    padding-inline: 12px;
    box-sizing: border-box;
  }

  .testimonials-mobile-swiper .testimonial-card {
    width: 100% !important;
    max-width: 100%;
    margin: 0 !important;
  }

  .testimonials .testimonial-card,
  .testimonials .testimonial-card.active {
    width: 100% !important;
    max-width: 100%;
    min-height: 0;
    height: auto;
    flex-shrink: 0;
    cursor: pointer;
    background: var(--color-white, #fff);
    color: var(--color-black, #111);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 39, 66, 0.1);
    border: 1px solid rgba(31, 78, 121, 0.1);
    padding: 1.5rem 1.25rem 1.35rem;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .testimonials .testimonial-card.active {
    border-color: rgba(244, 116, 41, 0.45);
    box-shadow: 0 10px 32px rgba(15, 39, 66, 0.14);
  }

  /*
   * Grid: avatar / name / role on top; flexible middle band for centered quote text;
   * decorative quote row anchored at bottom.
   */
  .testimonials .testimonial-content {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    min-height: clamp(15.5rem, 36vh, 24rem);
    padding: 0 !important;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto minmax(min-content, 1fr) auto;
    justify-items: center;
    align-items: start;
    row-gap: 0;
  }

  /* Each card shows full story (no “closed” sliver columns) */
  .testimonials .testimonial-card:not(.active) h3,
  .testimonials .testimonial-card:not(.active) .role,
  .testimonials .testimonial-card:not(.active) .description {
    display: block !important;
  }

  .testimonials .testimonial-card .avatar {
    grid-row: 1;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.65rem;
  }

  .testimonials .testimonial-card h3 {
    grid-row: 2;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy-text, #1f3b63);
    margin: 0 0 0.55rem;
  }

  .testimonials .testimonial-card .role {
    grid-row: 3;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--color-text-muted, #6c757d);
    margin-top: 0;
    margin-bottom: 0.65rem;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .testimonials .testimonial-card .description {
    grid-row: 4;
    justify-self: center;
    align-self: center;
    width: 100%;
    max-width: min(34rem, 100%);
    font-size: clamp(0.75rem, 2.95vw, 0.8125rem);
    line-height: 1.58;
    color: var(--color-navy-text-soft, #1f4e79);
    text-align: center;
    text-wrap: balance;
    margin-block: clamp(0.35rem, 2vw, 0.85rem);
  }

  .testimonials .testimonial-card .description br {
    display: none;
  }

  .testimonials .testimonial-card .mini-img {
    display: none !important;
  }

  .testimonials .testimonial-card .bottom {
    grid-row: 5;
    justify-self: stretch;
    position: relative;
    inset: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 0 !important;
  }

  .testimonials .testimonial-card .quote {
    position: relative;
    inset: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
  }

  .testimonials .testimonial-card .quote img,
  .testimonials .testimonial-card.active .quote img,
  .testimonials .testimonial-card:not(.active) .quote img {
    width: 44px !important;
    height: 44px !important;
    max-width: 100%;
    margin: 0 !important;
    opacity: 0.25 !important;
    object-fit: contain;
  }

  .testimonials .testimonial-card:last-child {
    display: flex !important;
  }
}

/* --- Wide desktop cap (1440px content rhythm) --- */
@media (min-width: 1440px) {

  .gallery-section .container,
  .footer-inner {
    max-width: min(1600px, 100%);
  }
}

/* --- Courses listing: filter sidebar (Figma-aligned) --- */
.courses-filter-sidebar {
  --cf-orange: #f37a32;
  --cf-border: #e5e7eb;
  --cf-text: #144979;
  --cf-muted-chev: #d1d5db;
}

.courses-filter-sidebar.sidebar {
  border: 1px solid var(--cf-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.courses-filter-sidebar .sidebar-header {
  color: var(--cf-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
}

.courses-filter-sidebar .sidebar-header>span:last-child {
  font-size: 13px;
  font-weight: 700;
}

.courses-filter-sidebar__filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
}

.courses-filter-sidebar .section-title {
  color: var(--cf-text);
  letter-spacing: 0.04em;
  font-size: 11px;
  margin-bottom: 8px;
}

.courses-filter-sidebar .search-boxth input {
  width: 100%;
  border: 1px solid var(--cf-border);
  border-radius: 8px;
  color: var(--cf-text);
}

.courses-filter-sidebar__search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #9ca3af;
  pointer-events: none;
}

.courses-filter-sidebar__menu {
  border: 1px solid var(--cf-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.35rem;
}

.courses-filter-sidebar__menu li {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cf-border);
  background: #fff;
  color: var(--cf-text);
  font-size: 13px;
}

.courses-filter-sidebar__menu li:last-child {
  border-bottom: none;
}

.courses-filter-sidebar__menu li:hover {
  background: #f9fafb;
}

.courses-filter-sidebar__menu--category li.active,
.courses-filter-sidebar__menu--subcategory li.active {
  background: var(--cf-orange);
  color: #fff;
}

.courses-filter-sidebar__menu--category li.active:hover,
.courses-filter-sidebar__menu--subcategory li.active:hover {
  background: var(--cf-orange);
  color: #fff;
}

.courses-filter-sidebar__menu--category button[data-filter-category],
.courses-filter-sidebar__menu--subcategory button[data-filter-subcategory] {
  flex: 1;
  min-width: 0;
  text-align: start;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.courses-filter-sidebar__menu li:not(.active) .courses-filter-sidebar__chev {
  color: var(--cf-muted-chev);
}

.courses-filter-sidebar__menu--category li.active .courses-filter-sidebar__chev,
.courses-filter-sidebar__menu--subcategory li.active .courses-filter-sidebar__chev {
  color: #fff;
}

.courses-filter-sidebar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.courses-filter-sidebar__row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.courses-filter-sidebar__row-text {
  flex: 1;
  min-width: 0;
  text-align: start;
}

.courses-filter-sidebar__menu--choices li:has(input:checked) {
  background: var(--cf-orange);
  color: #fff;
}

.courses-filter-sidebar__menu--choices li:has(input:checked):hover {
  background: var(--cf-orange);
  color: #fff;
}

.courses-filter-sidebar__menu--choices li:has(input:checked) .courses-filter-sidebar__chev {
  color: #fff;
}

.courses-filter-sidebar__menu--choices li:not(:has(input:checked)) .courses-filter-sidebar__chev {
  color: var(--cf-muted-chev);
}

.courses-filter-sidebar__menu--choices li:has(input:focus-visible),
.courses-filter-sidebar__menu--delivery li:has(input:focus-visible) {
  outline: 2px solid var(--cf-orange);
  outline-offset: -2px;
  z-index: 1;
}

.courses-filter-sidebar__radio-indicator {
  width: 16px;
  height: 16px;
  border: 2px solid var(--cf-muted-chev);
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.courses-filter-sidebar__menu--delivery li:has(input:checked) {
  background: #fff8f3;
}

.courses-filter-sidebar__menu--delivery li:has(input:checked) .courses-filter-sidebar__radio-indicator {
  border-color: var(--cf-orange);
  background: var(--cf-orange);
  box-shadow: inset 0 0 0 3px #fff;
}

.courses-filter-sidebar__dropdown {
  position: relative;
  border: 1px solid var(--cf-border);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 1.35rem;
  min-height: 44px;
  align-items: stretch;
}

.courses-filter-sidebar__partner-select {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 10px 36px 10px 14px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  color: var(--cf-text);
  appearance: none;
  cursor: pointer;
}

.courses-filter-sidebar__dropdown-chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.courses-filter-sidebar__tags {
  margin-bottom: 0;
}

.courses-filter-sidebar__tag {
  border: 1px solid var(--cf-border);
  background: #f9fafb;
}

@media (max-width: 1024px) {
  .courses-filter-sidebar .search-boxth input {
    width: 100% !important;
  }
}

/* Global Floating Scroll Button */
.global-scroll-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #15487B, #003F7D);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(21, 72, 123, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0.9;
}

[dir="rtl"] .global-scroll-btn {
  right: auto;
  left: 30px;
}

.global-scroll-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #f57a36, #e06a2b);
  box-shadow: 0 6px 20px rgba(245, 122, 54, 0.45);
  opacity: 1;
}

.global-scroll-btn:active {
  transform: scale(0.95);
}

.global-scroll-btn i {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.global-scroll-btn.pointing-up i {
  transform: rotate(180deg);
}

/* Offset scroll button upward when the course CTA card is fixed to avoid overlap */
@media (max-width: 1024px) {
  .global-scroll-btn.has-sticky-cta {
    bottom: 95px !important;
  }
}

@media (max-width: 640px) {
  .global-scroll-btn {
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  [dir="rtl"] .global-scroll-btn {
    right: auto;
    left: 16px;
  }
  .global-scroll-btn.has-sticky-cta {
    bottom: 75px !important;
  }
}

@media (min-width: 1025px) {
  .global-scroll-btn.has-sticky-cta {
    bottom: 180px !important;
  }
}

/* --- Mobile version section unhiding and responsive optimizations --- */
@media (max-width: 768px) {

  /* Restore sections hidden in app.css */
  .partnersq {
    display: block !important;
  }

  .herov {
    display: flex !important;
  }

  .contactm {
    display: block !important;
  }

  .challengel {
    display: block !important;
  }

  .heroy {
    display: flex !important;
  }

  .insights {
    display: block !important;
  }

  .news-section {
    display: block !important;
  }

  .subscribe-wrapper {
    display: flex !important;
  }

  /* Responsive styling for unhidden sections */
  .cardsq {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .cardq {
    max-width: 480px !important;
    margin-inline: auto !important;
  }

  .herov {
    flex-direction: column !important;
    height: auto !important;
  }

  .leftv {
    width: 100% !important;
    padding: 40px var(--layout-pad-x) !important;
  }

  .leftv p {
    margin-top: 2rem !important;
    width: 100% !important;
  }

  .rightv {
    width: 100% !important;
    right: 0 !important;
    height: 200px !important;
  }

  /* Typography and Spacing Optimizations for Mobile */

  /* General Section padding overrides on mobile */
  .partnerse {
    padding: 30px 0 !important;
  }

  .learning-journey {
    padding: 40px 0 !important;
  }

  .testimonials {
    padding: 40px var(--layout-pad-x) !important;
  }

  .why {
    padding: 40px var(--layout-pad-x) !important;
  }

  /* 1. Partners in Excellence */
  .partnersq {
    padding: 40px var(--layout-pad-x) !important;
  }

  .section-titleq {
    font-size: clamp(1.25rem, 5vw, 1.5rem) !important;
  }

  .section-descq {
    font-size: 0.875rem !important;
    margin-top: 10px !important;
  }

  /* 2. Vibrant Learning Community */
  .small-titlev {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem) !important;
    margin-bottom: 10px !important;
  }

  .simv {
    font-size: 1rem !important;
    margin-top: 0 !important;
    white-space: normal !important;
    margin-bottom: 1rem !important;
  }

  .leftv h1 {
    font-size: clamp(1.25rem, 5vw, 1.5rem) !important;
    margin-bottom: 1rem !important;
    white-space: normal !important;
  }

  .leftv p {
    font-size: 0.875rem !important;
  }

  /* 3. Contact Now */
  .contactm {
    padding: 40px var(--layout-pad-x) !important;
  }

  .small-titlem h4 {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem) !important;
  }

  .containerm h1 {
    font-size: clamp(1.5rem, 6vw, 2.25rem) !important;
  }

  .sub-textm {
    font-size: 1.125rem !important;
    margin-bottom: 2rem !important;
  }

  /* 4. Monthly Skills Challenge */
  .challengel {
    padding: 40px var(--layout-pad-x) !important;
  }

  .small-titlel h4 {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem) !important;
  }

  .sub-textl {
    margin-bottom: 1.5rem !important;
  }

  .leftl h1 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    margin-bottom: 1.5rem !important;
  }

  .downfl {
    margin-top: 2rem !important;
  }

  .infol {
    gap: 20px !important;
  }

  .infol p {
    max-width: 100% !important;
  }

  /* 5. Get Started */
  .heroy {
    min-height: auto !important;
    padding: 60px var(--layout-pad-x) !important;
  }

  .heroy .wrapper {
    width: min(100%, 280px) !important;
    height: min(100vw, 280px) !important;
  }

  .small-titley {
    font-size: clamp(1.15rem, 4.5vw, 1.35rem) !important;
  }

  .contenty h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
    margin-bottom: 1.5rem !important;
  }

  .descy {
    margin-top: 1.5rem !important;
  }

  /* 6. Latest Insights */
  .insights {
    padding: 40px var(--layout-pad-x) !important;
  }

  .containeri h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .insights-card-row__body h4 {
    font-size: 1.125rem !important;
  }

  .insights-card-row__body p {
    font-size: 0.875rem !important;
  }

  /* 7. Latest News */
  .news-section {
    padding: 40px var(--layout-pad-x) !important;
  }

  .news-section .section-header h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .news-section .section-header p {
    font-size: 0.875rem !important;
  }

  .main-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 10px !important;
  }

  .main-card p {
    font-size: 0.875rem !important;
  }

  .side-content h4 {
    font-size: 0.875rem !important;
  }

  .side-content p {
    font-size: 0.8125rem !important;
  }

  /* 8. Subscribe Section */
  .subscribe-title {
    font-size: 1.125rem !important;
    margin-bottom: 1.25rem !important;
  }

  /* Why Choose Us Section Mobile Optimization */
  .why .section-header h2,
  .why .section-header p {
    display: none !important;
  }

  .why .section-header {
    margin-bottom: 24px !important;
  }

  .why .feature-item h4 {
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }

  .why .feature-item p {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  .why .number {
    font-size: 12px !important;
    min-width: 32px !important;
    padding: 4px 6px !important;
    margin-bottom: 4px !important;
  }

  /* Display features first (2 columns continuous flow), then the image */
  .why .content {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px 16px !important;
  }

  .why .features {
    display: contents !important;
  }

  .why .feature-item {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 6px !important;
  }

  .why .feature-item .number {
    order: 1 !important;
  }

  .why .feature-item .text {
    order: 2 !important;
  }

  .why .center-image {
    order: 2 !important;
    grid-column: span 2 !important;
    margin-top: 20px !important;
    display: flex !important;
    justify-content: center !important;
  }
}


/* --- Courses Page Mobile Search & Filter Drawer --- */
.courses-mobile-filter-btn {
  display: none !important;
}

.courses-filter-sidebar__close-btn {
  display: none !important;
}

@media (max-width: 640px) {

  /* Reduce search input height and icon size */
  .courses-theme .courses-hero-search {
    height: 44px !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .courses-theme .search-boxtwo {
    height: 44px !important;
    border-radius: 12px 0 0 12px !important;
    border: 1px solid rgba(0, 63, 125, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 4px 12px rgba(0, 63, 125, 0.03) !important;
    margin: 0 !important;
  }

  html[dir='rtl'] .courses-theme .search-boxtwo {
    border-radius: 0 12px 12px 0 !important;
  }

  .courses-theme .search-boxtwo input {
    padding: 0 16px !important;
    font-size: 13.5px !important;
    height: 100% !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
  }

  .courses-theme .courses-hero-search__btn {
    height: 44px !important;
    width: 48px !important;
    border-radius: 0 12px 12px 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  html[dir='rtl'] .courses-theme .courses-hero-search__btn {
    border-radius: 12px 0 0 12px !important;
  }

  .courses-theme .courses-hero-search__btn i {
    font-size: 14px !important;
  }

  /* Add and style mobile filter trigger button next to search */
  .courses-mobile-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 44px !important;
    padding: 0 16px !important;
    background: var(--color-orange-main, #f47429) !important;
    /* Orange background like in screenshot */
    color: #fff !important;
    border: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 12px !important;
    /* Rounded corners */
    box-shadow: 0 4px 12px rgba(244, 116, 41, 0.15) !important;
    margin-inline-start: 8px !important;
    /* Visual gap between search bar and filter button */
    flex-shrink: 0 !important;
  }

  html[dir='rtl'] .courses-mobile-filter-btn {
    margin-inline-start: 0 !important;
    margin-inline-end: 8px !important;
  }

  .courses-mobile-filter-btn:hover {
    background: #003F7D !important;
  }

  /* Mobile Filter Drawer Overlay Backdrop */
  .courses-filter-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 15, 30, 0.45) !important;
    z-index: 4999 !important;
    transition: opacity 0.3s ease !important;
    cursor: pointer;
  }

  /* Sidebar to Mobile Popup Slider Drawer */
  .courses-filter-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    visibility: hidden !important;
    width: 320px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #ffffff !important;
    box-shadow: -8px 0 40px rgba(0, 63, 125, 0.15) !important;
    z-index: 5000 !important;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 24px 20px !important;
    margin: 0 !important;
    display: block !important;
  }

  .courses-filter-sidebar.active {
    right: 0 !important;
    visibility: visible !important;
  }

  /* RTL Slide from Left */
  html[dir='rtl'] .courses-filter-sidebar {
    left: -100% !important;
    right: auto !important;
    visibility: hidden !important;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease !important;
    box-shadow: 8px 0 40px rgba(0, 63, 125, 0.15) !important;
  }

  html[dir='rtl'] .courses-filter-sidebar.active {
    left: 0 !important;
    right: auto !important;
    visibility: visible !important;
  }

  /* Mobile Drawer close button styling */
  .courses-filter-sidebar__close-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #003F7D !important;
    font-size: 22px !important;
    cursor: pointer !important;
    padding: 8px !important;
    line-height: 1 !important;
    margin-inline-start: auto !important;
    transition: color 0.2s ease !important;
  }

  .courses-filter-sidebar__close-btn:hover {
    color: var(--color-orange-main, #f47429) !important;
  }

  /* Make sidebar elements look premium inside drawer */
  .courses-filter-sidebar .sidebar-header {
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(0, 63, 125, 0.08) !important;
  }
}

/* Custom premium styling for the Courses navigation link in the header */
.header .nav a.nav-courses-btn {
  color: var(--color-navy-main, #003F7D) !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  background-color: rgba(244, 116, 41, 0.07) !important;
  border: 1px solid rgba(244, 116, 41, 0.12) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0 8px !important;
}

.header .nav a.nav-courses-btn::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-orange-main, #f47429);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.header .nav a.nav-courses-btn:hover {
  background-color: rgba(244, 116, 41, 0.12) !important;
  border-color: rgba(244, 116, 41, 0.25) !important;
  color: var(--color-orange-main, #f47429) !important;
  transform: translateY(-1px) !important;
}

.header .nav a.nav-courses-btn:hover::before {
  transform: scale(1.4);
}

.header .nav a.nav-courses-btn:active {
  transform: translateY(0) !important;
}