/* section-slideshow.css - Updated with Responsive Copyright */

.slideshow-index-section {
  position: relative;
  min-height: 100vh;
  padding: 0;
  background-image: url('img/bgslide-index.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.slideshow-index-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; 
  z-index: 1;
}

.slideshow-index-container {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slideshow-index-main-title {
  margin-bottom: 3rem;
  position: relative;
}

.slideshow-index-main-title h2 {
  font-family: 'Marcellus', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  font-weight: 400;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.02em;
}

/* Copyright Text - Responsive */
.copyright-text {
  color: #FFF;
  font-size: 12px;
  z-index: 999;
}

/* Desktop: Copyright ขวาบน */
@media (min-width: 992px) {
  .copyright-text {
    position: absolute;
    top: 0;
    right: 0;
    float: right;
  }
}

/* Mobile: Copyright ใต้ h2 */
@media (max-width: 991.98px) {
  .copyright-text {
    text-align: center;
    margin-top: 1rem;
    order: 2;
  }
  
  .slideshow-index-main-title {
    display: flex;
    flex-direction: column;
  }
  
  .slideshow-index-main-title h2 {
    order: 1;
    text-align: center;
  }
}

.slideshow-index-wrapper {
  position: relative;
  min-height: 500px;
}

.slideshow-index-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  pointer-events: none;
}

.slideshow-index-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
}

.slide-index-location {
  position: absolute;
  top: -2rem;
  right: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  font-weight: 300;
}

.slide-index-header {
  font-family: 'Marcellus', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.slide-index-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  max-width: 90%;
  margin-bottom: 2rem;
}

/* Slide Controls Container */
.slide-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

/* Indicators Inline */
.slideshow-index-indicators-inline {
  display: flex;
  gap: 0.8rem;
}

/* Navigation Inline */
.slideshow-index-nav-inline {
  display: flex;
  gap: 1rem;
}

.slide-index-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.slide-index-image:hover {
  transform: translateY(-8px);
}

.slide-index-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 400px;
}

.slideshow-index-nav {
  position: absolute;
  bottom: 6rem;
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.slide-index-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.slide-index-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.slide-index-btn:active {
  transform: scale(0.95);
}

.slideshow-index-indicators {
  position: absolute;
  bottom: 3rem;
  display: flex;
  gap: 0.8rem;
  z-index: 10;
}

.indicator-index {
  width: 50px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 2px;
  padding: 0;
}

.indicator-index.active {
  background: #fff;
  width: 60px;
}

.indicator-index:hover {
  background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 991.98px) {
  .slideshow-index-container {
    padding: 3rem 1.5rem;
  }

  .slide-index-location {
    position: static;
    margin-bottom: 1rem;
    text-align: left;
  }

  .slide-index-header {
    font-size: 1.8rem;
  }

  .slide-index-content {
    max-width: 100%;
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .slide-index-image img {
    min-height: 300px;
  }

  .slideshow-index-nav {
    bottom: 1rem;
  }

  .slideshow-index-indicators {
    bottom: 4rem;
  }

  .slide-index-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .slideshow-index-main-title h2 {
    font-size: 1.8rem;
  }

  .slide-index-header {
    font-size: 1.5rem;
  }

  .slide-index-content {
    font-size: 0.95rem;
  }

  .slide-index-image img {
    min-height: 250px;
  }

  .slide-controls {
    gap: 1rem;
  }

  .slide-index-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .indicator-index {
    width: 40px;
  }

  .indicator-index.active {
    width: 50px;
  }
}

/* Dynamic Indicators - ปรับให้รองรับจำนวน slide ที่ไม่คงที่ */
.slideshow-index-indicators {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* Enhanced Image Loading */
.slide-index-image img {
  transition: opacity 0.3s ease;
}

.slide-index-image img[data-loading="true"] {
  opacity: 0.5;
}

.slide-index-image img[data-loaded="true"] {
  opacity: 1;
}

/* Fallback for missing images */
.slide-index-image .image-placeholder {
  width: 100%;
  height: 450px;
  background: linear-gradient(45deg, #ada281, #8b9266);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  border-radius: 12px;
}