/* TripHunter AI - Main Stylesheet */
/* This file contains custom CSS that supplements Tailwind CSS */

/* =============================================
   CSS Variables & Custom Properties
   ============================================= */
:root {
  /* Color Palette */
  --color-primary: #0a192f;
  --color-secondary: #64ffda;
  --color-neutral: #f6f9fc;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Monaco', 'Courier New', monospace;
  
  /* Spacing (8pt Grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;
  
  /* Transitions */
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-primary);
  background-color: var(--color-neutral);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Responsive Typography */
h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.font-mono {
  font-family: var(--font-mono);
}

/* =============================================
   Component Styles
   ============================================= */

/* Hero Section Enhancements */
.hero-gradient {
  background: linear-gradient(135deg, #0a192f 0%, #1e3a5f 50%, #2d5a8e 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2364ffda' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-pattern {
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(100, 255, 218, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(100, 255, 218, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(100, 255, 218, 0.02) 0%, transparent 50%);
}

/* Navigation Enhancement */
.nav-link {
  position: relative;
  transition: color var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background-color: var(--color-secondary);
  transition: width var(--transition-base), left var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Search Widget Styles */
.search-widget {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  padding: var(--space-4);
}

.search-input {
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.search-input:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

/* Tab Navigation */
.tab-button {
  position: relative;
  transition: color var(--transition-base);
}

.tab-button.active {
  color: var(--color-primary);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-secondary);
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: 8px;
  padding: var(--space-3);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: var(--space-2) 0;
}

.faq-question {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2);
  transition: background-color var(--transition-base);
}

.faq-question:hover {
  background-color: rgba(100, 255, 218, 0.05);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-base);
}

.faq-answer.active {
  max-height: 500px;
  padding: var(--space-2);
}

.faq-icon {
  transition: transform var(--transition-base);
}

.faq-icon.rotate {
  transform: rotate(45deg);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--space-3);
}

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 500;
  color: var(--color-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.form-error {
  color: #ef4444;
  font-size: 14px;
  margin-top: 4px;
}

.form-success {
  color: #10b981;
  font-size: 14px;
  margin-top: 4px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-primary);
}

.btn-primary:hover {
  background-color: #4fffc9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--color-primary);
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Password Strength Indicator */
.password-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: 8px;
  transition: width var(--transition-base);
}

.password-strength.weak {
  background-color: #ef4444;
  width: 33%;
}

.password-strength.medium {
  background-color: #f59e0b;
  width: 66%;
}

.password-strength.strong {
  background-color: #10b981;
  width: 100%;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: var(--space-4);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Partner Logo Styles */
.partner-logo {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all var(--transition-base);
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Hero Gradient Overlays */
.hero-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3a8a 100%);
}

/* Social Icons */
.social-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base), color var(--transition-base);
}

.social-icon:hover {
  transform: translateY(-2px);
  color: var(--color-secondary);
}

/* =============================================
   Utility Classes
   ============================================= */
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-secondary), #4fffc9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blur-background {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
}

/* =============================================
   Mobile Menu Animations
   ============================================= */
.mobile-menu {
  transition: max-height var(--transition-slow), opacity var(--transition-base);
}

.mobile-menu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.mobile-menu.active {
  max-height: 500px;
  opacity: 1;
}

/* Hamburger Animation */
.hamburger-line {
  transition: all var(--transition-base);
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 768px) {
  .search-widget {
    padding: var(--space-2);
  }
  
  .feature-card {
    padding: var(--space-2);
  }
  
  .hero-gradient {
    padding: var(--space-8) var(--space-2);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
  }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
  .no-print,
  header,
  footer,
  .mobile-menu-button {
    display: none !important;
  }
  
  body {
    color: black;
    background: white;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}

/* =============================================
   Accessibility Enhancements
   ============================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link:focus {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid currentColor;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@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;
  }
}