/* =============================================================================
   steiner-search.css - Master CSS File
   Steiner Search Component System
   ============================================================================= */

/* Import All Component Modules */
@import url('./01-base.css');
@import url('./02-layout.css');
@import url('./03-components.css');
@import url('./04-search.css');
@import url('./05-results.css');
@import url('./06-utilities.css');

/* =============================================================================
   Application-Specific Overrides & Extensions
   ============================================================================= */

/* Enhanced Google Fonts Loading */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Georgia:ital,wght@0,400;0,700;1,400&display=swap');

/* =============================================================================
   Logo & Branding
   ============================================================================= */

.logo {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-gray-800);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--transition-base);
}

.logo:hover {
  color: var(--color-brand-primary);
  transform: translateY(-1px);
}

.logo::before {
  content: "🌟";
  font-size: var(--font-size-xl);
  animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

/* =============================================================================
   Navigation
   ============================================================================= */

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-brand-accent) 0%, var(--color-brand-secondary) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  opacity: 0.1;
}

.nav-links a:hover {
  color: var(--color-brand-primary);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--color-brand-primary);
  font-weight: 600;
}

/* =============================================================================
   Enhanced Animations
   ============================================================================= */

/* Fade-in animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for multiple elements */
.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.2s; }
.animate-stagger-3 { animation-delay: 0.3s; }
.animate-stagger-4 { animation-delay: 0.4s; }

/* Pulse animation for loading states */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* =============================================================================
   Scroll Behavior Enhancements
   ============================================================================= */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Scroll padding for sticky header */
html {
  scroll-padding-top: 80px;
}

/* =============================================================================
   Interactive States Enhancement
   ============================================================================= */

/* Enhanced focus states for better accessibility */
*:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
  /* Hide non-essential elements when printing */
  .nav-links,
  .search-options,
  .result-actions,
  .action-button {
    display: none !important;
  }
  
  /* Ensure good contrast for print */
  body {
    background: white !important;
    color: black !important;
  }
  
  /* Remove shadows and gradients for print */
  .card,
  .result-item,
  .search-container {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #ccc !important;
  }
  
  /* Page break management */
  .result-item,
  .card {
    page-break-inside: avoid;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* =============================================================================
   Performance Optimizations
   ============================================================================= */

/* GPU acceleration for smooth animations */
.btn,
.card,
.result-item,
.search-input,
.search-button {
  transform: translateZ(0);
  will-change: transform;
}

/* Contain layout for better performance */
.results-grid {
  contain: layout;
}

.result-item {
  contain: layout style;
}

/* =============================================================================
   Dark Mode Support (Future Enhancement)
   ============================================================================= */

@media (prefers-color-scheme: dark) {
  /* CSS custom properties would be updated here for dark mode */
  /* This is a placeholder for future dark mode implementation */
  
  /* Example:
  :root {
    --color-gray-900: #f9fafb;
    --color-gray-100: #1f2937;
    --bg-primary-gradient: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }
  */
}
