@font-face {
  font-family: 'Bethany Elingston';
  src: url('../fonts/bethany_elingston/BethanyElingston.otf') format('opentype');
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}
* > body {
  line-height: 1.5; /* Adjust spacing between lines */
  letter-spacing: 1px; /* Adjust spacing between letters */
  overflow-x: hidden;
}
/* Header */
.header {
    transition: all .3s ease-in-out;
    background-color: #fff;
    z-index: 100;
}
.header-up {
    transform: translateY(-100%);
}
.header-down {
    transform: translateY(0);
}
.mobile-menu {
  position: relative;
  z-index: 110;
}
.socials {
  transition: all .3s ease-in-out;
  z-index: 0;
}
.socials-right {
  transform: translateX(10rem);
}
.socials-left {
  transform: translateX(0);
}
/* Desktop nav animations */
/* Arrow Rotation for dropdown - Apply only to navigation links */
nav .group:hover .fa-chevron-down {
  transform: rotate(180deg);
  transition: transform 0.3s ease-in-out;
}
/* Bottom border and text color change for all nav links */
nav a {
  position: relative;
  display: inline-block; /* Ensures proper width handling */
  color: #4A5568; /* Default text color */
  transition: color 0.3s ease;
}
nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #000; /* Red line color */
  transform: scaleX(0); /* Hide the line initially */
  transform-origin: center;
  transition: transform 0.3s ease;
}
nav a:hover {
  color: #000; /* Change text color to red when hovered */
}
nav a:hover::after {
  transform: scaleX(1); /* Show the line */
}
/* Dropdown visibility for both third and fifth links */
nav .th-link:hover .th-link-dropdown-menu,
nav .fifth-link:hover .fifth-link-dropdown-menu {
  display: block; /* Show dropdown when hovering over parent link */
}
nav .th-link .th-link-dropdown-menu,
nav .fifth-link .fifth-link-dropdown-menu {
  display: none; /* Hide the dropdown by default */
  position: absolute;
  top: 70%;
  left: 0;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 100%;
  padding: 10px 0;
  z-index: 120;
}
/* Parallax Effect */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-attachment: fixed; /* Keeps the background fixed */
  background-size: cover;
}
/* Reviews */
.h-review {
  height: 30vh
}
/* About Us Section */
.aboutUsSection {
  margin-top: 140vh;
}

/* Rotation keyframe animation */
@keyframes rotate {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

/* Center the arrow above the factory */
.arrow-container {
  position: absolute;
  top: -50px; /* Adjust to position above the cogs */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

/* Bouncing animation for the arrow */
.arrow {
  font-size: 40px;
  color: white;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-20px);
  }
}
/* About us section */
.slider-3d-container {
  position: relative;
  width: 120%;
  left: -10%;
  height: 400px;
  transform-style: preserve-3d;
  perspective: 1200px;
  margin: 0 auto;
}

.slider-3d-track {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.slider-3d-item {
  position: absolute;
  width: 80%;
  left: 10%;
  height: 100%;
  transform-style: preserve-3d;
  animation: slideFlow 12s infinite linear;
  opacity: 0;
  backface-visibility: hidden;
  will-change: transform;
  transform-origin: center center;
}

/* Animation Delays */
.slider-3d-item:nth-child(1) { animation-delay: 0s; }
.slider-3d-item:nth-child(2) { animation-delay: 4s; }
.slider-3d-item:nth-child(3) { animation-delay: 8s; }

@keyframes slideFlow {
  /* Enter from left */
  0% {
    transform: translateX(-150%) translateZ(-300px) rotateY(30deg) scale(0.6);
    opacity: 0;
  }
  
  /* Arrive at center (X movement complete) */
  25% {
    transform: translateX(0%) translateZ(-300px) rotateY(0deg) scale(0.8);
    opacity: 0.8;
  }

  /* Move forward in Z-axis */
  37.5% {
    transform: translateX(0%) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
  }

  /* Hold front position */
  50% {
    transform: translateX(0%) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
  }

  /* Move back in Z-axis */
  62.5% {
    transform: translateX(0%) translateZ(-300px) rotateY(0deg) scale(0.8);
    opacity: 0.8;
  }

  /* Start exiting to right */
  75% {
    transform: translateX(0%) translateZ(-300px) rotateY(0deg) scale(0.8);
    opacity: 0.8;
  }

  /* Exit to right */
  87.5% {
    transform: translateX(150%) translateZ(-300px) rotateY(-30deg) scale(0.6);
    opacity: 0;
  }

  /* Final state */
  100% {
    transform: translateX(150%) translateZ(-300px) rotateY(-30deg) scale(0.6);
    opacity: 0;
  }
}

/* Additional Fixes */
.slider-3d-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateZ(0); /* Force hardware acceleration */
}
/* Services Section */
.services {
  margin-top: 0;
}

/* Contact Form */
.contact-form {
  --form-ok-color: rgb(109, 238, 109);
  --form-error-color: red;
}
.contact-form [required]:valid {
  border: thin solid var(--form-ok-color);
}
.contact-form [required].input-invalid {
  border: thin solid var(--form-error-color);
}
.contact-form-error {
  margin-top: -1rem;
  font-size: 80%;
  background-color: red;
  color: #fff;
  transition: all 800ms ease;
}
.contact-form-loader {
  text-align: center;
}
.contact-form span {
  width: 100%;
}
.contact-form-error.is-active {
  display: inline-block;
  animation: show-message 1s 1 normal 0s ease-out both; 
}
.none {
  display: none;
}
@keyframes show-message {
  0% {
    visibility: hidden;
    opacity: 0;
  }

  100% {
    visibility: visible;
    opacity: 1;
  }
}


/* Masonry Grid Layout */
.gallery-grid {
  column-count: 4; /* Number of columns */
  column-gap: 5px; /* Spacing between columns */
  padding: 20px;
}
.item {
  position: relative;
  background-color: #f0f0f0; /* Optional: for better visibility */
  overflow: hidden;
  break-inside: avoid; /* Prevent items from breaking across columns */
  margin-bottom: 5px; /* Spacing between items */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.item img {
  width: 100%; /* Ensure the image fills the container */
  height: auto; /* Maintain aspect ratio */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-grid {
      column-count: 3; /* 2 columns on smaller screens */
  }
}
@media (max-width: 480px) {

  .gallery-grid {
      column-count: 3; /* 1 column on mobile */
      margin-top: 32rem;
  }

}
@media (max-width: 768px) {

  /* Slider */
  .slider-3d-container {
    position: absolute;
    left: 0%;
    width: 100%;
    height: 500px;
    perspective: 800px;
  }

  .slider-3d-track {
    overflow-x: hidden;
  }
  
  .slider-3d-item {
    animation: slideFlowMobile 9s infinite linear; /* Adjusted timing */
  }

  @keyframes slideFlowMobile {
    /* Enter from left */
    0% {
      transform: translateX(-150%) translateZ(-300px) rotateY(30deg) scale(0.2);
      opacity: 0;
    }
    
    /* Arrive at center (X movement complete) */
    25% {
      transform: translateX(0%) translateZ(-300px) rotateY(0deg) scale(0.6);
      opacity: 0.8;
    }
  
    /* Move forward in Z-axis */
    37.5% {
      transform: translateX(0%) translateZ(0) rotateY(0deg) scale(1);
      opacity: 1;
    }
  
    /* Hold front position */
    50% {
      transform: translateX(0%) translateZ(0) rotateY(0deg) scale(1);
      opacity: 1;
    }
  
    /* Move back in Z-axis */
    62.5% {
      transform: translateX(0%) translateZ(-300px) rotateY(0deg) scale(0.6);
      opacity: 0.8;
    }
  
    /* Start exiting to right */
    75% {
      transform: translateX(0%) translateZ(-300px) rotateY(0deg) scale(0.6);
      opacity: 0;
    }
  
    /* Exit to right */
    87.5% {
      transform: translateX(-50%) translateZ(-300px) rotateY(-30deg) scale(0.2);
      opacity: 0;
    }
  
    /* Final state */
    100% {
      transform: translateX(-50%) translateZ(-300px) rotateY(-30deg) scale(0.2);
      opacity: 0;
    }
  }

  .slider-3d-item:nth-child(1) { animation-delay: 0s; }
  .slider-3d-item:nth-child(2) { animation-delay: 3s; }
  .slider-3d-item:nth-child(3) { animation-delay: 6s; }


  /* Services */
  .services, .projects {
    margin-top: 65vh;
  }
}



