/* style/faq.css */

/* --- Base Styles & Variables --- */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #1A1A1A; /* Dark Black */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-light: #f4f4f4; /* From body background */
    --border-color: #e0e0e0;
}

.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Ensure dark text on light body background */
    background-color: var(--background-light); /* Inherited from body or set explicitly */
}

/* --- Utility Classes --- */
.page-faq__light-bg {
    background-color: var(--background-light);
    color: var(--text-color-dark);
}

.page-faq__dark-bg {
    background-color: var(--secondary-color); /* Dark black for contrast */
    color: var(--text-color-light);
}

/* --- Container & Section Styles --- */
.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-faq__section-title {
    font-size: 32px;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    padding-top: 40px;
}

.page-faq__text-block {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.7;
}

.page-faq__list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    font-size: 16px;
}

.page-faq__list li {
    margin-bottom: 8px;
}

/* --- Hero Section --- */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background-color: var(--secondary-color); /* Dark background for hero */
  color: var(--text-color-light);
  overflow: hidden; /* Prevent image overflow */
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any potential background effects */
}

.page-faq__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

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

.page-faq__main-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color); /* Gold title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

/* --- CTA Button General Style --- */
.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--secondary-color); /* Dark text on gold button */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button:hover {
  background: var(--primary-color);
  color: var(--text-color-light); /* White text on hover for better contrast */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  border-color: var(--text-color-light);
}

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

/* --- Image Wrapper for Content Images --- */
.page-faq__image-wrapper {
    margin: 30px auto;
    max-width: 800px; /* Example max-width for content images */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

/* --- FAQ Section --- */
.page-faq__faq-section {
    padding: 60px 0;
}

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

/* 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 15px;
  opacity: 0;
}

/* 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 to ensure priority, value large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #ffffff; /* White background for answer */
  border-radius: 0 0 8px 8px;
  color: var(--text-color-dark);
}

/* Question style */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--primary-color); /* Gold background for question */
  color: var(--secondary-color); /* Dark text on gold */
  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-question:hover {
  background: #ffdb4d; /* Slightly lighter gold on hover */
  border-color: #e6c200;
  color: var(--secondary-color);
}

.page-faq__faq-question:active {
  background: #e6c200;
  border-color: #ccad00;
}

/* Question title style */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: inherit; /* Inherit color from parent */
}

/* Toggle icon */
.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color); /* Dark color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* --- CTA Section at Bottom --- */
.page-faq__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--secondary-color); /* Dark background */
    color: var(--text-color-light);
}

.page-faq__cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-faq__cta-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color); /* Gold title */
}

.page-faq__cta-description {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 800px;
    color: var(--text-color-light);
}

.page-faq__cta-button--inverted {
    background: var(--text-color-light); /* White background */
    color: var(--primary-color); /* Gold text */
    border-color: var(--text-color-light);
    margin-right: 20px;
    margin-bottom: 20px; /* For mobile stacking */
}

.page-faq__cta-button--inverted:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
    border-color: var(--text-color-light);
}

.page-faq__cta-button--secondary {
    background: var(--primary-color);
    color: var(--secondary-color); /* Dark text on gold */
    border-color: var(--primary-color);
    margin-bottom: 20px; /* For mobile stacking */
}

.page-faq__cta-button--secondary:hover {
    background: var(--text-color-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 40px;
    }
    .page-faq__hero-description {
        font-size: 18px;
    }
    .page-faq__section-title {
        font-size: 28px;
    }
    .page-faq__faq-question h3 {
        font-size: 17px;
    }
    .page-faq__cta-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-faq__hero-image {
        margin-bottom: 20px;
    }

    .page-faq__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-faq__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        margin-top: 20px;
    }

    .page-faq__section-title {
        font-size: 24px;
        margin-bottom: 30px;
        padding-top: 30px;
    }

    .page-faq__text-block,
    .page-faq__list li {
        font-size: 15px;
    }

    /* FAQ specific mobile styles */
    .page-faq__faq-question {
        padding: 15px;
        flex-wrap: wrap;
        border-radius: 6px;
    }
    
    .page-faq__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px); /* Adjust width for toggle */
    }
    
    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }

    .page-faq__faq-item {
        border-radius: 6px;
    }

    /* Images responsive */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Buttons responsive */
    .page-faq__cta-button,
    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq a[class*="button"],
    .page-faq a[class*="btn"] {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      white-space: normal !important;
      word-wrap: break-word !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    
    .page-faq__cta-buttons,
    .page-faq__button-group,
    .page-faq__btn-container,
    .page-faq__cta-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-direction: column; /* Stack buttons vertically */
      gap: 15px; /* Space between stacked buttons */
    }

    .page-faq__cta-button--inverted,
    .page-faq__cta-button--secondary {
        margin-right: 0; /* Remove horizontal margin for stacking */
        margin-bottom: 0; /* Adjusted by gap on container */
    }

    .page-faq__cta-title {
        font-size: 26px;
    }
    .page-faq__cta-description {
        font-size: 16px;
    }
}