/* style/faq.css */

/* General Styles */
.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background (body is #FFFFFF) */
    background-color: var(--secondary-color, #FFFFFF); /* Ensure body background is light */
}

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

.page-faq__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

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

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

.page-faq__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Brand primary color */
    border: 2px solid #017439;
}

.page-faq__btn-secondary:hover {
    background-color: #017439;
    color: #FFFFFF;
}

.page-faq__btn-link {
    background: none;
    color: #017439;
    border: none;
    padding: 0;
    text-decoration: underline;
}

.page-faq__btn-link:hover {
    color: #005f2e;
    text-decoration: none;
}

.page-faq__btn-block {
    display: block;
    width: 100%;
    margin-top: 20px;
}

/* Hero Section */
.page-faq__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #017439, #005f2e); /* Gradient using brand primary color */
    color: #FFFFFF;
}

.page-faq__hero-section .page-faq__container {
    display: flex;
    flex-direction: column; /* Stacks children vertically */
    align-items: center;
    gap: 40px;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 1000px; /* Constrain image width */
    text-align: center;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-faq__hero-content {
    text-align: center;
    max-width: 800px;
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Clamp for responsive H1 */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFFF00; /* Use accent color for H1 */
}

.page-faq__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

.page-faq__cta-buttons--inline {
    margin-top: 20px;
    justify-content: flex-start;
}

/* Content Section (FAQ Accordion) */
.page-faq__content-section {
    padding: 60px 0;
    background-color: #f8f8f8; /* Light background for content */
}

.page-faq__dark-bg {
    background-color: #017439; /* Brand primary color for section background */
    color: #ffffff; /* White text for dark background */
}

.page-faq__dark-bg .page-faq__section-title {
    color: #FFFF00; /* Yellow title for dark background */
}

.page-faq__accordion {
    margin-top: 40px;
}

.page-faq__faq-item {
    background-color: #FFFFFF;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    color: #333333;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 700;
    color: #017439; /* Brand primary color for question */
    cursor: pointer;
    border-bottom: 1px solid #eee;
    list-style: none; /* For details/summary */
}

.page-faq__faq-item[open] > .page-faq__faq-question {
    border-bottom: 1px solid #ddd;
    background-color: #f5f5f5;
}

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

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker */
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #C30808; /* Accent color for toggle */
    transition: transform 0.3s ease;
}

.page-faq__faq-answer {
    padding: 20px 25px 25px;
    font-size: 1.05em;
    color: #555555;
}

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

.page-faq__faq-answer ol,
.page-faq__faq-answer ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

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

.page-faq__content-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 8px;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

/* Related Articles Section */
.page-faq__related-articles-section {
    padding: 60px 0 80px;
    background-color: #FFFFFF; /* Light background */
}

.page-faq__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-faq__light-bg .page-faq__section-title {
    color: #017439;
}

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

.page-faq__blog-card {
    background-color: #fcfcfc;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-faq__blog-card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-faq__blog-card-title {
    font-size: 1.3em;
    font-weight: 700;
    margin: 15px 15px 10px;
    min-height: 60px; /* Ensure consistent title height */
}

.page-faq__blog-card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-faq__blog-card-title a:hover {
    color: #C30808; /* Accent color on hover */
}

.page-faq__blog-card-excerpt {
    font-size: 0.95em;
    color: #666666;
    margin: 0 15px 15px;
    min-height: 70px; /* Ensure consistent excerpt height */
}

.page-faq__btn-link {
    display: block;
    margin: 0 15px 15px;
    text-align: right;
    font-size: 1em;
}

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

/* Image specific CSS rules for min size */
.page-faq img {
    min-width: 200px;
    min-height: 200px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-faq__hero-image-wrapper {
        max-width: 800px;
    }

    .page-faq__blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* General responsive styles */
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-faq__container {
        padding: 0 15px !important; /* Ensure padding on mobile */
    }

    .page-faq__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    /* Hero Section */
    .page-faq__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
        padding-bottom: 40px;
    }

    .page-faq__hero-section .page-faq__container {
        gap: 30px;
    }

    .page-faq__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust clamp for smaller screens */
        margin-bottom: 15px;
    }

    .page-faq__description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        margin-top: 20px;
        width: 100%; /* Ensure button container takes full width */
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to button container */
    }

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

    .page-faq__cta-buttons--inline {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 10px;
    }

    .page-faq__cta-buttons--inline .page-faq__btn-primary,
    .page-faq__cta-buttons--inline .page-faq__btn-secondary {
        width: auto !important; /* Allow auto width for inline buttons */
        max-width: 100% !important;
    }

    /* Content Section (FAQ Accordion) */
    .page-faq__content-section {
        padding: 40px 0;
    }

    .page-faq__faq-question {
        font-size: 1.1em;
        padding: 18px 20px;
    }

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

    /* Related Articles Section */
    .page-faq__related-articles-section {
        padding: 40px 0 60px;
    }

    .page-faq__blog-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
        margin-top: 30px;
    }

    .page-faq__blog-card-image {
        height: 180px; /* Adjust height for mobile cards */
    }

    .page-faq__blog-card-title {
        font-size: 1.1em;
        min-height: auto; /* Allow height to adjust */
    }

    .page-faq__blog-card-excerpt {
        font-size: 0.9em;
        min-height: auto; /* Allow height to adjust */
    }

    .page-faq__view-all {
        margin-top: 40px;
    }

    /* All images must be responsive and not overflow */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        padding: 0 !important; /* Remove any padding that might cause overflow */
    }

    /* All containers that might contain images or buttons */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__content-section,
    .page-faq__related-articles-section,
    .page-faq__blog-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}