@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* The original photo-led header, with a usable layout before JavaScript. */
.home-skip-link {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 10px 16px;
  transform: translateY(calc(-100% - 20px));
  background: #fff;
  color: #252525;
}

.home-skip-link:focus {
  transform: none;
}

.home-header {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background: linear-gradient(rgba(18, 12, 16, 0.44), rgba(18, 12, 16, 0));
  color: #fff;
}

.home-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
}

.home-header-inner::before,
.home-header-inner::after {
  display: none;
}

.home-logo {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.home-logo img {
  display: block;
}

#mainnav.home-nav {
  display: block;
  float: none;
}

#mainnav.home-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 10px;
}

#mainnav.home-nav li,
#mainnav.home-nav li:last-child {
  float: none;
  padding: 0;
}

#mainnav.home-nav a {
  display: flex;
  float: none;
  min-height: 44px;
  align-items: center;
  padding: 6px 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

#mainnav.home-nav a:hover,
#mainnav.home-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.home-menu-toggle,
.home-slide-toggle {
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: #251c20;
  color: #fff;
  font: inherit;
  line-height: 1.3;
  text-transform: none;
}

.home-menu-toggle,
.home-menu-toggle[hidden],
.home-slide-toggle[hidden],
.home-hero-image[hidden],
.home .go-top[hidden] {
  display: none;
}

.home-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background: #251c20;
  color: #fff;
  text-align: center;
}

.home-hero-image,
.home-hero::after {
  position: absolute;
  inset: 0;
}

.home-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero-image:first-of-type img {
  object-position: center top;
}

.home-hero::after {
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.46) 53%, rgba(0, 0, 0, 0.08));
}

.home-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1300px;
  padding: 96px 20px 72px;
}

.home-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 57px);
  font-weight: 700;
  line-height: 1.16;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.home-hero h1::after {
  display: block;
  width: min(40%, 550px);
  height: 2px;
  margin: 12px auto 0;
  background: #ea0030;
  content: "";
}

.home-hero-subtitle {
  max-width: 1080px;
  margin: 20px auto 28px;
  color: #fff;
  font-size: clamp(16px, 2.2vw, 30px);
  line-height: 1.4;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
}

.home-hero .home-hero-link:hover,
.home-hero .home-hero-link:focus-visible {
  border-color: #a40023;
  background: #a40023;
  color: #fff;
}

.home-slide-toggle {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 14px;
  width: 44px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(37, 28, 32, 0.72);
}

.home-slide-toggle::before {
  font-family: FontAwesome;
  content: "\f04b";
}

.home-slide-toggle[data-playing="true"]::before {
  content: "\f04c";
}

.home a:focus-visible,
.home button:focus-visible,
#mainnav.home-nav a:focus-visible {
  outline: 3px solid #1765bf;
  outline-offset: 3px;
}

.home-header a:focus-visible,
.home-header button:focus-visible,
#mainnav.home-nav a:focus-visible,
.home-hero a:focus-visible,
.home-hero button:focus-visible,
#contact a:focus-visible {
  outline-color: #fff;
}

#contact,
#contact a,
.site-footer,
.site-footer a {
  color: #e5e5e5;
}

#contact a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

#contact iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

@media (max-width: 1024px) {
  .home-header {
    position: relative;
    background: #251c20;
  }

  .home-header-inner {
    flex-wrap: wrap;
  }

  .home-menu-toggle:not([hidden]) {
    display: inline-block;
  }

  .home-menu-toggle:not([hidden])[aria-expanded="false"] ~ #mainnav.home-nav {
    display: none;
  }

  #mainnav.home-nav {
    width: 100%;
  }

  #mainnav.home-nav ul {
    justify-content: flex-start;
  }

  #mainnav.home-nav a {
    font-size: 16px;
  }

  .home-hero {
    min-height: calc(100vh - 64px);
    min-height: calc(100svh - 64px);
  }

  .home-hero-content {
    padding: 48px 16px 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mainnav.home-nav,
  #mainnav.home-nav a,
  .home-hero .home-hero-link,
  .home .go-top {
    transition: none;
  }
}

/* Keep the existing sections readable without the page-builder scripts. */
.home-about {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(16px, 5vw, 52px);
  border-bottom: 1px solid #e0e0e0;
}

.home-about::before,
.home-about::after {
  display: none;
}

.home-about,
.home-partners,
.home-projects {
  padding-block: clamp(40px, 7vw, 100px);
}

.home-about .widget-title,
.home-partners .widget-title,
.home-projects .widget-title,
#pg-8-1 .widget-title {
  margin: 0 0 1.15em;
  font-size: clamp(22px, 3vw, 32px);
  text-align: center;
  text-transform: uppercase;
}

.home-about .widget-title::after,
.home-partners .widget-title::after,
.home-projects .widget-title::after {
  display: block;
  width: 50px;
  height: 1px;
  margin: 12px auto 0;
  background: #ea0030;
  content: "";
}

.home-about > img {
  width: min(100%, 340px);
  height: auto;
  justify-self: center;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 24px;
}

.home-project img {
  width: 100%;
  height: auto;
}

.home-project .entry-title {
  margin: 14px 0 6px;
  font-size: 1.2em;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .home-about {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-about > img {
    width: min(45%, 180px);
  }
}

#pg-8-4,
#pg-8-12 {
  width: 100%;
  max-width: none;
  background: #eb0030;
}

#pg-8-4 > .panel-row-style,
#pg-8-12 > .panel-row-style {
  max-width: 1170px;
  margin-inline: auto;
}

#pg-8-1 {
  width: 100%;
  max-width: none;
  border-bottom: 1px solid #e0e0e0;
  background: #f2f2f2;
}

#pg-8-1 > .panel-row-style {
  max-width: 1170px;
  margin-inline: auto;
  background: transparent;
}

#pg-8-12 .social-menu-widget a {
  color: #fff;
}

#pg-8-12 .social-menu-widget a::before {
  color: currentColor;
  text-shadow: none;
}

#pg-8-12 .social-menu-widget a:focus-visible {
  outline-color: #fff;
}
