/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background #F5F7FA */
  background-color: #F5F7FA;
}

/* Container for main content */
.page-faq__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Banner Section */
.page-faq__hero-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Use brand gradient for hero section background */
  color: #ffffff;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure full width for flex item */
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 30px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.page-faq__main-title {
  font-size: clamp(2em, 3.2vw, 3.2em); /* Using clamp for responsive font size */
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  max-width: 800px; /* Limit width for readability */
  margin-left: auto;
  margin-right: auto;
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 900px; /* Limit width for readability */
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-faq__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Custom button gradient */
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't exceed container */
  box-sizing: border-box;
}

.page-faq__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-button--secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-faq__cta-button--secondary:hover {
  background: #f0f0f0;
  color: #FF5A4F;
  border-color: #FF5A4F;
}

.page-faq__cta-button--small {
  padding: 10px 25px;
  font-size: 16px;
}

.page-faq__cta-button--primary-large {
  padding: 18px 45px;
  font-size: 20px;
}

.page-faq__cta-button--secondary-large {
  padding: 18px 45px;
  font-size: 20px;
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}
.page-faq__cta-button--secondary-large:hover {
  background: #f0f0f0;
  color: #FF5A4F;
  border-color: #FF5A4F;
}

/* Content Section */
.page-faq__content-section {
  padding: 40px 0;
  background-color: #F5F7FA;
}

.page-faq__grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  align-items: flex-start; /* Align categories to the top */
}

/* Category Navigation */
.page-faq__category-nav {
  position: sticky;
  top: calc(var(--header-offset, 0px) + 20px); /* Adjust sticky position based on header height */
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #E0E0E0;
}

.page-faq__category-title {
  font-size: 1.5em;
  color: #E53935;
  margin-bottom: 20px;
  border-bottom: 2px solid #FF5A4F;
  padding-bottom: 10px;
}

.page-faq__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-faq__category-list li {
  margin-bottom: 10px;
}

.page-faq__category-list a {
  display: block;
  padding: 10px 15px;
  color: #333333;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.page-faq__category-list a:hover,
.page-faq__category-list a.active {
  background: #ffe0e0; /* Light red background for hover/active */
  color: #E53935;
  font-weight: bold;
}

/* FAQ List */
.page-faq__faq-list {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #E0E0E0;
}

.page-faq__section-heading {
  font-size: clamp(1.5em, 2.2vw, 2em); /* Clamp for responsive heading */
  color: #E53935;
  margin-top: 40px;
  margin-bottom: 25px;
  border-bottom: 2px solid #FF5A4F;
  padding-bottom: 10px;
}

.page-faq__section-heading:first-of-type {
  margin-top: 0;
}

/* FAQ Item (details/summary) */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #E0E0E0;
  overflow: hidden;
  background: #fff;
  transition: all 0.3s ease;
}
details.page-faq__faq-item[open] {
  border-color: #FF5A4F;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 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;
  background: #fdfdfd;
}
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: #fffafa; /* Lighter red for hover */
}
details.page-faq__faq-item[open] summary.page-faq__faq-question {
  background: #fff5f5; /* Even lighter red for open state */
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #E53935; /* Use primary color for toggle icon */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}
details.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to form an X or minus */
  color: #FF5A4F; /* Secondary color when open */
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: #555555;
  font-size: 1em;
}
.page-faq__faq-answer p {
  margin-top: 0;
  margin-bottom: 1em;
}
.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__grid {
    grid-template-columns: 1fr; /* Stack categories and FAQ list */
    gap: 30px;
  }

  .page-faq__category-nav {
    position: relative; /* Remove sticky on smaller screens */
    top: 0;
    max-width: 100%;
    margin-bottom: 20px;
  }
  .page-faq__faq-list {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-banner {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__main-title {
    font-size: clamp(1.8em, 5vw, 2.2em); /* Adjust clamp for mobile */
    margin-bottom: 15px;
  }

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

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