/* Helper classes that Drupal core CSS used to provide and the old content still uses. */
.element-invisible, .visually-hidden {
  position: absolute !important; clip: rect(1px, 1px, 1px, 1px); overflow: hidden; height: 1px; width: 1px;
}
.element-hidden { display: none; }
.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
ul.inline, ul.links.inline { display: inline; padding-left: 0; }
ul.inline li { display: inline; list-style-type: none; padding: 0 0.5em; }
/* Contact form (replaces the Drupal contact module form). Sizes measured on the old page. */
.contact-form .form-item { margin-bottom: 1em; }
.contact-form label { display: block; font-weight: normal; }
.contact-form .form-required { color: #c00; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea { width: 100%; padding: 6px 12px; }
/* The theme CSS loads after this file and sets a smaller height, hence the id selector. */
#contact-site-form textarea#edit-message { height: 200px; }
.contact-form .hidden-field { display: none; }
/* Contact office card (the old site drew it with the md_slider module: 1100x360, image 540x360). */
.contact-office .contact-card { display: flex; flex-wrap: wrap; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.15); overflow: hidden; min-height: 360px; position: relative; z-index: 1; }
.contact-office .contact-image-cut { position: relative; flex: 0 0 540px; max-width: 100%; height: 360px; overflow: hidden; }
.contact-office .contact-image-cut img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-office .contact-details { flex: 1 1 260px; padding: 82px 44px 30px; font-family: "Trebuchet MS", sans-serif; font-size: 15.84px; line-height: 35px; color: #54585a; }
.contact-office .contact-details h3 { color: #a70e13; font-family: "Source Sans Pro", sans-serif; font-size: 29.7px; line-height: 37px; margin: 0 0 18px; text-transform: none; }
.contact-office .contact-details .phone { margin-top: 23px; line-height: 26px; }
@media (max-width: 700px) { .contact-office .contact-image-cut { flex-basis: 100%; height: 220px; } .contact-office .contact-details { padding-top: 30px; } .contact-image-cut::after { display: none; } }
/* Gallery images: the old site served them through the "article-image" image style (960x900 crop). */
.field-name-field-gallery .field-item img { display: block; width: 100%; height: auto; aspect-ratio: 960 / 900; object-fit: cover; }
/* Phones/tablets: a few theme rows (Bootstrap negative margins, the footer call-to-action container,
   wide inline images) reached past the screen edge, so the page could be dragged sideways.
   The old site had the same problem. `clip` hides that without breaking the off-canvas menu. */
html, body { overflow-x: clip; }
.layout_grid_2pic img, .field-name-body img { max-width: 100%; height: auto; }
/* Phones. The old theme left these rough on small screens (same on the old site). */
@media (max-width: 767px) {
  /* Contact form used half the width (custom.css: width 50%), only ~190px on a phone. */
  #contact-site-form.contact-form { width: auto; margin-left: 20px; margin-right: 20px; }
  /* Event/blog lists: text started at the screen edge (Bootstrap row margins inside an unpadded wrapper). */
  .view-events > .row, .view-blog-page-view > .row { margin-left: 0; margin-right: 0; }
  .view-events .views-row img, .view-blog-page-view .views-row img { width: 100%; height: auto; }
  /* Quote/About titles in the header were too big and ran over the site name. */
  /* "body" outranks custom.css, which loads after this file. */
  body .section--hero.about-page-hero .section__post-title,
  body.page-node-219 .section__post-title,
  body .section--hero .section__post-title.quote-title { font-size: 28px; padding-bottom: 20px; }
}
/* Home page cards on phones. The theme gave every card the same short band (11rem), so pictures
   lost their top and bottom (the STEEL-RX logo, the 250th badge) and cards without a picture were
   mostly empty space. "body" outranks custom.css, which loads after this file. */
@media (max-width: 699.98px) {
  body .view--masonry-grid .node--view-mode-featured.has-picture { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  body .view--masonry-grid .node--view-mode-featured:not(.has-picture) { height: auto; min-height: 8rem; }
  body .view--masonry-grid .node--view-mode-featured:not(.has-picture) .node__text { position: relative; top: auto; transform: none; padding: 1.4em 1em; }
}
/* Home cards without a picture: "See more" (shown on hover) was cut off in the narrow cards
   (the old theme centred the text with wide side padding). Centre with flex instead, never past
   the top edge, and use less side padding so titles wrap less. */
@media (min-width: 700px) {
  body .view--masonry-grid .node--view-mode-featured:not(.has-picture) .node__text {
    top: 0; bottom: 0; transform: none; display: flex; flex-direction: column; justify-content: center; justify-content: safe center; padding: 1em 2em;
  }
}
/* The title font (Plantin) has very narrow spaces; words ran together ("BRINGINGTHE AMERICAN"). */
body h1, body h2, body h3 { word-spacing: .12em; }
/* Page headers with a picture on phones: the theme made them half the screen tall (about 420 px),
   so wide pictures lost both sides (the STEEL-Rx logo, people at the edges). Lower is closer to
   the pictures' own shape. */
@media (max-width: 699.98px) {
  body .section--hero.section--hero-image { height: 290px; min-height: 0; }
}
