/**
 * ELIO SOLAR - FAQ ACCORDION + FINAL CTA
 * Frequently asked questions with final conversion push
 * Version: 1.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
  /* FAQ Section */
  --faq-padding: 80px;
  --faq-padding-mobile: 60px;
  --faq-bg: white;
  --faq-max-width: 900px;

  /* FAQ Items */
  --faq-item-bg: #f8fafc;
  --faq-item-bg-active: white;
  --faq-item-border: #e5e7eb;
  --faq-item-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --faq-item-radius: 16px;
  --faq-item-padding: 24px;

  /* Final CTA */
  --cta-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 60%, #60a5fa 100%);
  --cta-shadow: 0 20px 60px rgba(59, 130, 246, 0.4);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
  background: var(--faq-bg);
  padding: var(--faq-padding) 32px;
}

.faq-container {
  max-width: var(--faq-max-width);
  margin: 0 auto;
}

/* Section Header */
.faq-header {
  text-align: center;
  margin-bottom: 56px;
}

.faq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.faq-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 16px 0;
}

.faq-subtitle {
  font-size: 18px;
  color: #64748b;
  margin: 0;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--faq-item-bg);
  border: 2px solid var(--faq-item-border);
  border-radius: var(--faq-item-radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item[data-expanded="true"] {
  background: var(--faq-item-bg-active);
  border-color: #3b82f6;
  box-shadow: var(--faq-item-shadow);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: var(--faq-item-padding);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.04);
}

.faq-question-text {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  flex: 1;
}

.faq-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.faq-item[data-expanded="true"] .faq-icon {
  background: #3b82f6;
  transform: rotate(180deg);
}

.faq-icon svg {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
}

.faq-item[data-expanded="true"] .faq-icon svg {
  fill: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[data-expanded="true"] .faq-answer {
  max-height: 500px;
  padding: 0 var(--faq-item-padding) var(--faq-item-padding);
}

.faq-answer-text {
  font-size: 16px;
  line-height: 1.7;
  color: #64748b;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* ============================================
   FINAL CTA SECTION
   ============================================ */

.final-cta {
  background: var(--cta-gradient);
  padding: 100px 32px;
  position: relative;
  overflow: hidden;
  text-align: center;
  color: white;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: ctaFloat 12s ease-in-out infinite;
}

@keyframes ctaFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

.final-cta::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: ctaFloat 10s ease-in-out infinite reverse;
}

.final-cta-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.final-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: badgePulse 2s ease-in-out infinite;
}

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

.final-cta-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
  color: white;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.final-cta-subtitle {
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 40px 0;
  opacity: 0.95;
}

.final-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.final-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 44px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
}

.final-cta-button--primary {
  background: white;
  color: #1e3a8a;
  box-shadow: 0 12px 48px rgba(255, 255, 255, 0.3);
}

.final-cta-button--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
  transition: left 0.5s ease;
}

.final-cta-button--primary:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 16px 64px rgba(255, 255, 255, 0.5);
}

.final-cta-button--primary:hover::before {
  left: 100%;
}

.final-cta-button--secondary {
  background: transparent;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.5);
}

.final-cta-button--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  transform: translateY(-4px);
}

.final-cta-button-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.final-cta-button:hover .final-cta-button-icon {
  transform: translateX(4px);
}

.final-cta-features {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.final-cta-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.95;
}

.final-cta-feature-icon {
  width: 24px;
  height: 24px;
  fill: #10b981;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1023px) {
  :root {
    --faq-padding: 60px;
    --faq-item-padding: 20px;
  }

  .faq-title,
  .final-cta-title {
    font-size: 36px;
  }

  .final-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .final-cta-button {
    width: 100%;
    max-width: 400px;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 640px) {
  :root {
    --faq-padding: var(--faq-padding-mobile);
    --faq-item-padding: 16px;
  }

  .faq-section {
    padding: var(--faq-padding-mobile) 20px;
  }

  .faq-eyebrow {
    font-size: 11px;
    padding: 6px 16px;
  }

  .faq-title {
    font-size: 28px;
  }

  .faq-subtitle {
    font-size: 16px;
  }

  .faq-question-text {
    font-size: 16px;
  }

  .faq-answer-text {
    font-size: 15px;
  }

  .final-cta {
    padding: 60px 20px;
  }

  .final-cta-title {
    font-size: 32px;
  }

  .final-cta-subtitle {
    font-size: 18px;
  }

  .final-cta-button {
    padding: 18px 32px;
    font-size: 18px;
  }

  .final-cta-features {
    flex-direction: column;
    gap: 16px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .faq-section {
    padding: 40px 20px;
  }

  .faq-item {
    box-shadow: none;
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  .faq-item[data-expanded="true"] .faq-answer {
    max-height: none;
    padding: var(--faq-item-padding);
  }

  .final-cta {
    background: white;
    color: #000;
    border: 2px solid #000;
    padding: 40px 20px;
  }

  .final-cta::before,
  .final-cta::after {
    display: none;
  }

  .final-cta-button {
    display: none;
  }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-question,
  .faq-icon,
  .faq-answer,
  .final-cta-button {
    transition: none !important;
  }

  .final-cta::before,
  .final-cta::after,
  .final-cta-badge {
    animation: none !important;
  }

  .faq-item[data-expanded="true"] .faq-icon {
    transform: none;
  }

  .final-cta-button:hover {
    transform: none !important;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states */
.faq-question:focus {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

.final-cta-button:focus {
  outline: 3px solid white;
  outline-offset: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .faq-item {
    border: 2px solid currentColor;
  }

  .final-cta {
    background: #000;
    border: 2px solid #fff;
  }
}
