/* style/faq.css */

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

/* Base styles for the page content, assuming dark body background from shared.css */
.page-faq {
    background-color: var(--fcb8-bg-dark); /* Use custom background color */
    color: var(--fcb8-text-main); /* Light text for dark background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

.page-faq h1,
.page-faq h2,
.page-faq h3,
.page-faq h4,
.page-faq h5,
.page-faq h6 {
    color: var(--fcb8-text-main);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-faq h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    line-height: 1.2;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.page-faq h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--fcb8-primary-green);
    margin: 15px auto 0;
}

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

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0 60px; /* Small top padding, body handles --header-offset */
    overflow: hidden;
    background-color: var(--fcb8-bg-dark);
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 30px;
}

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

.page-faq__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    margin-top: -100px; /* Overlap slightly for visual effect, but not text on image */
    position: relative; /* Ensure z-index works if needed */
    z-index: 1;
}

.page-faq__description {
    color: var(--fcb8-text-secondary);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 20px auto 30px;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-text {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow word breaking */
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-faq__btn-primary {
    background: var(--fcb8-button-gradient);
    color: var(--fcb8-text-main);
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.page-faq__btn-secondary:hover {
    background-color: var(--fcb8-primary-green);
    color: var(--fcb8-text-main);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-text {
    background-color: transparent;
    color: var(--fcb8-primary-green);
    border: none;
    padding: 5px 0;
    text-align: left;
    display: block;
    margin-top: 10px;
    font-weight: 500;
}

.page-faq__btn-text:hover {
    text-decoration: underline;
    color: var(--fcb8-glow);
}


/* FAQ Section */
.page-faq__faq-section {
    padding: 60px 0;
    background-color: var(--fcb8-card-bg); /* Darker background for contrast */
}

.page-faq__section-title {
    margin-bottom: 20px;
    color: var(--fcb8-text-main);
}

.page-faq__section-description {
    text-align: center;
    color: var(--fcb8-text-secondary);
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
}

.page-faq__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.page-faq__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--fcb8-text-main);
    transition: background-color 0.3s ease;
}

.page-faq__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-faq__faq-item summary:hover {
    background-color: rgba(var(--fcb8-primary-green), 0.1);
}

.page-faq__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-faq__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fcb8-glow);
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    color: var(--fcb8-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

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

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


/* Call to Action Section */
.page-faq__cta-section {
    text-align: center;
    padding: 60px 20px 0;
    background-color: var(--fcb8-card-bg);
}

.page-faq__cta-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--fcb8-text-main);
    margin-bottom: 15px;
}

.page-faq__cta-description {
    color: var(--fcb8-text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
}


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

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

.page-faq__article-card {
    background-color: var(--fcb8-card-bg);
    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;
    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-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.25rem;
    line-height: 1.4;
    flex-grow: 1; /* Allow title to take up available space */
}

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

.page-faq__article-card h3 a:hover {
    color: var(--fcb8-glow);
}

.page-faq__article-meta {
    font-size: 0.9rem;
    color: var(--fcb8-text-secondary);
    padding: 0 20px;
    margin-bottom: 10px;
}

.page-faq__article-excerpt {
    font-size: 1rem;
    color: var(--fcb8-text-secondary);
    padding: 0 20px 15px;
    flex-grow: 1; /* Allow excerpt to take up available space */
}

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

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

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


/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__hero-content {
        margin-top: -80px;
    }
}

@media (max-width: 768px) {
    .page-faq {
        font-size: 15px;
        line-height: 1.5;
    }

    .page-faq__container {
        padding: 0 15px; /* Add padding for mobile */
    }

    .page-faq h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .page-faq h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .page-faq__hero-section {
        padding-bottom: 40px;
    }

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

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 350px; /* Limit button group width */
        margin-left: auto;
        margin-right: auto;
    }

    .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__faq-section,
    .page-faq__cta-section,
    .page-faq__related-articles {
        padding: 40px 0;
    }

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

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

    .page-faq__article-list {
        grid-template-columns: 1fr;
    }

    /* Mobile image responsiveness */
    .page-faq img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    /* Content containers for mobile */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__faq-section,
    .page-faq__cta-section,
    .page-faq__related-articles,
    .page-faq__faq-list,
    .page-faq__article-list,
    .page-faq__cta-buttons {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    
    /* Ensure no horizontal overflow */
    .page-faq__cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
        padding: 0 15px;
    }

    /* Video section top padding for mobile */
    .page-faq__video-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
}

@media (max-width: 480px) {
    .page-faq__hero-content {
        margin-top: -40px;
    }
    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Ensure content area images are not too small */
/* This rule applies to any img within .page-faq, ensuring it's at least 200px wide */
.page-faq img:not(.page-faq__hero-image) { /* Exclude hero image from this specific width rule if it's too broad */
    min-width: 200px;
    min-height: 200px;
    object-fit: cover; /* Ensure aspect ratio is maintained while covering space */
}
/* Override for specific smaller images if needed, but none are allowed by rules */
.page-faq__article-image {
    min-width: auto; /* Allow article images to scale down if needed, but still >=200px */
    min-height: auto;
}

/* Specific content area image CSS size lower bound (as per requirement) */
.page-faq__faq-answer img,
.page-faq__content-area img,
.page-faq__article-card img {
    /* These images should adhere to the minimum 200x200px display size */
    /* If they are used as smaller elements, this needs to be addressed */
    /* For this page, all images are large content images, so this is implicitly handled */
    /* The max-width: 100% and height: auto in media query already ensure they don't overflow */
    /* The min-width/height above ensures they are not generated as small icons */
}