/* ========================================================================
   VALLEY O'VILLE RESORT - PREMIUM SCROLLBAR DESIGN
   Ultra-smooth, luxury scrollbar with glassmorphism effects
   ======================================================================== */

/* ===================================================================== */
/* SCROLLBAR VARIABLES & BASE STYLES                                    */
/* ===================================================================== */

:root {
  /* Scrollbar Colors */
  --scrollbar-track: rgba(248, 250, 252, 0.3);
  --scrollbar-track-hover: rgba(248, 250, 252, 0.5);
  --scrollbar-thumb: linear-gradient(180deg, 
    rgba(206, 172, 65, 0.8) 0%, 
    rgba(228, 181, 76, 0.9) 50%, 
    rgba(206, 172, 65, 0.8) 100%);
  --scrollbar-thumb-hover: linear-gradient(180deg, 
    rgba(206, 172, 65, 0.95) 0%, 
    rgba(244, 208, 63, 1) 50%, 
    rgba(206, 172, 65, 0.95) 100%);
  --scrollbar-thumb-active: linear-gradient(180deg, 
    #ceac41 0%, 
    #f4d03f 50%, 
    #ceac41 100%);
  
  /* Scrollbar Dimensions */
  --scrollbar-width: 12px;
  --scrollbar-width-hover: 16px;
  --scrollbar-border-radius: 8px;
  --scrollbar-thumb-border-radius: 6px;
  
  /* Scrollbar Shadows & Effects */
  --scrollbar-thumb-shadow: 0 2px 8px rgba(206, 172, 65, 0.3);
  --scrollbar-thumb-shadow-hover: 0 4px 16px rgba(206, 172, 65, 0.5);
  --scrollbar-thumb-shadow-active: 0 6px 20px rgba(206, 172, 65, 0.7);
  
  /* Animation Timings */
  --scrollbar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --scrollbar-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================== */
/* WEBKIT SCROLLBAR STYLING (Chrome, Safari, Edge)                      */
/* ===================================================================== */

/* Main scrollbar container */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
  transition: var(--scrollbar-transition);
}

/* Scrollbar track (background) */
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: var(--scrollbar-border-radius);
  margin: 4px;
  border: 1px solid rgba(206, 172, 65, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--scrollbar-transition);
}

/* Scrollbar thumb (draggable part) */
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--scrollbar-thumb-border-radius);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--scrollbar-thumb-shadow);
  transition: var(--scrollbar-transition);
  position: relative;
}

/* Scrollbar thumb hover effects */
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  box-shadow: var(--scrollbar-thumb-shadow-hover);
  transform: scaleX(1.1);
  border-width: 1px;
}

/* Scrollbar thumb active/pressed effects */
::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
  box-shadow: var(--scrollbar-thumb-shadow-active);
  transform: scaleX(1.2);
  border-width: 0px;
}

/* Scrollbar corner (where horizontal and vertical meet) */
::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
  border-radius: var(--scrollbar-border-radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ===================================================================== */
/* ENHANCED HOVER EFFECTS FOR CONTAINERS                                */
/* ===================================================================== */

/* Container hover effects - expand scrollbar */
*:hover::-webkit-scrollbar {
  width: var(--scrollbar-width-hover);
  height: var(--scrollbar-width-hover);
}

*:hover::-webkit-scrollbar-track {
  background: var(--scrollbar-track-hover);
  border-color: rgba(206, 172, 65, 0.2);
  margin: 2px;
}

/* ===================================================================== */
/* FIREFOX SCROLLBAR STYLING                                            */
/* ===================================================================== */

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(206, 172, 65, 0.8) rgba(248, 250, 252, 0.3);
}

/* Enhanced Firefox scrollbar for supported versions */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: rgba(206, 172, 65, 0.9) rgba(248, 250, 252, 0.4);
    scrollbar-width: auto;
  }
}

/* ===================================================================== */
/* SPECIALIZED SCROLLBARS FOR DIFFERENT SECTIONS                        */
/* ===================================================================== */

/* Hero Section Scrollbar */
.hero-section::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.3) 0%, 
    rgba(206, 172, 65, 0.6) 50%, 
    rgba(255, 255, 255, 0.3) 100%);
}

.hero-section::-webkit-scrollbar-track {
  background: rgba(10, 26, 61, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Testimonials Section Scrollbar */
.testimonials-section::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, 
    rgba(206, 172, 65, 1) 0%, 
    rgba(255, 255, 255, 0.9) 50%, 
    rgba(206, 172, 65, 1) 100%);
}

.testimonials-section::-webkit-scrollbar-track {
  background: rgba(30, 58, 138, 0.3);
  border-color: rgba(206, 172, 65, 0.2);
}

/* Dark Section Scrollbars */
.section-dark::-webkit-scrollbar-thumb,
.pvmgo-section::-webkit-scrollbar-thumb,
.carousel-section::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-hover);
  box-shadow: 0 2px 12px rgba(206, 172, 65, 0.4);
}

.section-dark::-webkit-scrollbar-track,
.pvmgo-section::-webkit-scrollbar-track,
.carousel-section::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(206, 172, 65, 0.3);
}

/* ===================================================================== */
/* SCROLLBAR ANIMATIONS & SMOOTH EFFECTS                                */
/* ===================================================================== */

/* Smooth scrolling enhancement */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
  overscroll-behavior: none;
}

/* Custom scroll progress indicator */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(248, 250, 252, 0.2);
  z-index: 9999;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--primary-gold) 0%, 
    var(--accent-gold-light) 50%, 
    #f4d03f 100%);
  width: 0%;
  transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(206, 172, 65, 0.5);
}

/* ===================================================================== */
/* MOBILE & RESPONSIVE SCROLLBAR ADJUSTMENTS                            */
/* ===================================================================== */

/* Mobile scrollbar adjustments */
@media (max-width: 768px) {
  :root {
    --scrollbar-width: 8px;
    --scrollbar-width-hover: 12px;
    --scrollbar-border-radius: 6px;
    --scrollbar-thumb-border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb {
    border-width: 1px;
  }
  
  ::-webkit-scrollbar-track {
    margin: 2px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-hover);
    border-width: 0;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track-hover);
    margin: 1px;
  }
}

/* ===================================================================== */
/* ACCESSIBILITY & REDUCED MOTION SUPPORT                               */
/* ===================================================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  ::-webkit-scrollbar-thumb {
    transition: none;
  }
  
  ::-webkit-scrollbar-track {
    transition: none;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .scroll-progress-bar {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  ::-webkit-scrollbar-thumb {
    background: #000;
    border: 2px solid #fff;
  }
  
  ::-webkit-scrollbar-track {
    background: #fff;
    border: 1px solid #000;
  }
}

/* ===================================================================== */
/* ADVANCED EFFECTS & ANIMATIONS                                        */
/* ===================================================================== */

/* Scrollbar glow effect */
@keyframes scrollbar-glow {
  0%, 100% {
    box-shadow: var(--scrollbar-thumb-shadow);
  }
  50% {
    box-shadow: var(--scrollbar-thumb-shadow-hover);
  }
}

/* Apply glow effect on scroll */
::-webkit-scrollbar-thumb:active {
  animation: scrollbar-glow 0.6s ease-in-out;
}

/* Pulse effect for new content */
.new-content-indicator::-webkit-scrollbar-thumb {
  animation: scrollbar-pulse 2s ease-in-out infinite;
}

@keyframes scrollbar-pulse {
  0%, 100% {
    opacity: 0.8;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1);
  }
}

/* ===================================================================== */
/* UTILITY CLASSES FOR CUSTOM SCROLLBAR CONTROL                        */
/* ===================================================================== */

/* Hide scrollbar but keep functionality */
.scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* Thin scrollbar variant */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/* Thick scrollbar variant */
.scrollbar-thick::-webkit-scrollbar {
  width: 20px;
  height: 20px;
}

/* Auto-hide scrollbar */
.scrollbar-auto-hide::-webkit-scrollbar {
  width: 0px;
  transition: width 0.3s ease;
}

.scrollbar-auto-hide:hover::-webkit-scrollbar {
  width: var(--scrollbar-width);
}