/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

.page-faq__section-title {
    font-size: 2.5em;
    color: #ffffff; /* Default for dark sections */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.page-faq__sub-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #ffffff; /* Default for dark sections */
}

.page-faq__text-block p,
.page-faq__faq-answer p,
.page-faq__image-cta-content p,
.page-faq__image-caption {
    margin-bottom: 1em;
    line-height: 1.8;
}

.page-faq a {
    color: #FFFF00; /* Yellow for links to stand out on dark background */
    text-decoration: underline;
}

.page-faq a:hover {
    color: #f0f0f0;
    text-decoration: none;
}

/* Color contrast handling based on body background #1a1a1a (dark) */
.page-faq__dark-bg {
    background-color: #017439; /* Primary brand color */
    color: #ffffff;
    padding: 60px 20px;
}

.page-faq__light-bg {
    background-color: #ffffff; /* Auxiliary brand color */
    color: #333333; /* Dark text for light background */
    padding: 60px 20px;
}

.page-faq__light-bg .page-faq__section-title,
.page-faq__light-bg .page-faq__sub-title {
    color: #017439; /* Brand color for titles on light background */
}

.page-faq__light-bg a {
    color: #017439; /* Brand color for links on light background */
}

.page-faq__light-bg a:hover {
    color: #005f2e;
}

/* Hero Section */
.page-faq__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 80px 20px;
    background: linear-gradient(135deg, #017439, #005f2e); /* Gradient using brand color */
    color: #ffffff;
}

.page-faq__hero-content {
    max-width: 800px;
    z-index: 1;
    margin-bottom: 40px;
}

.page-faq__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFF00; /* Yellow for main title on dark background */
}

.page-faq__intro-text {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 900px;
}

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

.page-faq__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq a[class*="button"],
.page-faq a[class*="btn"] {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-faq__btn-primary {
    background-color: #C30808; /* Login/Register button color */
    color: #FFFF00; /* Login/Register font color */
    border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-faq__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #ffffff;
}

.page-faq__btn-secondary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
}

/* Content Area */
.page-faq__content-area {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* FAQ Section */
.page-faq__faq-section {
    padding: 60px 20px;
    text-align: center;
}

.page-faq__faq-list {
    max-width: 900px;
    margin: 40px auto 0;
    text-align: left;
}

.page-faq__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    background-color: #017439; /* Brand color for question background */
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: #005f2e;
}

.page-faq__faq-question h3 {
    margin: 0;
    color: inherit;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

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

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter for answer */
    color: #f0f0f0;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px;
}

/* Image CTA Section */
.page-faq__image-cta-section {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-faq__image-cta-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
}

.page-faq__image-cta-image {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Full Width Image Section */
.page-faq__image-section {
    padding: 60px 0;
    text-align: center;
}

.page-faq__image-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-faq__image-full-width {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.page-faq__image-caption {
    margin-top: 20px;
    font-style: italic;
    color: #666; /* Softer color for caption on light background */
}

/* Support Section */
.page-faq__support-section {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-faq__support-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
}

.page-faq__support-image {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Bottom CTA */
.page-faq__cta-bottom {
    text-align: center;
    padding: 60px 20px;
}

.page-faq__cta-bottom .page-faq__btn-primary {
    margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 2.8em;
    }
    .page-faq__intro-text {
        font-size: 1.2em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
    .page-faq__sub-title {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    .page-faq {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-faq__hero-section {
        padding: 60px 15px;
    }

    .page-faq__main-title {
        font-size: 2.2em;
    }

    .page-faq__intro-text {
        font-size: 1em;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq a[class*="button"],
    .page-faq a[class*="btn"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-faq__cta-buttons,
    .page-faq__button-group,
    .page-faq__btn-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
    }

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

    .page-faq__content-area,
    .page-faq__faq-section,
    .page-faq__image-cta-section,
    .page-faq__support-section,
    .page-faq__cta-bottom {
        padding: 40px 15px;
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

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

    .page-faq__image-cta-section,
    .page-faq__support-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .page-faq__image-cta-content,
    .page-faq__support-content {
        text-align: center;
    }

    .page-faq__image-cta-image,
    .page-faq__support-image,
    .page-faq__hero-image,
    .page-faq__image-full-width,
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .page-faq__image-wrapper,
    .page-faq__video-wrapper, /* Assuming a video wrapper might exist */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__content-area,
    .page-faq__faq-section,
    .page-faq__image-cta-section,
    .page-faq__support-section,
    .page-faq__cta-bottom {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by specific sections, but ensuring container doesn't overflow */
    }

    /* Content area images CSS dimensions must not be less than 200px */
    .page-faq__content-area img,
    .page-faq__text-block img {
      min-width: 200px;
      min-height: 200px;
      width: 100%; /* Ensure responsiveness */
      height: auto;
    }
}