/* CSS Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #f59e0b;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-alt: #f9fafb;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
  --border-radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--primary-color);
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
}

.logo-text {
  display: none;
}

@media (min-width: 640px) {
  .logo-text {
    display: inline;
  }
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
  background-color: var(--bg-alt);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  color: var(--text-color);
}

.nav-list {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow);
}

.nav-list.active {
  display: flex;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }

  .nav-list {
    display: flex;
    position: static;
    background: none;
    border: none;
    padding: 0;
    flex-direction: row;
    gap: 2rem;
    box-shadow: none;
  }
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
  text-decoration: none;
  background-color: var(--bg-alt);
}

/* Main Content */
main {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Page Hero */
.page-hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #fef3e2 100%);
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.page-hero .lead {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Content Sections */
.content-section {
  padding: 3rem 0;
}

.content-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.content-section ul, .content-section ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.content-section li {
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.content-section strong {
  color: var(--text-color);
}

.content-section a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image svg {
  max-width: 100%;
  height: auto;
}

/* Features Section */
.features {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

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

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-icon {
  width: 48px;
  height: 48px;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Steps Section */
.how-it-works .steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.step {
  position: relative;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

.step-number {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Testimonials */
.testimonials {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  position: relative;
}

.testimonial-card p {
  font-style: italic;
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.testimonial-author {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* CTA Sections */
.cta-section {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: white;
}

.cta-section p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: white;
}

/* Testimonials CTA */
.testimonials-cta {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-color);
}

.testimonials-cta h2,
.testimonials-cta h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.testimonials-cta p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Article CTA */
.article-content-cta {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin: 2rem 0;
  color: var(--text-color);
}

.article-content-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.article-content-cta p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Final CTA Section */
.final-cta {
  padding: 5rem 0;
  text-align: center;
  background: var(--bg-alt);
}

.final-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.final-cta p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.cta-btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.cta-btn:hover {
  background-color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cta-btn:active {
  transform: translateY(0);
}

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

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

.cta-secondary:hover {
  background-color: var(--bg-alt);
}

.cta-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.cta-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  padding: 1rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cta-floating:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .cta-floating {
    bottom: 1rem;
    right: 1rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-section ul {
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
  text-decoration: none;
}

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

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.blog-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-content h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-content h2 a {
  color: var(--text-color);
  text-decoration: none;
}

.blog-content h2 a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.blog-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Blog Article */
.blog-article {
  padding: 2rem 0 4rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-weight: 500;
}

.article-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text-light);
}

.article-content ul, .article-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.article-content strong {
  color: var(--text-color);
}

.article-cta {
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--bg-alt);
  border-radius: var(--border-radius);
  text-align: center;
}

.article-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.article-cta p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-articles h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li {
  margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.contact-info h2 {
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 2rem;
}

.contact-methods li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.contact-methods strong {
  display: block;
  margin-bottom: 0.25rem;
}

.contact-methods p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-form-container h2 {
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* FAQ */
.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

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

.faq-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.faq-item p {
  color: var(--text-light);
}

/* Features Highlight */
.features-highlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-highlight-item h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.feature-highlight-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.step-icon {
  width: 48px;
  height: 48px;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Story Card */
.story-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.story-card p {
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.story-author {
  font-weight: 600;
  color: var(--text-color);
  text-align: right;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .page-hero h1 {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .features h2,
  .testimonials h2 {
    font-size: 1.5rem;
  }
}

/* Ensure no overflow */
body {
  overflow-x: hidden;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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