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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --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);
  --radius: 12px;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
  overflow-x: hidden;
}

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

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

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

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

/* Header */
header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

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

.logo svg {
  width: 40px;
  height: 40px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-dark);
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow);
    display: none;
    gap: 1rem;
  }

  nav.active {
    display: flex;
  }
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.cta-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: var(--shadow);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

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

.cta-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
}

/* Features grid */
.features {
  background: var(--bg-light);
}

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

.feature-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

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

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

.feature-card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.step h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

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

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

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

.cta-section p {
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.cta-section .cta-btn {
  background: white;
  color: var(--primary);
  font-size: 1.125rem;
  padding: 1rem 3rem;
}

.cta-section .cta-btn:hover {
  background: var(--bg-light);
  color: var(--primary-dark);
}

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

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

.footer-section h4 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.footer-section ul {
  list-style: none;
}

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

.footer-section a {
  color: #9ca3af;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
  font-size: 0.875rem;
}

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

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

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card-content {
  padding: 1.5rem;
}

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

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

.blog-card .read-more {
  color: var(--primary);
  font-weight: 600;
}

/* FAQ */
.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  color: var(--text-dark);
}

.faq-question svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-question[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer-content {
  padding: 0 0 1.5rem;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

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

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Feature card as link */
.feature-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Footer paragraph */
.footer-section p {
  color: #9ca3af;
  line-height: 1.7;
}

/* Meta text (published date) */
.meta-text {
  font-size: 1.125rem;
  color: var(--text-light);
}

/* Container modifiers */
.container--narrow {
  max-width: 800px;
}

.leading-relaxed {
  line-height: 1.8;
}

/* Lead paragraph for intro */
.lead-paragraph {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--text-light);
}

/* CTA box for article content */
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius);
  margin-top: 3rem;
}

/* Primary button for non-affiliate actions */
.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: var(--shadow);
  border: none;
  border-radius: var(--radius);
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
}
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}
.primary-btn:active {
  transform: translateY(0);
}

/* Related articles section in blog posts */
.related-articles {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--radius);
}

/* Spacing utilities */
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.mb-3 { margin-bottom: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* List spacing */
.spaced-list {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Content paragraph for about page */
.content-paragraph {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

/* Centered content for lists etc. */
.centered-content {
  max-width: 700px;
  margin: 0 auto;
  line-height: 2;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  section {
    padding: 3rem 0;
  }

  .cta-floating {
    bottom: 1rem;
    right: 1rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
