/* Home page v9 - mobile-first, based on the supplied 2026 homepage design. */
.home-page-v2 {
  --home-orange: #ff5e2f;
  --home-blue: #51a1d6;
  --home-pale-blue: #eef8fe;
  --home-ink: #111;
  --home-carousel-overhang: 16px;
  --home-carousel-control-gap: 16px;
  color: var(--home-ink);
}

.home-page-v2 *,
.home-page-v2 *::before,
.home-page-v2 *::after { box-sizing: border-box; }

.home-page-v2 h1,
.home-page-v2 h2 { line-height: 1.3; }

/* Keep all homepage body copy at the design's 16px size. */
.home-page-v2 p { font-size: 16px; }

.home-shell {
  width: calc(100% - 32px);
  max-width: 1280px;
  margin: 0 auto;
}

.home-hero {
  min-height: 330px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.home-hero__shell { min-height: inherit; position: relative; }

.home-intro {
  padding: 36px 0 55px;
  border-top: 1px solid #d3d3d3;
  background-color: #fff;
  background-image: url('../../images/cdpe-bg.png');
  background-position: top left;
  background-repeat: repeat;
}

.home-intro__grid { display: block; }
.home-intro__latest { margin-bottom: 42px; }
.home-latest { width: 100%; }
.home-latest__item {
  position: relative;
  width: 100%;
  margin-bottom: 48px;
  padding: 24px 22px 38px;
  background: #fff;
  border: 1px solid rgba(255,94,47,.55);
  box-shadow: 0 10px 22px rgba(0,0,0,.09);
}
.home-latest__item:last-child { margin-bottom: 0; }
.home-latest__content { padding-bottom: 20px; }
.home-eyebrow {
  margin: 0 0 15px;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
  text-transform: uppercase;
}
.home-latest__title {
  margin: 0 0 16px;
  padding-top: 0;
  color: var(--home-orange);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.3;
  font-weight: 700;
}
.home-latest__copy { font-size: 16px; line-height: 1.65; }
.home-latest__copy p:last-child { margin-bottom: 0; }
.home-latest__image { aspect-ratio: 1.62 / 1; overflow: hidden; }
.home-latest__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.home-button {
  display: inline-block;
  padding: 10px 20px;
  border: 0;
  border-radius: 0;
  background: var(--home-orange);
  color: #fff;
  font-family: 'Asap', sans-serif;
  font-size: 1.125em;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  text-decoration: none;
  transition: background-color .2s ease-in-out;
}
.home-button:visited { color: #fff; }
.home-button:hover,
.home-button:focus { background: #e63600; color: #fff; }
.home-latest__item .home-button {
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: -20px;
}

.home-info-card {
  position: relative;
  padding: 30px 24px;
  color: #fff;
  box-shadow: 0 14px 22px rgba(0,0,0,.10);
}
.home-info-card + .home-info-card { margin-top: 38px; }
.home-info-card--orange { margin-top: 58px; background: var(--home-orange); }
.home-info-card--blue { background: var(--home-blue); }
.home-info-card__icon {
  position: absolute;
  left: 0;
  top: -58px;
  width: 88px;
  height: 58px;
  padding: 11px 18px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--home-orange);
}
.home-info-card__icon img { display: block; width: 38px; height: 38px; }
.home-info-card h2 { margin: 0 0 18px; padding-top: 0; color: #fff; font-size: clamp(26px, 2.6vw, 39px); line-height: 1.3; font-weight: 700; }
.home-info-card__copy { font-size: 16px; line-height: 1.6; }
.home-info-card__copy p:last-child { margin-bottom: 0; }

.home-text-link {
  display: inline;
  margin-top: 22px;
  padding-bottom: 4px;
  color: #fff;
  font-family: 'Asap', sans-serif;
  font-size: 1em;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  text-decoration: none;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-position: left calc(100% - 1px), left calc(100% - 1px);
  background-repeat: no-repeat;
  background-size: 100% 2px, 0 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size .2s ease-out;
}
.home-text-link::before,
.home-text-link::after { content: none; }
.home-text-link {
  background-image:
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)),
    linear-gradient(currentColor, currentColor);
}
.home-text-link:hover,
.home-text-link:focus {
  color: inherit;
  background-size: 100% 2px, 100% 2px;
}
.home-text-link--dark {
  color: var(--home-ink);
  background-image:
    linear-gradient(rgba(17,17,17,.3), rgba(17,17,17,.3)),
    linear-gradient(currentColor, currentColor);
}

.home-projects { padding: 65px 0 70px; background: var(--home-pale-blue); border-top: 1px solid #d3d3d3; border-bottom: 1px solid #d3d3d3; }
.home-projects__header { max-width: 900px; margin-bottom: 55px; }
.home-projects__header h2 { margin: 0 0 28px; font-size: clamp(42px, 5vw, 70px); line-height: 1.3; font-weight: 700; }
.home-projects__copy { max-width: 820px; font-size: 16px; line-height: 1.65; }
.home-projects__copy p:last-child { margin-bottom: 0; }
.home-projects__links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 36px;
  margin-top: 22px;
}
.home-projects__links .home-text-link {
  display: inline-block;
  margin-right: 0;
  white-space: nowrap;
  margin-top:8px;
}
.home-featured-projects { display: grid; gap: 78px; }
.home-featured-project,
.home-featured-project--reverse {
  display: flex;
  flex-direction: column;
}
.home-featured-project__card,
.home-featured-project--reverse .home-featured-project__card {
  order: 1;
  position: relative;
  z-index: 2;
  width: calc(100% - 40px);
  margin: 0 20px -28px;
  padding: 26px 20px 46px;
  background: #fff;
  border: 1px solid rgba(255, 94, 47, .65);
  box-shadow: 10px 12px 22px rgba(0, 0, 0, .09);
}
.home-featured-project__image {
  order: 2;
  width: 100%;
}
.home-featured-project__image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.home-featured-project__card .home-eyebrow { margin: 0 0 15px; }
.home-featured-project__card h3 { padding-top:0;margin: 0 0 24px; color: var(--home-orange); font-size: clamp(25px, 2.3vw, 36px); line-height: 1.3; font-weight: 700; }
.home-featured-project__card h3 a { color: inherit; text-decoration: none; }
.home-featured-project__copy { font-size: 16px; line-height: 1.65; }
.home-featured-project__copy p:last-child { margin-bottom: 0; }
.home-featured-project__card .home-button,
.home-featured-project--reverse .home-featured-project__card .home-button {
  position: absolute;
  left: 20px;
  right: auto;
  bottom: -20px;
}

.home-social-posts { padding: 62px 0 68px; background: #fff; overflow: hidden; }
.home-social-posts__header { display: flex; align-items: flex-start; flex-direction: column; gap: 20px; padding-right: 92px; margin-bottom: 36px; position: relative; }
.home-social-posts__header h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.3; font-weight: 700; }
.home-social-posts__networks { display: flex; align-items: center; gap: 10px; }
.home-social-posts__networks a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #000;
  text-decoration: none;
  transition: color .2s ease-in-out;
}
.home-social-posts__networks a:hover,
.home-social-posts__networks a:focus { color: var(--home-orange); }
.home-social-posts__networks svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.home-social-posts__networks .home-social-glyph { fill: #fff; }
.home-social-carousel { margin-right: -16px; }
.home-social-card { width: 82%; margin-right: 22px; }
.home-social-card__image { margin-bottom: 24px; }
.home-social-card__image img { width: 100%; height: auto; display: block; }
.home-social-card__copy { font-size: 16px; line-height: 1.55; }
.home-social-card__copy p:last-child { margin-bottom: 0; }
.home-social-card__copy + .home-text-link { display: inline-block; margin-top: 22px; }

.home-social-carousel .flickity-viewport {
  overflow: visible;
}

.home-page-v2 .flickity-button {
  background: var(--home-orange);
  color: #fff;
  border: 0;
  border-radius: 0 !important;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  max-width: 38px;
  max-height: 38px;
  padding: 0 !important;
  aspect-ratio: 1 / 1;
}
.home-page-v2 .flickity-button:hover { background: #e63600; }
.home-page-v2 .flickity-button:disabled { opacity: .35; }
.home-page-v2 .flickity-button svg { display: none; }
.home-page-v2 .flickity-button::after { display: none; }
.home-page-v2 .flickity-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 4px solid currentColor;
  border-right: 4px solid currentColor;
  background: transparent;
  transform-origin: center;
}
.home-page-v2 .flickity-prev-next-button.next::before {
  transform: translate(-62%, -50%) rotate(45deg);
}
.home-page-v2 .flickity-prev-next-button.previous::before {
  transform: translate(-38%, -50%) rotate(-135deg);
}
.home-page-v2 .flickity-prev-next-button.previous {
  left: auto;
  right: calc(var(--home-carousel-overhang) + 38px + var(--home-carousel-control-gap));
  top: -57px;
}
.home-page-v2 .flickity-prev-next-button.next {
  right: var(--home-carousel-overhang);
  top: -57px;
}
.home-page-v2 .flickity-page-dots { display: none; }

@media screen and (min-width: 750px) {
  .home-page-v2 {
    --home-carousel-overhang: calc((100vw - min(1280px, calc(100vw - 48px))) / 2);
    --home-carousel-control-gap: 16px;
  }
  .home-shell { width: calc(100% - 48px); }
  .home-hero { min-height: 565px; }

  .home-intro { min-height: 780px; padding: 45px 0 120px; }
  .home-intro__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr); gap: 40px; align-items: start; }
  .home-intro__latest { align-self: stretch; margin: -103px 0 0; }
  .home-latest {
    position: sticky;
    top: 96px;
    z-index: 4;
  }
  .home-latest__item { padding: 30px 30px 42px; margin-bottom: 60px; }
  .home-latest__content { padding-bottom: 22px; }
  .home-latest__item .home-button { left: 30px; }

  .home-info-card { padding: 40px 32px 36px; }
  .home-info-card--orange { margin-top: 58px; }
  .home-info-card + .home-info-card { margin-top: 46px; }

  .home-projects { padding: 90px 0 100px; }
  .home-projects__header { margin-bottom: 75px; }
  .home-projects__links { gap: 8px 38px; }
  .home-featured-projects { gap: 100px; }
  .home-featured-project,
  .home-featured-project--reverse {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr);
    align-items: center;
  }
  .home-featured-project__card,
  .home-featured-project--reverse .home-featured-project__card {
    width: auto;
    margin: 0;
    padding: 36px 32px 48px;
  }
  .home-featured-project__card .home-button { left: 32px; right: auto; }
  .home-featured-project--reverse .home-featured-project__card .home-button { left: auto; right: 32px; }
  .home-featured-project:not(.home-featured-project--reverse) .home-featured-project__card {
    order: 1;
    grid-column: 1;
    grid-row: 1;
    margin-right: -45px;
  }
  .home-featured-project:not(.home-featured-project--reverse) .home-featured-project__image {
    order: 2;
    grid-column: 2;
    grid-row: 1;
  }
  .home-featured-project--reverse { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); }
  .home-featured-project--reverse .home-featured-project__image {
    order: 1;
    grid-column: 1;
    grid-row: 1;
  }
  .home-featured-project--reverse .home-featured-project__card {
    order: 2;
    grid-column: 2;
    grid-row: 1;
    margin-left: -45px;
  }
  .home-featured-project__image { min-height: 430px; }
  .home-featured-project__image img { min-height: 430px; height: 100%; aspect-ratio: auto; }

  .home-social-posts { padding: 85px 0 80px; }
  .home-social-posts__header { flex-direction: row; align-items: center; gap: 26px; margin-bottom: 50px; padding-right: 110px; }
  .home-social-carousel { margin-right: calc((100vw - min(1280px, calc(100vw - 48px))) / -2); }
  .home-social-card { width: 305px; margin-right: 50px; }
  .home-page-v2 .flickity-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; max-width: 44px; max-height: 44px; }
  .home-page-v2 .flickity-prev-next-button.previous {
    right: calc(var(--home-carousel-overhang) + 44px + var(--home-carousel-control-gap));
    top: -75px;
  }
  .home-page-v2 .flickity-prev-next-button.next { right: var(--home-carousel-overhang); top: -75px; }
}

@media screen and (min-width: 960px) {
  .home-intro__grid { grid-template-columns: minmax(0, 1.1fr) minmax(350px, .8fr); gap: 70px; }
  .home-intro__latest { margin-top: -125px; }
  .home-latest { top: 104px; }
  .home-latest__item { padding: 34px 34px 46px; margin-bottom: 70px; }
  .home-latest__item .home-button { left: 34px; }
  .home-info-card { padding: 48px 38px 42px; }
  .home-info-card + .home-info-card { margin-top: 52px; }
  .home-projects { padding: 110px 0 125px; }
  .home-projects__header { margin-bottom: 90px; }
  .home-featured-projects { gap: 130px; }
  .home-featured-project__image { min-height: 510px; }
  .home-featured-project__image img { min-height: 510px; }
  .home-featured-project:not(.home-featured-project--reverse) .home-featured-project__card { margin-right: -90px; padding: 42px 36px 52px; }
  .home-featured-project--reverse .home-featured-project__card { margin-left: -90px; padding: 42px 36px 52px; }
  .home-featured-project__card .home-button { left: 36px; right: auto; }
  .home-featured-project--reverse .home-featured-project__card .home-button { left: auto; right: 36px; }
  .home-social-posts { padding: 105px 0 95px; }
}

/* Home page v6 refinements. */
.home-page-v2 h1,
.home-page-v2 h2,
.home-page-v2 h3,
.home-page-v2 h4,
.home-page-v2 h5,
.home-page-v2 h6 {
  line-height: 1.3;
}

/* Keep Latest overlapping the hero even while the intro columns are stacked. */
.home-intro__latest {
  position: relative;
  z-index: 3;
  margin-top: -72px;
  margin-bottom: 72px;
}

/* Give image-led Latest cards more breathing room before the straddled CTA. */
.home-latest__image {
  margin-bottom: 28px;
}

/* Preserve clear space between the final Latest card and the About tab/icon. */
.home-intro__cards {
  padding-top: 24px;
}

.home-info-card__icon {
  width: 95px;
  padding-top: 30px;
  padding-bottom: 0;
}

/* More separation between card copy and its CTA link. */
.home-info-card__copy {
  margin-bottom: 30px;
}

.home-info-card__copy + .home-text-link {
  margin-top: 0;
}

/* Match the existing 40px promotional/footer social icon sizing exactly. */
.home-social-posts__networks a {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.home-social-posts__networks svg {
  width: 40px;
  height: 40px;
}

@media screen and (min-width: 750px) {
  .home-intro__latest {
    margin-top: -103px;
    margin-bottom: 0;
  }

  .home-intro__cards {
    padding-top: 0;
  }
}

@media screen and (min-width: 960px) {
  .home-intro__latest {
    margin-top: -125px;
  }
}
