body, html {
    margin: 0;
    padding: 0;
    height: 100%;
  }

  .lazy-img,
  .lazy-video {
    display: flex;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
  }
  .lazy-img:not([data-src]),
  .lazy-video:not([data-src]) {
    opacity: 1;
  }
  .proj-window.has-video {
    background-color: black !important;
  }
  

.navbar-bg {
    display: flex;
    position: fixed;
    justify-content: space-between;
    align-items: center;
    top: 0;
    width: 100vw;
    height: 140px;
    background-image: url("../assets/images/texture.png");
    background-size: 100%, 100%;
    background-position: center, center;
    mask-image: linear-gradient(to bottom,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0));
    z-index: 8;
}

.proj-wrapper {
    display: flex;
    justify-content: center;
    height: 80vh;
    padding: 8rem 1rem 4rem;
}

.proj-sec {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100vw;
}

.btn-txt {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 1rem;
}

.proj-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 2rem;
    gap: 0.5rem;
    button {
        font-family: var(--main-font);
        font-size: 20px;
        font-weight: 300;
        color: white;
        outline: 1px solid white;
        border: none;
        border-radius: 50px;
        padding: 0.5rem 1rem;
        background-color: transparent;
        transition: all 0.15s ease-in-out;
        /* pointer-events: all; */
    }
    button.active,
    button:hover {
        color: var(--blue);
        background-color: white;
        font-weight: bold;
    }
}

.proj-preview {
    position: relative;
    overflow: hidden;
    width: clamp(280px, 90vw, 60vw);
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: black;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;
  }
  .proj-window {
    justify-content: center;
    align-items: center;
    display: flex;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background: black;
    z-index: 0;
  }

  .proj-window video {
    width: 100%;
    object-fit: cover;
    display: block;
  }
  
  .proj-window img {
    width: 100%;
    object-fit: cover;
    display: block;
  }

  .proj-window video {
    background: black;
    pointer-events: auto;
    z-index: 3;
  }

.proj-preview {
  position: relative;
  overflow: hidden;
}

.proj-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 30px;
}

.preview-txt,
.proj-dots {
  position: relative;
  padding: 1.5rem;
  z-index: 5;
  filter: drop-shadow(0 0 4px black);
}


.preview-txt p {
    margin: 0.5rem 0;
}

.proj-dots {
    display: flex;
    justify-content: right;
    flex-wrap: wrap;
    gap: 0.8rem;
    z-index: 2;
}

.proj-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    outline: 1px solid white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.proj-dots .dot:hover {transform: scale(1.1);}
.proj-dots .dot.active {background-color: white;}
.carousel-wrapper {
    display: flex;
    overflow: scroll;
    height: 100%;
    position: relative;
    padding: 0 1rem;
    /* mask-image: linear-gradient(to bottom,
     rgba(0,0,0,0),
     rgba(0,0,0,1) 5%,
     rgba(0,0,0,1) 95%,
     rgba(0,0,0,0)); */
  }

.proj-carousel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    scroll-behavior: smooth;
    animation: scroll 20s linear infinite;
}

.proj-img {
    position: relative;
    img {
        width: 183px;
        height: 136px;
        border-radius: 10px;
        object-fit: cover;
        transition: all 0.3s ease-in-out;
    }
    :hover {transform: scale(1.06);}
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .custom-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    z-index: 5;
  }
  
  .custom-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
  }
  
.proj-img::after {
    content: attr(data-title);
    position: absolute;
    display: flex;
    bottom: 0;
    height: 100%;
    width: 100%;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    transform: scale(1.06);
  }
  
  .proj-img:hover::after {
    opacity: 1;
  }
  
.proj-window video {
    position: relative;
    z-index: 5;
    pointer-events: auto;
  }
  
  .proj-preview::after {
    pointer-events: none; 
  }
  
  .preview-txt,
  .proj-dots {
    pointer-events: auto;
    z-index: 6; 
  }
  
.proj-window {
    transition: transform 0.3s ease, background-color 0.3s ease;
    will-change: transform;
  }
  
  .proj-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 0.3em 0.6em;
    border-radius: 50%;
    cursor: pointer;
    z-index: 7;
    transition: background 0.3s;
  }
  
  .proj-arrow:hover {
    background: rgba(0,0,0,0.6);
  }
  
  .left-arrow {
    left: 10px;
  }
  
  .right-arrow {
    right: 10px;
  }

@media (max-width: 1280px) {
    .btn-txt {
        text-align: center;
        br {display: none;}
        h3 {
            font-size: 30px;
            margin: 1rem;
        }
    }
    .proj-btn {
        flex-direction: row;
        padding-bottom: 0;
    }
    .proj-sec {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .proj-wrapper {
        height: 100%;
    }
    .proj-preview {
        height: 100%;
    }
    .preview-txt {
        h4 {font-size: 20px;}
        p {font-size: 16px;}
    }
    .proj-carousel {
        flex-direction: row;
        align-items: center;
        width: 900px;
    }
    .proj-preview {width: clamp(250px, 90vw, 900px);}
    .carousel-wrapper {
        overflow-y: hidden;
        overflow-x: visible;
        height: 50%;
        mask-image: none;
        padding: 0;
    }
}
@media (max-width: 1000px) {
  .proj-carousel {
    width: 90vw;
  }
  .proj-arrow {
    font-size: 1.5rem;
    padding: 0.2em 0.4em;
  }
}
@media (max-width: 768px) {
    .proj-preview {
      aspect-ratio: 4 / 3;
      width: 95vw;
      border-radius: 20px;
    }
  
    .preview-txt{padding: 1rem;}

    .preview-txt h4 {
      font-size: 18px;
    }
  
    .preview-txt p {
      font-size: 14px;
    }
  
    .proj-dots {
      gap: 0.3rem;
      opacity: 0.5;
      padding: 1rem;
    }
  
    .proj-dots .dot {
      width: 5px;
      height: 5px;
    }
  }

@media (max-width: 490px) {
    .proj-btn {
        flex-direction: column;
        button {
            font-size: 16px;
        }
    }
}

@media (max-width: 480px) {
    .proj-preview {
      aspect-ratio: 1 / 1;
    }
  
    .preview-txt h4 {
      font-size: 16px;
    }
  
    .preview-txt p {
      font-size: 12px;
    }
  }