/* assets/css/style.css */
/* Modern minimalist styles for the redesigned index.php */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Common Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  width: 100%;
  z-index: 1;
  position: relative;
  margin-bottom: 4rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  margin: 0 0 3rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  transition: all 0.3s ease;
}

.hero-section.search-active .hero-content {
  transform: translateY(-10vh);
}

.hero-section.search-active .features-grid {
  opacity: 0;
  transform: translateY(20px);
}

#ghost-container {
  position: relative;
}

#searchBox, #ghost-text {
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  box-sizing: border-box;
  font-family: inherit;
}

#searchBox {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  z-index: 2;
  outline: none;
  transition: all 0.2s ease;
}

#ghost-text {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  white-space: pre;
  background: transparent;
}

#searchBox:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

#searchBox::placeholder {
  color: var(--text-muted);
}

.search-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1rem;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  color: var(--text-muted);
  font-weight: 300;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.feature-card {
  background: var(--bg-primary);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Why Choose Section */
.why-choose-section {
  padding: 8rem 0;
  background: var(--bg-primary);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
}

.benefit-item {
  text-align: center;
  padding: 2rem 1.5rem;
}

.benefit-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.benefit-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.benefit-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Statistics Section */
.stats-section {
  padding: 8rem 0;
  background: var(--primary-color);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-card .stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: white;
  display: block;
}

.stat-card .stat-label {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  display: block;
}

.stat-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* CTA Section */
.cta-section {
  padding: 8rem 0;
  background: var(--bg-primary);
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
}

.cta-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 3rem;
}

.cta-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  gap: 0.5rem;
}

.cta-search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.cta-search-input:focus {
  border-color: var(--primary-color);
}

.cta-search-button {
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cta-search-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.popular-searches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.popular-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.popular-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.1);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.popular-link:hover {
  background: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

/* Search Suggestions */
#suggestions-container {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
}

.suggestions-list {
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  border: 1px solid var(--border-color);
}

.suggestion-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bg-tertiary);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.suggestion-item:hover, .suggestion-item.selected {
  background-color: var(--bg-secondary);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-details {
  flex-grow: 1;
  color: var(--text-primary);
}

.suggestion-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.suggestion-composition {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.highlight {
  color: var(--primary-color);
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.1em 0.2em;
  border-radius: 0.25em;
}

/* Footer */
footer {
  background: var(--text-primary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: white;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: white;
}

.footer-column a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
}

.footer-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .hero-content {
    margin-bottom: 3rem;
  }
  
  .search-stats {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 3rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 2rem 1.5rem;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .benefit-item {
    padding: 1.5rem 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .cta-search {
    flex-direction: column;
    gap: 1rem;
  }
  
  .popular-searches {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .why-choose-section,
  .stats-section,
  .cta-section {
    padding: 5rem 0;
  }
}

@media (max-width: 480px) {
  #searchBox, #ghost-text {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  .search-stats {
    font-size: 0.8rem;
  }
  
  .stat-number {
    font-size: 0.9rem;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  .section-header h2 {
    margin-bottom: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .stat-card .stat-number {
    font-size: 2.5rem;
  }
  
  .why-choose-section,
  .stats-section,
  .cta-section {
    padding: 4rem 0;
  }
}

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

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .cta-search-button,
  .popular-link {
    transition: none;
  }
  
  .feature-card:hover,
  .cta-search-button:hover,
  .popular-link:hover {
    transform: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}
