:root {
  --primary-color: #8B0000; /* Deep Red */
  --secondary-color: #FFD700; /* Gold */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f9f9f9;
  --border-light: #e0e0e0;
  --header-offset: 120px; /* Default value, overridden by shared.css if present */
}

/* Base styles for the FAQ page content */
.page-faq {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: #ffffff; /* Assuming default white body background */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Ensure content is not covered by fixed header */
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #a30000 50%, var(--secondary-color) 100%); /* Blend brand colors */
  color: var(--text-light);
  text-align: center;
  overflow: hidden; /* Ensure image does not overflow */
}

.page-faq__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-faq__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 1000px; /* Limit hero image width for better composition */
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  overflow: hidden; /* Ensure border-radius applies */
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

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

.page-faq__hero-title {
  font-size: 3.2em;
  margin-bottom: 15px;
  font-weight: bold;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

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

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color); /* Gold button */
  color: var(--primary-color); /* Deep red text for contrast */
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--secondary-color); /* Match background */
}

.page-faq__cta-button:hover {
  background: var(--primary-color); /* Hover to deep red */
  color: var(--text-light); /* White text */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--text-light); /* White border on hover */
}

/* Content Area */
.page-faq__content-area {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.page-faq__section-header {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--secondary-color);
}

.page-faq__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-faq__section-description {
  font-size: 1.1em;
  color: var(--text-dark);
  max-width: 700px;
  margin: 0 auto;
}

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

/* FAQ Item Styles */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

/* FAQ default state - answer hidden */
.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;
  color: var(--text-dark);
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important for priority, large value to contain any content */
  padding: 20px 25px !important;
  opacity: 1;
  background: var(--bg-light); /* Light background for answer */
  border-radius: 0 0 8px 8px;
  border-top: 1px dashed var(--border-light);
}

/* Question styles */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--primary-color); /* Deep red for question background */
  color: var(--text-light); /* White text for contrast */
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, 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: var(--secondary-color); /* Gold on active */
  color: var(--primary-color); /* Deep red text on active */
}

.page-faq__faq-question:hover {
  background: #a30000; /* Slightly darker red on hover */
  border-color: #a30000;
}

/* Question title styles */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: inherit; /* Inherit color from parent (.page-faq__faq-question) */
}

/* Toggle icon */
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: inherit; /* Inherit color from parent */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

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

/* Contact CTA Section */
.page-faq__contact-cta {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-light);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-faq__contact-cta img {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 30px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-faq__contact-title {
  font-size: 2em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-faq__contact-description {
  font-size: 1.1em;
  color: var(--text-dark);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__contact-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color); /* Deep red button */
  color: var(--text-light); /* White text */
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--primary-color);
}

.page-faq__contact-button:hover {
  background: var(--secondary-color); /* Hover to gold */
  color: var(--primary-color); /* Deep red text */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color); /* Deep red border on hover */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 2.8em;
  }
  .page-faq__section-title {
    font-size: 2.2em;
  }
  .page-faq__contact-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
    padding-bottom: 40px;
  }
  .page-faq__hero-title {
    font-size: 2.2em;
    line-height: 1.2;
  }
  .page-faq__hero-description {
    font-size: 1em;
    padding: 0 10px;
  }
  .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 {
    margin: 30px auto;
    padding: 0 15px;
  }
  .page-faq__section-header {
    margin-bottom: 30px;
  }
  .page-faq__section-title {
    font-size: 1.8em;
  }
  .page-faq__section-description {
    font-size: 0.95em;
  }

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

  .page-faq__contact-cta {
    padding: 40px 15px;
    margin-top: 40px;
  }
  .page-faq__contact-title {
    font-size: 1.6em;
  }
  .page-faq__contact-description {
    font-size: 1em;
  }
  .page-faq__contact-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;
  }

  /* Image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .page-faq__hero-image img,
  .page-faq__contact-cta img {
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .page-faq__section,
  .page-faq__card,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-faq__hero-title {
    font-size: 1.8em;
  }
  .page-faq__section-title {
    font-size: 1.6em;
  }
  .page-faq__contact-title {
    font-size: 1.4em;
  }
  .page-faq__faq-question h3 {
    font-size: 0.95em;
  }
}