/* style/faq.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #0056b3;
  --accent-color: #ffc107;
  --text-color-light: #f8f9fa;
  --text-color-dark: #333333;
  --bg-dark: #111;
  --bg-light: #f0f0f0;
}

/* Base styles for the page-faq scope */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light); /* Light text on dark body background */
  background-color: var(--bg-dark);
}

.page-faq__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-faq__dark-bg {
  background-color: var(--bg-dark);
  color: var(--text-color-light);
}

.page-faq__light-bg {
  background-color: var(--bg-light);
  color: var(--text-color-dark);
}

/* Hero Section */
.page-faq__hero-section {
  padding: 120px 0 80px; /* Adjusted padding-top for fixed header */
  text-align: center;
  background: linear-gradient(135deg, #0a0a0a, #222222) no-repeat center center/cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
}

.page-faq__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button--secondary {
  background: var(--accent-color);
  color: var(--text-color-dark);
}

.page-faq__cta-button--secondary:hover {
  background: #e0a800;
  color: var(--text-color-dark);
}

.page-faq__cta-button--small {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
}

.page-faq__link-in-text {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-faq__link-in-text:hover {
  color: #e0a800;
  text-decoration: none;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 80px 0;
  background-color: var(--bg-dark);
}

.page-faq__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 50px;
  color: var(--primary-color);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* FAQ Item styles */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for items */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* FAQ default state - answer hidden */
.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  color: var(--text-color-light);
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* 🚨 Ensure it can expand */
  padding: 20px !important;
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  color: var(--text-color-light);
}

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
  margin-bottom: 15px;
  padding-left: 25px;
}

.page-faq__faq-answer li {
  margin-bottom: 8px;
  color: var(--text-color-light);
}

/* Question styles */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  border: 1px solid var(--primary-color);
}

.page-faq__faq-question:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.page-faq__faq-question:active {
  background-color: #004085;
}

/* Question title styles */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: #ffffff;
}

/* Toggle icon */
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(180deg);
  background-color: rgba(255, 255, 255, 0.3);
}

/* Contact Promo Section */
.page-faq__contact-promo {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) no-repeat center center/cover;
  box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.3);
  margin-top: 40px;
}

.page-faq__contact-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-faq__contact-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 40px;
  }
  .page-faq__contact-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding-top: 80px !important; /* Mobile padding-top for fixed header */
    padding-bottom: 60px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-faq__hero-title {
    font-size: 32px;
  }

  .page-faq__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__faq-section {
    padding: 60px 0;
  }

  .page-faq__section-title {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .page-faq__faq-question {
    padding: 15px;
    flex-wrap: wrap;
    border-radius: 6px;
  }

  .page-faq__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }

  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }

  .page-faq__faq-answer {
    padding: 0 15px;
  }

  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px !important;
    border-radius: 0 0 6px 6px;
  }

  .page-faq__contact-promo {
    padding: 60px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-faq__contact-title {
    font-size: 30px;
  }

  .page-faq__contact-description {
    font-size: 18px;
  }

  /* Ensure all containers are responsive */
  .page-faq__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}