/* style/faq.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: var(--dark-bg-1); /* From shared.css */
  --card-bg: #ffffff;
  --border-light: #e0e0e0;
  --hover-bg-light: #f5f5f5;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Default to light text for dark body background */
  background-color: var(--background-dark);
  padding-bottom: 60px;
}

/* Ensure main content is not hidden by fixed header */
.page-faq__hero-sub-section {
  padding-top: 180px; /* Desktop: Adjust based on fixed header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--secondary-color), #5a0000); /* Darker gradient for hero sub */
  color: var(--text-light);
  text-align: center;
}

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

.page-faq__hero-sub-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--primary-color);
}

.page-faq__hero-sub-description {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-faq__hero-sub-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-faq__hero-sub-link:hover {
  color: #ffd700;
}

.page-faq__hero-sub-cta {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__hero-sub-cta:hover {
  background: #ffcc00;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-faq__content-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
}

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

.page-faq__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__section-description {
  font-size: 18px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

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

.page-faq__faq-question:active {
  background: #eeeeee;
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Allow click on parent div */
  color: var(--text-dark);
}

.page-faq__faq-question-link {
  color: var(--text-dark);
  text-decoration: none;
  pointer-events: auto; /* Re-enable pointer events for the link itself */
}

.page-faq__faq-question-link:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Visually change '+' to 'x' or similar */
}

.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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to cover all content */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  line-height: 1.7;
  font-size: 16px;
}

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

.page-faq__faq-answer-link {
  color: var(--secondary-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-faq__faq-answer-link:hover {
  color: #b30000;
}

.page-faq__faq-answer-cta {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

.page-faq__faq-answer-cta:hover {
  background: #ffcc00;
}

.page-faq__cta-banner {
  background: linear-gradient(135deg, var(--primary-color), #ffc107); /* Lighter gradient */
  border-radius: 12px;
  padding: 40px;
  margin-top: 60px;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: var(--text-dark);
}

.page-faq__cta-banner-image {
  width: 250px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-faq__cta-banner-content {
  flex-grow: 1;
}

.page-faq__cta-banner-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-faq__cta-banner-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.page-faq__cta-banner-button {
  display: inline-block;
  padding: 14px 30px;
  background: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-faq__related-articles-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
}

.page-faq__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-faq__article-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

.page-faq__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-faq__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-faq__article-card h3.page-faq__article-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px;
  line-height: 1.4;
}

.page-faq__article-card h3.page-faq__article-title a {
  color: var(--text-dark);
  text-decoration: none;
}

.page-faq__article-card h3.page-faq__article-title a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-faq__article-excerpt {
  font-size: 15px;
  color: #666666;
  padding: 0 20px 15px;
  line-height: 1.6;
}

.page-faq__article-link {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 20px 20px;
  background: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-faq__article-link:hover {
  background: #ffcc00;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__hero-sub-title {
    font-size: 36px;
  }
  .page-faq__hero-sub-description {
    font-size: 16px;
  }
  .page-faq__section-title {
    font-size: 30px;
  }
  .page-faq__section-description {
    font-size: 16px;
  }
  .page-faq__cta-banner {
    flex-direction: column;
    text-align: center;
  }
  .page-faq__cta-banner-image {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-sub-section {
    padding-top: 160px !important; /* Mobile: Adjust based on fixed header height */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__hero-sub-title {
    font-size: 28px;
  }
  .page-faq__hero-sub-description {
    font-size: 15px;
  }
  .page-faq__hero-sub-cta {
    padding: 12px 30px;
    font-size: 18px;
  }
  .page-faq__content-section,
  .page-faq__related-articles-section {
    padding: 40px 15px;
  }
  .page-faq__section-title {
    font-size: 26px;
  }
  .page-faq__section-description {
    font-size: 15px;
  }
  .page-faq__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .page-faq__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }
  .page-faq__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  .page-faq__faq-answer {
    padding: 0 20px;
  }
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px 20px !important;
  }
  .page-faq__faq-answer p {
    font-size: 15px;
  }
  .page-faq__cta-banner {
    padding: 30px 20px;
  }
  .page-faq__cta-banner-image {
    width: 200px;
    height: auto;
  }
  .page-faq__cta-banner-title {
    font-size: 26px;
  }
  .page-faq__cta-banner-description {
    font-size: 16px;
  }
  .page-faq__cta-banner-button {
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-faq__articles-grid {
    grid-template-columns: 1fr;
  }
  .page-faq__article-card h3.page-faq__article-title {
    font-size: 20px;
  }
  /* Mobile image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
  }
  .page-faq__container,
  .page-faq__hero-sub-container,
  .page-faq__faq-item,
  .page-faq__cta-banner,
  .page-faq__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__cta-banner {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .page-faq__article-card {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-faq__article-image {
    border-radius: 12px 12px 0 0;
  }
  .page-faq__article-card h3.page-faq__article-title,
  .page-faq__article-excerpt,
  .page-faq__article-link {
    margin-left: 15px;
    margin-right: 15px;
  }
}