/* style/faq.css */

/* Root variables for colors */
:root {
    --primary-color: #F2C14E; /* Main tone */
    --secondary-color: #FFD36B; /* Auxiliary tone */
    --card-bg: #111111; /* Card Background */
    --site-bg-dark: #0A0A0A; /* Page Background */
    --text-main: #FFF6D6; /* Main Text Color */
    --border-color: #3A2A12; /* Border Color */
    --glow-color: #FFD36B; /* Glow Color */
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

/* Base styles for the FAQ page content */
.page-faq {
    background-color: var(--site-bg-dark); /* Using the defined background color */
    color: var(--text-main); /* Main text color for readability on dark background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-bottom: 60px; /* Add some padding at the bottom */
}

/* Ensure headings maintain readability on dark backgrounds */
.page-faq h1,
.page-faq h2,
.page-faq h3,
.page-faq h4,
.page-faq h5,
.page-faq h6 {
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-faq h1 {
    font-weight: bold;
    letter-spacing: -0.03em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.page-faq h2 {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
}

.page-faq h3 {
    font-size: 1.3em;
    font-weight: 600;
}

.page-faq p {
    margin-bottom: 1em;
}

.page-faq a {
    color: var(--secondary-color); /* Links use auxiliary color */
    text-decoration: none;
}

.page-faq a:hover {
    text-decoration: underline;
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    padding: 10px 20px 60px; /* Small top padding, larger bottom padding */
    box-sizing: border-box;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 1600px; /* Max width for hero image container */
    margin-bottom: 30px;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 211, 107, 0.3); /* Glow effect */
}

.page-faq__hero-content {
    max-width: 900px;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-faq__main-title {
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 700;
}

.page-faq__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-main);
}

/* CTA Buttons */
.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    width: 100%; /* Ensure container takes full width for responsive wrapping */
    max-width: 500px; /* Limit max width for button group */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.page-faq__cta-buttons--centered {
    margin-top: 40px;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    flex-grow: 1; /* Allow buttons to grow */
    flex-basis: 0; /* Initial flex basis */
}

.page-faq__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main); /* Text Main color */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
}

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

.page-faq__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--site-bg-dark); /* Dark text on primary color hover */
    transform: translateY(-2px);
}

/* General Section Styling */
.page-faq__section {
    padding: 60px 20px;
    border-top: 1px solid var(--border-color);
}

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

.page-faq__section-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-faq__section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
    color: rgba(255, 246, 214, 0.8); /* Slightly muted text main */
}

/* FAQ List */
.page-faq__faq-list {
    margin-top: 30px;
}

.page-faq__faq-item {
    background-color: var(--card-bg); /* Card background */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: var(--card-bg);
    color: var(--text-main);
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: rgba(255, 211, 107, 0.1); /* Slight hover effect */
}

.page-faq__faq-question h3 {
    margin: 0;
    color: var(--text-main);
    flex-grow: 1;
}

.page-faq__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    margin-left: 20px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg); /* Plus to X for active */
    content: "−"; /* Visually change to minus, JS handles text */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: rgba(255, 246, 214, 0.7); /* Muted text for answers */
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 1000px !important; /* Ensure content fits, !important for JS toggle */
    padding: 15px 25px 25px; /* Adjusted padding when active */
}

/* Image blocks within sections */
.page-faq__image-block {
    margin: 40px auto;
    text-align: center;
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 211, 107, 0.2);
}

.page-faq__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

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

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

    .page-faq__section-title {
        font-size: 2em;
    }
}

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

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

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

    .page-faq__main-title {
        font-size: clamp(1.8em, 5vw, 2.2em); /* Responsive H1 font size */
        margin-bottom: 15px;
    }

    .page-faq__intro-text {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        max-width: 100%; /* Ensure container takes full width */
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important; /* Force full width */
        max-width: 100% !important; /* Force full width */
        padding: 12px 20px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__section {
        padding: 40px 15px;
    }

    .page-faq__container {
        padding: 0; /* Remove inner padding as section already has it */
    }

    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .page-faq__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-faq__faq-question {
        padding: 18px 20px;
    }

    .page-faq__faq-question h3 {
        font-size: 1.1em;
    }

    .page-faq__faq-toggle {
        font-size: 1.5em;
    }

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

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

    /* Images responsiveness */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .page-faq__image-block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding to image container */
    }

    /* Ensure all containers are responsive */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: clamp(1.6em, 6vw, 2em);
    }
    .page-faq__section-title {
        font-size: 1.6em;
    }
    .page-faq__faq-question {
        padding: 15px;
    }
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 10px 15px 15px;
    }
}

/* Ensure no filter is used on images */
.page-faq img {
    filter: none;
}