/* style/faq.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-login: #EA7C07;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--secondary-color); /* Matches shared.css body background if it's light */
}

.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a7bb0 100%); /* Blue gradient for hero */
  color: var(--text-light);
}

.page-faq__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.2; /* Slightly faded background image */
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-light);
  margin-bottom: 15px;
  max-width: 100%;
}

.page-faq__hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 800px;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
  width: auto;
  text-align: center;
}

.page-faq__btn-primary {
  background-color: var(--button-login); /* Use login color for primary CTA */
  color: var(--text-light);
  border: 2px solid var(--button-login);
}

.page-faq__btn-primary:hover {
  background-color: #c96800;
  border-color: #c96800;
}

.page-faq__btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-left: 15px;
}

.page-faq__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: var(--secondary-color); /* Light background for content */
  color: var(--text-dark);
}

.page-faq__section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
}

.page-faq__intro-text {
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 60px;
}

.page-faq__faq-item {
  background-color: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-faq__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--primary-color);
  background-color: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
  list-style: none; /* Hide default marker */
}

.page-faq__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-faq__faq-item[open] summary {
  background-color: #eaf7fd; /* Lighter background when open */
  border-bottom: 1px solid var(--primary-color);
}

.page-faq__faq-qtext {
  flex-grow: 1;
}

.page-faq__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--primary-color);
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-faq__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--secondary-color);
}

.page-faq__faq-answer p {
  margin-bottom: 10px;
}

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

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

.page-faq__faq-answer a:hover {
  color: #1a7bb0;
}

.page-faq__cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a7bb0 100%);
  color: var(--text-light);
  padding: 50px 20px;
  text-align: center;
  border-radius: 10px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.page-faq__cta-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-faq__cta-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 800px;
}

.page-faq__cta-description a {
  color: var(--text-light);
  text-decoration: underline;
}

.page-faq__cta-description a:hover {
  color: #f0f0f0;
}

.page-faq__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 500px;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    padding: 0 15px;
  }

  .page-faq__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

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

  .page-faq__section-title {
    font-size: 1.8rem;
  }

  .page-faq__faq-item summary {
    font-size: 1.05rem;
    padding: 18px 20px;
  }

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

  .page-faq__cta-title {
    font-size: 1.8rem;
  }

  .page-faq__cta-description {
    font-size: 1rem;
  }
}

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

  .page-faq__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-faq__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-faq__hero-description {
    font-size: 0.95rem;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 10px;
  }

  .page-faq__btn-primary:last-child,
  .page-faq__btn-secondary:last-child {
    margin-bottom: 0;
  }

  .page-faq__hero-content {
    flex-direction: column;
    gap: 15px;
  }

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

  .page-faq__section-title {
    font-size: 1.6rem;
  }

  .page-faq__intro-text {
    font-size: 0.95rem;
  }

  .page-faq__faq-item summary {
    font-size: 1rem;
    padding: 15px 18px;
  }

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

  .page-faq__cta-title {
    font-size: 1.6rem;
  }

  .page-faq__cta-description {
    font-size: 0.95rem;
  }

  /* Image responsive rules */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__content-area,
  .page-faq__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  /* Specific adjustments for button groups */
  .page-faq__hero-content .page-faq__btn-primary,
  .page-faq__hero-content .page-faq__btn-secondary,
  .page-faq__cta-section .page-faq__btn-primary,
  .page-faq__cta-section .page-faq__btn-secondary {
    margin: 0 !important; /* Remove specific margins to allow full width */
  }

  .page-faq__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
  }
}

/* Ensure images in content area are not too small */
.page-faq img:not(.page-faq__hero-image) {
  min-width: 200px;
  min-height: 200px;
  object-fit: contain; /* or cover, depending on desired effect */
  margin: 20px auto; /* Center content images */
  display: block;
}

/* Color contrast safety */
.page-faq__hero-section {
  color: var(--text-light);
}

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

.page-faq__cta-section {
  color: var(--text-light);
}

/* Ensure all text within .page-faq has sufficient contrast */
.page-faq p,
.page-faq li,
.page-faq__intro-text,
.page-faq__hero-description,
.page-faq__cta-description {
  color: var(--text-dark);
}

/* Override for dark sections */
.page-faq__hero-section p,
.page-faq__hero-section h1,
.page-faq__hero-section a,
.page-faq__cta-section p,
.page-faq__cta-section h3,
.page-faq__cta-section a {
  color: var(--text-light);
}

/* Links in light sections */
.page-faq__faq-answer a {
  color: var(--primary-color);
}

.page-faq__faq-item summary {
  color: var(--primary-color);
}

.page-faq__faq-toggle {
  color: var(--primary-color);
}