/* ===========================================================================
   SaleStreams — Enhanced Components
   FAQ Accordion, Form Messages, and Interactive Elements
   =========================================================================== */
html {
    scroll-behavior: smooth;  /* Smooth scrolling */
}

section {
    scroll-margin-top: 100px;  /* Offset for sticky header height */
}
/* ========================================
   FAQ Section & Accordion Styles
   ======================================== */

.faq-section {
  background: var(--surface-app);
  padding: 3rem 1.5rem;
}

@media (min-width: 768px) {
  .faq-section {
    padding: 5rem 1.5rem;
  }
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Individual FAQ Item */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  background: var(--surface-card);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(240, 83, 46, 0.08);
}

.faq-item.open {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(240, 83, 46, 0.12);
}

/* FAQ Question (Button) */
.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: none;
  background: var(--surface-card);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  text-align: left;
}

.faq-question:hover {
  background: var(--surface-sunken);
  color: var(--brand);
}

.faq-item.open .faq-question {
  background: var(--surface-sunken);
  color: var(--brand);
}

/* FAQ Toggle Arrow */
.faq-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.3s ease;
  color: var(--brand);
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

/* FAQ Answer (Content) */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  overflow: visible;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem 1.5rem;
  margin: 0;
  color: var(--text-body);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.faq-item.open .faq-answer p {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus state for accessibility */
.faq-question:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ========================================
   Form Message Styles
   ======================================== */

.form-message {
  padding: 1rem 1.25rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success Message */
.form-message-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #86efac;
}

.form-message-success::before {
  content: "✓";
  font-weight: bold;
  font-size: 1.1rem;
}

/* Error Message */
.form-message-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-message-error::before {
  content: "⚠";
  font-weight: bold;
  font-size: 1.1rem;
}

/* ========================================
   Contact Form Enhancements
   ======================================== */

.contact-form {
  position: relative;
}

.contact-form button[type="submit"] {
  transition: all 0.3s ease;
}

.contact-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(240, 83, 46, 0.3);
}

/* Form input focus states */
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(240, 83, 46, 0.1);
  background: var(--surface-app);
}

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

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: var(--text-on-dark);
  text-align: center;
  padding: 3rem 1.5rem;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 5rem 1.5rem;
  }
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin: 0 0 1rem 0;
  color: var(--text-on-dark);
}

@media (min-width: 768px) {
  .cta-section h2 {
    font-size: var(--text-3xl);
    margin-bottom: 1.5rem;
  }
}

.cta-section p {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: var(--leading-relaxed);
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .cta-group {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
  border: 2px solid var(--text-on-dark);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--text-on-dark);
  color: #0f172a;
  transform: translateY(-2px);
}

/* ========================================
   Mobile Menu
   ======================================== */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-strong);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

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

.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100vh;
  background: var(--surface-card);
  transition: left 0.3s ease;
  z-index: 99;
  overflow-y: auto;
  padding: 5rem 1.5rem;
}

.mobile-menu.open {
  left: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 98;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-body);
  text-decoration: none;
  font-weight: var(--weight-medium);
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--brand);
}

/* ========================================
   Responsive Utilities
   ======================================== */

@media (max-width: 767px) {
  .section-title {
    font-size: var(--text-2xl) !important;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .mobile-menu-toggle,
  .mobile-menu-overlay,
  header,
  footer {
    display: none;
  }
  
  .faq-answer {
    max-height: none !important;
    overflow: visible;
  }
}
