/* style/faq.css */
/* 
 * BEM Naming Convention: .page-faq__element-name
 * Scope: Restricted to .page-faq
 * No global selectors (body, html, *) or descendant selectors (.page-faq .element)
 * Color scheme: #FFD700 (gold), #000080 (midnight blue)
 */

/* Base styles for the FAQ page content */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background (var(--dark-bg)) */
  background-color: transparent; /* Inherit from body or shared.css */
  padding-top: 0; /* Assuming shared.css handles body padding for header offset */
}

/* Hero Section - for FAQ page, not homepage HERO */
.page-faq__hero-section {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  color: #ffffff; /* White text for dark background */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px; /* Minimum height for the hero section */
}

.page-faq__hero-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.4); /* Darken image for text readability */
}

.page-faq__hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for better contrast */
    z-index: 0;
}

.page-faq__hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1; /* Ensure text is above image and overlay */
}

.page-faq__hero-title {
  font-size: 3.2em;
  color: #FFD700; /* Gold for title */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-faq__hero-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Content Sections */
.page-faq__content-section {
  padding: 60px 20px;
  background-color: #1a1a1a; /* Dark background for content sections */
  color: #f0f0f0; /* Light text for dark background */
}

.page-faq__container {
  max-width: 900px;
  margin: 0 auto;
}

.page-faq__section-title {
  font-size: 2.2em;
  color: #FFD700; /* Gold for section titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-faq__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #cccccc;
}

/* FAQ Items - Styling as per prompt */
.page-faq__faq-list {
  margin-top: 30px;
}

.page-faq__faq-item {
  margin-bottom: 15px;
  background-color: #2a2a2a; /* Slightly lighter dark for FAQ item background */
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3a3a3a;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #000080; /* Midnight blue for question background */
  color: #ffffff; /* White text for contrast */
  border: 1px solid #000080;
  border-radius: 8px; /* Apply border-radius here to override item's */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  margin: -1px; /* Adjust for border collapse */
}

.page-faq__faq-item.active .page-faq__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.page-faq__faq-question:hover {
  background: #1a1a9a; /* Darker blue on hover */
  border-color: #1a1a9a;
}

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

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: #FFD700; /* Gold for question title */
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold for toggle icon */
  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: 28px;
  height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
  color: #ffffff; /* White when active */
}

.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: #cccccc; /* Light gray text for answer */
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Use !important and large value as required */
  padding: 20px !important;
  opacity: 1;
  background: #2a2a2a; /* Match item background */
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #3a3a3a;
}

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

.page-faq__faq-answer a {
    color: #FFD700; /* Gold for links in answers */
    text-decoration: underline;
}

.page-faq__faq-answer a:hover {
    color: #e6c200; /* Lighter gold on hover */
}


/* Contact Support Section */
.page-faq__contact-support-section {
  background-color: #000080; /* Midnight blue background */
  padding: 80px 20px;
  text-align: center;
  color: #ffffff; /* White text */
}

.page-faq__contact-support-section .page-faq__section-title {
  color: #FFD700; /* Gold for title */
}

.page-faq__contact-support-section .page-faq__section-description {
  color: #f0f0f0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50px;
}

.page-faq__contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Button styles */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%; /* Ensure buttons adapt to container */
  box-sizing: border-box;
}

.page-faq__btn-primary {
  background-color: #FFD700; /* Gold background */
  color: #000080; /* Midnight blue text for contrast */
  border: 2px solid #FFD700;
}

.page-faq__btn-primary:hover {
  background-color: #e6c200; /* Slightly darker gold on hover */
  border-color: #e6c200;
  color: #000060;
}

.page-faq__btn-secondary {
  background-color: transparent;
  color: #FFD700; /* Gold text */
  border: 2px solid #FFD700;
}

.page-faq__btn-secondary:hover {
  background-color: #FFD700; /* Gold background on hover */
  color: #000080; /* Midnight blue text */
}

/* Image responsive styles (global for .page-faq img) */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

  .page-faq__hero-section {
    padding: 60px 15px;
    min-height: 300px;
  }

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

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

  .page-faq__content-section {
    padding: 40px 15px;
  }

  .page-faq__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-faq__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-faq__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-faq__faq-answer {
    padding: 0 15px;
  }
  
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px !important;
  }

  .page-faq__contact-support-section {
    padding: 60px 15px;
  }

  .page-faq__contact-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* Mobile button adaptations */
  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .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;
  }
  
  .page-faq__contact-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
  }

  /* Mobile image adaptations */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__hero-section,
  .page-faq__content-section,
  .page-faq__contact-support-section,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__faq-item {
    border-radius: 5px;
  }
  .page-faq__faq-question {
    border-radius: 5px;
  }
  .page-faq__faq-item.active .page-faq__faq-answer {
    border-radius: 0 0 5px 5px;
  }
}

/* Ensure link colors have good contrast */
.page-faq a {
  color: #FFD700; /* Gold for general links */
}
.page-faq a:hover {
  color: #e6c200; /* Slightly darker gold on hover */
}