/* Projects Carousel Section */
.projects {
  min-height: 100vh;
  padding: 120px 50px 80px 50px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  scroll-margin-top: 75px;
}

.projects::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(173, 83, 23, 0.05) 0%,
    rgba(161, 77, 21, 0.1) 100%
  );
  pointer-events: none;
}

.projects .titles {
  text-align: center;
  margin-bottom: 60px;
  font-size: 2.5rem;
  font-weight: 700;
  color: #ad5317;
  position: relative;
  z-index: 2;
}

.projects .titles::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #ad5317, #a14d15);
  border-radius: 2px;
}

/* Carousel Container */
.carousel-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-slide {
  min-width: 100%;
  background: #2a2f2a;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.project-slide.active {
  opacity: 1;
  transform: scale(1);
}

.project-slide:not(.active) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.project-image {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-slide:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(173, 83, 23, 0.8) 0%,
    rgba(161, 77, 21, 0.9) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-slide:hover .project-overlay {
  opacity: 1;
}

.project-tech {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tech span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-info {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ad5317;
  margin-bottom: 15px;
  line-height: 1.3;
}

.project-info p {
  color: #e0e0e0;
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.btn-project,
.btn-github {
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-project {
  background: linear-gradient(135deg, #ad5317, #a14d15);
  color: #fff;
  border: 2px solid transparent;
}

.btn-project:hover {
  background: transparent;
  border-color: #ad5317;
  color: #ad5317;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(173, 83, 23, 0.3);
}

.btn-github {
  background: transparent;
  color: #ad5317;
  border: 2px solid #ad5317;
}

.btn-github:hover {
  background: #ad5317;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(173, 83, 23, 0.3);
}

/* Navigation Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(173, 83, 23, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.dot.active {
  background: #ad5317;
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(173, 83, 23, 0.5);
}

.dot:hover {
  background: #ad5317;
  transform: scale(1.1);
}

/* Navigation Arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(173, 83, 23, 0.9);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.carousel-btn:hover {
  background: #ad5317;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 20px rgba(173, 83, 23, 0.4);
}

.prev-btn {
  left: -25px;
}

.next-btn {
  right: -25px;
}

/* Auto-play indicator */
.carousel-container::before {
  content: "";
  position: absolute;
  top: -30px;
  right: 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ad5317, #a14d15);
  animation: pulse 2s infinite;
}

/* Slide counter indicator */
.carousel-container::after {
  content: attr(data-slide-counter);
  position: absolute;
  top: -30px;
  right: 50px;
  color: #ad5317;
  font-weight: bold;
  font-size: 0.9rem;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Loading animation for images */
.project-image img {
  opacity: 0;
  animation: fadeInImage 0.8s ease forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}

/* Slide transition effects */
.project-slide {
  position: relative;
}

.project-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(173, 83, 23, 0.1),
    transparent
  );
  transition: left 0.8s ease;
  z-index: 1;
}

.project-slide.active::before {
  left: 100%;
}
