/* ==========================================================================
   S² Sports Academy - Custom Theme & Liquid Glassmorphism Stylesheet
   ========================================================================== */

:root {
  --primary-emerald: #10b981;
  --vibrant-green: #00e676;
  --deep-emerald: #059669;
  --dark-slate: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 20px 40px -15px rgba(16, 185, 129, 0.12);
  --dock-bg: rgba(15, 23, 42, 0.88);
}

/* Smooth Scrolling with Fixed Nav & Dock Offsets */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  scroll-padding-bottom: 110px;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--dark-slate);
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 50%, #f8fafc 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Liquid Glassmorphism Utility Classes with Two-Sided Green Borders */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(220, 252, 231, 0.9);
  border-bottom: 1px solid rgba(220, 252, 231, 0.9);
  border-left: 3.5px solid #10b981;
  border-right: 3.5px solid #10b981;
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(220, 252, 231, 0.85);
  border-bottom: 1px solid rgba(220, 252, 231, 0.85);
  border-left: 3.5px solid #10b981;
  border-right: 3.5px solid #10b981;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 0 15px -3px rgba(16, 185, 129, 0.08);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(16, 185, 129, 0.25);
  border-left-color: #00e676;
  border-right-color: #00e676;
}

.glass-island {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid #10b981;
  box-shadow: 0 12px 36px -8px rgba(16, 185, 129, 0.22), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

/* macOS-Style Dock Magnification & Solid Black Background */
.macos-dock {
  background: #000000;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 0, 0, 0.35);
}

.dock-item {
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

.dock-item:hover {
  transform: scale(1.22) translateY(-6px);
}

.dock-item:active {
  transform: scale(1.1) translateY(-2px);
}

.dock-tooltip {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* White Full Width Liquid Glass Blur Bar Behind Nav Dock */
.dock-liquid-bar {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 -12px 35px -5px rgba(0, 0, 0, 0.06), 0 -2px 6px rgba(16, 185, 129, 0.04);
}

/* Sporty Emerald Gradient Text */
.text-gradient-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #00e676 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Archery Target & Precision Shooting Geometric Motifs */
.target-ring-bg {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(16, 185, 129, 0.15);
  pointer-events: none;
  animation: rotateSlow 60s linear infinite;
}

.target-ring-bg-reverse {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, 0.1);
  pointer-events: none;
  animation: rotateReverse 45s linear infinite;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Subtle Shimmer & Pulse Effects */
.pulse-emerald {
  animation: pulseEmerald 2.5s infinite;
}

@keyframes pulseEmerald {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Gallery Grid Styling */
.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background: #e2e8f0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -8px rgba(16, 185, 129, 0.3);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

/* Modal Transitions */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.modal-content {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

/* Hide scrollbar utility for mobile carousels */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Archery "Bull's Eye" Preloader Animations
   ========================================================================== */
#app-preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.03);
}

.preloader-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(0, 230, 118, 0.45);
  animation: rippleExpand 1.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  pointer-events: none;
}

.preloader-ripple-delayed {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  animation: rippleExpand 1.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  animation-delay: 0.65s;
  pointer-events: none;
}

@keyframes rippleExpand {
  0% {
    transform: scale(0.3);
    opacity: 1;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

.ring-draw {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: ringDraw 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ringDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.ring-pulse {
  animation: ringPulse 2s ease-in-out infinite alternate;
}

@keyframes ringPulse {
  0% { transform: scale(1); transform-origin: center; opacity: 0.7; }
  100% { transform: scale(1.03); transform-origin: center; opacity: 1; }
}

.bullseye-core {
  animation: corePulse 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
  transform-origin: center;
}

@keyframes corePulse {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.18); filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.9)); }
}

.arrow-impact {
  animation: arrowImpactStrike 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  will-change: transform, opacity;
}

@keyframes arrowImpactStrike {
  0% {
    opacity: 0;
    transform: translate(32px, -32px) scale(1.8) rotate(-15deg);
  }
  60% {
    opacity: 1;
    transform: translate(0, 0) scale(0.88) rotate(0deg);
  }
  80% {
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-up {
  animation: preloaderFadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

@keyframes preloaderFadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
