/* Shared mobile header corrections: keep branding and navigation legible on every page. */
@media (max-width: 991px) {
  .header-area .xb-header-logo {
    flex: 0 0 auto;
    width: clamp(100px, 27vw, 124px) !important;
    max-width: 124px;
    padding: 0;
  }

  .header-area .xb-header-logo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .header-area .header-bar-mobile {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1012;
  }

  .header-area .header-bar-mobile .xb-nav-mobile {
    display: grid;
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid #bd9850 !important;
    border-radius: 50%;
    background: #282824 !important;
    color: #fff !important;
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .header-area .header-bar-mobile .xb-nav-mobile:hover {
    border-color: #bd9850 !important;
    background: #3a3933 !important;
    color: #fff !important;
  }

  .header-area .header-bar-mobile .xb-nav-mobile:focus-visible,
  .header-area .xb-menu-close:focus-visible {
    outline: 3px solid #bd9850;
    outline-offset: 3px;
  }

  .header-area.mobile-nav-open .header-bar-mobile {
    visibility: hidden;
    pointer-events: none;
  }

  .header-area .xb-header-menu {
    width: min(360px, 86vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .header-area .xb-header-menu-scroll {
    padding: 18px 22px 32px;
  }

  .header-area .xb-mobile-menu-header {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
  }

  .header-area .xb-logo-mobile {
    width: clamp(92px, 28vw, 108px);
    margin: 0;
    flex: 0 1 auto;
  }

  .header-area .xb-logo-mobile a,
  .header-area .xb-logo-mobile img {
    display: block;
    width: 100%;
    height: auto;
  }

  .header-area .xb-menu-close {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    padding: 0;
    border: 1px solid #e8e3d9;
    border-radius: 50%;
    background: transparent;
    color: #39372f;
    cursor: pointer;
  }

  .header-area .xb-menu-close::before,
  .header-area .xb-menu-close::after {
    width: 17px;
    height: 1.5px;
    left: 50%;
    margin-left: -8.5px;
    background: currentColor;
  }

  .header-area .xb-header-menu-scroll .xb-menu-primary > li > a {
    min-height: 44px;
  }
}

@media (max-width: 767px) {
  /* The homepage's active project list needs space for seven entries, not an 830px blank panel. */
  .xb-service-right {
    height: 500px;
  }

  /* Keep the About page's statistic icon and value together on narrow screens. */
  .xb-funfact-item .xb-item--holder {
    margin-top: 36px;
  }

  /* Bring the first homepage section closer to the hero's natural end. */
  .about.pt-135.pb-150 {
    padding-top: clamp(48px, 13vw, 64px) !important;
  }

  .process{
    padding-top: 0;
  }

  .hmProList{
    padding-bottom: 15px !important;
  }
}

@media (max-width: 991px) {
  .hero-area-two {
    min-height: clamp(470px, 60svh, 530px);
  }

  .hero-area-two::before {
    background: linear-gradient(
      180deg,
      rgba(246, 243, 234, 0.10) 0%,
      rgba(246, 243, 234, 0.10) 68%,
      #fdfaf3 100%
    );
  }

  .ar-hero-bottom .xb-item--text img {
    width: clamp(22px, 6.2vw, 26px);
  }

  .ar-hero-bottom .xb-item--text span {
    font-size: clamp(15px, 4vw, 16.5px);
    line-height: 1.35;
  }

  .ar-hero-bottom .xb-item--title {
    font-size: clamp(38px, 12.2vw, 50px);
  }
}

@media (max-width: 991px) and (orientation: landscape) {
  .hero-area-two {
    min-height: clamp(390px, 112svh, 450px);
  }

  .ar-hero-bottom .xb-item--title {
    font-size: clamp(38px, 9vw, 48px);
  }
}

@media (max-width: 650px) {
  /* The listings already end with their own breathing room; reduce the added footer lead-in on this page. */
  main.ht-listing .ht-listing__body {
    padding-bottom: 48px;
  }

  main.ht-listing .ht-listing__grid {
    gap: 12px;
  }

  main.ht-listing .ht-project-card__content {
    min-height: 168px;
  }

  .ht-listing ~ .footer-area {
    padding-top: 96px;
  }
}

@media (min-width: 500px) and (max-width: 650px) and (orientation: landscape) {
  main.ht-listing .ht-listing__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  /* Gallery filter chips are controls, so keep labels legible and targets easy to tap. */
  .gallery-filters button {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xb-header-menu,
  .xb-header-menu-backdrop,
  .xb-nav-mobile {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
