/* Base Styles & Variables */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-light: #9ca3af;
  --background-light: #f3f4f6;
  --transition-base: all 0.3s ease;
}

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

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

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

/* Typography Enhancements */
body {
  font-feature-settings: "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation Styles */
.header-shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-link {
  position: relative;
  transition: var(--transition-base);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-base);
}

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

/* Hero Section Animation */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
}

.hero-text {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quiz Section Styles */
.quiz-card {
  transition: var(--transition-base);
}

.quiz-card:hover {
  transform: translateY(-2px);
}

.quiz-option {
  border: 2px solid transparent;
  transition: var(--transition-base);
}

.quiz-option:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

/* Success Stories Cards */
.story-card {
  transition: var(--transition-base);
  overflow: hidden;
}

.story-card:hover {
  transform: translateY(-4px);
}

.story-image {
  transition: var(--transition-base);
}

.story-card:hover .story-image {
  transform: scale(1.05);
}

/* Performance Chart Styles */
.chart-container {
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* Tools Section */
.tool-card {
  transition: var(--transition-base);
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.tool-card:hover .tool-icon {
  transform: scale(1.1);
  color: var(--primary-color);
}

/* Contact Form Styles */
.form-input {
  transition: var(--transition-base);
  border: 2px solid transparent;
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Button Styles */
.btn {
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
  width: 300%;
  height: 300%;
}

/* Footer Styles */
.footer-link {
  transition: var(--transition-base);
  position: relative;
}

.footer-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: white;
  transition: var(--transition-base);
}

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

/* Responsive Design Adjustments */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .story-card:hover {
    transform: none;
  }

  .tool-card:hover {
    transform: none;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

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

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 0.4s ease forwards;
}

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

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to {
    left: 100%;
  }
}

/* Custom Utility Classes */
.hover-lift {
  transition: transform 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.text-balance {
  text-wrap: balance;
}

.smooth-image {
  transition: opacity 0.3s ease;
}

.smooth-image.loading {
  opacity: 0;
}

.smooth-image.loaded {
  opacity: 1;
}
