/* Projects Section - Derun Studio */

.projects-section {
  padding: 80px 0;
  background: var(--nefes-beji);
  position: relative;
  overflow: hidden;
}

/* Projects Carousel Wrapper */
.projects-carousel {
  margin-top: 60px;
  position: relative;
}

/* Owl Carousel Stage */
.projects-carousel .owl-stage-outer {
  overflow: visible;
  padding: 60px 0 80px 0;
}

.projects-carousel .owl-stage {
  display: flex;
  align-items: center;
}

.projects-carousel .owl-item {
  padding: 0 20px;
}

/* Project Card */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px 32px 30px 34px;
  background: var(--nefes-beji);
  border: 2px solid var(--derun-toprak);
  cursor: pointer;
  width: 500px;
  height: 400px;
  aspect-ratio: 4 / 3;
  box-shadow: 4px 4px 0px rgba(139, 106, 78, 0.1),
    8px 8px 0px rgba(139, 106, 78, 0.05);
}
/* Carousel items - using jQuery animate for smooth transition */
.projects-carousel .owl-item .project-card {
  /* Default side item state */
  transform: scale(0.55);
  opacity: 0.5;
}

.project-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 15px,
    rgba(124, 154, 109, 0.05) 15px,
    rgba(124, 154, 109, 0.05) 30px
  );

  border-radius: 28px 32px 30px 34px;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  border-color: var(--doga-yesil);
  box-shadow: 6px 6px 0px rgba(124, 154, 109, 0.2),
    12px 12px 0px rgba(124, 154, 109, 0.1),
    0 20px 40px rgba(124, 154, 109, 0.15);
}

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

/* Project Image */
.project-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover .project-image img {
  filter: blur(8px);
  transform: scale(1.1);
}

/* Project Overlay */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(124, 154, 109, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  padding: 40px;
}

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

/* Project Title */
.project-title {
  font-family: var(--font--serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  line-height: 1.3;
  margin: 0;
  transform: translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.project-card:hover .project-title {
  transform: translateY(0);
}

/* Responsive: Tablet */
@media screen and (max-width: 991px) {
  .projects-section {
    padding: 60px 0;
  }

  .projects-carousel {
    margin-top: 48px;
  }

  .project-card {
    aspect-ratio: 3 / 2.5;
  }

  .project-title {
    font-size: 28px;
  }

  .project-overlay {
    padding: 30px;
  }

  .projects-carousel .owl-nav button.owl-prev,
  .projects-carousel .owl-nav button.owl-next {
    width: 48px;
    height: 48px;
    font-size: 28px !important;
  }
}

/* Responsive: Mobile */
@media screen and (max-width: 767px) {
  .projects-section {
    padding: 50px 0;
  }

  .projects-carousel {
    margin-top: 40px;
  }

  .project-card {
    aspect-ratio: 4 / 3;
  }

  .project-title {
    font-size: 24px;
  }

  .project-overlay {
    padding: 24px;
  }

  .project-card:hover {
    transform: translateY(-6px) rotate(-0.5deg);
  }

  .projects-carousel .owl-item .project-card {
    transform: scale(0.8) !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .projects-carousel .owl-item.center .project-card {
    transform: scale(1.1) !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .projects-carousel .owl-nav button.owl-prev,
  .projects-carousel .owl-nav button.owl-next {
    width: 42px;
    height: 42px;
    font-size: 24px !important;
  }

  .projects-carousel .owl-nav {
    padding: 0 10px;
  }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
  .project-title {
    font-size: 20px;
  }

  .project-overlay {
    padding: 20px;
  }

  .projects-carousel .owl-nav button.owl-prev,
  .projects-carousel .owl-nav button.owl-next {
    width: 38px;
    height: 38px;
    font-size: 22px !important;
  }
}

/* Animation Enhancement */
@keyframes projectFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card {
  animation: projectFadeIn 0.6s ease forwards;
}

.project-card:nth-child(1) {
  animation-delay: 0.1s;
}

.project-card:nth-child(2) {
  animation-delay: 0.2s;
}

.project-card:nth-child(3) {
  animation-delay: 0.3s;
}

.project-card:nth-child(4) {
  animation-delay: 0.4s;
}

.project-card:nth-child(5) {
  animation-delay: 0.5s;
}

.project-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Owl Carousel Navigation */
.projects-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 20px;
  z-index: 10;
}

.projects-carousel .owl-nav button.owl-prev,
.projects-carousel .owl-nav button.owl-next {
  pointer-events: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white) !important;
  color: var(--derun-toprak) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px !important;
  line-height: 1;
  border: 2px solid var(--derun-toprak);
  box-shadow: 4px 4px 0px rgba(139, 106, 78, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.projects-carousel .owl-nav button span {
  font-size: 32px;
  line-height: 1;
  display: block;
}

.projects-carousel .owl-nav button:hover {
  background: var(--doga-yesil) !important;
  color: var(--white) !important;
  border-color: var(--doga-yesil);
  transform: scale(1.1);
  box-shadow: 6px 6px 0px rgba(124, 154, 109, 0.2);
}

/* Hide dots */
.projects-carousel .owl-dots {
  display: none !important;
}
