/* Valley O'Ville Resort - Glassmorphism Design System
 * Liquid Glass Implementation with Advanced Effects
 * ================================================== */

/* Enhanced CSS Variables for Glassmorphism */
:root {
  /* Glass Properties */
  --glass-background: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  --glass-backdrop: blur(12px);
  --glass-border-radius: 20px;
  
  /* Premium Glass Variants */
  --glass-light: rgba(255, 255, 255, 0.15);
  --glass-medium: rgba(255, 255, 255, 0.10);
  --glass-dark: rgba(0, 0, 0, 0.15);
  --glass-gold: rgba(206, 172, 65, 0.2);
  
  /* Advanced Shadows for Depth */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.25);
  --shadow-gold: 0 8px 32px rgba(206, 172, 65, 0.25);
  
  /* Gradient Overlays */
  --gradient-glass: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  --gradient-gold-glass: linear-gradient(135deg, 
    rgba(206, 172, 65, 0.3) 0%, 
    rgba(206, 172, 65, 0.1) 100%);
}

/* Global Glass Morphism Base */
.glass-morphism {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-border-radius);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.glass-morphism::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  pointer-events: none;
  z-index: 1;
}

.glass-morphism > * {
  position: relative;
  z-index: 2;
}

/* Glass Variants */
.glass-card {
  background: var(--glass-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  background: rgba(255, 255, 255, 0.18);
}

.glass-button {
  background: var(--glass-background);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.glass-button:hover {
  background: var(--glass-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.glass-navigation {
  background: linear-gradient(135deg, 
    rgba(10, 26, 61, 0.15) 0%, 
    rgba(16, 35, 75, 0.12) 50%, 
    rgba(24, 55, 118, 0.15) 100%) !important;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid rgba(206, 172, 65, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10012; /* Ensure nav + toggles are above the mobile overlay/backdrop */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-navigation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(206, 172, 65, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.glass-navigation.scrolled {
  background: linear-gradient(135deg, 
    rgba(10, 26, 61, 0.35) 0%, 
    rgba(16, 35, 75, 0.32) 50%, 
    rgba(24, 55, 118, 0.35) 100%) !important;
  backdrop-filter: blur(35px) saturate(200%);
  -webkit-backdrop-filter: blur(35px) saturate(200%);
  border-bottom: 1px solid rgba(206, 172, 65, 0.3);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Enhanced Hero Section with Liquid Glass */
.hero-section {
  min-height: 100vh;
  background: 
    linear-gradient(135deg, 
      rgba(10, 26, 61, 0.9) 0%,
      rgba(30, 58, 138, 0.8) 50%,
      rgba(37, 99, 235, 0.7) 100%
    ),
    url('https://picsum.photos/id/1024/1920/1080') center/cover fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(206, 172, 65, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(206, 172, 65, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: glassMorphFloat 20s ease-in-out infinite;
}

.hero-content {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 4rem 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: white;
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.hero-content p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.hero-features .feature {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.hero-features .feature:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-features .feature i {
  color: var(--primary-gold);
  font-size: 1.1rem;
}

/* Glass Button Styles */
.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  color: white;
}

.btn-glass-gold {
  background: rgba(206, 172, 65, 0.2);
  border: 1px solid rgba(206, 172, 65, 0.4);
  color: white;
}

.btn-glass-gold:hover {
  background: rgba(206, 172, 65, 0.3);
  color: white;
  box-shadow: var(--shadow-gold);
}

/* Enhanced Intro Section */
.intro-section {
  padding: 8rem 0;
  background: 
    linear-gradient(45deg, 
      rgba(248, 250, 252, 0.9) 0%,
      rgba(255, 255, 255, 0.8) 100%
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(206,172,65,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  position: relative;
}

.intro-content {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.intro-visual img {
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
}

.intro-visual img:hover {
  transform: scale(1.02) translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/* PVMGO Section Glass Cards */
.pvmgo-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pvmgo-card:hover {
  transform: translateY(-12px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.icon-circle {
  width: 80px;
  height: 80px;
  background: var(--gradient-gold-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(206, 172, 65, 0.3);
  box-shadow: 0 8px 25px rgba(206, 172, 65, 0.2);
}

/* Features Section Enhancement */
.features-grid .feature-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease;
  height: 100%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.features-grid .feature-box:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Scroll Indicator Enhancement */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  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);
  border-radius: 50px;
  padding: 1rem 2rem;
  color: white;
  text-align: center;
  animation: scrollBounce 2s ease-in-out infinite;
}

/* Animations */
@keyframes glassMorphFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-20px) rotate(1deg);
    opacity: 0.8;
  }
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Responsive Glassmorphism */
@media (max-width: 768px) {
  .hero-content {
    padding: 2.5rem 2rem;
    margin: 0 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-features {
    gap: 1rem;
  }
  
  .hero-features .feature {
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .pvmgo-card {
    padding: 2rem 1.5rem;
  }
  
  .intro-content {
    padding: 2rem;
  }
}

/* Performance Optimizations */
@supports (backdrop-filter: blur()) {
  .glass-morphism,
  .glass-card,
  .hero-content,
  .pvmgo-card {
    background: rgba(255, 255, 255, 0.08);
  }
}

@supports not (backdrop-filter: blur()) {
  .glass-morphism,
  .glass-card,
  .hero-content,
  .pvmgo-card {
    background: rgba(255, 255, 255, 0.15);
  }
}

/* Accessibility Support */
@media (prefers-reduced-motion: reduce) {
  .hero-section::before,
  .scroll-indicator,
  .hero-features .feature,
  .pvmgo-card {
    animation: none;
  }
  
  .hero-features .feature:hover,
  .pvmgo-card:hover,
  .intro-visual img:hover {
    transform: none;
  }
}

/* Navbar hide animation */
.navbar-hidden {
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

/* Golden Scroll Progress Bar */
.header-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    #ceac41 0%, 
    #f4d03f 25%,
    #ffffff 50%,
    #f4d03f 75%,
    #ceac41 100%);
  z-index: 10000;
  transform-origin: left center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(206, 172, 65, 0.5),
    0 4px 16px rgba(206, 172, 65, 0.3),
    0 0 20px rgba(206, 172, 65, 0.4);
  will-change: width;
}

.header-scroll-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.header-scroll-progress.visible {
  opacity: 1;
  visibility: visible;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(255, 255, 255, 0.15) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem) scale(0.98) rotate(0deg);
  transition: opacity 260ms cubic-bezier(.2,.9,.2,1),
              transform 260ms cubic-bezier(.2,.9,.2,1),
              visibility 260ms linear;
  z-index: 999;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.back-to-top:hover {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.2) 100%);
  transform: translateY(0);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) rotate(0deg);
}

/* Animated hiding state (small upward scroll): scale down + fade */
.back-to-top.hiding {
  opacity: 0;
  visibility: visible; /* keep visible during animation */
  transform: translateY(-8px) scale(0.86) rotate(-4deg);
}

/* Dark theme for back-to-top button on light backgrounds */
.back-to-top.dark-theme {
  /* Dark blue glass variant to match site theme */
  background: linear-gradient(135deg,
    rgba(6, 30, 60, 0.88) 0%,
    rgba(10, 46, 102, 0.82) 50%,
    rgba(16, 64, 128, 0.95) 100%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(80, 120, 200, 0.18);
  color: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 14px 48px rgba(6, 30, 60, 0.36),
    0 6px 18px rgba(6, 30, 60, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: background 240ms ease, transform 180ms ease, box-shadow 240ms ease;
}

.back-to-top.dark-theme:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg,
    rgba(16, 64, 128, 1) 0%,
    rgba(12, 54, 120, 0.98) 50%,
    rgba(10, 46, 102, 1) 100%);
  box-shadow:
    0 22px 68px rgba(6, 30, 60, 0.48),
    0 10px 30px rgba(6, 30, 60, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.back-to-top.dark-theme i {
  color: rgba(255,255,255,0.98);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
