/* style/faq.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #222;
  --bg-light: #f9f9f9;
  --border-color: #e0e0e0;
}

/* Base styles for the FAQ page content */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Inherited from shared.css, but for context */
  padding-top: 10px; /* Adjust for fixed header on desktop */
}

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

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

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

.page-faq__dark-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 60px 0;
}

.page-faq__light-bg {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 60px 0;
}

.page-faq__light-bg .page-faq__section-title {
  color: var(--secondary-color);
}

.page-faq__light-bg .page-faq__section-description {
  color: var(--text-dark);
}

/* Module 1: H1 Title + CTA Buttons */
.page-faq__title-section {
  padding-top: 120px; /* Adjust for fixed header on desktop */
  padding-bottom: 60px;
  text-align: center;
}

.page-faq__main-title {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__title-description {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  word-wrap: break-word;
}

.page-faq__btn-primary {
  background: var(--primary-color);
  color: var(--text-dark);
}

.page-faq__btn-primary:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.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: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Module 2: FAQ Section */
.page-faq__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

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

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

.page-faq__faq-question:hover {
  background: #f0f0f0;
  border-color: #c0c0c0;
}

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

.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: 15px;
  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 {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.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: #ffffff;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px 25px !important;
  opacity: 1;
  background: #fcfcfc;
  border: 1px solid var(--border-color);
  border-top: none;
}

.page-faq__faq-answer p {
  margin: 0;
  font-size: 16px;
  color: var(--text-dark);
  line-height: 1.7;
}

/* Module 3: Brand Introduction */
.page-faq__brand-section {
  padding: 80px 0;
}

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

.page-faq__brand-item {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark background */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text-light);
}

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

.page-faq__brand-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
}

.page-faq__brand-item-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  flex-grow: 0;
}

.page-faq__brand-item p {
  font-size: 16px;
  color: var(--text-light);
  flex-grow: 1;
}

/* Module 4: Blog List */
.page-faq__blog-section {
  padding: 80px 0;
}

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

.page-faq__blog-item {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-faq__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-faq__blog-link {
  text-decoration: none;
  display: block;
  color: var(--text-dark);
}

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

.page-faq__blog-item-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px 20px;
  color: var(--secondary-color);
  line-height: 1.4;
}

.page-faq__blog-item-excerpt {
  font-size: 15px;
  margin: 0 20px 15px 20px;
  color: #555;
  line-height: 1.6;
}

.page-faq__blog-item-date {
  display: block;
  font-size: 13px;
  color: #888;
  margin: 0 20px 20px 20px;
  text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 40px;
  }
  .page-faq__section-title {
    font-size: 30px;
  }
  .page-faq__faq-question h3 {
    font-size: 17px;
  }
  .page-faq__faq-answer p {
    font-size: 15px;
  }
  .page-faq__brand-item-title {
    font-size: 22px;
  }
  .page-faq__blog-item-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-faq {
    padding-top: 10px !important; /* Mobile: Adjust for fixed header */
  }
  .page-faq__title-section {
    padding-top: 100px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
  }
  .page-faq__main-title {
    font-size: 32px;
  }
  .page-faq__title-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-faq__cta-button {
    padding: 12px 25px !important;
    font-size: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-faq__section-title {
    font-size: 28px;
  }
  .page-faq__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-faq__container {
    padding: 0 15px;
  }

  /* FAQ specific mobile styles */
  .page-faq__faq-question {
    padding: 15px 20px;
  }
  .page-faq__faq-question h3 {
    font-size: 16px;
  }
  .page-faq__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .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: 14px;
  }

  /* Brand & Blog mobile styles */
  .page-faq__brand-section, .page-faq__blog-section {
    padding: 40px 0;
  }
  .page-faq__brand-content, .page-faq__blog-list {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-faq__brand-item, .page-faq__blog-item {
    padding: 25px;
  }
  .page-faq__brand-item-title {
    font-size: 20px;
  }
  .page-faq__blog-image {
    height: 180px;
  }
  .page-faq__blog-item-title {
    font-size: 18px;
    margin: 15px;
  }
  .page-faq__blog-item-excerpt, .page-faq__blog-item-date {
    margin-left: 15px;
    margin-right: 15px;
  }
  
  /* Image responsiveness */
  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-faq__container, .page-faq__brand-item, .page-faq__blog-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

/* Ensure color contrast for dark body background */
.page-faq h1, .page-faq h2, .page-faq h3, .page-faq h4, .page-faq h5, .page-faq h6 {
  color: var(--primary-color);
}

.page-faq p, .page-faq li, .page-faq span {
  color: var(--text-light);
}

/* Override for light background sections */
.page-faq__light-bg p, .page-faq__light-bg li, .page-faq__light-bg span {
  color: var(--text-dark);
}

.page-faq__light-bg .page-faq__blog-item-excerpt, .page-faq__light-bg .page-faq__blog-item-date {
  color: #555;
}

/* Card backgrounds for light section to ensure contrast */
.page-faq__light-bg .page-faq__card {
  background: #ffffff;
  color: var(--text-dark);
}

.page-faq__light-bg .page-faq__blog-item-title {
  color: var(--secondary-color);
}

/* Specific adjustments for brand items in dark section */
.page-faq__dark-section .page-faq__brand-item {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
}

.page-faq__dark-section .page-faq__brand-item-title {
  color: var(--primary-color);
}

.page-faq__dark-section .page-faq__brand-item p {
  color: var(--text-light);
}