/*
Theme Name: Linc HTX Frost Child
Description: Child theme of Frost for Linc HTX's site
Author: JB Web
Template: frost
Version: 1.0.0
Text Domain: linc-htx-frost-child
*/

/*------------------------------------*\
  ROOT VARIABLES
\*------------------------------------*/

:root {
  /* Layout / grid */
  --content-gutter: calc(
    (100vw - var(--wp--style--global--content-size)) / 2
  );

  /* Vertical section padding */
  --section-padding-desktop: 80px;
  --section-padding-mobile: 48px;
  --section-padding-mobile-tight: 32px;

  /* Typography spacing */
  --text-gap: 0.85em;
  --text-gap-tight: 0.25em;

  /* Split section height (desktop) */
  --split-section-height: 750px;
}

/*------------------------------------*\
  GLOBAL LAYOUT FIXES
\*------------------------------------*/

/* ------------------------------------ *
 * Remove layout gap around header & hero
 * ------------------------------------ */

/* Hide the auto page title on pages / front page */
body.page .wp-block-post-title,
body.home .wp-block-post-title,
body.front-page .wp-block-post-title {
  display: none;
}

figcaption {display:none;}

/* Remove extra top spacing on the first content wrapper after header */
.wp-site-blocks > header + .has-global-padding,
.wp-site-blocks > header + :where(.is-layout-flow),
.wp-site-blocks > header + main,
.wp-site-blocks > header + .wp-block-group.has-global-padding {
  margin-top: 0;
  margin-block-start: 0;
  padding-top: 0;
}

/* First block in main/content area should not get the global top gap */
main :where(.is-layout-flow) > :first-child,
.wp-site-blocks > .has-global-padding :where(.is-layout-flow) > :first-child {
  margin-block-start: 0;
}

/* Remove layout gap before full-width sections only
   (hero, split sections, testimonials, service sections, etc.) */
:root :where(.is-layout-flow, .is-layout-constrained)
  > :where(.wp-block-group.alignfull,
           .wp-block-cover.alignfull,
           .wp-block-columns.alignfull) {
  margin-block-start: 0 !important;
}

/* Remove layout gap at top/bottom of split-section columns themselves */
.split-section .split-section__columns {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

/* Remove extra bottom margin on last child in groups/columns */
.wp-block-group > *:last-child,
.wp-block-column > *:last-child,
.editor-styles-wrapper .wp-block-group > *:last-child,
.editor-styles-wrapper .wp-block-column > *:last-child {
  margin-bottom: 0;
}

main {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.wp-block-cover__inner-container, .editor-styles-wrapper .wp-block-cover__inner-container {
  z-index: 1 !important;
}

/*------------------------------------*\
  TYPOGRAPHY
\*------------------------------------*/

/* Front-end body + editor wrapper */
body,
.editor-styles-wrapper {
  font-family: var(--wp--preset--font-family--body);
  color: var(--wp--preset--color--dark);
  background: var(--wp--preset--color--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Headings front + editor */
h1,
h2,
h3,
h4,
h5,
h6,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  font-family: var(--wp--preset--font-family--heading);
  margin-top: 0;
  color: var(--wp--preset--color--dark);
}

/* Headings: clear bottom margins only (top already zeroed) */
h1,
.editor-styles-wrapper h1 {
  margin-bottom: 0.6em;
}

h2,
.editor-styles-wrapper h2 {
  margin-bottom: 0.5em;
}

h3,
.editor-styles-wrapper h3 {
  margin-bottom: 0.45em;
}

h4,
h5,
h6,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  margin-bottom: 0.4em;
}

/* Body text elements */
p,
ul,
ol,
dl,
.editor-styles-wrapper p,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol,
.editor-styles-wrapper dl {
  margin-top: 0;
  margin-bottom: var(--text-gap);
}

/* List items: tighten internal spacing a bit */
li,
.editor-styles-wrapper li {
  margin-bottom: var(--text-gap-tight);
}

/* Figures/images inside content */
figure,
.editor-styles-wrapper figure {
  margin: 0 0 1em;
}

/* Figma-inspired typography scale */
h1,
.editor-styles-wrapper h1 {
  font-size: clamp(2.4rem, 3vw, 3rem);
  line-height: 1.1;
}

h2,
.editor-styles-wrapper h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  line-height: 1.2;
}

h3,
.editor-styles-wrapper h3 {
  font-size: 1.4rem;
}

/*------------------------------------*\
  GLOBAL FONT OVERRIDE (POPPINS)
\*------------------------------------*/

body,
.wp-site-blocks,
.wp-site-blocks p,
.wp-site-blocks li,
.wp-site-blocks a,
.wp-site-blocks button,
.wp-site-blocks input,
.wp-site-blocks select,
.wp-site-blocks textarea {
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial !important;
}

/* Navigation + overlay menus */
.wp-block-navigation,
.wp-block-navigation * {
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial !important;
}

/*------------------------------------*\
  LINKS
\*------------------------------------*/

a,
.editor-styles-wrapper a {
  color: var(--wp--preset--color--brand-orange);
  text-decoration: none;
}

a:hover,
.editor-styles-wrapper a:hover {
  text-decoration: underline;
}

/*------------------------------------*\
  BUTTONS (CORE BUTTON)
\*------------------------------------*/

.wp-block-button .wp-block-button__link,
.editor-styles-wrapper .wp-block-button .wp-block-button__link {
  background: var(--wp--preset--color--brand-orange);
  color: #fff;
  padding: 0.9em 1.8em;
  border-radius: 5px;
  font-weight: 600;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wp-block-button .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button .wp-block-button__link:hover {
  background: #e46910;
  transform: translateY(-1px);
}

/* Outline style matches hero “View Services” */
.wp-block-button.is-style-outline .wp-block-button__link,
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  box-shadow: none;
  transform: none;
}

/*------------------------------------*\
  SECTIONS (GROUP BLOCKS)
\*------------------------------------*/

/* Any top-level Group that is full width becomes a section (outside footer) */
.wp-site-blocks > .wp-block-group.alignfull,
.editor-styles-wrapper > .wp-block-group.alignfull {
  padding-block: var(--section-padding-desktop);
}

@media (max-width: 768px) {
  .wp-site-blocks > .wp-block-group.alignfull,
  .editor-styles-wrapper > .wp-block-group.alignfull {
    padding-block: var(--section-padding-mobile);
  }
}

/* Constrained inner content containers */
.wp-block-group > .wp-block-group,
.wp-block-column > .wp-block-group,
.editor-styles-wrapper .wp-block-group > .wp-block-group,
.editor-styles-wrapper .wp-block-column > .wp-block-group {
  max-width: var(--wp--style--global--content-size);
  margin-inline: auto;
  padding-inline: 16px;
}

/*------------------------------------*\
  FULL-BLEED ALIGNFULL BLOCKS
\*------------------------------------*/

/* Make any alignfull block break out of the constrained content width (front end only) */
.wp-site-blocks > .alignfull,
.wp-site-blocks > .wp-block-group.alignfull,
.wp-site-blocks .is-layout-constrained > .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/*------------------------------------*\
  HERO (COVER BLOCK)
\*------------------------------------*/

.wp-block-cover.hero,
.wp-block-cover.alignfull:first-of-type,
.editor-styles-wrapper .wp-block-cover.hero,
.editor-styles-wrapper .wp-block-cover.alignfull:first-of-type {
  min-height: 70vh;
  color: #fff;
  position: relative;
}

.wp-block-cover.hero::before,
.wp-block-cover.alignfull:first-of-type::before,
.editor-styles-wrapper .wp-block-cover.hero::before,
.editor-styles-wrapper .wp-block-cover.alignfull:first-of-type::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.wp-block-cover__inner-container,
.editor-styles-wrapper .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  max-width: var(--wp--style--global--content-size);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Hero inner layout tweaks */
.wp-block-cover.hero .wp-block-cover__inner-container {
  display: flex;
  align-items: center;
  min-height: 80vh;
}

/* Make the hero text block wider (does not affect other sections) */
.wp-block-cover.hero .wp-block-group {
  max-width: 720px;   /* adjust to taste: 680–820px */
  width: 100%;
}

/* Slightly increase ONLY the hero H1 */
.wp-block-cover.hero h1,
.wp-block-cover.hero .wp-block-heading {
  font-size: clamp(2.7rem, 3.2vw, 3.4rem);
  line-height: 1.08;
}

/* Optional: on very wide screens, let it breathe a bit more */
@media (min-width: 1200px) {
  .wp-block-cover.hero .wp-block-group {
    max-width: 800px;
  }
}

/* Buttons row spacing */
.wp-block-cover.hero .wp-block-buttons {
  margin-top: 16px;
}

/* Hero logos: keep them small and consistent */
.wp-block-cover.hero .hero-logo img,
.editor-styles-wrapper .wp-block-cover.hero .hero-logo img,
.wp-block-cover.hero .wp-block-group .wp-block-image img,
.editor-styles-wrapper .wp-block-cover.hero .wp-block-group .wp-block-image img {
  max-height: 4rem;
  max-width: 15rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .wp-block-cover.hero {
    min-height: 70vh;
  }

  .wp-block-cover.hero .hero-logo img,
.editor-styles-wrapper .wp-block-cover.hero .hero-logo img,
.wp-block-cover.hero .wp-block-group .wp-block-image img,
.editor-styles-wrapper .wp-block-cover.hero .wp-block-group .wp-block-image img {
  max-height: 3rem;
  max-width: 15rem;
  width: auto;
  height: auto;
  object-fit: contain;
}
}

/*------------------------------------*\
  SERVICE CARDS (COLUMNS)
\*------------------------------------*/

/* Only card grids (or explicit service-card-grid) get the card styling */
.wp-block-columns.is-style-card .wp-block-column,
.service-card-grid .wp-block-column,
.editor-styles-wrapper .wp-block-columns.is-style-card .wp-block-column,
.editor-styles-wrapper .service-card-grid .wp-block-column {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
}

/* Card images only */
.wp-block-columns.is-style-card .wp-block-image img,
.service-card-grid .wp-block-image img,
.editor-styles-wrapper .wp-block-columns.is-style-card .wp-block-image img,
.editor-styles-wrapper .service-card-grid .wp-block-image img {
  border-radius: 8px;
}

/* Service section wrapper */
.service-section {
  padding-block: var(--section-padding-desktop);
}

@media (max-width: 768px) {
  .service-section {
    padding-block: var(--section-padding-mobile);
  }
}

/* Service card layout refinements */
.service-card-grid .service-card {
  display: flex;
  flex-direction: column;
}

.service-card-grid .service-card__image {
  margin-bottom: 0;
}

.service-card-grid .service-card__link {
  margin-top: 12px;
  font-weight: 600;
}

.service-card-grid .service-card > .wp-block-group.is-layout-flex,
.service-carousel .service-card > .wp-block-group.is-layout-flex {
  justify-content: flex-start !important;
  width: 100%; 
}

.service-card {
  cursor: pointer;
}

.service-card:focus-visible {
  outline: 2px solid var(--wp--preset--color--brand-orange);
  outline-offset: 4px;
}

/*------------------------------------*\
  SERVICE CARD IMAGES — CONSISTENT SIZE
\*------------------------------------*/

.service-card-grid .service-card .wp-block-image {
  aspect-ratio: 16 / 9;  
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 0;  
}

/* Make the actual image fill the ratio box and crop nicely */
.service-card-grid .service-card .wp-block-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Grid version */
.service-card-grid .service-card .wp-block-image:not(.service-card__image) {
  aspect-ratio: auto;
  overflow: visible;
  width: auto;
  border-radius: 0;
}

/* Carousel version */
.service-carousel .service-card .wp-block-image:not(.service-card__image) {
  aspect-ratio: auto;
  overflow: visible;
  width: auto;
  border-radius: 0;
}

/* Reset image behavior for non-card images (logos, icons) */
.service-card-grid .service-card
  .wp-block-image:not(.service-card__image) img,
.service-carousel .service-card
  .wp-block-image:not(.service-card__image) img {
  max-width: none;
  max-height: none;
  object-fit: contain;
  display: block;
}

/* =========================================================
   SERVICE ICON LOGOS
   ========================================================= */

/* Large logo (H2 row header) */
.service-icon-logos {
  width: 3.5em;
  flex: 0 0 auto;
}

.service-icon-logos img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.service-icon-logos-small {
  width: auto;           /* width should follow height */
  height: 2.5em;           /* lock to heading scale */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.service-icon-logos-small img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
}

/*------------------------------------*\
  TESTIMONIALS
\*------------------------------------*/

/* Inner wrapper: sits inside global content width */
.testimonial-inner {
  text-align: left;
}

/* Columns layout */
.testimonial-columns {
  display: flex;
  align-items: center;
  column-gap: 40px;
  padding-inline: var(--wp--preset--spacing--x-large);
}

/* Left column: avatar and meta */
.testimonial-left {
  flex: 0 0 20%;
  text-align: center;
}

/* Right column: quote */
.testimonial-right {
  flex: 1 1 auto;
}

/* Avatar */
.testimonial-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  object-fit: cover;
  display: inline-block;
}

/* Stars */
.testimonial-stars {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 1.3rem;
  letter-spacing: 4px;
  color: #ffbf00;
}

/* Name + location */
.testimonial-name {
  margin: 0;
  font-weight: 600;
}

.testimonial-location {
  margin-top: 4px;
  margin-bottom: 0;
}

/* Quote */
.testimonial-quote {
  line-height: 1.6;
}

/* Desktop: keep extra inset and slightly cap width for breathing room */
@media (min-width: 1200px) {
  .testimonial-inner {
    max-width: 960px;
    margin-inline: auto;
  }
}

/* Tablet: still side-by-side but ease the padding a bit */
@media (min-width: 782px) and (max-width: 1199.98px) {
  .testimonial-columns {
    padding-inline: var(--wp--preset--spacing--large);
  }
}

/* Mobile: stack and reduce side padding */
@media (max-width: 781.98px) {
  .testimonial-section {
    padding-block: var(--section-padding-mobile);
  }

  .testimonial-columns {
    flex-direction: column;
    row-gap: 24px;
    padding-inline: var(--wp--preset--spacing--medium);
  }

  .testimonial-left,
  .testimonial-right {
    flex-basis: 100% !important;
    max-width: 100%;
  }

  .testimonial-right,
  .testimonial-quote {
    text-align: center;
  }
}

.testimonial-section {
  padding-block: var(--section-padding-desktop);
}

/*------------------------------------*\
  TRUST SIGNALS
\*------------------------------------*/

.trust-signals-section {
  padding-block: var(--section-padding-desktop);
  font-size: 1.1rem;
}

@media (max-width: 781.98px) {
  .trust-signals-section {
    padding-block: var(--section-padding-mobile-tight);
    font-size: 1.1rem;
  }
}

/*------------------------------------*\
  NAVIGATION
\*------------------------------------*/

/* DESKTOP & MOBILE – force solid white submenu background */
.wp-block-navigation .wp-block-navigation__submenu-container {
	background-color: #fff !important;
	border: 1px solid #00000026;
  padding: 1em;
}

/* Right-justified nav: have 3rd-level menus open to the RIGHT of the 2nd-level */
@media (min-width: 782px) {
	.wp-block-navigation.items-justified-right
		.wp-block-navigation__submenu-container
		.wp-block-navigation__submenu-container {
		left: 100% !important;
		right: auto !important;
    margin-top: -1em;
	}

	.wp-block-navigation.items-justified-right
		.wp-block-navigation__submenu-container
		.wp-block-navigation__submenu-container::before {
		left: auto;
		right: 100%;
    margin-top: -1em;
	}
}

/* Tighter line-height for nav labels */
.wp-block-navigation .wp-block-navigation-item__content {
	line-height: 1.3;
}

/* MOBILE overlay: collapsed submenus + aligned chevrons */
@media (max-width: 800px) {

  /* --- Collapse all submenus in the overlay by default --- */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .has-child
    > .wp-block-navigation__submenu-container {
      height: 0;
      opacity: 0;
      overflow: hidden;
      visibility: hidden;
      padding-top: 0;
      padding-bottom: 0;
      border-width: 0;
  }

  /* --- Reveal submenu when the core toggle button is expanded --- */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .has-child
    > .wp-block-navigation-submenu__toggle[aria-expanded="true"]
    ~ .wp-block-navigation__submenu-container {
      height: auto;
      opacity: 1;
      overflow: visible;
      visibility: visible;
      padding-top: 0.4em;
      padding-bottom: 0.4em;
      border-width: 1px;
  }

  /* --- Show icons again in the overlay (WP hides them by default) --- */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-icon {
      display: inline-block;
  }

  /* --- Layout for any <li> that has a submenu --- */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation-item.has-child {
      display: flex;
      flex-direction: row !important;  /* override WP's column */
      flex-wrap: wrap;                 /* allow submenu to move to next row */
      align-items: center;
      justify-content: flex-end;      /* cluster label + chevron on the right */
      margin-left: auto;              /* push row to the right */
      margin-right: 0;
      width: 100%;           
  }

  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation-item.has-child
  > .wp-block-navigation-item__content {
    text-align: right;
  }

  /* Link text */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation-item.has-child
    > .wp-block-navigation-item__content {
      flex: 0 1 auto;
  }

  /* Chevron toggle to the right of the label */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation-item.has-child
    > .wp-block-navigation-submenu__toggle {
      flex: 0 0 auto;
      margin-left: 0.35rem;
      background: transparent;
      border: 0;
      padding: 0;
      width: auto;
      display: block;   /* no full-width, no internal flex needed */
  }

  /* Submenu list drops onto the next line, below the parent row */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation-item.has-child
    > .wp-block-navigation__submenu-container {
      flex: 1 0 100%;      /* forces wrap to a new row */
      position: static;    /* keep it in normal flow for overlay */
      padding-left: 0;     /* adjust if you want indentation */
      padding-right: 0;
  }

  /* Rotate the icon when open (keep your existing behaviour) */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .has-child
    .wp-block-navigation-submenu__toggle[aria-expanded="true"]
    .wp-block-navigation__submenu-icon {
      transform: rotate(180deg);
  }
}

@media (max-width: 599.98px) {

	/* Less vertical spacing between each nav item */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-container-content
		.wp-block-navigation-item {
		margin: 0;
	}

	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-container-content
		.wp-block-navigation-item__content {
		padding: 0.35em 0;
	}
}

/*------------------------------------*\
  FOOTER
\*------------------------------------*/

/* Footer top CTA: force image/text columns to 40% / 60% */
@media (min-width: 782px) {
  footer > .wp-block-columns.alignfull > .wp-block-column:first-child {
    flex: 0 0 40% !important;
    max-width: 40%;
  }

  footer > .wp-block-columns.alignfull > .wp-block-column:last-child {
    flex: 0 0 60% !important;
    max-width: 60%;
  }
}

/* Mobile: stack columns full width */
@media (max-width: 781.98px) {
  footer > .wp-block-columns.alignfull > .wp-block-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  #footer-contact-form {
    padding-left: 1em !important;
    padding-right: 1em !important;
  }
}

footer,
.wp-block-template-part.footer,
.editor-styles-wrapper footer,
.editor-styles-wrapper .wp-block-template-part.footer {
  background: transparent;
  color: inherit;
  padding-block: 0;
}

footer a,
.editor-styles-wrapper footer a {
  color: inherit;
}

/* Remove any box/background/radius from the top CTA columns in footer */
footer .wp-block-columns.alignfull,
.editor-styles-wrapper footer .wp-block-columns.alignfull {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* Remove per-column padding/background/radius – controlled via inline padding on blue column */
footer .wp-block-columns.alignfull .wp-block-column,
.editor-styles-wrapper footer .wp-block-columns.alignfull .wp-block-column {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* Make the team image truly edge-to-edge */
footer .wp-block-columns.alignfull .wp-block-column:first-child .wp-block-image,
editor-styles-wrapper footer .wp-block-columns.alignfull .wp-block-column:first-child .wp-block-image {
  margin: 0;
  width: 100%;
  height: 100%;
}

footer .wp-block-columns.alignfull .wp-block-column:first-child .wp-block-image img,
.editor-styles-wrapper footer .wp-block-columns.alignfull .wp-block-column:first-child .wp-block-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}

/* Alignfull footer bands */
.wp-site-blocks footer .alignfull,
.wp-site-blocks footer .wp-block-group.alignfull,
.wp-site-blocks footer .wp-block-columns.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Bottom-most footer band background */
.wp-site-blocks footer .wp-block-group.alignfull:last-of-type {
  background: #fafafa; /* muted gray */
}

/* Remove section padding from footer bands */
footer.wp-block-group.alignfull,
.editor-styles-wrapper footer.wp-block-group.alignfull,
footer .wp-block-group.alignfull,
.editor-styles-wrapper footer .wp-block-group.alignfull {
  padding-block: 0;
}

/* Bottom-most footer band: slight padding to match Figma */
footer .footer-bottom,
.editor-styles-wrapper footer .footer-bottom {
  padding-block: 32px;
}

/* Remove global layout gaps inside the footer */
footer :where(.is-layout-flow) > *,
.editor-styles-wrapper footer :where(.is-layout-flow) > * {
  margin-block-start: 0 !important;
  margin-block-end: 0;
  gap: 0 !important;
}

/* Footer contact form (CF7) */
footer .wpcf7 form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 16px;
}

/* CF7 wraps each control in a <p> */
footer .wpcf7-form p {
  margin: 0;
}

/* Field styling */
footer .wpcf7-form input[type="text"],
footer .wpcf7-form input[type="email"],
footer .wpcf7-form input[type="tel"],
footer .wpcf7-form input[type="number"],
footer .wpcf7-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border-radius: 6px;
  border: none;
  background: #fafafa;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: #111111;
}

/* Placeholder text */
footer .wpcf7-form ::placeholder {
  color: #777777;
  font-weight: 500;
}

/* 5th <p> (textarea) spans both columns */
footer .wpcf7-form p:nth-of-type(5) {
  grid-column: 1 / -1;
}

/* 6th <p> (submit button) also spans both columns */
footer .wpcf7-form p:nth-of-type(6) {
  grid-column: 1 / -1;
}

/* Submit button styling */
footer .wpcf7-form input[type="submit"] {
  width: 100%;
  padding: 16px 24px;
  border-radius: 5px;
  border: none;
  background: var(--wp--preset--color--brand-orange);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  margin-top: 8px;
}

footer .wpcf7-form input[type="submit"]:hover {
  filter: brightness(1.05);
}

/* Mobile: stack everything in one column */
@media (max-width: 768px) {
  footer .wpcf7 form {
    grid-template-columns: 1fr;
  }

  footer .wpcf7-form p:nth-of-type(5),
  footer .wpcf7-form p:nth-of-type(6) {
    grid-column: 1 / -1;
  }
}

/* Mobile: footer CTA image is a full-width square */
@media (max-width: 781.98px) {
  footer .wp-block-columns.alignfull .wp-block-column:first-child .wp-block-image,
  footer .wp-block-columns.alignfull .wp-block-column:first-child .wp-block-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto !important;
    object-fit: cover;
  }
}

/* Footer CTA: align text/form to content rails, left-aligned */
@media (min-width: 1200px) {
  footer .wp-block-columns.alignfull .wp-block-column:last-child
    > .wp-block-group {
    margin-right: var(--content-gutter);
    margin-left: 0;
    padding-inline: 0;
    text-align: left;
  }
}

/*------------------------------------*\
  CTAs (DARK SECTIONS)
\*------------------------------------*/

.wp-block-group.has-dark-background-color,
.editor-styles-wrapper .wp-block-group.has-dark-background-color {
  color: var(--wp--preset--color--white);
}

.wp-block-group.has-dark-background-color a,
.editor-styles-wrapper .wp-block-group.has-dark-background-color a {
  color: var(--wp--preset--color--brand-orange);
}

/*------------------------------------*\
  SPLIT SECTIONS (IMAGE + TEXT)
\*------------------------------------*/

/* Remove default section padding inside split-section groups */
.split-section {
  padding-block: 0 !important;
  border-radius: 0 !important;
}

.split-section .split-section__columns {
  gap: 0;
}

.split-section .split-section__col {
  padding: 0;
}

.split-section .split-section__columns,
.split-section .split-section__col {
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

/* Make image side fill its column and go edge-to-edge */
.split-section .split-section__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}

/* Text side inner padding – only horizontal */
.split-section .split-section__inner {
  padding-block: 0;
  padding-inline: 2em;
}

/* Desktop layout — AUTO height driven by content, image crops vertically */
@media (min-width: 782px) {
  .split-section {
    height: auto;
    overflow: hidden;
  }

  .split-section .split-section__columns {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    flex-direction: row-reverse;
  }

  .split-section .split-section__col {
    flex: 1 1 50%;
    min-height: 0;
  }

  /* Text: add consistent space above/below + keep vertical centering */
  .split-section .split-section__inner {
    width: 100%;
    padding-block: var(--section-padding-desktop);
  }

  .split-section .split-section__col-content {
    display: flex;
    align-items: center;
  }

  /* Image: fill section height but never drive section height */
  .split-section .split-section__col-image {
    position: relative;
    overflow: hidden;
    min-height: 0;
  }

  .split-section .split-section__col-image .split-section__image {
    position: absolute;
    inset: 0;
    margin: 0;
  }

  .split-section .split-section__col-image .split-section__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
  }
}


/* Mobile: let things grow naturally, just keep padding */
@media (max-width: 781.98px) {
  .split-section .split-section__inner {
    padding-block: var(--section-padding-mobile);
  }

  /* Split-section images are full-width squares */
  .split-section .split-section__col-image .split-section__image,
  .split-section .split-section__col-image .split-section__image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto !important;
    object-fit: cover;
  }
}

/* Align split-section text with global content rails */
@media (min-width: 1200px) {
  /* Base: no hard max, no extra inner padding */
  .split-section .split-section__inner {
    padding-inline: 0;
    max-width: none;
  }

  /* Builder section: text on LEFT, narrower block inside rails */
  .split-section--builder .split-section__col-content .split-section__inner {
    max-width: calc(var(--wp--style--global--content-size) / 2);
    margin-left: var(--content-gutter);
    margin-right: auto;
  }

  /* Generac section: text on RIGHT, fill space between image and right rail */
  .split-section--generac .split-section__col-content .split-section__inner {
    max-width: none;
    width: calc(100% - var(--content-gutter) - 32px); /* 32px = gap from image */
    margin-left: 32px;
    margin-right: var(--content-gutter);
  }
}

/*------------------------------------*\
  WHAT TO EXPECT SECTION
\*------------------------------------*/

.expect-section {
  padding-block: var(--section-padding-desktop);
}

@media (max-width: 768px) {
  .expect-section {
    padding-block: var(--section-padding-mobile);
  }
}

.expect-grid .expect-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.expect-heading {
  margin-top: 16px;
  margin-bottom: 0.4em;
}

/* Hide on Mobile (<=600px) */
@media screen and (max-width: 600px) {
    .hide-on-mobile {
        display: none !important;
    }
}
/* Hide on Desktop (>600px) */
@media screen and (min-width: 601px) {
    .hide-on-desktop {
        display: none !important;
    }
}

/* =========================
   Service Cards Carousel (Frontend)
   ========================= */

.service-carousel {
  position: relative;
  margin-top: 32px;
}

/* Prevent theme nested Group max-width + padding from affecting carousel internals */
.service-carousel__viewport.wp-block-group,
.service-carousel__track.wp-block-group {
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

/* Viewport */
.service-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.service-carousel__viewport::-webkit-scrollbar { height: 0; }

/* Track */
.service-carousel__track {
  display: flex;
  gap: 32px;
  align-items: stretch; /* equal-height cards */
}

.service-carousel__track > * {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

/* Slides */
.service-carousel .service-card {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 64px) / 3);

  /* Match original grid look */
  background: #fff;
  border-radius: 12px;
  padding: 24px;

  /* Match original “consistent height” behavior */
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 1024px) {
  .service-carousel .service-card { flex-basis: calc((100% - 32px) / 2); }
}
@media (max-width: 781.98px) {
  .service-carousel .service-card { flex-basis: 100%; }
}

/* Images (match original grid behavior) */
.service-carousel .service-card .wp-block-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 0;
}
.service-carousel .service-card .wp-block-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

/* Normalize inner block margins to avoid card-to-card drift */
.service-carousel .service-card > * {
  margin-top: 0;
}
.service-carousel .service-card > *:last-child {
  margin-bottom: 0;
}

.service-carousel .service-card h3 {
  margin: 16px 0 12px;
}
.service-carousel .service-card .wp-block-list {
  margin: 0 0 16px;
}

/* Link: keep consistent + push to bottom like original equal-height cards */
.service-carousel .service-card__link {
  margin-top: auto;
  font-weight: 600;
}

/* =========================
   Buttons: intentionally UNSTYLED (you style in Gutenberg)
   ========================= */

/* Keep your requested disabled behavior exactly */
.service-carousel__btn.is-disabled {
  pointer-events: none;
  opacity: 0.2;
}

/* Add subtle breathing room around card titles */
.service-carousel .service-card h3 {
  padding-top: 1em;
  padding-bottom: 1em;

  /* keep margins stable so card heights stay consistent */
  margin-top: 16px;
  margin-bottom: 12px;
}

/* Prevent horizontal overflow caused by carousel columns/track on mobile */
@media (max-width: 781.98px) {
  #service-cards-carousel {
    overflow-x: hidden;
  }

  /* Allow flex/grid children to shrink instead of forcing overflow */
  #service-cards-carousel .wp-block-columns,
  #service-cards-carousel .wp-block-column,
  #service-cards-carousel .wp-block-group {
    min-width: 0;
  }

  /* The track is flex; ensure it doesn't create layout overflow */
  #service-cards-carousel .service-carousel__track {
    min-width: 0;
  }

  /* The viewport should be the only scroll container */
  #service-cards-carousel .service-carousel__viewport {
    max-width: 100%;
  }
}

/* Track should always align items to the left */
.service-carousel__track {
  justify-content: flex-start;
}

/* Prevent single-card centering caused by auto margins */
.service-carousel__track .service-card {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
