/* Shared bottom margin for page sections */
.o4m-section {
  margin-bottom: 96px;
}

@media (max-width: 1024px) {
  .o4m-section {
    margin-bottom: 80px;
  }
}

@media (max-width: 767px) {
  .o4m-section {
    margin-bottom: 64px;
  }
}

/* Editorial grid — featured article + sidebar layout */
.o4m-editorial-grid {
  margin: 0 0 24px 0;
}
.o4m-editorial-grid-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.o4m-editorial-grid-featured {
  flex: 1 1 444px;
  min-width: 280px;
  max-width: 712px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.o4m-editorial-grid-featured .o4m-related-thumb {
  width: 100%;
  aspect-ratio: 712/320;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f3f3;
  display: block;
}

@media (min-width: 768px) {
  .o4m-editorial-grid-layout {
    flex-wrap: nowrap;
  }
}

@media (max-width: 1023px) {
  .o4m-editorial-grid-featured .o4m-related-thumb {
    aspect-ratio: 444/320;
  }
}
.o4m-editorial-grid-featured .o4m-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.o4m-editorial-grid-featured-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.o4m-editorial-grid-featured .o4m-related-title {
  font-family: Inter, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  color: rgba(0, 0, 0, 0.87);
  margin: 0;
  word-break: break-word;
}
.o4m-editorial-grid-featured .o4m-related-title a {
  color: inherit;
  text-decoration: none;
}

.o4m-editorial-grid-sidebar {
  flex: 1 1 280px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}
.o4m-editorial-grid-sidebar .o4m-related-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #e6e6e6;
}
.o4m-editorial-grid-sidebar .o4m-related-item:last-child {
  border-bottom: 0;
}
.o4m-editorial-grid-sidebar .o4m-related-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.o4m-editorial-grid-sidebar .o4m-related-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f3f3;
}
.o4m-editorial-grid-sidebar .o4m-related-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}
.o4m-editorial-grid-sidebar .o4m-related-title {
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: rgba(0, 0, 0, 0.87);
  margin: 0;
  word-break: break-word;
}
.o4m-editorial-grid-sidebar .o4m-related-title a {
  color: inherit;
  text-decoration: none;
}
.o4m-editorial-grid-sidebar .o4m-play-overlay,
.o4m-related-item .o4m-play-overlay {
  width: 32px;
  height: 32px;
}

.o4m-editorial-grid .o4m-related-topic {
  font-size: 12px;
  line-height: 1.3;
  text-transform: uppercase;
  color: #6b6b6b;
  letter-spacing: 0.02em;
}
.o4m-editorial-grid a.o4m-related-topic {
  text-decoration: none;
}
.o4m-editorial-grid a.o4m-related-topic:hover {
  text-decoration: underline;
}
.o4m-editorial-grid .o4m-related-excerpt {
  font-size: 14px;
  color: #4a4a4a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767px) {
  .o4m-editorial-grid {
    margin-bottom: 24px;
  }
  .o4m-editorial-grid-layout {
    flex-direction: column;
    gap: 16px;
  }
  .o4m-editorial-grid-featured,
  .o4m-editorial-grid-sidebar {
    max-width: 100%;
    flex: 0 0 auto;
  }
}

/* layout-split: compact row layout when the ad sidebar is active (cancer type pages) */
.o4m-editorial-grid.layout-split .o4m-editorial-grid-layout {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 20px;
}
.o4m-editorial-grid.layout-split .o4m-editorial-grid-featured {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  min-width: 0;
}
.o4m-editorial-grid.layout-split
  .o4m-editorial-grid-featured
  .o4m-related-thumb {
  flex: 0 0 240px;
  width: 240px;
  height: 240px;
  max-width: 240px;
}
.o4m-editorial-grid.layout-split
  .o4m-editorial-grid-featured
  .o4m-related-thumb
  img {
  width: 240px;
  height: 240px;
  object-fit: cover;
}
.o4m-editorial-grid.layout-split .o4m-editorial-grid-sidebar {
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
}
.o4m-editorial-grid.layout-split
  .o4m-editorial-grid-sidebar
  .o4m-related-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}
.o4m-editorial-grid.layout-split
  .o4m-editorial-grid-sidebar
  .o4m-related-thumb
  img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}
@media (max-width: 900px) {
  .o4m-editorial-grid.layout-split .o4m-editorial-grid-featured {
    flex-direction: column;
    gap: 12px;
  }
  .o4m-editorial-grid.layout-split
    .o4m-editorial-grid-featured
    .o4m-related-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 240/240;
  }
  .o4m-editorial-grid.layout-split
    .o4m-editorial-grid-featured
    .o4m-related-thumb
    img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.o4m-editorial-grid.layout-stacked
  .o4m-editorial-grid-featured
  .o4m-related-title {
  margin-top: 2px;
}

.o4m-related-thumb {
  display: block;
  overflow: hidden;
  background: #f3f3f3;
  position: relative;
}
.o4m-related-item.is-hidden {
  display: none;
}
.single-cancer_type .o4m-related-title {
  font-weight: 700 !important;
}
@media (max-width: 768px) {
  .o4m-related-item .o4m-related-excerpt {
    display: none;
  }
}

.o4m-sections-slot {
  margin-bottom: 32px;
}
.o4m-sections-slot:last-child {
  margin-bottom: 0;
}
.o4m-sections-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 26px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.o4m-sections-title {
  font-size: 24px;
  font-weight: 700 !important;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.o4m-sections-divider {
  border: 0;
  border-top: 1px solid #e6e6e6;
  margin: 0 0 20px 0 !important;
}
.o4m-sections-see-more {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
  color: #ff7958;
  text-decoration: none;
  white-space: nowrap;
}
.o4m-sections-see-more:hover {
  text-decoration: underline;
}
.o4m-sections-see-more-bottom {
  display: none;
}
@media (max-width: 767px) {
  .o4m-sections-header .o4m-sections-see-more {
    display: none;
  }
  .o4m-sections-see-more-bottom {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 24px;
  }
}

/* Pill list — shared by [o4m_subtypes_list] and [o4m_top_searches] */
.o4m-subtypes {
  border-top: 1px solid #e6e6e6;
  padding-top: 16px;
}
.o4m-subtypes-title {
  font-family: Inter, sans-serif;
  font-size: 24px;
  font-weight: 700 !important;
  line-height: 32px;
  color: rgba(0, 0, 0, 0.87) !important;
  margin: 0 0 24px 0;
}
.o4m-subtypes-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.o4m-subtypes-pill {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 9999px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
  color: rgba(0, 0, 0, 0.87) !important;
  text-decoration: none !important;
  background: #f0f0f0;
  transition: background 0.15s ease;
}
.o4m-subtypes-pill:hover {
  background: #e4e4e4;
}
