/* Prime Health Guide — global layout normalization (post-wget audit) */

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #ffffff;
  color: #1f2933;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img,
picture,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

/* Hide broken wget/template image refs */
img[src*="{{"],
img[src*="{%"],
img[src^="https://assets.primehealthguide"],
img[src*="/transform/"]:not([src*="/-/scassets/"]) {
  visibility: hidden;
  min-height: 0;
  max-height: 1px;
  overflow: hidden;
}

main,
.phg-main,
.site-main,
.content,
.entry-content,
.article-content,
.post-content,
.container--md,
.container--lg {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
}

article,
.phg-article {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

article img,
.entry-content img,
.article-content img,
.post-content img,
main img,
.content img,
.teaser__image,
.story-panel__image img,
.hero__image,
img.js-story-panel__image {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.hero img,
.hero__image,
.featured-image img,
.wp-post-image,
.article-hero img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.card img,
.related img,
.category-card img,
.topic-card img,
.teaser__image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

a {
  overflow-wrap: anywhere;
}

main a,
.article-content a,
.entry-content a,
.post-content a,
.content a {
  color: #0f5db8;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

main a:hover,
.article-content a:hover,
.entry-content a:hover,
.post-content a:hover,
.content a:hover {
  color: #073f80;
}

.phg-main-nav a,
.phg-mobile-menu-toggle,
.phg-brand-title {
  overflow-wrap: normal;
  text-decoration: none;
}

.phg-nextjs-mirror-notice {
  max-width: 1120px;
  margin: 1rem auto;
  padding: 12px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 0.95rem;
}

@media (max-width: 767px) {
  main,
  .phg-main,
  .site-main,
  .content,
  .entry-content,
  .article-content,
  .post-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero img,
  .hero__image,
  .featured-image img,
  .wp-post-image,
  .article-hero img {
    max-height: 280px;
  }

  article,
  .phg-article {
    max-width: 100%;
  }
}
