
/* ============================================================
   MicroHub Insights — Mobile Post Fixes
   Shared by every article under /insights/posts/
   ============================================================ */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  -webkit-text-size-adjust: 100%;
}

/* ---------- Shared MicroHub navbar / mobile logo ---------- */
.navbar,
.navbar-container {
  width: 100%;
  max-width: 100%;
}

.navbar .logo {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
}

.navbar .logo-img {
  width: auto;
  max-width: 190px;
  height: 64px !important;
  object-fit: contain;
  object-position: left center;
  display: block;
}

@media (max-width: 1120px) {
  .navbar-container {
    height: 72px;
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px;
  }

  .navbar .logo-img {
    height: 54px !important;
    max-width: 170px;
  }

  .navbar .nav-actions {
    margin-left: auto;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .navbar .nav-actions .primary-btn {
    display: none;
  }

  .mobile-menu {
    display: flex;
    flex: 0 0 42px;
  }
}

/* ---------- Article page ---------- */
.article-hero-shell,
.article-body-shell {
  width: 100%;
  overflow: hidden;
}

.article-hero-grid,
.article-body-grid,
.article-section {
  min-width: 0;
}

.article-hero-copy,
.article-section-copy,
.article-content,
.article-rail {
  min-width: 0;
}

.article-hero-copy h1,
.article-section h2,
.article-section h3,
.article-intro h2,
.article-takeaway h2 {
  overflow-wrap: anywhere;
  word-break: normal;
}

.article-hero-copy > p,
.article-intro p,
.article-section p,
.article-takeaway p,
.article-keypoints li {
  overflow-wrap: anywhere;
}

.article-hero-media,
.article-section-media {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.article-hero-media .blog-visual,
.article-section-media {
  width: 100%;
  max-width: 100%;
}

.article-hero-media .blog-visual__image,
.article-section-image {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-highlight-row {
  max-width: 100%;
}

.article-highlight-row span {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.article-rail-card {
  max-width: 100%;
  min-width: 0;
}

.article-rail-link,
.article-rail-related-item {
  min-width: 0;
}

.article-rail-link__label,
.article-rail-related-title {
  overflow-wrap: anywhere;
}

/* Tables, code and embeds must never push the viewport wider */
.article-content table,
.article-content pre,
.article-content .table-responsive,
.article-content iframe,
.article-content video,
.article-content img {
  max-width: 100%;
}

.article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}

.article-content iframe,
.article-content video {
  display: block;
  width: 100%;
}

@media (max-width: 767.98px) {
  /* Header */
  .navbar {
    min-height: 68px;
  }

  .navbar-container {
    height: 68px;
    padding: 0 14px;
  }

  .navbar .logo-img {
    height: 46px !important;
    max-width: 148px;
  }

  .navbar .logo {
    max-width: calc(100% - 54px);
  }

  .mobile-menu {
    width: 40px;
    height: 40px;
  }

  /* Give article hero enough room below the fixed navbar */
  .page-hero.article-hero-shell {
    padding-top: 108px;
    padding-bottom: 42px;
  }

  .article-hero-shell .container,
  .article-body-shell .container {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .article-hero-grid {
    gap: 28px;
  }

  .article-hero-copy {
    gap: 0.85rem;
  }

  .article-hero-copy h1 {
    font-size: clamp(1.9rem, 8.6vw, 2.65rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .article-hero-copy > p {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .article-meta-row {
    gap: 0.55rem 0.9rem;
    font-size: 0.78rem;
  }

  .article-highlight-row {
    gap: 0.45rem;
  }

  .article-highlight-row span {
    font-size: 0.72rem;
    padding: 0.4rem 0.65rem;
  }

  .article-hero-media,
  .article-hero-media .blog-visual {
    min-height: 220px;
    height: 220px;
    border-radius: 16px;
  }

  .article-body-shell {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .article-body-grid {
    gap: 30px;
  }

  .article-content {
    gap: 1.25rem;
  }

  .article-section {
    gap: 0.7rem;
    padding-top: 1.1rem;
  }

  .article-section h2 {
    font-size: 1.22rem;
    line-height: 1.25;
  }

  .article-intro p,
  .article-section p,
  .article-takeaway p {
    font-size: 0.96rem;
    line-height: 1.72;
  }

  .article-section-media,
  .article-hero-media .blog-visual {
    min-height: 210px;
  }

  .article-section-media {
    height: 210px;
    border-radius: 16px;
  }

  .article-keypoints {
    padding-left: 1.1rem;
    gap: 0.5rem;
  }

  .article-keypoints li {
    font-size: 0.94rem;
    line-height: 1.65;
  }

  .article-rail-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .related-posts-section {
    padding-bottom: 40px;
  }
}

@media (max-width: 420px) {
  .navbar-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .navbar .logo-img {
    height: 42px !important;
    max-width: 132px;
  }

  .article-hero-shell .container,
  .article-body-shell .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .article-hero-copy h1 {
    font-size: clamp(1.75rem, 8.8vw, 2.25rem);
  }

  .article-hero-media,
  .article-hero-media .blog-visual,
  .article-section-media {
    min-height: 190px;
    height: 190px;
  }

  .article-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-highlight-row {
    justify-content: flex-start;
  }
}


/* ============================================================
   FINAL MOBILE ARTICLE PASS — all Insights posts
   ============================================================ */
@media (max-width: 767.98px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  /* Header / logo */
  header.navbar {
    width: 100%;
    min-height: 64px;
    overflow: visible;
  }
  header.navbar .navbar-container {
    width: 100%;
    max-width: 100%;
    height: 64px !important;
    min-height: 64px;
    padding: 0 12px !important;
    gap: 10px !important;
  }
  header.navbar .logo {
    width: auto;
    max-width: calc(100% - 52px);
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  header.navbar .logo-img {
    display: block;
    width: auto !important;
    height: 40px !important;
    max-width: 138px !important;
    min-width: 0;
    object-fit: contain;
    object-position: left center;
  }
  header.navbar .nav-actions {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    margin-left: auto;
    gap: 0 !important;
  }
  header.navbar .nav-actions .primary-btn {
    display: none !important;
  }
  header.navbar .mobile-menu {
    display: flex !important;
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px;
    margin: 0;
  }

  /* Prevent the article from being hidden under the fixed header */
  .page-hero.article-hero-shell {
    width: 100%;
    padding-top: 92px !important;
    padding-bottom: 34px !important;
    margin: 0;
  }
  .article-hero-shell .container,
  .article-body-shell .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Hero */
  .article-hero-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
  }
  .article-hero-grid > .article-hero-copy,
  .article-hero-grid > .article-hero-media {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .article-hero-copy h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(28px, 8.5vw, 40px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .article-hero-copy p,
  .article-hero-copy .article-meta-row,
  .article-hero-copy .article-highlight-row {
    max-width: 100%;
  }
  .article-meta-row {
    flex-wrap: wrap;
  }
  .article-highlight-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .article-highlight-row span {
    max-width: 100%;
    white-space: normal !important;
  }
  .article-hero-media {
    min-height: 0 !important;
    height: auto !important;
  }
  .article-hero-media .blog-visual,
  .article-hero-media .blog-visual--article {
    width: 100% !important;
    min-height: 205px !important;
    height: 205px !important;
    max-width: 100% !important;
    transform: none !important;
    border-radius: 16px !important;
  }

  /* Main article + sidebar */
  .article-body-shell {
    width: 100%;
    padding-top: 28px !important;
    padding-bottom: 36px !important;
  }
  .article-body-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
    width: 100% !important;
  }
  .article-content,
  .article-section,
  .article-section-copy,
  .article-rail {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .article-section {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding-top: 20px !important;
  }
  .article-section h2,
  .article-section h3,
  .article-intro h2,
  .article-takeaway h2 {
    max-width: 100%;
    font-size: 21px !important;
    line-height: 1.25 !important;
    overflow-wrap: break-word;
  }
  .article-content p,
  .article-intro p,
  .article-section p,
  .article-takeaway p,
  .article-keypoints li {
    max-width: 100%;
    font-size: 15.5px !important;
    line-height: 1.72 !important;
    overflow-wrap: anywhere;
  }
  .article-section-media {
    width: 100% !important;
    min-height: 190px !important;
    height: 190px !important;
    max-width: 100% !important;
    border-radius: 14px !important;
  }
  .article-section-image,
  .article-content img {
    max-width: 100% !important;
    height: auto;
  }

  /* Cards, lists, tables and code */
  .article-rail-card,
  .article-intro,
  .article-takeaway {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .article-rail-card {
    position: static !important;
  }
  .article-content table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  .article-content pre {
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: pre !important;
    font-size: 12px !important;
  }
  .article-content iframe,
  .article-content video {
    max-width: 100% !important;
  }
  .article-content blockquote {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 20px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 420px) {
  header.navbar .navbar-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  header.navbar .logo-img {
    height: 38px !important;
    max-width: 128px !important;
  }
  .page-hero.article-hero-shell {
    padding-top: 88px !important;
  }
  .article-hero-shell .container,
  .article-body-shell .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .article-hero-copy h1 {
    font-size: clamp(26px, 8.8vw, 34px) !important;
  }
  .article-hero-media .blog-visual,
  .article-hero-media .blog-visual--article,
  .article-section-media {
    min-height: 175px !important;
    height: 175px !important;
  }
}
