/**
 * Project Gallery Styles
 * Uses BEM methodology for class naming
 */

/* Gallery Container */
.project-gallery {
  width: 100%;
  margin: 30px 0;
  position: relative;
}

/* Gallery Counter and Navigation Area */
.project-gallery__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 15px;
  margin-bottom: 20px;
}

.project-gallery__counter {
  font-size: 14px;
  color: #777;
  font-weight: 500;
  margin-left: 15px;
  min-width: 40px;
  text-align: right;
}

/* Swiper Slider for Desktop and Tablet */
.project-gallery__slider {
  height: 500px;
  width: 100%;
  overflow: visible;
}

.project-gallery__slide {
  height: 100%;
  width: auto;
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

/* Remove specific width constraints for different orientations */
.project-gallery__slide.square,
.project-gallery__slide.horizontal,
.project-gallery__slide.vertical {
  width: auto;
}

.project-gallery__image {
  height: 500px;
  width: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
}

.project-gallery__link {
  display: block;
  height: 100%;
  width: auto;
}

.project-gallery__link:hover .project-gallery__image {
  transform: scale(1.03);
}

/* Update Swiper wrapper for flex and gap */
.swiper-wrapper {
  display: flex;
  gap: 0px;
  padding: 0;
}

/* Scrollbar Styling */
.project-gallery__scrollbar {
  flex-grow: 1;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: pointer;
}

.project-gallery__scrollbar-drag {
  position: absolute;
  height: 100%;
  background-color: #000;
  left: 0;
  top: 0;
  width: 0;
}

/* Free scroll mode styling */
.swiper-free-mode > .swiper-wrapper {
  transition-timing-function: ease-out;
  margin: 0 auto;
}

/* Default Gallery Grid (for Mobile) */
.project-gallery__grid {
  display: none;
  grid-gap: 30px;
}

.project-gallery__item {
  width: 100%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
}

/* Different aspect ratio treatment for grid images */
.project-gallery__item.vertical {
  aspect-ratio: 2/3;
}

.project-gallery__item.horizontal {
  aspect-ratio: 3/2;
}

.project-gallery__grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-gallery__grid-link {
  display: block;
  height: 100%;
}

.project-gallery__grid-link:hover .project-gallery__grid-image {
  transform: scale(1.03);
}

/* Project Navigation - Redesigned */
.project-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 0;
  border-top: none;
}

.nav-prev, .nav-next {
  font-size: 14px;
  letter-spacing: 1px;
  color: #777;
  font-weight: 500;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  transition: color 0.3s ease;
  background: none;
}

.nav-prev::after, .nav-next::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: #000;
  transition: width 0.3s ease;
}

.nav-prev:hover, .nav-next:hover {
  color: #000;
  background: none;
}

.nav-prev:hover::after, .nav-next:hover::after {
  width: 100%;
}

/* Media Queries */
@media (max-width: 576px) {
  /* Mobile View Only */
  .project-gallery__slider,
  .project-gallery__nav {
    display: none;
  }
  
  .project-gallery__grid {
    display: grid;
    grid-template-columns: 1fr;
  }
} 