/* style/faq.css */

/* Variables for consistency */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --bg-light: #f8f8f8;
  --border-color: #e0e0e0;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-color-dark);
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-color-light);
  overflow: hidden; /* Prevent overflow from pseudo-elements if any */
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any background effects */
}

.page-faq__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 800px; /* Limit image width in hero for better composition */
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 15px;
}

.page-faq__main-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  font-weight: 700;
  color: var(--text-color-light); /* Ensure high contrast */
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-faq__description {
  font-size: 1.2em;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #f0f0f0; /* Slightly lighter for description */
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
}

.page-faq__cta-button:hover {
  background: #e6c200; /* Direct color for hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Content Area */
.page-faq__content-area {
  padding: 60px 20px;
  background: var(--bg-light);
}

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

.page-faq__section-title {
  font-size: 2.2em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.page-faq__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.page-faq__text-block {
  font-size: 1.05em;
  line-height: 1.7;
  margin-bottom: 30px;
  text-align: justify;
  color: var(--text-color-dark);
}

.page-faq__text-block a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-faq__text-block a:hover {
  color: var(--primary-color);
}

/* FAQ List Styling */
.page-faq__faq-list {
  margin-top: 30px;
}

.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--text-color-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-faq__faq-item.active .page-faq__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-faq__faq-question:hover {
  background: var(--bg-light);
  border-color: #d0d0d0;
}

.page-faq__faq-item.active .page-faq__faq-question:hover {
  background: var(--primary-color); /* Keep active state hover consistent */
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: inherit; /* Inherit color from parent for active state */
}

.page-faq__faq-toggle {
  font-size: 2.2em;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--text-color-light);
  transform: rotate(180deg); /* Rotate for minus sign */
}

.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 25px;
  opacity: 0;
  background: #fdfdfd;
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  color: var(--text-color-dark);
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Sufficiently large for content */
  padding: 20px 25px !important;
  opacity: 1;
  background: #fdfdfd;
  border-color: #d0d0d0;
}

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

.page-faq__faq-answer ul, .page-faq__faq-answer ol {
  margin: 1em 0;
  padding-left: 25px;
}

.page-faq__faq-answer li {
  margin-bottom: 0.5em;
}

.page-faq__faq-answer strong {
  color: var(--secondary-color);
}

.page-faq__faq-answer a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-faq__faq-answer a:hover {
  color: var(--primary-color);
}

.page-faq__image-content {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* Call to Action Section (bottom) */
.page-faq__cta-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-faq__cta-content .page-faq__section-title {
  color: var(--text-color-light);
}

.page-faq__cta-content .page-faq__section-title::after {
  background: var(--primary-color);
}

.page-faq__cta-content .page-faq__text-block {
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: none;
}

.page-faq__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 2.5em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-faq {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    font-size: 15px;
  }

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

  .page-faq__main-title {
    font-size: 2em;
    line-height: 1.3;
  }

  .page-faq__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-faq__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

  .page-faq__faq-question {
    padding: 15px 20px;
  }

  .page-faq__faq-question h3 {
    font-size: 1em;
  }

  .page-faq__faq-toggle {
    font-size: 1.8em;
    width: 24px;
    height: 24px;
  }

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

  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px 20px !important;
  }

  .page-faq__image-content {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* Ensure all images and containers are responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__cta-buttons,
  .page-faq__button-group,
  .page-faq__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-faq__btn-primary {
    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;
  }
}