/* ===================================
   FilterFive Homepage - Mobile First CSS
   =================================== */

/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
  --primary-color: #667eea;
  --primary-dark: #5568d3;
  --secondary-color: #764ba2;
  --accent-color: #fbbf24;
  --text-dark: #2d3748;
  --text-medium: #4a5568;
  --text-light: #718096;
  --text-lighter: #a0aec0;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --success-color: #48bb78;
  --error-color: #f56565;

  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);

  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 64px;

  --border-radius: 10px;
  --border-radius-lg: 20px;

  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ===================================
   Container & Layout
   =================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

section {
  padding: var(--spacing-xl) 0;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 18px;
}

p {
  margin-bottom: var(--spacing-sm);
}

.section-headline {
  text-align: center;
  font-size: 32px;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
}

.section-subheadline {
  text-align: center;
  font-size: 18px;
  color: var(--text-medium);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================
   Buttons
   =================================== */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-sm) 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  flex-direction: column;
  padding: var(--spacing-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  gap: var(--spacing-sm);
}

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

.nav-links a {
  padding: var(--spacing-sm);
  color: var(--text-medium);
  font-weight: 500;
  border-radius: var(--border-radius);
}

.nav-links a:hover {
  color: var(--primary-color);
  background: var(--bg-light);
}

.nav-login {
  color: var(--primary-color) !important;
}

.btn-primary-nav {
  background: var(--gradient-primary) !important;
  color: white !important;
  padding: 10px 20px !important;
  border-radius: var(--border-radius);
}

/* Hamburger Menu */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
  background: var(--gradient-primary);
  color: white;
  padding: var(--spacing-xxl) 0;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero-headline {
  font-size: 36px;
  margin-bottom: var(--spacing-md);
  color: white;
}

.hero-subheadline {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
  color: rgba(255, 255, 255, 0.95);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

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

.hero-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.hero-cta .btn-secondary {
  border-color: white;
  color: white;
}

.hero-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-trust {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-visual {
  margin-top: var(--spacing-xl);
}

.hero-image-placeholder {
  max-width: 400px;
  margin: 0 auto;
}

/* ===================================
   Problem Section
   =================================== */
.problem-section {
  background: var(--bg-light);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.problem-card {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.problem-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-sm);
}

.problem-card h3 {
  font-size: 20px;
  margin-bottom: var(--spacing-xs);
}

.problem-card p {
  color: var(--text-medium);
  margin-bottom: 0;
}

.problem-summary {
  text-align: center;
  font-size: 18px;
  color: var(--text-medium);
  max-width: 700px;
  margin: var(--spacing-lg) auto 0;
}

/* ===================================
   How It Works Section
   =================================== */
.how-it-works {
  background: white;
}

.methods-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.method-card {
  background: var(--bg-light);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
}

.method-badge {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.method-title {
  font-size: 24px;
  margin-bottom: var(--spacing-sm);
}

.method-intro {
  color: var(--text-medium);
  margin-bottom: var(--spacing-lg);
}

.flow-steps {
  margin: var(--spacing-lg) 0;
}

.flow-step {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.flow-step p {
  margin-bottom: 0;
  color: var(--text-medium);
}

.flow-step em {
  font-style: italic;
  color: var(--text-light);
}

.method-best-for {
  background: white;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius);
  margin-top: var(--spacing-md);
  border-left: 4px solid var(--primary-color);
}

/* ===================================
   Benefits Section
   =================================== */
.benefits-section {
  background: white;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.benefit-card {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--bg-light);
  border-radius: var(--border-radius-lg);
}

.benefit-icon {
  font-size: 56px;
  margin-bottom: var(--spacing-sm);
}

.benefit-card h3 {
  font-size: 22px;
  margin-bottom: var(--spacing-sm);
}

.benefit-card p {
  color: var(--text-medium);
  margin-bottom: 0;
}

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

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.feature-item {
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
}

.feature-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--success-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.feature-content h4 {
  font-size: 18px;
  margin-bottom: var(--spacing-xs);
}

.feature-content p {
  color: var(--text-medium);
  margin-bottom: 0;
  font-size: 14px;
}

/* ===================================
   Pricing Section
   =================================== */
.pricing-section {
  background: white;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.pricing-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  position: relative;
}

.pricing-card.popular {
  border-color: var(--primary-color);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.plan-name {
  font-size: 24px;
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.plan-price {
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.price-amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary-color);
}

.price-period {
  font-size: 18px;
  color: var(--text-light);
}

.plan-annual {
  text-align: center;
  color: var(--text-medium);
  margin-bottom: var(--spacing-md);
  font-size: 14px;
}

.savings {
  color: var(--success-color);
  font-weight: 600;
}

.plan-features {
  list-style: none;
  margin-bottom: var(--spacing-md);
}

.plan-features li {
  padding: var(--spacing-xs) 0;
  color: var(--text-medium);
  position: relative;
  padding-left: 28px;
}

.plan-features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: 700;
}

.plan-overage {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.pricing-footer {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.pricing-footer p {
  margin-bottom: var(--spacing-sm);
}

.pricing-comparison {
  color: var(--text-light);
  font-size: 14px;
}

/* ===================================
   FAQ Section
   =================================== */
.faq-section {
  background: var(--bg-light);
}

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

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

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

.faq-question:hover {
  color: var(--primary-color);
}

.faq-icon {
  font-size: 24px;
  color: var(--primary-color);
  transition: var(--transition);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

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

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

.faq-answer p {
  padding: 0 var(--spacing-md) var(--spacing-md);
  color: var(--text-medium);
  line-height: 1.7;
}

/* ===================================
   Final CTA Section
   =================================== */
.final-cta {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: var(--spacing-xxl) 0;
}

.cta-headline {
  font-size: 36px;
  color: white;
  margin-bottom: var(--spacing-md);
}

.cta-subheadline {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  margin-bottom: var(--spacing-md);
}

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

.cta-trust {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-md);
}

.cta-contact {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.cta-contact a {
  color: white;
  text-decoration: underline;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--text-dark);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  color: white;
  font-size: 16px;
  margin-bottom: var(--spacing-sm);
}

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

.footer-col ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-col a {
  color: var(--text-lighter);
  font-size: 14px;
}

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

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

.footer-bottom p {
  color: var(--text-lighter);
  font-size: 14px;
  margin-bottom: 0;
}

/* ===================================
   Sticky CTA (Mobile)
   =================================== */
.sticky-cta {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: var(--spacing-sm);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-cta.visible {
  transform: translateY(0);
}

/* ===================================
   Tablet Breakpoint (768px+)
   =================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }

  section {
    padding: var(--spacing-xxl) 0;
  }

  /* Typography */
  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 40px;
  }

  .section-headline {
    font-size: 40px;
  }

  /* Hero */
  .hero-headline {
    font-size: 48px;
  }

  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

  /* Problem Grid */
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Benefits Grid */
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Features Grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Pricing Grid */
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid-two {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hide Sticky CTA on tablet+ */
  .sticky-cta {
    display: none;
  }
}

/* ===================================
   Desktop Breakpoint (1024px+)
   =================================== */
@media (min-width: 1024px) {
  /* Navigation - Desktop */
  .hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    box-shadow: none;
    gap: var(--spacing-md);
  }

  .nav-links a {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  /* Hero */
  .hero {
    text-align: left;
  }

  .hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
  }

  .hero-content {
    max-width: none;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  /* Problem Grid */
  .problem-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Methods */
  .methods-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
  .navbar,
  .sticky-cta,
  .hero-cta,
  .cta-buttons {
    display: none;
  }
}
