/* Critical CSS for Above-the-fold Content - Load Inline for Better Performance */

/* CSS Custom Properties (Variables) */
:root {
  --primary: #0f0f23;
  --primary-light: #1a1a2e;
  --accent: #00d4ff;
  --accent-dark: #0099cc;
  --secondary: #ff6b6b;
  --success: #4ecdc4;
  --warning: #ffe66d;
  --light: #ffffff;
  --gray-light: #f8f9fa;
  --gray-medium: #6c757d;
  --gray-dark: #343a40;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-dark: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Base Styles - Critical for CLS prevention */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  font-display: swap; /* Improve font loading performance */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header - Critical for LCP */
header {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  height: 80px; /* Fixed height to prevent CLS */
}

.nav-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem 0;
  height: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-right: auto;
}

.logo-img {
  height: 50px;
  width: 50px; /* Fixed dimensions for CLS prevention */
  object-fit: contain;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light);
  text-decoration: none;
}

/* Navigation */
nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--gray-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

/* Hero Section - Critical for LCP */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  min-height: 100vh; /* Fixed height to prevent CLS */
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 600;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--gray-light);
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* CTA Buttons */
.cta-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-primary,
.cta-secondary,
.cta-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-height: 56px; /* Fixed height for CLS prevention */
}

.cta-primary {
  background: var(--gradient-accent);
  color: var(--primary);
}

.cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

.cta-secondary {
  background: transparent;
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

.cta-admin {
  background: var(--gradient-secondary);
  color: var(--light);
}

/* Mobile Optimization */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--light);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 35, 0.98);
  backdrop-filter: blur(20px);
  padding: 2rem;
  z-index: 999;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.mobile-nav.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a {
  display: block;
  color: var(--light);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  transition: color 0.3s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  nav {
    display: none;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .cta-container {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-primary,
  .cta-secondary,
  .cta-admin {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* Performance Optimizations */
img {
  max-width: 100%;
  height: auto;
  /* Loading attribute is set in HTML, not CSS */
}

/* Reduce motion for accessibility and performance */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: var(--primary);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}
