/* Homepage hero photography – designed for the actual #about-us and #government-services sections. */
#about-us .mz-home-about-hero,
#government-services .mz-home-government-hero {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background: #fff !important;
  border-radius: 0 !important;
}

#about-us .mz-home-about-hero {
  min-height: 335px !important;
}

#government-services .mz-home-government-hero {
  min-height: 360px !important;
}

/* Position image on the right, rather than magnifying it to fill the entire viewport. */
#about-us .mz-home-hero-photo,
#government-services .mz-home-hero-photo {
  display: block !important;
  position: absolute !important;
  inset: 0 0 0 auto !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#about-us .mz-home-hero-photo {
  width: 68% !important;
}

#government-services .mz-home-hero-photo {
  width: 72% !important;
}

#about-us .mz-home-hero-photo img,
#government-services .mz-home-hero-photo img {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* Landscape photo: reveal the stalls, canopy, people and market surroundings. */
#about-us .mz-home-hero-photo img {
  object-fit: cover !important;
  object-position: center 44% !important;
}

/* Portrait photo: preserve the entire building and flag instead of cropping to a narrow slice. */
#government-services .mz-home-hero-photo img {
  object-fit: contain !important;
  object-position: 72% center !important;
}

/* Fill the extra space around the portrait with a soft, subdued copy of the same photo. */
#government-services .mz-home-hero-photo::before {
  content: "";
  position: absolute;
  inset: -22px;
  background: url("../img/bg-img/mzansibiz-union-buildings.jpg") center 48% / cover no-repeat;
  filter: blur(15px) saturate(.85);
  opacity: .27;
}

/* Gentle fade across the left side, no visible image rectangles or hard corners. */
#about-us .mz-home-about-hero .about-hero-overlay,
#government-services .mz-home-government-hero .government-hero-overlay {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(90deg, #fff 0%, #fff 23%, rgba(255, 255, 255, .98) 31%, rgba(255, 255, 255, .87) 39%, rgba(255, 255, 255, .48) 49%, rgba(255, 255, 255, .06) 64%, transparent 78%) !important;
}

#about-us .mz-home-about-hero .about-hero-content,
#government-services .mz-home-government-hero .hero-copy {
  position: relative !important;
  z-index: 3 !important;
}

/* Keep the government flag decoration visible, without covering the photo. */
#government-services .mz-home-government-hero::after {
  z-index: 2 !important;
  opacity: .70 !important;
  pointer-events: none !important;
}

@media (max-width: 760px) {

  #about-us .mz-home-about-hero,
  #government-services .mz-home-government-hero {
    min-height: 500px !important;
    align-items: flex-start !important;
  }

  #about-us .mz-home-hero-photo,
  #government-services .mz-home-hero-photo {
    width: 100% !important;
    height: 65% !important;
    inset: auto 0 0 !important;
  }

  #about-us .mz-home-hero-photo img {
    object-fit: cover !important;
    object-position: center 40% !important;
  }

  #government-services .mz-home-hero-photo img {
    object-fit: contain !important;
    object-position: center center !important;
  }

  #about-us .mz-home-about-hero .about-hero-overlay,
  #government-services .mz-home-government-hero .government-hero-overlay {
    background: linear-gradient(180deg, #fff 0%, #fff 29%, rgba(255, 255, 255, .98) 40%, rgba(255, 255, 255, .74) 54%, rgba(255, 255, 255, .18) 75%, transparent 100%) !important;
  }

  #about-us .mz-home-about-hero .about-hero-content,
  #government-services .mz-home-government-hero .hero-copy {
    width: 100% !important;
    max-width: 100% !important;
  }

  #government-services .mz-home-government-hero::after {
    opacity: .25 !important;
  }
}

/* Government homepage banner: one continuous, panoramic image; no portrait rectangle. */
#government-services .mz-home-government-hero {
  background: #fff url("../img/bg-img/mzansibiz-government-hero-wide.png")
    center center / cover no-repeat !important;
  min-height: 390px !important;
}

#government-services .mz-home-government-hero .mz-home-hero-photo {
  display: none !important;
}

/* White overlay covering the left half */
#government-services .mz-home-government-hero .government-hero-overlay {
  background: linear-gradient(
    90deg,
    #fff 0%,
    rgba(255,255,255,1) 25%,
    rgba(255,255,255,0.95) 35%,
    rgba(255,255,255,0.65) 45%,
    rgba(255,255,255,0.20) 55%,
    rgba(255,255,255,0) 65%
  ) !important;
}

#government-services .mz-home-government-hero::after {
  right: -100px !important;
  top: -210px !important;
  width: 490px !important;
  height: 305px !important;
  opacity: .78 !important;
}

@media(max-width:760px) {
  #government-services .mz-home-government-hero {
    background-position: 64% center !important;
    min-height: 490px !important;
  }

  #government-services .mz-home-government-hero .government-hero-overlay {
    background: linear-gradient(180deg, #fff 0%,
     rgba(255, 255, 255, .97) 34%,
      rgba(255, 255, 255, .90) 62%, 
      transparent 100%) !important;
  }

  #government-services .mz-home-government-hero::after {
    opacity: .22 !important;
  }
}

#government-services .mz-home-government-hero::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;

  /* Large flag */
  width: 650px !important;
  height: 230px !important;

  background: url("../img/bg-img/government-ribbon.png") right top / contain no-repeat !important;

  border-radius: 0 !important;
  transform: none !important;
  opacity: 0.94 !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* Responsive flag size for mobile */
@media (max-width: 760px) {
  #government-services .mz-home-government-hero::after {
    width: 85% !important;
    height: 160px !important;
    opacity: 0.82 !important;
  }
}