/* style/faq.css */

/* Variables and Base Styles */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #EA7C07; /* Login button color */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #ffffff;
  --border-color: #e0e0e0;
  --hover-bg: #f5f5f5;
  --active-bg: #eeeeee;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
}

.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--background-light); /* Assuming shared provides light background */
}

/* Hero Section - Intro for FAQ */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background-color: var(--primary-color); /* Using brand color as background */
  color: var(--text-light); /* White text for primary color background */
  padding-top: var(--header-offset, 120px);
}

.page-faq__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-faq__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-light);
}

.page-faq__intro-description {
  font-size: 1.2em;
  line-height: 1.8;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* Content Section */
.page-faq__content-section {
  padding: 60px 0;
  background-color: var(--background-light);
}

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

.page-faq__section-title {
  font-size: 2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
}

/* FAQ List */
.page-faq__faq-list {
  margin-bottom: 40px;
}

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

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--background-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;
  border-color: var(--primary-color);
}

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

.page-faq__faq-question:active {
  background: var(--active-bg);
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-dark);
  pointer-events: none; /* Prevent h3 from blocking click events */
}

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-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: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background-color: var(--background-light);
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(180deg);
  color: var(--text-light);
  background-color: var(--primary-color);
}

.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;
  background: var(--hover-bg);
  border-left: 1px solid var(--primary-color);
  border-right: 1px solid var(--primary-color);
  border-bottom: 1px solid var(--primary-color);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px !important;
  opacity: 1;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  color: var(--text-dark);
  font-size: 1em;
}

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

.page-faq__image-content {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  margin-top: 20px;
  margin-bottom: 20px;
  object-fit: cover;
}

/* Call to Action Buttons */
.page-faq__cta-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  margin-top: 15px;
  margin-right: 10px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%; /* For mobile responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__cta-button:last-child {
  margin-right: 0;
}

.page-faq__cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-faq__main-title {
    font-size: 2.2em;
  }
  .page-faq__intro-description {
    font-size: 1.1em;
  }
  .page-faq__section-title {
    font-size: 1.8em;
  }
  .page-faq__faq-question h3 {
    font-size: 1.05em;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__main-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

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

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

  .page-faq__container {
    padding: 0 15px;
  }

  .page-faq__section-title {
    font-size: 1.5em;
    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); /* Adjust width for toggle icon */
  }
  
  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
    border-width: 1px;
  }

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

  /* Mobile image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__section, 
  .page-faq__card, 
  .page-faq__container, 
  .page-faq__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Padding is handled by .page-faq__container for content */
  }

  /* Specific padding for content inside containers */
  .page-faq__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Mobile button responsiveness */
  .page-faq__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-right: 0 !important; /* Remove horizontal margin for stacked buttons */
    margin-bottom: 10px; /* Add vertical spacing for stacked buttons */
  }

  /* If multiple buttons are in a flex container */
  .page-faq__faq-answer {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align buttons to start */
    gap: 10px; /* Spacing between buttons */
  }
  .page-faq__faq-answer .page-faq__cta-button {
    margin-top: 0; /* Reset margin top if flex column */
  }
}