/* style/faq.css */

/* Base styles for the page, adhering to BEM and color palette */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color, #F2FFF6); /* Default text color on dark background */
  background-color: var(--background-color, #08160F); /* Dark background */
}

/* Variables for custom color palette */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg-color: #11271B;
  --background-color: #08160F;
  --text-main-color: #F2FFF6;
  --text-secondary-color: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom for content */
  background-color: var(--deep-green-color);
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-width: 1920px; /* Ensure image wrapper does not exceed max width */
  margin-bottom: 30px;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-faq__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
  z-index: 1;
  color: var(--text-main-color);
}

.page-faq__main-title {
  font-size: clamp(2em, 4vw, 3.2em);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main-color);
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary-color);
}

.page-faq__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.page-faq__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 255, 100, 0.3);
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 100, 0.4);
}

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

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Content Area */
.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  background-color: var(--background-color);
  color: var(--text-main-color);
}

.page-faq__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main-color);
  text-shadow: 0 0 10px rgba(87, 227, 141, 0.2);
}

.page-faq__intro-text {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: var(--text-secondary-color);
}

/* Accordion/FAQ styles */
.page-faq__accordion {
  margin-top: 40px;
}

.page-faq__faq-item {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-main-color);
}

.page-faq__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main-color);
  position: relative;
  user-select: none;
}

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

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

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

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--gold-color);
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg);
}

.page-faq__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1.05em;
  color: var(--text-secondary-color);
  border-top: 1px solid var(--divider-color);
}

.page-faq__faq-answer h3 {
  font-size: 1.15em;
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 10px;
}

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

/* CTA Section */
.page-faq__cta-section {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--deep-green-color);
  border-radius: 10px;
  margin-top: 60px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-title {
  font-size: 2em;
  color: var(--text-main-color);
  margin-bottom: 20px;
}

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

/* Related Articles Section */
.page-faq__related-articles {
  padding: 60px 20px;
  background-color: var(--background-color);
}

.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-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-main-color);
  display: flex;
  flex-direction: column;
}

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

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

.page-faq__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-faq__article-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-faq__article-title a {
  color: var(--text-main-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-faq__article-title a:hover {
  color: var(--primary-color);
}

.page-faq__article-excerpt {
  font-size: 0.95em;
  color: var(--text-secondary-color);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-faq__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-faq__read-more:hover {
  text-decoration: underline;
  color: var(--gold-color);
}

.page-faq__view-all-button {
  text-align: center;
  margin-top: 50px;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }

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

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding: 10px 15px 40px 15px;
  }

  .page-faq__hero-content {
    padding: 0 15px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__content-area,
  .page-faq__cta-section,
  .page-faq__related-articles {
    padding: 30px 15px;
  }

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

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

  .page-faq__faq-item summary {
    font-size: 1.1em;
    padding: 15px 20px;
  }

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

  .page-faq__article-image {
    height: 180px;
  }

  /* Mobile image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__hero-image-wrapper,
  .page-faq__article-card,
  .page-faq__articles-grid,
  .page-faq__accordion,
  .page-faq__cta-section,
  .page-faq__content-area,
  .page-faq__related-articles {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow for content blocks */
  }
}

@media (max-width: 480px) {
  .page-faq__main-title {
    font-size: clamp(1.5em, 8vw, 2em);
  }

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

  .page-faq__description {
    font-size: 1em;
  }

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

  .page-faq__faq-answer {
    font-size: 0.95em;
    padding: 0 15px 12px 15px;
  }
}