/* MAAL HOME | V29 | 27 October 2026
 * Match the Services detail navigation's structure and rhythm, while keeping
 * the existing navy identity of Project detail sidebars. Desktop and mobile
 * use the same PHP list partial and real project poster thumbnails.
 * Scoped to project.php; no changes to services, project cover images or cards.
 */

/* Shared navigation: horizontal service-style rows, not separate pill cards. */
body .project-detail-page .mh-project-nav-panel .mh-project-navigation,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-navigation {
  width: 100%;
  max-width: 100%;
  direction: rtl;
  text-align: right;
}
body .project-detail-page .mh-project-nav-panel .mh-project-nav-list,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-list {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
body .project-detail-page .mh-project-nav-panel .mh-project-nav-item,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-item {
  display: block !important;
  padding: 5px 0 !important;
  margin: 0 !important;
  list-style: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(211, 234, 255, .18) !important;
  background: transparent !important;
  box-shadow: none !important;
}
body .project-detail-page .mh-project-nav-panel .mh-project-nav-item:last-child,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-item:last-child {
  border-bottom: 0 !important;
}
body .project-detail-page .mh-project-nav-panel .mh-project-nav-link,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-link {
  box-sizing: border-box !important;
  display: flex !important;
  width: 100% !important;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  flex-direction: row;
  gap: 15px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #f5faff !important;
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 800;
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  text-decoration: none !important;
  overflow-wrap: anywhere;
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
body .project-detail-page .mh-project-nav-panel .mh-project-nav-thumb,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-thumb {
  box-sizing: border-box !important;
  display: block !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  flex: 0 0 60px !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 3px !important;
  margin: 0 !important;
  border: 1px solid rgba(215, 235, 252, .78) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}
body .project-detail-page .mh-project-nav-panel .mh-project-nav-name,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-name {
  display: block !important;
  min-width: 0;
  flex: 1 1 0%;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-weight: inherit !important;
  text-align: right;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
body .project-detail-page .mh-project-nav-panel a.mh-project-nav-link:hover,
body .mh-projects-navigation-section .mh-project-nav-panel a.mh-project-nav-link:hover {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(202, 232, 255, .20);
  color: #fff !important;
}
body .project-detail-page .mh-project-nav-panel a.mh-project-nav-link:focus-visible,
body .mh-projects-navigation-section .mh-project-nav-panel a.mh-project-nav-link:focus-visible {
  outline: 3px solid #8dcffc;
  outline-offset: 2px;
  background: rgba(255,255,255,.12);
}
/* The current project mirrors the solid selected row in All Services, but
   uses a deeper navy within the existing navy projects panel. */
body .project-detail-page .mh-project-nav-panel .mh-project-nav-item.is-current .mh-project-nav-link,
body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-item.is-current .mh-project-nav-link {
  color: #fff !important;
  background: #061d46 !important;
  border-color: rgba(157, 210, 250, .25) !important;
  box-shadow: 0 8px 20px rgba(0, 17, 45, .21) !important;
  cursor: default;
}

/* Desktop: V24 already provides the familiar navy sidebar panel; preserve it
   and only adjust the inner list spacing to match the Services navigation. */
@media (min-width: 992px) {
  body .project-detail-page .mh-other-projects-widget.mh-project-nav-panel {
    margin-top: 17px !important;
  }
}

/* Phones/tablets: replace the old two-column project card grid with the
   same list directly after the apartment models. No filters or extra cards. */
@media (max-width: 991.98px) {
  body .mh-projects-navigation-section {
    padding: 26px 0 40px !important;
    background: linear-gradient(180deg, #f5faff, #eaf3fc) !important;
  }
  body .mh-projects-navigation-section > .container {
    width: calc(100% - 24px) !important;
    max-width: 920px !important;
    padding: 0 !important;
    margin-inline: auto !important;
  }
  body .mh-projects-navigation-section .mh-project-nav-panel {
    position: relative;
    isolation: isolate;
    width: 100%;
    padding: clamp(17px, 3vw, 26px);
    border: 1px solid #1b548e;
    border-radius: 21px;
    background:
      radial-gradient(ellipse at 100% 0%, rgba(53,144,219,.28), transparent 49%),
      linear-gradient(157deg, #104c8d 0%, #082f69 46%, #062452 100%);
    box-shadow: 0 15px 42px rgba(2,34,80,.19), inset 0 1px 0 rgba(255,255,255,.12);
    text-align: right;
    direction: rtl;
    overflow: hidden;
  }
  body .mh-projects-navigation-section .mh-project-nav-panel::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 35%;
    height: 3px;
    background: linear-gradient(270deg, #48a5e5, transparent);
    pointer-events: none;
  }
  body .mh-projects-navigation-section .mh-project-nav-panel h2 {
    margin: 0 0 12px !important;
    padding: 6px 6px 18px !important;
    background: transparent !important;
    color: #fff !important;
    font-size: clamp(20px, 2.8vw, 24px) !important;
    font-weight: 850 !important;
    line-height: 1.55 !important;
    text-align: right !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(211,234,255,.22) !important;
    text-shadow: none !important;
  }
}
@media (max-width: 575.98px) {
  body .mh-projects-navigation-section { padding: 22px 0 34px !important; }
  body .mh-projects-navigation-section > .container { width: calc(100% - 20px) !important; }
  body .mh-projects-navigation-section .mh-project-nav-panel {
    border-radius: 18px;
    padding: 16px 15px 17px;
  }
  body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-link {
    min-height: 72px;
    gap: 12px;
    padding: 10px 8px;
    font-size: 15px;
  }
  body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-thumb {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    flex-basis: 58px !important;
  }
}
@media (max-width: 355px) {
  body .mh-projects-navigation-section .mh-project-nav-panel { padding-inline: 12px; }
  body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-link {
    gap: 10px;
    padding-inline: 6px;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .project-detail-page .mh-project-nav-panel .mh-project-nav-link,
  body .mh-projects-navigation-section .mh-project-nav-panel .mh-project-nav-link {
    transition: none !important;
  }
}
