/* MIDZ live fixes — upload this file + includes/header.php */

@media (min-width: 992px) {
  body.midz-project-page .header-menu-wrap .custom-container {
    max-width: 1920px !important;
    padding-left: 65px !important;
    padding-right: 48px !important;
  }

  body.midz-project-page .header-menu-wrap .custom-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: var(--midz-header-row-h, 65px) !important;
    height: auto !important;
    gap: 16px !important;
  }

  body.midz-project-page .header-menu-wrap .logo {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    flex: 0 0 auto !important;
    margin-right: 16px !important;
    margin-top: -10px !important;
    max-width: none !important;
  }

  body.midz-project-page .header-menu-wrap .logo img {
    max-width: 200px !important;
        margin-bottom: 10px;
    max-height: calc(var(--midz-header-row-h, 65px) - 4px) !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
  }

  body.midz-project-page .header-menu-wrap .navbar {
    display: block !important;
    margin: 0 !important;
  }

  body.midz-project-page .header-menu-wrap .navbar .menu {
    display: flex !important;
    align-items: center !important;
    gap: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.midz-project-page .header-menu-wrap .navbar .menu > li {
    padding: 0 !important;
  }

  body.midz-project-page .header-menu-wrap .header-right-info {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    justify-content: flex-end !important;
    gap: 0 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    position: static !important;
    transform: none !important;
  }

  body.midz-project-page .header-menu-wrap .midz-header-slot-download img,
  body.midz-project-page .header-menu-wrap .header-right-info a[aria-label="View company portfolio"] img {
    width: 24px !important;
    height: 24px !important;
    vertical-align: middle !important;
  }

  body.midz-project-page .midz-project-hero-content.custom-container {
    padding-left: clamp(24px, 4vw, 72px) !important;
    padding-right: clamp(24px, 4vw, 72px) !important;
    padding-bottom: clamp(36px, 4vw, 56px) !important;
  }
}

@media (max-width: 991px) {
  body.midz-project-page .midz-project-hero-title {
    font-size: clamp(28px, 8vw, 42px) !important;
    margin-bottom: 8px !important;
  }

  body.midz-project-page .midz-project-hero-subtitle {
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }

  body.midz-project-page .midz-project-breadcrumb {
    margin-bottom: 10px !important;
  }

  body.midz-project-page .midz-project-meta {
    gap: 8px 12px !important;
  }

  body.midz-project-page .midz-project-meta strong {
    font-size: 12px !important;
  }

  body.midz-project-page .midz-project-hero-content.custom-container {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }

  body.midz-project-page .header-menu-wrap .header-right-info a[aria-label="View company portfolio"] {
    display: none !important;
  }

  body.midz-project-page .midz-project-hero-title {
    font-size: clamp(32px, 9vw, 48px) !important;
    line-height: 1.05 !important;
    margin-bottom: 12px !important;
  }

  body.midz-project-page .midz-project-hero-subtitle {
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin-bottom: 16px !important;
  }

  body.midz-project-page .midz-project-breadcrumb {
    margin-bottom: 12px !important;
    font-size: 11px !important;
  }

  body.midz-project-page .midz-project-meta {
    gap: 10px 16px !important;
  }

  body.midz-project-page .midz-project-meta li {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: calc(50% - 8px) !important;
  }

  body.midz-project-page .midz-project-meta strong {
    font-size: 13px !important;
  }

  body.midz-project-page .midz-project-scroll-hint {
    margin-top: 12px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 575px) {
  body.midz-project-page .midz-project-hero-content.custom-container {
    padding-bottom: max(18px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-height: 740px) and (max-width: 991px) {
  body.midz-project-page .midz-project-scroll-hint {
    display: none !important;
  }

  body.midz-project-page .midz-project-hero-title {
    font-size: clamp(28px, 8vw, 40px) !important;
    margin-bottom: 8px !important;
  }

  body.midz-project-page .midz-project-hero-subtitle {
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }

  body.midz-project-page .midz-project-meta {
    gap: 8px 12px !important;
  }
}

/* Stronger bottom fade — hides text baked into hero photos */
body.midz-project-page .midz-project-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.22) 34%,
    rgba(0, 0, 0, 0.68) 62%,
    rgba(0, 0, 0, 0.94) 100%
  ) !important;
}

body.midz-project-page .midz-project-hero-content.custom-container::before {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: -6px;
  bottom: -8px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.42) 28%,
    rgba(0, 0, 0, 0.88) 100%
  );
}

body.midz-project-page .midz-project-hero,
body.midz-project-page .midz-project-detail,
body.midz-project-page .aixor-main {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.midz-project-page .midz-project-hero {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.midz-project-page .midz-project-hero-content.custom-container {
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  padding-left: clamp(18px, 4vw, 72px) !important;
  padding-right: clamp(18px, 4vw, 72px) !important;
}

@media (min-width: 992px) {
  body.midz-project-page .midz-project-hero {
    padding-left: clamp(24px, 4vw, 72px) !important;
    padding-right: clamp(24px, 4vw, 72px) !important;
  }

  body.midz-project-page .midz-project-hero-content.custom-container::before {
    left: 0;
    right: 0;
  }
}

/* ===== GLOBAL HEADER — all pages: logo + menu same line/height ===== */
@media (max-width: 991px) {
  body {
    --midz-header-pad-top: max(10px, env(safe-area-inset-top, 0px));
    --midz-header-pad-left: max(18px, env(safe-area-inset-left, 0px));
    --midz-header-pad-right: max(18px, env(safe-area-inset-right, 0px));
    --midz-header-item: 56px;
    --midz-menu-nudge-y: 9px;
  }

  .header-menu-wrap {
    padding-top: var(--midz-header-pad-top) !important;
    padding-bottom: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  .header-menu-wrap .custom-container {
    padding-left: var(--midz-header-pad-left) !important;
    padding-right: calc(var(--midz-header-pad-right) + var(--midz-header-item) + 10px) !important;
    max-width: 100% !important;
  }

  .header-menu-wrap .custom-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: var(--midz-header-item) !important;
    min-height: var(--midz-header-item) !important;
    max-height: var(--midz-header-item) !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .header-menu-wrap .logo {
    display: flex !important;
    align-items: center !important;
    height: var(--midz-header-item) !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 1 auto !important;
    max-width: calc(100% - var(--midz-header-item) - 10px) !important;
  }

  .header-menu-wrap .logo img {
    display: block !important;
    height: var(--midz-header-item) !important;
    max-height: var(--midz-header-item) !important;
    width: auto !important;
    max-width: min(260px, 74vw) !important;
    object-fit: contain !important;
    object-position: left 46% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .scroll-to-show-menu {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .scroll-to-show-menu .hamburg-menu {
    display: none !important;
  }

  /* scroll-to-show-menu disabled — use .midz-header-slot-menu in header */
  }

  body.home-page .hero-sec .hero-bottom h2 {
    font-size: clamp(42px, 11vw, 56px) !important;
    line-height: 1.02 !important;
  }

  body.home-page .hero-sec .hero-bottom .theme-btn {
    font-size: 16px !important;
    padding: 14px 28px !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  body {
    --midz-header-item: 56px;
    --midz-header-pad-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .header-menu-wrap .logo img {
    max-width: min(260px, 74vw) !important;
  }
}

@media (max-width: 767px) {
  body {
    --midz-header-item: 56px;
    --midz-header-pad-top: max(10px, env(safe-area-inset-top, 0px));
    --midz-header-pad-left: max(18px, env(safe-area-inset-left, 0px));
    --midz-header-pad-right: max(18px, env(safe-area-inset-right, 0px));
  }

  .header-menu-wrap .logo img {
    max-width: min(260px, 74vw) !important;
  }
}

/* ===== PROJECT MOBILE — hero image behind transparent header ===== */
@media (max-width: 991px) {
  body.single-project.midz-project-page .midz-project-detail,
  body.single-project.midz-project-page .midz-project-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.single-project.midz-project-page .midz-project-hero-media {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  body.single-project.midz-project-page .midz-project-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.28) 0%,
      rgba(0, 0, 0, 0.08) 14%,
      rgba(0, 0, 0, 0.2) 38%,
      rgba(0, 0, 0, 0.62) 72%,
      #000 100%
    ) !important;
  }

  body.single-project.midz-project-page .header-menu-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1050 !important;
    pointer-events: none;
  }

  body.single-project.midz-project-page .header-menu-wrap .custom-container,
  body.single-project.midz-project-page .header-menu-wrap .custom-row,
  body.single-project.midz-project-page .header-menu-wrap .logo,
  body.single-project.midz-project-page .scroll-to-show-menu {
    pointer-events: auto;
  }
}

/* ===== HOME MOBILE — fixed header: logo + menu same line while scrolling ===== */
@media (max-width: 991px) {
  body.home-page .header-menu-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1050 !important;
    pointer-events: none;
  }

  body.home-page .header-menu-wrap .custom-container,
  body.home-page .header-menu-wrap .custom-row,
  body.home-page .header-menu-wrap .logo,
  body.home-page .header-menu-wrap .header-right-info {
    pointer-events: auto;
  }
}

/* ===== HOME MOBILE — hero scroll only (keep sticky projects stack) ===== */
@media (max-width: 991px) {
  body.home-page .hero-sec .hero-inner .hero-video,
  body.home-page .hero-sec .hero-inner .hero-video video {
    pointer-events: none !important;
  }

  body.home-page #magic-cursor,
  body.home-page #magic-cursor #ball {
    pointer-events: none !important;
  }

  body.midz-project-page .feature-sec .feature-project {
    position: sticky !important;
    top: 8px !important;
    height: 98vh !important;
    min-height: 520px !important;
    margin-bottom: 0 !important;
  }

  body.home-page .feature-sec .feature-project-card-link {
    touch-action: pan-y !important;
  }
}

body.midz-project-page #magic-cursor {
  mix-blend-mode: normal !important;
}

body.midz-project-page .scroll-to-show-menu .hamburg-menu {
  right: 5px !important;
}

/* Nav slot swap: midz-header-nav.css + inline #midz-nav-critical in header.php */

@media (max-width: 991px) {
  .header-menu-wrap .header-right-info {
    position: fixed !important;
    top: calc(var(--midz-header-pad-top) + var(--midz-menu-nudge-y)) !important;
    right: var(--midz-header-pad-right) !important;
    width: auto !important;
    height: var(--midz-header-item) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1061 !important;
    pointer-events: none !important;
  }

  .header-menu-wrap .header-right-info > * {
    pointer-events: auto !important;
  }

  .header-menu-wrap .header-right-info a[aria-label="View company portfolio"],
  .header-menu-wrap .header-right-info .midz-header-slot-download {
    width: auto !important;
    height: var(--midz-header-item) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 2px !important;
  }

  .header-menu-wrap .header-right-info a[aria-label="View company portfolio"] img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
  }
}

/* ===== MOBILE — hamburger lines crisp on all devices ===== */
@media (max-width: 991px) {
  .scroll-to-show-menu .hamburg-menu {
    -webkit-tap-highlight-color: transparent;
  }

  .scroll-to-show-menu .hamburg-menu span {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
  }
}

/* ===== FOOTER — Email label + social mobile align with nav/contact ===== */
.footer-contact-infos .footer-email-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
}

.footer-contact-infos .footer-email-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1;
}

@media (min-width: 992px) {
  .footer-area .footer-social-col .footer-widget-top,
  .footer-area .footer-social-col ul {
    align-items: flex-end !important;
    text-align: right !important;
  }

  .footer-area .footer-social-col ul li a,
  .footer-area .footer-social-col .footer-social-link-btn {
    justify-content: flex-end !important;
    text-align: right !important;
  }
}

@media (max-width: 991px) {
  .footer-area .footer-social-col {
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
    text-align: left !important;
    margin-top: 4px !important;
    padding: 0 !important;
  }

  .footer-area .footer-social-col .footer-widget-top {
    display: none !important;
  }

  .footer-area .footer-social-col ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: clamp(4px, 1.8vw, 12px) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    overflow: hidden !important;
    text-align: left !important;
  }

  .footer-area .footer-social-col ul li {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .footer-area .footer-social-col ul li a,
  .footer-area .footer-social-col ul li .footer-social-link-btn,
  .footer-area .footer-social-col .footer-social-link-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    font-size: clamp(10px, 2.55vw, 12px) !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-transform: capitalize !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .footer-area .footer-social-col ul li:last-child a,
  .footer-area .footer-social-col ul li:last-child .footer-social-link-btn {
    justify-content: flex-end !important;
    text-align: right !important;
  }
}

@media (max-width: 360px) {
  .footer-area .footer-social-col ul {
    gap: clamp(3px, 1.2vw, 8px) !important;
  }

  .footer-area .footer-social-col ul li a,
  .footer-area .footer-social-col ul li .footer-social-link-btn,
  .footer-area .footer-social-col .footer-social-link-btn {
    font-size: clamp(9px, 2.35vw, 11px) !important;
    letter-spacing: 0 !important;
  }
}

/* ===== PARTNER MARQUEE — smooth infinite scroll all devices ===== */
@keyframes midzPartnerMarquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.our-partner-sec {
  overflow: hidden !important;
  contain: none !important;
  padding: clamp(28px, 4.5vw, 40px) 0 !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.our-partner-sec ul {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content !important;
  max-width: none !important;
  gap: clamp(64px, 12vw, 190px) !important;
  animation: midzPartnerMarquee 38s linear infinite !important;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.our-partner-sec ul li {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
}

.our-partner-sec ul li img {
  display: block !important;
  height: 36px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.our-partner-sec:hover ul {
  animation-play-state: paused !important;
}

@media (max-width: 767px) {
  .our-partner-sec ul {
    gap: clamp(48px, 10vw, 80px) !important;
    animation-duration: 32s !important;
  }

  .our-partner-sec ul li {
    min-height: 38px !important;
  }

  .our-partner-sec ul li img {
    height: 32px !important;
    max-width: 140px !important;
  }
}

/* ===== FLOATING SOCIAL — WhatsApp icon visible ===== */
.floating-social {
  overflow: visible !important;
}

.floating-social ul li:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.floating-social ul button.midz-regional-trigger--float {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
}

.floating-social ul button.midz-regional-trigger--float i,
.floating-social ul button.midz-regional-trigger--float i::before {
  display: inline-block !important;
  font-size: 14px !important;
  line-height: 1 !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (prefers-reduced-motion: reduce) {
  .our-partner-sec ul {
    animation: none !important;
    transform: none !important;
  }
}

/* ===== FINAL — mobile header alignment + download icon no circle ===== */
@media (max-width: 991px) {
  .scroll-to-show-menu .hamburg-menu {
    top: calc(var(--midz-header-pad-top) + var(--midz-menu-nudge-y)) !important;
    right: var(--midz-header-pad-right) !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
  }

  body.home-page .scroll-to-show-menu:not(.is-visible) .hamburg-menu {
    transform: scale(0) !important;
  }

  body.home-page .scroll-to-show-menu.is-visible .hamburg-menu,
  body.home-page.menu-open .scroll-to-show-menu .hamburg-menu {
    transform: scale(1) !important;
  }

  /* قائمة = تنزيل: نفس top / right / height بالظبط */
  body.home-page .header-menu-wrap .header-right-info,
  .scroll-to-show-menu .hamburg-menu {
    top: calc(var(--midz-header-pad-top) + var(--midz-menu-nudge-y)) !important;
    right: var(--midz-header-pad-right) !important;
    height: var(--midz-header-item) !important;
  }

  .header-menu-wrap .header-right-info a[aria-label="View company portfolio"] {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .header-menu-wrap .header-right-info a[aria-label="View company portfolio"]:hover,
  .header-menu-wrap .header-right-info a[aria-label="View company portfolio"]:focus-visible {
    background: transparent !important;
    border: none !important;
  }

  .header-menu-wrap .custom-row {
    align-items: center !important;
  }

  .header-menu-wrap .logo {
    align-items: center !important;
    align-self: center !important;
  }

  body.home-page .header-right-info .midz-header-slot-menu.hamburg-menu {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
  }
}

/* Navbar + sidebar styling: see assets/css/midz-header-nav.css (loads last) */

/* ===== About — Our Values icons float (all breakpoints) ===== */
body.about-page.services-page .service-sec-2 .service-box .service-inner .service-img-box img {
  animation: upDownAnim 3s infinite linear !important;
}

body.about-page.services-page .service-sec-2 .service-box.active .service-inner .service-img-box img,
body.about-page.services-page .service-sec-2 .service-box:hover .service-inner .service-img-box img {
  animation: upDownAnim 2s infinite linear !important;
}

/* ===== Services hero h1 — Arapey like About Us ===== */
body.services-page:not(.about-page) .midz-services-copy h1 {
  font-family: var(--font_arapey), "Arapey", Georgia, serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.04em !important;
}

/* ===== Services archive — card icons float (all devices) ===== */
body.services-page:not(.about-page) .midz-service-card-media img {
  animation: upDownAnim 3s infinite linear !important;
}

body.services-page:not(.about-page) .midz-service-card:hover .midz-service-card-media img,
body.services-page:not(.about-page) .midz-service-card:focus-within .midz-service-card-media img {
  animation: upDownAnim 2s infinite linear !important;
}

@media (prefers-reduced-motion: reduce) {
  body.services-page:not(.about-page) .midz-service-card-media img {
    animation: none !important;
  }
}

/* Nav slot swap: see assets/css/midz-header-nav.css (loads after this file). */

/* موبايل + تابلت — القوائم في نص الشاشة مقابل الأيقونة */
@media (max-width: 991px) {
  .header-sidebar-wrap .header-sidebar-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    gap: 0 !important;
    width: 100% !important;
  }

  .header-sidebar-wrap .header-sidebar-content .header-sidebar-top {
    flex: 0 0 auto !important;
  }

  .header-sidebar-wrap .header-sidebar-content .sidebar-menu {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .header-sidebar-wrap .header-sidebar-content .sidebar-menu ul {
    width: 100% !important;
  }

  .header-sidebar-wrap .header-sidebar-content .header-sidebar-bottom {
    flex: 0 0 auto !important;
    margin-top: auto !important;
  }

  .header-sidebar-wrap .header-sidebar-content .sidebar-shape {
    top: 42% !important;
    bottom: auto !important;
    height: min(300px, 34vh) !important;
    width: min(360px, 72vw) !important;
    right: -72px !important;
  }
}

/* ===== ARABIC TEXT — prevent SplitType ligature breakage ===== */
.midz-project-hero-title,
.midz-project-hero-subtitle,
.midz-project-research-card h2,
.midz-project-research-card p,
.midz-project-about-text,
.midz-project-text-block p,
.midz-project-gallery-stack-title {
  word-spacing: normal;
  letter-spacing: normal;
}

.midz-project-hero-title {
  line-height: 1.05;
}

body.midz-project-page .midz-project-hero-title {
  line-height: 1.05;
}

/* Arabic text — JS adds .has-arabic, wraps words in .midz-ar-word spans */
body.midz-project-page .midz-project-hero-title {
  font-family: var(--font_arapey), "Arapey", Georgia, serif !important;
  letter-spacing: -0.02em;
}

body.midz-project-page .midz-project-hero-title.has-arabic {
  font-family: "Arapey", "Amiri", Georgia, serif !important;
  font-size: 30px !important;
  line-height: 1.15;
  letter-spacing: normal;
  word-spacing: normal;
  unicode-bidi: isolate;
}

body.midz-project-page .midz-project-hero-subtitle {
  font-family: var(--font_urbanist), "Urbanist", system-ui, sans-serif !important;
  font-size: clamp(13px, 1.35vw, 16px) !important;
  line-height: 1.45 !important;
}

body.midz-project-page .midz-project-hero-subtitle.has-arabic {
  font-family: "Urbanist", "Amiri", Georgia, sans-serif !important;
}

body.midz-project-page .midz-project-hero-title.is-mixed-script-title {
  display: block;
  direction: ltr;
  unicode-bidi: plaintext;
  white-space: normal;
  font-size: 30px !important;
  line-height: 1.15;
  letter-spacing: normal;
  word-spacing: normal;
}

body.midz-project-page .midz-project-hero-title.is-mixed-script-title,
body.midz-project-page .midz-project-hero-title.is-mixed-script-title * {
  font-family: "Arapey", "Amiri", Georgia, serif !important;
}

/* Project hero full-bleed repair on laptop + alpha-media fill */
body.midz-project-page .midz-project-hero,
body.midz-project-page .midz-project-hero-media {
  background: rgb(var(--midz-project-accent-rgb)) !important;
}

body.midz-project-page .midz-project-hero-media picture,
body.midz-project-page .midz-project-hero-media img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

body.midz-project-page .midz-project-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.2) 36%,
    rgba(0, 0, 0, 0.64) 72%,
    #000 100%
  ) !important;
}

@media (min-width: 992px) {
  body.midz-project-page .midz-project-hero {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.midz-project-page .midz-project-hero-media,
  body.midz-project-page .midz-project-hero-overlay {
    inset: 0 !important;
  }

  body.midz-project-page .midz-project-hero-content.custom-container {
    padding-left: clamp(24px, 4vw, 72px) !important;
    padding-right: clamp(24px, 4vw, 72px) !important;
  }
}
