/* Client checklist fixes: shared ad system, hero readability, adaptive ad layouts, state banner, service area. */

/* 1. Shared clickable ad wrapper */
.mlg-page .mlg-ad-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.mlg-page .mlg-ad-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: inherit;
  pointer-events: none;
}
.mlg-page .mlg-ad-card .mlg-ad-link img {
  border-radius: inherit;
}
.mlg-page .mlg-ad-link:focus-visible {
  outline: 3px solid #d4ac62;
  outline-offset: 2px;
}
.mlg-page .mlgs-sponsor__track > .mlgs-sponsor__link {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  height: auto;
}
.mlg-page .mlgs-sponsor__track > .mlgs-sponsor__link img {
  height: auto;
}

/* 2. State banner ad: fill the horizontal container without distortion */
.mlg-state-page .mlgs-sponsor {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.mlg-state-page .mlgs-sponsor__track {
  width: 100%;
  min-height: 0;
}
.mlg-state-page .mlgs-sponsor img,
.mlg-state-page .mlgs-sponsor__track > .mlgs-sponsor__link img {
  display: block;
  width: 100%;
  min-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: fill;
  margin: 0;
}
.mlg-state-page .mlgs-county-popup .mlgs-sponsor img {
  width: 100%;
  height: auto;
}

/* 3. Hero / story text readability (site-wide rule for text placed on photographs) */
.mlg-page .mlgs-hero__content h1,
.mlg-page .mlgs-hero__content strong,
.mlg-page .mlgs-hero__content div,
.mlg-page .mlgs-hero__content span,
.mlg-page .mlgc-hero__content h1,
.mlg-page .mlgc-hero__content strong,
.mlg-page .mlgc-hero__content div,
.mlg-page .mlgc-hero__content::before,
.mlg-page .mlgs-dispatch__lead > div,
.mlg-page .mlgc-lead__card,
.mlg-page .mlgs-gallery__hero,
.mlg-page .mlgc-gallery__hero,
.mlg-page .mlgs-dispatch__title,
.mlg-page .mlgs-help .mlg-wrap,
.mlg-page .mlgs-journey .mlg-wrap,
.mlg-page .mlgc-help .mlg-wrap,
.mlg-page .mlgc-directory__header > div {
  text-shadow: 0 2px 6px rgba(0, 0, 0, .75), 0 4px 22px rgba(0, 0, 0, .55);
}
.mlg-page .mlgs-hero__content h1,
.mlg-page .mlgc-hero__content h1,
.mlg-page .mlgs-dispatch__lead h3,
.mlg-page .mlgc-lead__card h2,
.mlg-page .mlgs-gallery__hero h2,
.mlg-page .mlgc-gallery__hero h2 {
  text-shadow: 0 3px 8px rgba(0, 0, 0, .85), 0 8px 30px rgba(0, 0, 0, .6);
}
.mlg-page .mlgs-hero__shade,
.mlg-page .mlgc-hero__shade {
  background:
    linear-gradient(90deg, rgba(4, 22, 17, .9) 0%, rgba(4, 22, 17, .72) 34%, rgba(4, 22, 17, .34) 60%, rgba(4, 22, 17, .08) 100%),
    linear-gradient(180deg, rgba(4, 22, 17, .35) 0%, rgba(4, 22, 17, 0) 30%, rgba(4, 22, 17, 0) 70%, rgba(4, 22, 17, .45) 100%);
}
.mlg-state-page .mlgs-dispatch__lead::before,
.mlg-page .mlgc-lead::before {
  background:
    linear-gradient(90deg, rgba(4, 24, 18, .9) 0%, rgba(4, 24, 18, .7) 38%, rgba(4, 24, 18, .25) 68%, rgba(4, 24, 18, 0) 100%),
    linear-gradient(0deg, rgba(4, 24, 18, .7) 0%, rgba(4, 24, 18, .1) 45%, rgba(4, 24, 18, 0) 100%);
}
.mlg-state-page .mlgs-dispatch__lead::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
}
.mlg-state-page .mlgs-gallery__hero::before {
  background: linear-gradient(180deg, rgba(8, 27, 22, .55), rgba(8, 27, 22, .2) 45%, rgba(8, 27, 22, .55));
}
.mlg-county-page .mlgc-gallery__hero {
  position: relative;
  isolation: isolate;
}
.mlg-county-page .mlgc-gallery__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 27, 22, .5), rgba(8, 27, 22, .18) 45%, rgba(8, 27, 22, .5));
  pointer-events: none;
}
.mlg-page .mlgs-dispatch__title {
  position: relative;
  isolation: isolate;
}
.mlg-page .mlgs-dispatch__title::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 24, 18, .35), rgba(4, 24, 18, .55));
  pointer-events: none;
}

/* 4. County business ads: balanced static layout for 1-3 ads, carousel for 4+ */
.mlg-county-page .mlgc-business-slider--static {
  display: block;
}
.mlg-county-page .mlgc-business-slider--static .mlg-slider__arrow,
.mlg-county-page .mlgc-business-slider--static .mlg-slider__dots {
  display: none;
}
.mlg-county-page .mlgc-business-slider--static .mlg-slider__viewport {
  padding: 4px 0 40px;
  perspective: none;
  overflow: visible;
}
.mlg-county-page .mlgc-business-slider--static .mlg-slider__track {
  position: static;
  display: flex;
  height: auto;
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  transform: none !important;
}
.mlg-county-page .mlgc-business-slider--static .mlg-ad-card {
  position: static;
  flex: 0 1 32%;
  width: 32%;
  max-width: 340px;
  height: auto;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-box-reflect: unset;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.mlg-county-page .mlgc-business-slider--static .mlg-ad-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.mlg-county-page .mlgc-business-slider--count-1 .mlg-ad-card {
  flex-basis: 36%;
  width: 36%;
  max-width: 380px;
}
.mlg-county-page .mlgc-business-slider--count-2 .mlg-ad-card {
  flex-basis: 34%;
  width: 34%;
}
@media (max-width: 760px) {
  .mlg-county-page .mlgc-business-slider--static .mlg-slider__track {
    gap: 16px;
  }
  .mlg-county-page .mlgc-business-slider--static .mlg-ad-card,
  .mlg-county-page .mlgc-business-slider--count-1 .mlg-ad-card,
  .mlg-county-page .mlgc-business-slider--count-2 .mlg-ad-card {
    flex-basis: 46%;
    width: 46%;
  }
  .mlg-county-page .mlgc-business-slider--count-3 .mlg-slider__track {
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .mlg-county-page .mlgc-business-slider--static .mlg-slider__track {
    flex-wrap: wrap;
  }
  .mlg-county-page .mlgc-business-slider--static .mlg-ad-card,
  .mlg-county-page .mlgc-business-slider--count-1 .mlg-ad-card,
  .mlg-county-page .mlgc-business-slider--count-2 .mlg-ad-card {
    flex-basis: 78%;
    width: 78%;
  }
}

/* 5. Business page ads: keep the section intentional with any number of ads */
.mlg-ad-page .mlg-ad-current .mlg-slider__track {
  justify-content: center;
}
.mlg-ad-page .mlg-ad-coverflow--single .mlg-slider__arrow,
.mlg-ad-page .mlg-ad-coverflow--single .mlg-slider__dots,
.mlg-ad-page .mlg-ad-coverflow--cycling .mlg-slider__dots {
  display: none;
}
.mlg-ad-page .mlg-ad-current .mlg-ad-card .mlg-ad-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* 6. Service area: center a single city, balance small lists */
.mlg-ad-page .mlg-ad-area__box--single .mlg-ad-area__content ul,
.mlg-ad-page .mlg-ad-area__box--single .mlg-ad-area__content ol,
.mlg-ad-page .mlg-ad-area__box--few .mlg-ad-area__content ul,
.mlg-ad-page .mlg-ad-area__box--few .mlg-ad-area__content ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 48px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  grid-template-columns: none;
}
.mlg-ad-page .mlg-ad-area__box--single .mlg-ad-area__content li,
.mlg-ad-page .mlg-ad-area__box--few .mlg-ad-area__content li {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  text-align: center;
}

/* 7. Weather widget embed: dark panel so light widget text stays readable */
.mlg-page .mlgs-weather--embed {
  min-height: 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: #073b2d;
  color: #fff;
}
.mlg-page .mlgs-weather--embed iframe {
  min-height: 0;
}
