.dmb-blurb {
  padding: 20px 0;
}

.home-cta {
  vertical-align: bottom;
  font-size: 1.5em;
  padding-top: 100px;
}

@media screen and (max-width: 768px) {
  .home-cta {
    padding-top: 20px !important;
  }

  .container-padded.home-bespoke {
    padding-top: 0 !important;
    padding-bottom: 20px !important;
  }

  .home-bespoke h2 {
    margin-top: 0;
  }

  /* Reduce hero height on narrow screens so the Bespoke section sits closer */
  #homeSlider .item {
    padding: 120px 20px !important;
    max-height: 450px !important;
  }

  #homeSlider .carousel-inner {
    min-height: 450px !important;
  }
}

.carousel-caption {
  color: white;
  padding-bottom: 60px;
}
.carousel-caption h2 {
  color: white;
}

/* Carousel items now use an inner .kb-bg element so we can animate scale (Ken Burns)
   and fade transitions without relying on Bootstrap's slide transform. */
/* Base slide container: keeps the same padding-based height but we
   make the inner slides overlap so we can cross-fade them. */
.item {
  max-height: 800px;
  padding: 250px 50px;
  overflow: hidden;
}

/* Ensure the carousel-inner is a positioned container and has a
   minimum height so absolute-positioned slides keep visible height. */
.carousel-inner {
  position: relative;
  min-height: 600px; /* matches .item max-height */
}

/* Position slides on top of one another so we can fade between them (home hero only). */
#homeSlider.carousel-fade .carousel-inner .item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}

/* Active slide is fully visible. */
#homeSlider.carousel-fade .carousel-inner .item.active {
  opacity: 1;
  z-index: 2;
}

/* During a transition Bootstrap adds .next/.prev and directional classes.
   These rules create a true cross-fade between outgoing and incoming slides. */
#homeSlider.carousel-fade .carousel-inner .item.next,
#homeSlider.carousel-fade .carousel-inner .item.prev {
  opacity: 0;
  z-index: 1;
}

#homeSlider.carousel-fade .carousel-inner .item.next.left,
#homeSlider.carousel-fade .carousel-inner .item.prev.right {
  opacity: 1;
  z-index: 2;
}

#homeSlider.carousel-fade .carousel-inner .item.active.left,
#homeSlider.carousel-fade .carousel-inner .item.active.right {
  opacity: 0;
  z-index: 1;
}

/* Disable positional sliding; keep slides stacked and only fade/zoom. */
#homeSlider.carousel-fade .carousel-inner .item,
#homeSlider.carousel-fade .carousel-inner .item.left,
#homeSlider.carousel-fade .carousel-inner .item.right,
#homeSlider.carousel-fade .carousel-inner .item.next,
#homeSlider.carousel-fade .carousel-inner .item.prev,
#homeSlider.carousel-fade .carousel-inner .item.active.left,
#homeSlider.carousel-fade .carousel-inner .item.active.right {
  -webkit-transform: none !important;
  -ms-transform: none !important;
  transform: none !important;
  left: 0 !important;
}

/* Background layer that will be scaled/animated */
.item .kb-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  will-change: transform, opacity;
  transform-origin: center center;
  transform: scale(1);
}

/* Move background images onto the .kb-bg child so we can animate them.
   We keep the original positions where appropriate. */
#slide1 .kb-bg {
  background-image: url(../images/banners/deck.jpg);
  background-position: left center;
}
#slide2 .kb-bg {
  background-image: url(../images/banners/deck2.jpg);
  background-position: center center;
}
#slide3 .kb-bg {
  background-image: url(../images/banners/gate.jpg);
  background-position: center center;
}
#slide4 .kb-bg {
  background-image: url(../images/banners/house_frame.jpg);
  background-position: center center;
}

/* Ken Burns animation: slow scale-in while the item is active. The duration
   should match the carousel interval (5000ms) so it resets each slide. */
@keyframes kenburns-zoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.3);
  }
}

@keyframes kenburns-zoom-alt {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.3);
  }
}

/* The Ken Burns animation is now controlled by adding the `kb-animate` class
   to the slide background. We avoid `forwards` so the animation doesn't hold
   the end state (prevents the image from getting stuck scaled). A small JS
   helper will add/remove `kb-animate` when slides change so the animation
   restarts cleanly each interval. */
.kb-bg.kb-animate {
  animation: kenburns-zoom 5.5s linear forwards;
}

.kb-bg.kb-animate-alt {
  animation: kenburns-zoom-alt 5.5s linear forwards;
}

.caption-overlay {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 16px;
}

#banner2 {
  background-image: url(../images/home/board-walk.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  padding: 150px 0;
}

#projects {
  background-image: url(../images/home/wall.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  z-index: 0;
  position: relative;
  padding: 50px;
  padding-top: 250px;
  color: white;
}
#projects::before {
  content: "";
  position: absolute;
  inset: 0; /* shorthand for top:0; right:0; bottom:0; left:0; */
  background-color: rgba(0, 0, 0, 0.7); /* dark overlay */
  z-index: -1; /* keeps overlay *behind* the content */
}

.projectGal {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  padding: 200px 0;
}
