/* Fullscreen Scroll Gallery - Codrops Style */
.fullscreen-gallery-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery-scroll-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Gallery Slides */
.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100vh);
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1),
              opacity 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform, opacity;
}

/* First slide starts visible */
.gallery-slide:first-child {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gallery-slide.is-prev {
  transform: translateY(-100vh);
}

/* Background Images */
.slide-bg {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  overflow: hidden;
}

.slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) contrast(1.1);
  transform: scale(1.1);
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 1.2s ease;
}

.gallery-slide.is-active .slide-bg img {
  transform: scale(1);
}

/* Overlay */
.gallery-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

/* Content */
.slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 5%;
  max-width: 1400px;
}

.content-wrapper {
  position: relative;
  color: #fff;
  padding-left: 120px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.4) 70%,
    transparent 100%
  );
  padding: 40px 60px 40px 120px;
  border-radius: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slide-index {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1;
  opacity: 0.2;
  font-family: var(--heading-font);
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.slide-title {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9),
               0 2px 10px rgba(0, 0, 0, 0.8);
}

.slide-title .line {
  display: block;
  overflow: hidden;
  position: relative;
}

.slide-title .line:not(:last-child) {
  margin-bottom: 0.2em;
}

/* Title Animation */
.gallery-slide .slide-title .line span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
  transition-delay: 0.2s;
}

.gallery-slide.is-active .slide-title .line span,
.gallery-slide:first-child .slide-title .line span {
  transform: translateY(0);
}

.gallery-slide.is-active .slide-title .line:nth-child(2) span,
.gallery-slide:first-child .slide-title .line:nth-child(2) span {
  transition-delay: 0.3s;
}

.slide-desc {
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  transition-delay: 0.4s;
  max-width: 450px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-weight: 400;
}

.gallery-slide.is-active .slide-desc,
.gallery-slide:first-child .slide-desc {
  opacity: 1;
  transform: translateY(0);
}

.slide-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  transition-delay: 0.5s;
  position: relative;
  padding-bottom: 2px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.gallery-slide.is-active .slide-link,
.gallery-slide:first-child .slide-link {
  opacity: 1;
  transform: translateX(0);
}

.slide-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: width 0.3s ease;
}

.slide-link:hover::after {
  width: calc(100% - 32px);
}

.slide-link:hover svg {
  transform: translateX(5px);
}

.slide-link svg {
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

/* Navigation */
.gallery-nav {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.nav-dots {
  display: flex;
  gap: 16px;
}

.nav-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.nav-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.nav-dot.active {
  background: #fff;
  width: 40px;
  border-color: #fff;
}

.nav-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-dot:hover::before {
  width: 100%;
}

/* Progress Bar */
.nav-progress {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.progress-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 20%;
  height: 100%;
  background: var(--primary-color);
  transition: width 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Scroll Indicator */
.scroll-indicator-gallery {
  position: absolute;
  bottom: 40px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.scroll-indicator-gallery.hide {
  opacity: 0;
  pointer-events: none;
}

.scroll-line-gallery {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.scroll-line-gallery::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  animation: scrollLineAnim 2s ease-in-out infinite;
}

@keyframes scrollLineAnim {
  to {
    top: 100%;
  }
}

/* Skip Button */
.skip-gallery {
  position: absolute;
  top: 40px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  border-radius: 0;
}

.skip-gallery:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(-5px);
}

.skip-gallery svg {
  transition: transform 0.3s ease;
}

.skip-gallery:hover svg {
  transform: translateX(3px);
}

/* Loading State */
.gallery-slide.is-loading .slide-bg img {
  opacity: 0;
}

.gallery-slide .slide-bg img {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .content-wrapper {
    padding-left: 80px;
  }

  .slide-index {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
  }

  .slide-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .skip-gallery {
    top: 30px;
    right: 30px;
    padding: 10px 20px;
    font-size: 0.75rem;
  }

  .scroll-indicator-gallery {
    right: 30px;
  }
}

@media (max-width: 768px) {
  .fullscreen-gallery-section {
    height: 70vh;
  }
  
  .gallery-slide {
    height: 70vh;
  }
  
  .slide-content {
    padding: 0 5%;
  }

  .content-wrapper {
    padding: 25px;
    text-align: left;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
  }

  .slide-index {
    position: static;
    transform: none;
    margin-bottom: 0.5rem;
    opacity: 0.15;
    color: #fff;
    font-size: 2.5rem;
  }

  .slide-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .slide-title .line {
    margin-bottom: 0.25rem;
  }

  .slide-desc {
    max-width: 100%;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .slide-link {
    font-size: 0.875rem;
    padding: 10px 20px;
  }

  .gallery-nav {
    bottom: 30px;
  }

  .nav-dots {
    gap: 10px;
  }

  .nav-dot {
    width: 8px;
    height: 8px;
  }
  
  .nav-progress {
    display: none;
  }
  
  .skip-gallery {
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 0.75rem;
  }
  
  .skip-gallery span {
    display: none;
  }
  
  .scroll-indicator-gallery {
    display: none;
  }

  .nav-dot.active {
    width: 30px;
  }

  .nav-progress {
    width: 150px;
  }

  .skip-gallery {
    top: 20px;
    right: 20px;
    padding: 8px 16px;
  }

  .skip-gallery span {
    display: none;
  }

  .scroll-indicator-gallery {
    display: none;
  }
}

@media (max-width: 576px) {
  .fullscreen-gallery-section {
    height: 60vh;
  }
  
  .gallery-slide {
    height: 60vh;
  }
  
  .content-wrapper {
    padding: 20px;
    margin: 0 10px;
  }
  
  .slide-index {
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }
  
  .slide-title {
    font-size: 1.25rem;
  }
  
  .slide-desc {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
  
  .slide-link {
    font-size: 0.8rem;
    padding: 8px 16px;
  }
  
  .gallery-nav {
    bottom: 20px;
  }
}

/* Touch Device Styles */
@media (hover: none) {
  .nav-dot:active {
    transform: scale(0.9);
  }

  .skip-gallery:active {
    transform: scale(0.95);
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .gallery-slide::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.3) 50%,
      rgba(0, 0, 0, 0.9) 100%
    );
  }

  .nav-dot {
    border-width: 2px;
  }

  .skip-gallery {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .gallery-slide {
    transition-duration: 0.01ms;
  }

  .slide-bg img {
    transition-duration: 0.01ms;
  }

  .slide-desc,
  .slide-link,
  .nav-dot,
  .progress-fill {
    transition-duration: 0.01ms;
  }

  .scroll-line-gallery::after {
    animation: none;
  }
}