/* 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;
}

/* Content-length resilience for populated state and county pages. */
.mlg-state-page .mlgs-symbols__grid {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(180px, auto));
  align-items: stretch;
}
.mlg-state-page .mlgs-symbols__grid article {
  min-width: 0;
  min-height: min-content;
  height: auto;
  overflow-wrap: anywhere;
}
.mlg-state-page .mlgs-symbols__grid article p { margin: 0; }
.mlg-state-page .mlgs-counties__feature {
  height: auto;
  min-height: 255px;
  display: grid;
  align-items: center;
  isolation: isolate;
}
.mlg-state-page .mlgs-counties__feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  z-index: -2;
}
.mlg-state-page .mlgs-counties__feature::after {
  background: rgba(2, 35, 27, .70);
  z-index: -1;
}
.mlg-state-page .mlgs-counties__feature div {
  position: relative;
  inset: auto;
  padding: 24px;
}
.mlg-state-page .mlgs-counties__feature p {
  font-size: 18px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.mlg-state-page .mlgs-glance__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mlg-county-page .mlgc-glance__grid {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}
.mlg-page .mlgs-glance__grid article,
.mlg-page .mlgc-glance__grid article {
  min-width: 0;
  height: auto;
  overflow-wrap: anywhere;
}
.mlg-page .mlgs-resource-panels,
.mlg-page .mlgc-resource-panels,
.mlg-page .mlg-faq__answer { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .mlg-state-page .mlgs-symbols__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
  }
  .mlg-state-page .mlgs-symbols__grid article { min-height: 180px; }
  .mlg-state-page .mlgs-glance__grid,
  .mlg-county-page .mlgc-glance__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Public image attribution: readable source URLs on narrow screens. */
.mlg-photo-credits { overflow-wrap: anywhere; }
.mlg-photo-credits section { scroll-margin-top: 90px; margin-block: 2.5rem; }
.mlg-photo-credits li { margin-bottom: 1.25rem; }
.mlgs-footer a { color: inherit; text-decoration: underline; }

.mlg-default-template__hero .mlg-header__menu a { color: #fff; }


/* Complete guides without unrelated demo photography. */
.mlgc-hero, .mlgc-help, .mlgc-suggestion-card { background-color: #123e32; }
.mlgc-profile__top:not(:has(img)) { grid-template-columns: 1fr; padding: 36px; }
.mlgc-profile__top:not(:has(img)) > div { padding: 0; }
.mlg-business-nav { display:flex; gap:24px; padding:14px max(20px, calc((100% - 1180px)/2)); background:#123e32; }
.mlg-business-nav a { color:#fff; font-size:14px; text-decoration:underline; }
.mlg-business-directory ul { list-style:none; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.mlg-business-directory li { padding:24px; border:1px solid #d4d0c4; border-radius:12px; background:#fff; overflow-wrap:anywhere; }
.mlg-business-directory li > a { font-size:22px; font-weight:700; }
.mlgc-directory-grid { overflow-wrap:anywhere; }
.mlg-ad-hero__copy { min-width:0; overflow-wrap:anywhere; }
@media(max-width:600px) { .mlg-business-directory ul { grid-template-columns:1fr; } }

.page-id-898 .mlg-ad-hero__media img { object-position: right center; }
@media(max-width:600px) { .mlg-ad-page .mlg-ad-hero__copy { padding: 24px 20px; } }


/* Final audit: narrow phone headings and long county card words. */
.mlg-county-page .mlgc-suggestion-card__copy { overflow-wrap: anywhere; }
.mlg-county-page .mlgc-hero h1 { overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .mlg-state-page .mlgs-america__paper h2 { font-size: 16vw; }
  .mlg-county-page .mlgc-hero h1 { font-size: 40px; }
}
.mlg-county-page .mlgc-suggestion-card__copy {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}
@media (max-width: 600px) {
  .mlg-county-page .mlgc-suggestions__carousel { flex-wrap: wrap; justify-content: center; }
  .mlg-county-page .mlgc-suggestions__viewport { flex: 0 0 100%; width: 100%; }
  .mlg-county-page .mlgc-suggestions__arrow { order: 1; }
  .mlg-county-page .mlgc-suggestion-card { padding: 28px 20px !important; }
}
.mlg-county-page .mlgc-suggestion-card p.mlgc-suggestion-card__copy {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
}
