/*
 * Site-owned layout fixes (RKS, 27 Nov 2026). Loads after /site/site.css and /site/spacing.css.
 * Each section below is one agreed fix.
 */

/*
 * Range of Services (home, src/components/blocks/Services.astro), below 992px.
 * Ben, 27 Nov 2026: "A: stacked, full width (Recommended)". One card per row: image, title, text.
 * Webflow kept three 94 to 219px columns down to phones; this makes one column from 991 down.
 * Desktop (992 and up) is untouched.
 */
@media screen and (max-width: 991px) {
  body .solution_collection_list.is-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-column-gap: 0;
    grid-row-gap: 32px; /* tablet, 768 to 991 */
  }
  body .solution_collection_list.is-grid .solution_grid-card {
    padding-left: 0;
    padding-right: 0;
    border-left-style: none;
    border-right-style: none;
  }
  body .solution_collection_list.is-grid .solution_image-wrapper {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  body .solution_collection_list.is-grid .solution_image {
    height: 100%;
    object-fit: cover;
  }
}
@media screen and (max-width: 767px) {
  body .solution_collection_list.is-grid { grid-row-gap: 24px; } /* phones and large phones */
}

/*
 * 6X Use Cases cards (UseCaseGrid.astro, .section_6xuse-case), all widths.
 * Ben, 27 Nov 2026: "A: pin link to card bottom (Recommended)": "All links on one line per row; holds even if the
 * card text later changes length."
 * The cards in a row are already equal height (grid stretch); the text block did not fill its card, so Read More sat
 * under the text at a different height in each card. The content now fills the card and Read More sits at the bottom.
 * Scoped to .section_6xuse-case: the Locations grid also uses .solution_grid and is not touched.
 */
body .section_6xuse-case .solution_grid-card._6xuse-case-card .solution_card-content {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
}
body .section_6xuse-case .solution_grid-card._6xuse-case-card .solution_card-text-wrapper {
  flex: 1 1 auto;
  align-self: stretch;
  justify-content: space-between;
}

/*
 * Slider arrows on the four slider pages (co2-storage, conventional-reservoirs, eor, unconventional-reservoirs).
 * Webflow hangs the arrows outside the slider, in the section padding: 80px (5rem) above it from 768 to 991, 80px below
 * it at 767 and under. Webflow's old section padding (and the 96px under the heading at 768 to 991) had room for them;
 * the 120 / 64 rhythm (spacing.css) is smaller, so the arrows ran into the intro paragraph at 768 to 991 and 16px past
 * the section's bottom at 767 and under. The arrows' 80px is added to the rhythm on these sections only; the rhythm's
 * numbers are unchanged everywhere else. (unconventional-reservoirs has its own arrow, 32px below the slider at 767
 * and under; it fits, and sits on the slide's bottom edge on live too, so it is left as live has it.)
 */
@media screen and (min-width: 768px) and (max-width: 991px) {
  body .padding-global:has(.projects_slider) .global-header-wrapper.global-header-wrapper:not(.is-6x-header):not(._6x-header) {
    margin-bottom: calc(var(--header-gap) + 48px); /* 96: arrows (80) plus 16 clear of the paragraph, as live */
  }
}
@media screen and (max-width: 767px) {
  body .padding-global:has(.projects_slider .projects_slider-arrow) {
    padding-bottom: calc(var(--section-space) + 80px); /* the arrows (80) plus the rhythm's space below them */
  }
}
