/* Shared Moodle shell for every requests portal page. */
:root {
  --qimah-shell-navy: #101d42;
  --qimah-shell-blue: #075b91;
  --qimah-shell-cyan: #087eaf;
  --qimah-shell-orange: #fca635;
  --qimah-shell-header-height: 84px;
  --qimah-shell-rail-width: 60px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.has-qimah-moodle-shell {
  padding-inline-end: var(--qimah-shell-rail-width);
}

.qimah-header__language {
  position: relative;
  padding: 0;
}

.qimah-header__language > summary {
  display: flex;
  height: 100%;
  padding: 0 17px;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
}

.qimah-header__language > summary::-webkit-details-marker {
  display: none;
}

.qimah-header__language-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 165px;
  padding: 7px;
  border: 1px solid #dce9f3;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(7, 61, 124, .16);
}

.qimah-header__language-menu a {
  padding: 9px 11px;
  border-radius: 9px;
  color: #49627e;
  font-size: .72rem;
  font-weight: 700;
}

.qimah-header__language-menu a:hover,
.qimah-header__language-menu a.is-active {
  color: #075b91;
  background: #edf6fc;
}

.qimah-header__account:has(.qimah-account-action) {
  min-width: 310px;
  gap: 2px;
}

.qimah-account-action {
  min-width: 72px;
}

.qimah-moodle-rail {
  position: fixed;
  z-index: 111;
  top: var(--qimah-shell-header-height);
  right: 0;
  bottom: 0;
  display: flex;
  width: var(--qimah-shell-rail-width);
  align-items: center;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(180deg, #087fac 0%, #07558b 52%, #073d72 100%);
  box-shadow: -9px 0 28px rgba(7, 62, 111, .13);
}

.qimah-moodle-rail button,
.qimah-moodle-rail a {
  color: inherit;
}

.qimah-moodle-rail__toggle {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: 12px 0 4px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.qimah-moodle-rail__toggle:hover {
  background: rgba(255, 255, 255, .17);
}

.qimah-moodle-rail__toggle svg,
.qimah-moodle-rail__icons svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-open .qimah-moodle-rail__toggle {
  transform: rotate(180deg);
}

.qimah-moodle-rail__icons {
  display: flex;
  width: 100%;
  min-height: 0;
  padding: 3px 6px 10px;
  flex: 1;
  align-items: center;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}

.qimah-moodle-rail__icons::-webkit-scrollbar {
  display: none;
}

.qimah-moodle-rail__icons a {
  position: relative;
  display: grid;
  width: 48px;
  min-height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  opacity: .91;
  transition: background .18s ease, opacity .18s ease;
}

.qimah-moodle-rail__icons a:hover,
.qimah-moodle-rail__icons a.is-active {
  background: rgba(255, 255, 255, .12);
  opacity: 1;
}

.qimah-moodle-rail__icons a span {
  position: absolute;
  top: 50%;
  right: 58px;
  padding: 6px 10px;
  border-radius: 7px;
  color: #fff;
  background: #10264b;
  font-size: .64rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(8px, -50%);
  transition: .16s ease;
}

.qimah-moodle-rail__icons a:hover span {
  opacity: 1;
  transform: translate(0, -50%);
}

.qimah-moodle-panel {
  position: fixed;
  z-index: 110;
  top: var(--qimah-shell-header-height);
  right: var(--qimah-shell-rail-width);
  bottom: 0;
  width: min(390px, calc(100vw - var(--qimah-shell-rail-width)));
  padding: 22px;
  overflow-y: auto;
  color: #172c50;
  background: #fff;
  box-shadow: -24px 12px 70px rgba(5, 47, 88, .22);
  visibility: hidden;
  transform: translateX(calc(100% + var(--qimah-shell-rail-width)));
  transition: transform .27s ease, visibility .27s;
}

.rail-open .qimah-moodle-panel {
  visibility: visible;
  transform: translateX(0);
}

.qimah-moodle-rail__overlay {
  position: fixed;
  z-index: 109;
  inset: var(--qimah-shell-header-height) var(--qimah-shell-rail-width) 0 0;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(4, 29, 55, .36);
  cursor: default;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s;
}

.rail-open .qimah-moodle-rail__overlay {
  visibility: visible;
  opacity: 1;
}

.qimah-moodle-panel__head {
  display: grid;
  grid-template-columns: 58px 1fr 34px;
  gap: 12px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid #e5edf4;
}

.qimah-moodle-panel__head img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.qimah-moodle-panel__head div,
.qimah-moodle-panel__account div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.qimah-moodle-panel__head strong {
  color: #0b3b72;
  font-size: .92rem;
}

.qimah-moodle-panel__head span {
  color: #74859b;
  font-size: .58rem;
}

.qimah-moodle-panel__head button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #dbe7f0;
  border-radius: 10px;
  color: #315778;
  background: #f7fafc;
  font-size: 1.25rem;
  cursor: pointer;
}

.qimah-moodle-panel__account {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px;
  margin-top: 18px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #087ba9, #07518a);
  box-shadow: 0 14px 30px rgba(7, 88, 140, .18);
}

.qimah-moodle-panel__avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 13px;
  background: rgba(255, 255, 255, .14);
  font-size: 1.1rem;
  font-weight: 800;
}

.qimah-moodle-panel__account small {
  color: rgba(255, 255, 255, .7);
  font-size: .57rem;
}

.qimah-moodle-panel__account strong {
  overflow: hidden;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qimah-moodle-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}

.qimah-moodle-panel__grid a {
  display: flex;
  min-height: 86px;
  padding: 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #e0ebf3;
  border-radius: 14px;
  flex-direction: column;
  color: #315274;
  background: #fbfdff;
  font-size: .65rem;
  font-weight: 700;
}

.qimah-moodle-panel__grid a:hover {
  border-color: #aed3eb;
  color: #075b91;
  background: #eef7fc;
}

.qimah-moodle-panel__grid b {
  color: #0875a7;
  font-size: 1.25rem;
}

.qimah-moodle-panel__logout {
  margin-top: 11px;
}

.qimah-moodle-panel__logout button,
.qimah-moodle-panel__guest a {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #075b91;
  font-size: .68rem;
  font-weight: 800;
  cursor: pointer;
}

.qimah-moodle-panel__guest {
  padding: 20px;
  margin-top: 18px;
  border: 1px solid #dbe9f3;
  border-radius: 17px;
  background: linear-gradient(145deg, #f4faff, #fff);
  text-align: center;
}

.qimah-moodle-panel__guest strong {
  color: #0a3c73;
  font-size: .96rem;
}

.qimah-moodle-panel__guest p {
  margin: 5px 0 14px;
  color: #667d95;
  font-size: .66rem;
}

.qimah-moodle-panel__guest a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qimah-moodle-panel__links {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid #e3ebf2;
}

.qimah-moodle-panel__links a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf2f6;
  color: #375777;
  font-size: .67rem;
  font-weight: 700;
}

.qimah-moodle-panel__links a:hover {
  color: #0874a5;
}

.qimah-moodle-panel__links span {
  color: #f3a034;
  font-size: 1rem;
}

.qimah-moodle-footer {
  position: relative;
  z-index: 2;
  color: #f0f0f0;
  background: var(--qimah-shell-navy);
}

.qimah-moodle-footer__main {
  display: grid;
  width: min(1440px, calc(100% - 70px));
  padding: 42px 0 32px;
  margin: auto;
  grid-template-columns: 1.35fr .65fr;
  gap: clamp(45px, 8vw, 130px);
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.qimah-moodle-footer h2 {
  margin: 0 0 18px;
  color: var(--qimah-shell-orange);
  font-size: 1.35rem;
}

.qimah-moodle-footer__about p {
  max-width: 850px;
  margin: 0 0 8px;
  color: rgba(240, 240, 240, .88);
  font-size: .82rem;
  line-height: 1.95;
}

.qimah-moodle-footer__about img {
  width: 76px;
  height: 76px;
  margin-top: 20px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.qimah-moodle-footer__info {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.qimah-moodle-footer__info > a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  color: #f0f0f0;
  font-size: .78rem;
}

.qimah-moodle-footer__info > a span {
  color: #ffb200;
  font-size: 1.15rem;
}

.qimah-moodle-footer__social {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.qimah-moodle-footer__social a {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #25a18e;
  font-size: .72rem;
  font-weight: 800;
}

.qimah-moodle-footer__social a:last-child {
  background: #050505;
}

.qimah-moodle-footer__bottom {
  display: flex;
  width: min(1440px, calc(100% - 70px));
  min-height: 76px;
  margin: auto;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.qimah-moodle-footer__bottom p {
  margin: 0;
  color: #f0f0f0;
  font-size: .78rem;
}

.qimah-moodle-footer__bottom a {
  color: var(--qimah-shell-orange);
  font-size: .78rem;
  font-weight: 700;
}

.has-qimah-moodle-shell .topbar {
  top: var(--qimah-shell-header-height);
}

.login-page.has-qimah-moodle-shell .login-shell {
  min-height: calc(100vh - var(--qimah-shell-header-height));
}

@media (min-width: 981px) {
  .has-qimah-moodle-shell .sidebar {
    top: var(--qimah-shell-header-height);
    height: calc(100vh - var(--qimah-shell-header-height));
  }
}

@media (max-width: 1420px) {
  .qimah-header__account:has(.qimah-account-action) {
    min-width: 270px;
  }

  .qimah-account-action {
    min-width: 62px;
  }
}

@media (max-width: 1180px) {
  :root {
    --qimah-shell-header-height: 84px;
  }

  .qimah-header__language-menu {
    display: none;
  }

  .qimah-header__account:has(.qimah-account-action) {
    min-width: 210px;
  }
}

@media (max-width: 900px) {
  body.has-qimah-moodle-shell {
    padding-inline-end: 0;
  }

  .qimah-moodle-rail,
  .qimah-moodle-panel,
  .qimah-moodle-rail__overlay {
    display: none;
  }

  .qimah-moodle-footer__main {
    width: calc(100% - 36px);
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .qimah-moodle-footer__bottom {
    width: calc(100% - 36px);
  }
}

@media (max-width: 820px) {
  :root {
    --qimah-shell-header-height: 70px;
  }

  .qimah-header__account:has(.qimah-account-action) {
    min-width: 48px;
  }

  .qimah-moodle-footer__main {
    padding-block: 34px 26px;
  }

  .qimah-moodle-footer h2 {
    font-size: 1.08rem;
  }

  .qimah-moodle-footer__about p {
    font-size: .75rem;
  }
}

@media (max-width: 560px) {
  .qimah-moodle-footer__bottom {
    padding-block: 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .qimah-moodle-footer__bottom p,
  .qimah-moodle-footer__bottom a {
    font-size: .7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qimah-moodle-panel,
  .qimah-moodle-rail__overlay,
  .qimah-moodle-rail__toggle {
    transition: none;
  }
}


/* Pixel-matched shell from the active Qimah Moodle theme. */
#main-header.qimah-header {
  position: sticky !important;
  z-index: 1000;
  top: 0;
  width: 100%;
  border-block-end: 1px solid rgba(7, 61, 124, .08);
  color: #073d7c;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 24px rgba(17, 63, 104, .1);
  backdrop-filter: blur(18px);
}

#main-header .qimah-header__inner {
  position: relative;
  width: min(1640px, calc(100% - 48px));
  min-height: 84px;
  gap: 12px;
}

#main-header .qimah-header__brand {
  width: 78px;
  min-width: 78px;
  min-height: 84px;
  margin-inline-start: 0;
  margin-inline-end: 4px;
  border-inline-start: 0;
  border-inline-end: 1px solid #eef2f5;
}

#main-header .qimah-header__brand img {
  width: 56px;
  height: 56px;
}

#main-header .qimah-header__language {
  position: relative;
  display: block;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #073d7c;
  background: transparent;
}

#main-header .qimah-header__language > summary {
  display: flex;
  height: 52px;
  padding-inline: 14px;
  align-items: center;
  gap: 9px;
  border: 1px solid #d5e7f6;
  border-radius: 16px;
  background: #f9fcff;
  font-size: .82rem;
}

#main-header .qimah-header__language-menu {
  top: calc(100% + 10px);
  right: auto;
  inset-inline-start: 0;
  padding: 8px;
  border-color: #dceaf4;
  border-radius: 14px;
}

#main-header .qimah-header__search {
  width: min(325px, 22vw);
  height: 52px;
  margin: 0;
  padding-inline: 15px;
  border-radius: 16px;
}

#main-header .qimah-header__nav a {
  padding: 14px 13px;
  border-radius: 14px;
}

#main-header .qimah-header__account {
  min-width: 182px;
  gap: 4px;
  direction: rtl;
}

#main-header .qimah-header__account:has(.qimah-user-menu) {
  min-width: 310px;
}

#main-header .qimah-header__account:has(.qimah-login-button) {
  min-width: 182px;
}

#main-header .qimah-login-button {
  min-width: 184px;
  height: 54px;
  padding-inline: 19px;
  border-radius: 16px;
  font-size: .9rem;
}

#main-header .qimah-account-action {
  min-width: 58px;
  min-height: 58px;
}

#main-header .qimah-header__utilities {
  display: flex;
  align-items: center;
}

.qimah-user-menu {
  position: relative;
  flex: none;
}

.qimah-user-menu > summary {
  display: flex;
  max-width: 175px;
  min-height: 54px;
  padding: 4px 8px;
  align-items: center;
  gap: 7px;
  border: 1px solid #d5e7f6;
  border-radius: 16px;
  color: #164884;
  background: #f9fcff;
  cursor: pointer;
  list-style: none;
}

.qimah-user-menu > summary::-webkit-details-marker {
  display: none;
}

.qimah-user-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #087cae, #073d7c);
  box-shadow: 0 4px 12px rgba(7, 61, 124, .14);
  font-size: .9rem;
  font-weight: 800;
}

.qimah-user-menu summary > span:not(.qimah-user-avatar) {
  overflow: hidden;
  max-width: 82px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 700;
}

.qimah-user-menu summary > i {
  font-style: normal;
}

.qimah-user-menu__panel {
  position: absolute;
  z-index: 1003;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  width: 238px;
  padding: 8px;
  border: 1px solid #dceaf4;
  border-radius: 14px;
  color: #0a2e69;
  background: #fff;
  box-shadow: 0 18px 45px rgba(7, 61, 124, .16);
}

.qimah-user-menu__name {
  padding: 9px 11px 7px;
  overflow: hidden;
  color: #073d7c;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qimah-user-menu__panel a,
.qimah-user-menu__panel button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  color: #0a2e69;
  background: transparent;
  text-align: start;
  font-size: .75rem;
  cursor: pointer;
}

.qimah-user-menu__panel a:hover,
.qimah-user-menu__panel button:hover {
  color: #075b8e;
  background: #e7f3fc;
}

.qimah-user-menu__panel .divider {
  margin-block: 5px;
  border-block-start: 1px solid #e8eff5;
}

.qimah-user-menu__panel form {
  margin: 0;
}

.qimah-moodle-rail {
  border-inline-start: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(circle at 25% 8%, rgba(37, 161, 142, .34), transparent 13rem),
    linear-gradient(165deg, #07558b 0%, #082f61 72%);
}

.qimah-moodle-rail::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  content: "";
  pointer-events: none;
}

.qimah-moodle-rail__toggle {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.qimah-moodle-rail__icons {
  gap: 0;
  padding: 2px 6px 6px;
}

.qimah-moodle-rail__icons a {
  width: 48px;
  min-height: 46px;
  flex-basis: 46px;
  border: 0;
  border-radius: 0;
}

.qimah-moodle-rail__icons svg,
.qimah-moodle-rail__footer svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qimah-moodle-rail__icons a.is-active {
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, .13);
}

.qimah-moodle-rail__footer {
  display: flex;
  width: 100%;
  padding: 7px 6px 5px;
  align-items: center;
  flex-direction: column;
  border-block-start: 1px solid rgba(255, 255, 255, .13);
  background: rgba(4, 34, 73, .24);
}

.qimah-moodle-rail__footer a,
.qimah-moodle-rail__footer button {
  position: relative;
  display: grid;
  width: 48px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, .9);
  background: transparent;
  cursor: pointer;
}

.qimah-moodle-rail__footer a:hover,
.qimah-moodle-rail__footer button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.qimah-moodle-rail__footer span {
  position: absolute;
  right: 58px;
  padding: 6px 10px;
  border-radius: 7px;
  color: #fff;
  background: #10264b;
  font-size: .64rem;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
}

.qimah-moodle-rail__footer a:hover span {
  visibility: visible;
  opacity: 1;
}

.qimah-moodle-footer {
  --qimah-footer-line: rgba(255, 255, 255, .15);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-block-start: clamp(3rem, 7vw, 6rem);
  border-block-start: .25rem solid #25a18e;
  color: #f0f0f0;
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 161, 142, .24), transparent 24rem),
    radial-gradient(circle at 88% 92%, rgba(16, 85, 142, .2), transparent 28rem),
    linear-gradient(145deg, #101d42 0%, #123d72 58%, #101d42 100%);
  box-shadow: 0 -1.25rem 3.5rem rgba(16, 29, 66, .08);
}

.qimah-moodle-footer::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000);
  content: "";
  pointer-events: none;
}

.qimah-moodle-footer > * {
  position: relative;
  z-index: 1;
}

.qimah-moodle-footer__main {
  display: grid;
  width: min(calc(100% - 3rem), 94rem);
  padding-block: clamp(3.25rem, 6vw, 5rem) clamp(2.75rem, 5vw, 4rem);
  margin-inline: auto;
  grid-template-columns: minmax(0, 7fr) minmax(18rem, 5fr);
  align-items: start;
  gap: clamp(2.5rem, 7vw, 7rem);
  border: 0;
}

.qimah-moodle-footer h2 {
  position: relative;
  margin: 0 0 1.45rem;
  padding-block-end: .8rem;
  color: #fca635;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
}

.qimah-moodle-footer h2::after {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  width: 2.75rem;
  height: .2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #fca635, #55c8b6);
  content: "";
}

.qimah-moodle-footer__about p {
  max-width: 48rem;
  margin: 0 0 1.45rem;
  color: rgba(240, 240, 240, .88);
  font-size: .98rem;
  line-height: 1.9;
}

.qimah-moodle-footer__info {
  display: flex;
  width: 100%;
  max-width: 28rem;
  align-items: stretch;
  justify-self: start;
  flex-direction: column;
}

.qimah-moodle-footer__info > .qimah-footer-contact {
  display: flex;
  width: 100%;
  min-height: 3.15rem;
  padding: .45rem .65rem;
  margin-block-end: .7rem;
  align-items: center;
  gap: .75rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: .9rem;
  color: #f0f0f0;
  background: rgba(16, 29, 66, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  font-size: .92rem;
}

.qimah-footer-contact > span {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  place-items: center;
  border: 1px solid rgba(252, 166, 53, .3);
  border-radius: .75rem;
  color: #fca635;
  background: rgba(252, 166, 53, .1);
}

.qimah-footer-contact svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qimah-footer-contact b {
  color: rgba(240, 240, 240, .94);
  font-weight: 600;
}

.qimah-moodle-footer__social {
  display: flex;
  gap: .65rem;
  margin-block-start: .25rem;
}

.qimah-moodle-footer__social a {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: .85rem;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.qimah-moodle-footer__social a:last-child {
  background: rgba(255, 255, 255, .08);
}

.qimah-moodle-footer__social a:hover {
  transform: translateY(-.15rem);
  border-color: rgba(122, 222, 207, .7);
  background: rgba(37, 161, 142, .18);
}

.qimah-moodle-footer__social svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qimah-moodle-footer__bottom {
  display: flex;
  width: 100%;
  min-height: 78px;
  padding: 1.1rem max(1.5rem, calc((100% - 94rem) / 2));
  margin: 0;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-block-start: 1px solid var(--qimah-footer-line);
  background: rgba(16, 29, 66, .34);
}

.qimah-moodle-footer__bottom p {
  margin: 0;
  color: #f0f0f0;
  font-size: .875rem;
}

.qimah-moodle-footer__bottom a {
  display: inline-flex;
  min-height: 2.5rem;
  padding: .45rem .8rem;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: .7rem;
  color: rgba(240, 240, 240, .9);
  background: rgba(255, 255, 255, .05);
  font-size: .82rem;
}

.qimah-moodle-footer__bottom a span {
  font-size: 1.4rem;
  line-height: 1;
}

.qimah-moodle-footer__bottom a:hover {
  border-color: rgba(122, 222, 207, .65);
  color: #fff;
  background: rgba(37, 161, 142, .16);
}

@media (max-width: 1420px) {
  #main-header .qimah-header__search {
    width: 220px;
  }

  #main-header .qimah-header__nav a {
    padding-inline: 10px;
  }

  #main-header .qimah-header__account:has(.qimah-user-menu) {
    min-width: 280px;
  }
}

@media (max-width: 1180px) {
  #main-header .qimah-header__inner {
    width: min(calc(100% - 30px), 1380px);
  }

  #main-header .qimah-header__account:has(.qimah-user-menu) {
    min-width: 220px;
  }

  #main-header .qimah-header__language,
  #main-header .qimah-header__search {
    display: none;
  }
}

@media (max-width: 900px) {
  .qimah-moodle-footer__main {
    width: calc(100% - 2rem);
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .qimah-moodle-footer__info {
    max-width: none;
  }

  .qimah-moodle-footer__bottom {
    padding-inline: 1rem;
  }
}

@media (max-width: 740px) {
  #main-header .qimah-header__inner {
    width: calc(100% - 20px);
    min-height: 70px;
    gap: 8px;
  }

  #main-header .qimah-header__brand {
    width: 62px;
    min-width: 62px;
    min-height: 70px;
    margin: 0;
    border: 0;
  }

  #main-header .qimah-header__account:has(.qimah-user-menu) {
    min-width: 50px;
  }

  #main-header .qimah-header__utilities,
  #main-header .qimah-account-dashboard {
    display: none;
  }

  .qimah-user-menu > summary {
    width: 50px;
    min-height: 52px;
    padding: 4px;
    justify-content: center;
  }

  .qimah-user-menu summary > span:not(.qimah-user-avatar),
  .qimah-user-menu summary > i {
    display: none;
  }

  .qimah-user-menu__panel {
    left: 0;
    width: min(238px, calc(100vw - 24px));
  }

  .qimah-moodle-footer {
    margin-block-start: 3rem;
  }

  .qimah-moodle-footer__main {
    padding-block: 2.75rem 2.25rem;
  }

  .qimah-moodle-footer__about p {
    font-size: .87rem;
  }

  .qimah-moodle-footer__bottom {
    min-height: 0;
    padding-block: 1.15rem;
    align-items: flex-start;
    flex-direction: column;
    gap: .8rem;
  }
}


/* Layout correction: the rail is physically on the right.
   In RTL, inline-end points left and created the reported empty strip. */
html {
  max-width: 100%;
  overflow-x: clip;
}

body.has-qimah-moodle-shell {
  width: 100%;
  max-width: 100%;
  padding-right: var(--qimah-shell-rail-width);
  padding-left: 0;
  overflow-x: clip;
}

@media (max-width: 900px) {
  body.has-qimah-moodle-shell {
    padding-right: 0;
    padding-left: 0;
  }
}


/* Compact shared header density on tablet and desktop. */
@media (min-width:46.3125rem){
#main-header .qimah-header__inner{min-height:72px;gap:10px}
#main-header .qimah-header__brand{min-height:72px}
#main-header .qimah-header__language>summary,#main-header .qimah-header__search{height:46px;border-radius:14px}
#main-header .qimah-header__language>summary{padding-inline:12px;gap:7px}
#main-header .qimah-header__language svg,#main-header .qimah-header__search svg{width:22px;height:22px}
#main-header .qimah-header__search{padding-inline:13px;gap:9px}
#main-header .qimah-header__nav a{padding:10px 11px;border-radius:12px}
#main-header .qimah-header__account{min-width:174px;gap:6px}
#main-header .qimah-login-button{min-width:174px;height:48px;padding-inline:17px;gap:10px;border-radius:14px;font-size:.86rem}
#main-header .qimah-login-button svg{width:22px;height:22px}
#main-header .qimah-user-menu>summary{min-height:48px;border-radius:14px}
#main-header .qimah-user-menu .userpicture{width:38px;height:38px}
}
@media (min-width:46.3125rem) and (max-width:73.75rem){#main-header .qimah-header__nav{top:72px}}
