#mainNav .navbar-toggler {
  font-size: 100%;
  border: 0px;
}

.masthead {
  background: -webkit-gradient(linear, left top, left bottom, from(rgba(22, 22, 22, 0.1)), color-stop(75%, rgba(22, 22, 22, 0.5)), to(#161616)), url("../img/backgrounds/intro-bg1.jpg");
  background: linear-gradient(to bottom, rgba(22, 22, 22, 0.1) 0%, rgba(22, 22, 22, 0.5) 75%, #161616 100%), url("../img/backgrounds/intro-bg1.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;  
}

.about-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.projects-section .video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 0;
  -ms-transform: translateX(-50%) translateY(-50%);
  -moz-transform: translateX(-50%) translateY(-50%);
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
}

.people-section {
  padding-top: 5rem;
  padding-bottom: 5rem;	
}

.contact-section {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 35rem;
  background: -webkit-gradient(linear, left top, left bottom, from(rgba(22, 22, 22, 0.1)), color-stop(75%, rgba(22, 22, 22, 0.5)), to(#161616)), url("../img/contact.jpg");
  background: linear-gradient(to bottom, rgba(22, 22, 22, 0.1) 0%, rgba(22, 22, 22, 0.5) 75%, #161616 100%), url("../img/contact.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
}

.modal-body {
	padding: 0rem;
}

.portfolio-item {
  display: block;
  position: relative;
  overflow: hidden;
  max-width: 530px;
  margin: auto auto 1rem;
}

/*
  background: -webkit-gradient(linear, left top, left bottom, from(#161616), color-stop(75%, rgba(22, 22, 22, 0.9)), to(rgba(22, 22, 22, 0.8)));
  background: linear-gradient(to bottom, #161616 0%, rgba(22, 22, 22, 0.9) 75%, rgba(22, 22, 22, 0.8) 100%);
*/
.portfolio-item .caption {
  display: flex;
  height: 100%;
  width: 100%;
  background-color: rgba(22, 22, 22, 0.1);
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
}

/*
  background-color: rgba(33, 37, 41, 0.2);
*/

.portfolio-item .caption .caption-content {
  color: #fff;
  margin: auto 2rem 2rem;
}

.portfolio-item .caption .caption-content h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
}

.portfolio-item .caption .caption-content p {
  font-weight: 300;
  font-size: 1.2rem;
}

@media (min-width: 992px) {
  .portfolio-item {
    max-width: none;
    margin: 2;
  }
  .portfolio-item .caption {
    transition: background-color 0.7s, -webkit-clip-path 0.25s ease-out;
    transition: clip-path 0.25s ease-out, background-color 0.7s;
    transition: clip-path 0.25s ease-out, background-color 0.7s, -webkit-clip-path 0.25s ease-out;
    -webkit-clip-path: inset(0px);
    clip-path: inset(0px);
  }
  .portfolio-item .caption .caption-content {
    transition: opacity 0.25s;
    margin-left: 5rem;
    margin-right: 5rem;
    margin-bottom: 5rem;
  }
  .portfolio-item img {
/*
    transition: -webkit-clip-path 0.25s ease-out;
    transition: clip-path 0.25s ease-out;
    transition: clip-path 0.25s ease-out, -webkit-clip-path 0.25s ease-out;
    -webkit-clip-path: inset(-1px);
    clip-path: inset(-1px);
*/	
    /* filter: url(filters.svg#grayscale); Firefox 3.5+ */
    filter: gray; /* IE5+ */
    -webkit-filter: grayscale(1); /* Webkit Nightlies & Chrome Canary */
    -webkit-transition: all .8s ease-in-out;  
  }
  .portfolio-item:hover img {
/*
   -webkit-clip-path: inset(2rem);
    clip-path: inset(2rem);
*/	
	filter: none;
    -webkit-filter: grayscale(0);
    -webkit-transform: scale(1.01);

  }
  .portfolio-item:hover .caption {
/*
    background-color: rgba(22, 22, 22, 0.9);
    -webkit-clip-path: inset(2rem);
    clip-path: inset(2rem);
*/
  }
}

.post-preview > a {
  color: #212529;
}

.post-preview > a:focus, .post-preview > a:hover {
  text-decoration: none;
  color: #0085A1;
}

.post-preview > a > .post-title {
  font-size: 30px;
  margin-top: 30px;
  margin-bottom: 10px;
}

.post-preview > a > .post-subtitle {
  font-weight: 300;
  margin: 0 0 10px;
}

.post-preview > .post-meta {
  font-size: 18px;
  font-style: italic;
  margin-top: 0;
  color: #868e96;
}

.post-preview > .post-meta > a {
  text-decoration: none;
  color: #212529;
}

.post-preview > .post-meta > a:focus, .post-preview > .post-meta > a:hover {
  text-decoration: underline;
  color: #0085A1;
}

@media only screen and (min-width: 768px) {
  .post-preview > a > .post-title {
    font-size: 36px;
  }
}

/* Fix for carousel items overflowing their container during animation */
#teamCarousel {
  overflow: hidden;
}

/* Custom styles for multi-item carousel */
#teamCarousel .carousel-inner {
    display: flex;
    /* Allow items to be visible outside the 100% width of the inner container, 
       so they can slide in from the right. The parent #teamCarousel handles the clipping. */
    overflow: visible;
    /* Custom transition for smooth one-by-one slide, driven by JS */
    transition: transform 0.6s ease-in-out;
}

/* Spacing for carousel items to match grid gutters (gx-4 = 1.5rem / 2 = 0.75rem) */
#teamCarousel .carousel-item {
    padding: 0 0.75rem;
    flex: 0 0 100%;
    display: block;
    margin-right: 0;
}

/* On medium screens and up, show 3 items */
@media (min-width: 768px) {
    #teamCarousel .carousel-item {
        margin-right: 0;
        flex: 0 0 33.333333%;
        display: block;
    }
}

/*
  This is the fix for the animation conflict.
  1. Bootstrap's default CSS tries to animate individual items using `transform`.
     This conflicts with our custom JS animation that transforms the entire `.carousel-inner` container.
  2. This override neutralizes Bootstrap's transform on all items
     (active, next, and previous) during the slide, keeping them in the flexbox flow.
     This allows our container-based transform to create a smooth, continuous slide.
*/
#teamCarousel .active.carousel-item-start,
#teamCarousel .active.carousel-item-end,
#teamCarousel .carousel-item-next,
#teamCarousel .carousel-item-prev {
    position: relative !important;
    transform: none !important;
}

/* Navbar Scroll Color Fix */
@media (min-width: 992px) {
    /* Force white background when scrolled */
    #mainNav.navbar-shrink {
        background-color: #fff !important;
    }
    /* When navbar is shrunk (scrolled), force text and icons to black */
    #mainNav.navbar-shrink .navbar-brand,
    #mainNav.navbar-shrink .navbar-brand i,
    #mainNav.navbar-shrink .nav-link {
        color: #161616 !important;
    }
    
    /* Keep hover and active color */
    #mainNav.navbar-shrink .nav-link:hover,
    #mainNav.navbar-shrink .nav-link:active,
    #mainNav.navbar-shrink .nav-link.active {
        color: #64a19d !important;
    }
}

/* Mobile view adjustments - ensure text is visible on white background */
@media (max-width: 991px) {
    #mainNav .navbar-brand,
    #mainNav .navbar-brand i,
    #mainNav .nav-link {
        color: #161616 !important;
    }
    
    #mainNav .navbar-toggler {
        color: #161616 !important;
        border-color: #161616 !important;
    }
}