/* style/faq.css */

/* Custom properties for colors from the design brief */
:root {
  --page-faq-primary-color: #F2C14E;
  --page-faq-secondary-color: #FFD36B;
  --page-faq-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --page-faq-card-bg: #111111;
  --page-faq-background: #0A0A0A; /* Body background color */
  --page-faq-text-main: #FFF6D6; /* Main text color for dark background */
  --page-faq-border: #3A2A12;
  --page-faq-glow: #FFD36B;
}

/* Base styles for the FAQ page, assuming dark body background */
.page-faq {
  background-color: var(--page-faq-background); /* Explicitly set for main content area, though body handles overall */
  color: var(--page-faq-text-main); /* Light text for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 50px; /* Add some padding at the bottom */
}

/* Hero Section */
.page-faq__hero-section {
  display: flex;
  flex-direction: column; /* Default for mobile, will change for desktop */
  align-items: center;
  text-align: center;
  padding: 10px 20px 40px; /* 10px top padding as per instruction */
  background-color: var(--page-faq-card-bg); /* Dark background for the hero section */
  position: relative;
  overflow: hidden;
}

.page-faq__hero-image-container {
  width: 100%;
  max-width: 1200px; /* Max width for consistency */
  margin-bottom: 20px;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-faq__hero-content {
  max-width: 900px;
  margin-top: 20px; /* Space between image and content on mobile */
  z-index: 1; /* Ensure content is above any potential background layers */
}

.page-faq__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: var(--page-faq-primary-color);
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
}

.page-faq__hero-description {
  font-size: clamp(1em, 1.5vw, 1.2em);
  color: var(--page-faq-text-main);
  margin-bottom: 30px;
  opacity: 0.9;
}

/* CTA Buttons */
.page-faq__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box; /* Include padding in width calculation */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-faq__cta-button--primary {
  background: var(--page-faq-button-gradient);
  color: #ffffff; /* White text for primary button */
  border: none;
}

.page-faq__cta-button--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.page-faq__cta-button--secondary {
  background: transparent;
  color: var(--page-faq-primary-color);
  border: 2px solid var(--page-faq-primary-color);
  margin-left: 20px; /* Space between primary and secondary */
}

.page-faq__cta-button--secondary:hover {
  background: var(--page-faq-primary-color);
  color: #ffffff;
}

/* Content Area */
.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: var(--page-faq-background); /* Ensure content area matches body bg */
  color: var(--page-faq-text-main);
}

.page-faq__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: var(--page-faq-primary-color);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.page-faq__section-intro,
.page-faq__section-outro {
  font-size: 1.1em;
  line-height: 1.7;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  opacity: 0.8;
}

.page-faq__sub-section-title {
  font-size: clamp(1.5em, 2.5vw, 2em);
  color: var(--page-faq-secondary-color);
  margin-top: 50px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid var(--page-faq-border);
  padding-bottom: 10px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Accordion Container */
.page-faq__accordion-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-faq__faq-item {
  background-color: var(--page-faq-card-bg); /* Card background */
  border: 1px solid var(--page-faq-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #1a1a1a; /* Slightly lighter dark for question header */
  color: var(--page-faq-text-main);
  transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
  background-color: #222222;
}

.page-faq__question-text {
  font-size: 1.2em;
  font-weight: 600;
  margin: 0;
  color: var(--page-faq-text-main);
}

.page-faq__faq-toggle {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--page-faq-primary-color);
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg);
}

.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px; /* Initial padding */
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--page-faq-text-main);
  opacity: 0.9;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 1000px !important; /* Sufficiently large value */
  padding: 15px 25px; /* Padding when active */
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  font-size: 1em;
  line-height: 1.7;
}

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

/* Inline buttons within answers */
.page-faq__inline-button {
  display: inline-block;
  padding: 8px 15px;
  background: var(--page-faq-button-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 600;
  margin-top: 10px;
  transition: background 0.3s ease;
}

.page-faq__inline-button:hover {
  filter: brightness(1.1);
}

/* Policy links list */
.page-faq__policy-links {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

.page-faq__policy-links li {
  margin-bottom: 8px;
}

.page-faq__policy-links a {
  color: var(--page-faq-primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.page-faq__policy-links a:hover {
  color: var(--page-faq-secondary-color);
  text-decoration: underline;
}

/* Content Images */
.page-faq__content-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  object-fit: cover;
  max-width: 100%; /* Ensure content image is responsive by default */
}

/* CTA buttons at the bottom */
.page-faq__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (min-width: 769px) {
  .page-faq__hero-section {
    flex-direction: row; /* Desktop: row layout */
    text-align: left;
    padding: 60px 40px;
    justify-content: space-between;
    gap: 40px;
  }

  .page-faq__hero-image-container {
    flex: 1;
    margin-bottom: 0;
    order: 2; /* Image on right for desktop */
  }

  .page-faq__hero-content {
    flex: 1;
    margin-top: 0;
    order: 1; /* Content on left for desktop */
  }

  .page-faq__cta-button--secondary {
    margin-left: 15px;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-faq__hero-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__content-area {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__main-title {
    font-size: 2.2em;
  }

  .page-faq__hero-description {
    font-size: 1em;
  }

  /* Images must be responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  /* All containers with images must be responsive */
  .page-faq__hero-image-container,
  .page-faq__content-image-wrapper,
  .page-faq__faq-answer {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Buttons must be responsive */
  .page-faq__cta-button,
  .page-faq__inline-button,
  .page-faq a[class*="button"],
  .page-faq a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0 !important; /* Remove margin for stacked buttons */
    margin-right: 0 !important;
  }
  
  /* Button containers mobile adaptation */
  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    align-items: center;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-faq__cta-button--secondary {
    margin-left: 0; /* Remove desktop margin */
  }
}