/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--bg-color, #f5f5f5); /* Default fallback for body background */
}

/* Ensure the main content area respects body padding-top from shared.css */
.page-faq__hero-section {
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.page-faq__hero-image {
  width: 100%;
  height: 450px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover the area */
  display: block;
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: -150px auto 0;
  padding: 40px;
  background: rgba(211, 47, 47, 0.9); /* Card B G with slight transparency */
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  color: #FFF5E1; /* Text Main */
}

.page-faq__main-title {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFF5E1; /* Text Main */
  line-height: 1.2;
}

.page-faq__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-faq__section {
  padding: 40px 0;
  margin-bottom: 30px;
}

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

.page-faq__section-title {
  font-size: 2.5em;
  color: #C91F17; /* Main color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

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

.page-faq__faq-list {
  margin-top: 30px;
}

details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border color */
  overflow: hidden;
  background: #B71C1C; /* Background color */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #FFF5E1; /* Text Main */
  font-weight: 600;
}

details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}

details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: #7A0E0E; /* Deep Red */
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  line-height: 1.5;
  text-align: left;
  color: #FFF5E1; /* Text Main */
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFCC66; /* Glow */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: #D32F2F; /* Card B G */
  border-radius: 0 0 5px 5px;
  color: #FFF5E1; /* Text Main */
}

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

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

.page-faq__cta-section {
  text-align: center;
  padding: 50px 20px;
  background: #B71C1C; /* Background color */
  border-radius: 10px;
  margin-top: 50px;
  color: #FFF5E1; /* Text Main */
}

.page-faq__cta-title {
  font-size: 2em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 15px;
}

.page-faq__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-faq__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #7A0E0E; /* Deep Red for contrast */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-2px);
}

.page-faq__btn-secondary {
  background: transparent;
  color: #FFCC66; /* Glow */
  border: 2px solid #FFCC66; /* Glow */
}

.page-faq__btn-secondary:hover {
  background: #FFCC66;
  color: #B71C1C; /* Background color */
  transform: translateY(-2px);
}

/* --- Responsive Styles --- */

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-faq {
    font-size: 15px;
  }

  .page-faq__hero-section {
    margin-bottom: 20px;
  }

  .page-faq__hero-image {
    height: 300px;
  }

  .page-faq__hero-image img {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important;
  }

  .page-faq__hero-content {
    margin-top: -80px; /* Adjust overlap */
    padding: 25px 15px;
    max-width: calc(100% - 30px); /* Account for padding */
    left: 15px;
    right: 15px;
  }

  .page-faq__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em); /* Responsive font size for H1 */
  }

  .page-faq__hero-description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

  .page-faq__section {
    padding: 30px 0;
    margin-bottom: 20px;
  }

  .page-faq__container {
    padding: 0 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

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

  .page-faq__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px;
  }

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

  .page-faq__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }

  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 15px 15px;
  }

  .page-faq__image-inline {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 15px auto;
  }

  .page-faq__cta-section {
    padding: 30px 15px;
    margin-top: 30px;
  }

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

  .page-faq__cta-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}

/* Tablet (max-width: 1024px) - specific adjustments if needed, otherwise inherit desktop/mobile */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

  .page-faq__section-title {
    font-size: 2em;
  }

  .page-faq__cta-buttons {
    gap: 15px;
  }
}

/* Ensure all images and containers are responsive */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-faq__section,
.page-faq__card,
.page-faq__container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Color contrast safety for light background body */
.page-faq__light-bg {
  color: #333333; /* Dark text on light background */
  background: #fcfcfc; /* Slightly off-white for sections */
}

/* Color contrast safety for dark background body */
.page-faq__dark-bg {
  color: #FFF5E1; /* Text Main on dark background */
  background: #B71C1C; /* Background color */
}

/* Default text for paragraphs, lists etc. in main content area */
.page-faq p,
.page-faq li {
  color: #FFF5E1; /* Text Main */
}

/* Override for specific sections if needed */
.page-faq__content-area p,
.page-faq__content-area li {
  color: #333333; /* Darker text for readability in light sections */
}

.page-faq__hero-content p {
    color: #FFF5E1; /* Text Main */
}

.page-faq__faq-answer p {
    color: #FFF5E1; /* Text Main */
}