/* Heading consistency fixes — overrides adminimal_upei.min.css
   Author: Edwin M
   Date: 2026-05-26
*/

/* h1 / h1like: add bottom margin */
h1.page-title, .h1like {
  margin-bottom: 16px;
}

/* h1like used inside body content needs top margin too */
.innerpagecontent .h1like,
.innerpagecontent h1 {
  margin-top: 50px;
}

/* h2: add bottom margin to match h3/h4 pattern */
h2, .h2like {
  margin-bottom: 12px;
}

/* Remove whitespace-only empty paragraphs CKEditor adds around div.h1like blocks */
p.whitespace,
p:empty,
.field-content p.whitespace,
.innerpagecontent p.whitespace {
  display: none !important;
  height: 0;
  margin: 0;
  padding: 0;
}

/* Fix: Silktide-flagged horizontal scroll on mobile — .adminimal
   h1.page-title (adminimal_upei.min.css) out-specifies the mobile960
   responsive font-size rule, so H1 never actually shrinks below 40px on
   narrow viewports, and with no overflow-wrap a long title/word runs off
   the screen instead of wrapping. 2026-11-01.
*/
h1.page-title,
.h1like {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

@media only screen and (max-width: 991px) {
  .adminimal h1.page-title,
  .h1like {
    font-size: clamp(24px, 7.5vw, 40px);
  }
}
