/**
 * Work Section Styles
 *
 * @format
 */

.work {
  padding: 6rem 2rem;
  background: #ffffff;
}

.work-container {
  max-width: 1000px;
  margin: 0 auto;
}

.work-header {
  text-align: center;
  margin-bottom: 4rem;
}

.work-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.work-subtitle {
  font-size: 1rem;
  color: #666;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.project {
  background: #fafafa;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-image {
  width: 100%;
  /* Remove fixed height to allow natural image proportions */
  min-height: 200px; /* Set minimum instead of fixed height */
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0; /* Round top corners only */
}

.project-image img {
  width: 100%;
  height: auto; /* Allow natural height */
  max-height: 400px; /* Set maximum to prevent overly tall images */
  object-fit: contain; /* Change from 'cover' to 'contain' to show full image */
  object-position: center;
  transition: transform 0.3s ease;
}

/* Optional: Add padding if image appears too cramped */
.project-image {
  padding: 1rem; /* Add some breathing room */
}

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

.project-content {
  padding: 2.5rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.project-type {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.project-link {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  position: relative;
}

.project-link:hover {
  color: #1a1a1a;
}

.project-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #1a1a1a;
  transition: width 0.2s ease;
}

.project-link:hover::after {
  width: 100%;
}

.project-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  background: white;
  color: #666;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid #e5e5e5;
  font-weight: 500;
}

.coming-soon {
  text-align: center;
  padding: 3rem 2rem;
  color: #999;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .work {
    padding: 4rem 1rem;
  }

  .work-title {
    font-size: 1.75rem;
  }

  .project-content {
    padding: 2rem;
  }

  .project-header {
    flex-direction: column;
    gap: 1rem;
  }

  .project-links {
    align-self: flex-start;
  }

  .project-name {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-greeting {
    font-size: 0.9rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    width: 180px;
    padding: 0.7rem 1.25rem;
    font-size: 0.85rem;
  }

  .about {
    padding: 3rem 1rem;
  }

  .profile-photo {
    max-width: 200px;
  }

  .about-title {
    font-size: 1.5rem;
  }

  .work {
    padding: 3rem 1rem;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-image {
    height: 250px;
  }
}

/* ============================================
   Carousel Styles
   ============================================ */

.carousel-wrapper {
  position: relative;
  width: 100%;
  padding: 0 60px;
  box-sizing: border-box;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  width: 100%;
}

.carousel-slide {
  width: 100%;
  min-width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Override project styles inside carousel */
.carousel-slide.project {
  margin: 0;
}

.carousel-slide.project:hover {
  transform: none;
}

/* Better image display in carousel */
.carousel-slide .project-image {
  height: 400px;
  min-height: 400px;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide .project-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e5e5;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: #999;
}

.indicator.active {
  background: #1a1a1a;
  transform: scale(1.2);
}

/* Responsive Carousel */
@media (max-width: 768px) {
  .carousel-wrapper {
    padding: 0 50px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-slide .project-image {
    height: 300px;
    min-height: 300px;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .carousel-wrapper {
    padding: 0 40px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-slide .project-image {
    height: 250px;
    min-height: 250px;
    padding: 1rem;
  }
}
