/* Recent Projects Slider Section Styles */
.recent-projects {
  background-color: #f7f7f7;
  padding: 40px 0; /* Reduced padding by 50% */
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #0a0a0a, #121212, #0a0a0a);
  z-index: 1;
}

/* Section header styling */
.recent-projects-header {
  text-align: center;
  margin-bottom: 20px; /* Reduced margin by 50% */
}

.recent-projects-header h2 {
  font-size: 2rem; /* Reduced size */
  font-weight: 700;
  margin-bottom: 10px; /* Reduced margin */
  position: relative;
  display: inline-block;
  color: #ffffff;
}

.recent-projects-header h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #fad02c;
  border-radius: 3px;
}

.recent-projects-header p {
  font-size: 1.2rem;
  color: #e4e6eb;
  max-width: 700px;
  margin: 0 auto;
  padding-top: 15px;
}

/* Slider container */
.projects-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0; /* Reduced by 50% */
}

.projects-slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

/* Project card styling */
.project-card {
  flex: 0 0 350px; /* Slightly wider for better visibility */
  min-height: 250px; /* Increased height for better image display */
  margin: 0 15px;
  background-color: #252525;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* Enhanced shadow for better depth */
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 74, 173, 0.3);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: -1;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.project-card:hover::after {
  opacity: 1;
}

.project-logo-container {
  height: 180px; /* Increased for better image visibility */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    #f0f0f0,
    #fafafa
  ); /* Subtle gradient background */
  padding: 0; /* Removed padding to allow images to fill the container completely */
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* Subtle separator */
}

/* Add a subtle overlay for better image contrast when needed */
.project-logo-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 70%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-logo-container::after {
  opacity: 0.2; /* Reduce overlay on hover to show more image details */
}

.project-logo {
  width: 100%; /* Use full width of container */
  height: 100%; /* Use full height of container */
  object-fit: cover; /* Cover ensures the image fills the container */
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Smoother transition */
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15));
  display: block; /* Ensures proper rendering */
  transform-origin: center; /* Better zoom effect */
}

.project-card:hover .project-logo {
  transform: scale(1.08); /* Slightly more zoom for better visibility */
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2)) brightness(1.08);
  animation: subtle-pulse 3s infinite; /* Slower animation for more elegance */
}

@keyframes subtle-pulse {
  0% {
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.15)) brightness(1.05);
  }
  50% {
    filter: drop-shadow(0 8px 18px rgba(0, 74, 173, 0.3)) brightness(1.12); /* Enhanced brightness and shadow */
  }
  100% {
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.15)) brightness(1.05);
  }
}

.project-info {
  padding: 15px; /* Increased padding for better readability */
  text-align: center;
  position: relative;
  background-color: rgba(
    30,
    30,
    30,
    0.95
  ); /* Slightly darker background for contrast */
}

.project-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px; /* Wider divider */
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    #fad02c,
    transparent
  ); /* Changed to gold color to match brand */
  border-radius: 3px;
}

.project-title {
  font-size: 1.2rem; /* Increased font size for better readability */
  font-weight: 700; /* Bolder text for better visibility */
  margin: 10px 0 5px; /* Adjusted margins */
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Added subtle text shadow for better contrast */
}

.project-type {
  font-size: 0.9rem; /* Increased font size */
  color: #fad02c;
  margin-bottom: 8px;
  font-weight: 600; /* Bolder text */
  letter-spacing: 1px; /* Increased letter spacing for better readability */
}

/* Animated background elements */
.projects-bg-element {
  position: absolute;
  z-index: -1;
  opacity: 0.05;
}

.projects-circle {
  width: 150px; /* Reduced by 50% */
  height: 150px; /* Reduced by 50% */
  border-radius: 50%;
  border: 15px solid #fad02c; /* Reduced by 50% */
  top: -75px; /* Adjusted to match new size */
  right: 10%;
}

.projects-square {
  width: 100px; /* Reduced by 50% */
  height: 100px; /* Reduced by 50% */
  transform: rotate(45deg);
  background-color: #fad02c;
  bottom: -50px; /* Adjusted to match new size */
  left: 15%;
}

/* Continuous sliding animation styling */
.projects-slider-track {
  display: flex;
  padding: 10px 0; /* Reduced by 50% */
}

/* Auto sliding animation */
@keyframes slideAnimation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(
      calc(-350px * 3)
    ); /* Adjusted for updated card width and smoother sliding */
  }
}

.auto-slide {
  animation: slideAnimation 30s linear infinite; /* Slower animation for better visibility */
  will-change: transform; /* Performance optimization */
  -webkit-backface-visibility: hidden; /* Smoother animation */
  backface-visibility: hidden;
}

.auto-slide:hover {
  animation-play-state: paused; /* Pause on hover to let users examine details */
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .project-card {
    flex: 0 0 240px; /* Slightly larger to improve visibility */
    min-height: 160px; /* Increased height for better image display */
  }

  .project-logo-container {
    height: 100px; /* Increased height for better image visibility */
  }

  .project-logo {
    width: 100%; /* Use full width of container */
    height: 100%; /* Use full height of container */
    object-fit: cover; /* Maintain consistency with desktop view */
  }
}

@media screen and (max-width: 480px) {
  .recent-projects {
    padding: 30px 0;
  }

  .project-card {
    flex: 0 0 190px; /* Slightly larger for better visibility */
    min-height: 140px; /* Increased for better image display */
    margin: 0 8px; /* Slightly larger margins */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Optimized shadow for mobile */
  }

  .project-logo-container {
    height: 90px; /* Increased height for better image visibility */
    padding: 5px; /* Reduced padding to maximize image space */
  }

  .project-logo {
    width: 100%; /* Use full width of container */
    height: 100%; /* Use full height of container */
    object-fit: cover; /* Maintain consistency with desktop view */
  }

  .project-title {
    font-size: 1rem; /* Adjusted font size for mobile */
    margin: 5px 0 3px; /* Optimized margins for mobile */
  }

  .project-type {
    font-size: 0.8rem; /* Adjusted font size for mobile */
  }
}
