/* style/faq.css */

.page-faq {
    font-family: 'Arial', sans-serif;
    color: #ffffff; /* Text color for dark body background */
    line-height: 1.6;
    background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-faq__hero-section {
    position: relative;
    padding: 120px 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #017439; /* Fallback for hero background */
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
}

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

.page-faq__hero-title {
    font-size: 3.5em;
    color: #FFFF00;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
    font-size: 1.2em;
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto 40px;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
    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, transform 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background-color: #C30808;
    color: #FFFF00;
    border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
    background-color: #e02020;
    transform: translateY(-2px);
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: #FFFF00;
    border: 2px solid #C30808;
}

.page-faq__btn-secondary:hover {
    background-color: #C30808;
    color: #ffffff;
    transform: translateY(-2px);
}

.page-faq__section-title {
    font-size: 2.5em;
    color: #FFFF00;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-faq__section-description {
    font-size: 1.1em;
    color: #f0f0f0;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px;
}

.page-faq__categories-section {
    padding: 80px 0;
    background-color: #0d0d0d;
}

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

.page-faq__category-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-faq__category-card:hover {
    transform: translateY(-10px);
    background-color: rgba(1, 116, 57, 0.3);
}

.page-faq__card-title {
    font-size: 1.5em;
    color: #FFFF00;
    margin-bottom: 15px;
}

.page-faq__card-text {
    font-size: 1em;
    color: #e0e0e0;
}

.page-faq__detailed-faq-section {
    padding: 80px 0;
    background-color: #0a0a0a;
}

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

.page-faq__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    cursor: pointer;
    background-color: #017439; /* Brand color for question */
    color: #ffffff;
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: #028e48;
}

.page-faq__question-title {
    font-size: 1.25em;
    color: #FFFF00;
    margin: 0;
}

.page-faq__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #FFFF00;
    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 30px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 20px 30px;
}

.page-faq__faq-answer p {
    margin-bottom: 0;
    color: #e0e0e0;
}

.page-faq__link {
    color: #FFFF00;
    text-decoration: underline;
}

.page-faq__link:hover {
    color: #ffffff;
}

.page-faq__cta-section {
    padding: 80px 0;
    background-color: #017439;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

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

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: 3em;
    }

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

    .page-faq__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 100px 0 60px;
        padding-top: var(--header-offset, 120px) !important;
    }

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

    .page-faq__hero-description {
        font-size: 1em;
    }

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

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-faq__container {
        padding: 0 15px !important;
    }

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

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

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

    .page-faq__category-card {
        padding: 25px;
    }

    .page-faq__question-title {
        font-size: 1.1em;
    }

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

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

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

    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-faq__hero-section,
    .page-faq__categories-section,
    .page-faq__detailed-faq-section,
    .page-faq__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .page-faq__hero-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;
    }
}