/* JTN SPL Automated Fitness Center - Enhanced Styles */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: white;
  overflow-x: hidden;
  background: var(--dark-900);
}

/* Service Cards */
.service-card {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: 0.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--silver-400);
}

/* Facility Cards */
.facility-card {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: 0.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.facility-card:hover {
  border-color: var(--silver-400);
}

/* Dark Automotive Theme Variables */
:root {
  --dark-900: #0a0a0a;
  --dark-800: #1a1a1a;
  --dark-700: #2a2a2a;
  --dark-600: #3a3a3a;
  --dark-500: #4a4a4a;
  
  --silver-400: #9ca3af;
  --silver-500: #6b7280;
  --silver-600: #4b5563;
  
  --accent-400: #60a5fa;
  --accent-500: #3b82f6;
  --accent-600: #2563eb;
  
  --gradient-silver: linear-gradient(135deg, #9ca3af, #ffffff);
  --gradient-dark: linear-gradient(135deg, var(--dark-800), var(--dark-700));
  --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.5);
  --glow-subtle: 0 0 20px rgba(156, 163, 175, 0.1);
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-silver);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-glow {
  text-shadow: 0 0 10px rgba(156, 163, 175, 0.3);
}

/* Navigation Styles */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-scrolled {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-bg {
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
}

.hero-pattern {
  background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 40px 40px;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.shape:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(120deg); }
  66% { transform: translateY(10px) rotate(240deg); }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Utility Classes */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Refined Animation Classes */
.animate-fade-in {
  animation: fadeIn 1.2s ease-out;
}

.animate-slide-up {
  animation: slideUp 1s ease-out;
}

.animate-slide-right {
  animation: slideRight 1s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.8s ease-out;
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease-out;
}

.reveal-text.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-title, .hero-subtitle, .hero-buttons, .hero-image, .about-image {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s ease-out;
}

.hero-title.animate-visible,
.hero-subtitle.animate-visible,
.hero-buttons.animate-visible,
.hero-image.animate-visible,
.about-image.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Card Styles */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Dark Card Styles */
.card {
  background: var(--dark-800);
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--dark-600);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--silver-600);
  box-shadow: var(--glow-subtle);
}

.service-card {
  background: var(--dark-800);
  padding: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--dark-600);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-silver);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  border-color: var(--silver-600);
  box-shadow: var(--glow-subtle);
}

/* Automotive Button Styles */
.btn-primary {
  background: white;
  color: var(--dark-900);
  padding: 1rem 2rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: var(--silver-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--silver-400);
  padding: 1rem 2rem;
  font-weight: 300;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid var(--silver-600);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

.btn-secondary:hover {
  color: white;
  border-color: white;
  transform: translateY(-1px);
}

/* Dark Glass Effects */
.glass {
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(156, 163, 175, 0.1);
  box-shadow: var(--shadow-dark);
}

.glass-subtle {
  background: rgba(26, 26, 26, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(156, 163, 175, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-pattern {
    background-size: 20px 20px;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .gradient-text {
    font-size: clamp(2rem, 8vw, 4rem);
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-800);
}

::-webkit-scrollbar-thumb {
  background: var(--silver-600);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--silver-400);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-900);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(156, 163, 175, 0.2);
  border-top: 2px solid #9ca3af;
  border-radius: 50%;
  animation: spin 2s linear infinite;
  margin-bottom: 30px;
}

.loading-text {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-shadow: var(--glow-subtle);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

/* Dark Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  color: white;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--dark-600);
}

.modal-close {
  background: none;
  border: none;
  color: var(--silver-400);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: white;
}

/* Particle Effect */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}
