/* ========================================
   ENHANCEMENTS CSS
   Scroll indicator, Preloader, Hover effects, Testimonial carousel
   ======================================== */

/* ========================================
   PRELOADER
   ======================================== */

.preloader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9999;
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease;
}

.preloader__content {
  text-align: center;
  max-width: 300px;
}

.preloader__logo {
  width: 120px;
  height: auto;
  margin-bottom: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

.preloader__bar {
  width: 100%;
  height: 3px;
  background: rgba(150, 175, 2, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.preloader__progress {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-secondary));
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--color-primary);
}

.preloader__text {
  color: var(--color-muted);
  font-size: 0.9rem;
}

body.loaded {
  overflow: visible;
}

/* ========================================
   SCROLL INDICATOR
   ======================================== */

.scroll-indicator {
  position: fixed;
  bottom: 40px;
  left: 40px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.scroll-indicator__mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--color-primary);
  border-radius: 15px;
  position: relative;
  opacity: 0.8;
}

.scroll-indicator__wheel {
  width: 3px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { top: 8px; opacity: 1; }
  100% { top: 24px; opacity: 0; }
}

.scroll-indicator__text {
  color: var(--color-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ========================================
   ENHANCED CARD HOVER EFFECTS
   ======================================== */

.intro__card,
.service-card,
.testimonial-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.intro__card::before,
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(150, 175, 2, 0.15) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.intro__card:hover::before,
.service-card:hover::before {
  opacity: 1;
}

.intro__card:hover,
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    var(--shadow-soft),
    0 0 30px rgba(150, 175, 2, 0.2);
}

/* ========================================
   TESTIMONIAL CAROUSEL
   ======================================== */

.testimonials__grid {
  position: relative;
  min-height: 250px;
}

.testimonial-card {
  transition: opacity 0.6s ease;
  width: 100%;
}

.testimonial-card[style*="position: absolute"] {
  top: 0;
  left: 0;
  right: 0;
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .scroll-indicator__wheel,
  .scroll-indicator__text,
  .preloader__logo {
    animation: none;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .scroll-indicator {
    bottom: 30px;
    right: 20px;
  }
  
  .scroll-indicator__mouse {
    width: 22px;
    height: 36px;
  }
  
  .scroll-indicator__text {
    font-size: 0.75rem;
  }
}
