/* Root variables */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #f472b6;
  --bg: #f8fafc;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Header */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

.logo svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.2s;
  font-size: 0.95rem;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.mobile-menu-btn svg {
  width: 28px;
  height: 28px;
}

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

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cta-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
}

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

.cta-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  padding: 1rem 2rem;
  animation: pulse 2s infinite;
  font-size: 1.1rem;
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4), 0 10px 10px -5px rgba(99, 102, 241, 0.2);
}

@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;
  color: var(--text);
}

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

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

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

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

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

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

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

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

/* Stats */
.stats {
  background: var(--bg-dark);
  color: var(--white);
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Testimonials */
.testimonials {
  background: var(--white);
}

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

.testimonial-card {
  background: var(--bg);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

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

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}

.author-name {
  font-weight: 600;
  color: var(--text);
}

.author-location {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* FAQ */
.faq {
  background: var(--bg);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.faq-question:hover {
  background: var(--bg);
}

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

.faq-question.active svg {
  transform: rotate(180deg);
}

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

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

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

/* Blog */
.blog {
  background: var(--white);
}

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

.blog-card {
  background: var(--bg);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.blog-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.blog-image svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

.blog-content {
  padding: 1.5rem;
}

.blog-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

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

.blog-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-link:hover {
  color: var(--primary-dark);
}

/* Article */
.article {
  background: var(--bg);
  padding: 4rem 0;
}

.article-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.article-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

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

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

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

.article-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

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

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

.article-nav {
  max-width: 800px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--primary-dark);
}

.related-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.related-links a {
  color: var(--primary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.related-links a:hover {
  background: rgba(99, 102, 241, 0.2);
}

/* About / Contact pages */
.page-content {
  padding: 5rem 0;
}

.page-content .container {
  max-width: 800px;
}

.page-content h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.page-content p {
  margin-bottom: 1.25rem;
  color: var(--text);
  line-height: 1.8;
}

.page-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.page-content ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

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

/* Contact form */
.contact-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

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

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

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

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

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

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white);
}

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

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-floating {
    position: static;
    margin: 2rem auto;
    display: block;
    width: fit-content;
  }
}
