/* style/community-forum.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-button-color: #C30808;
    --login-button-color: #C30808;
    --background-color: #FFFFFF;
    --register-login-font-color: #FFFF00;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
}

.page-community-forum {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-color);
}

.page-community-forum__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-community-forum__light-bg {
    background-color: var(--background-color);
    color: var(--text-color-dark);
}

.page-community-forum__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-community-forum__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px);
    text-align: center;
    overflow: hidden;
}

.page-community-forum__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-community-forum__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    filter: brightness(0.8); /* Slightly darken for text readability */
}

.page-community-forum__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.page-community-forum__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--text-color-light);
    font-weight: bold;
}

.page-community-forum__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: var(--text-color-light);
}

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

.page-community-forum__btn-primary,
.page-community-forum__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    word-wrap: normal;
}

.page-community-forum__btn-primary {
    background-color: var(--register-button-color);
    color: var(--register-login-font-color);
    border: 2px solid var(--register-button-color);
}

.page-community-forum__btn-primary:hover {
    background-color: darken(var(--register-button-color), 10%);
    border-color: darken(var(--register-button-color), 10%);
}

.page-community-forum__btn-secondary {
    background-color: transparent;
    color: var(--text-color-light);
    border: 2px solid var(--text-color-light);
}

.page-community-forum__btn-secondary:hover {
    background-color: var(--text-color-light);
    color: var(--primary-color);
}

.page-community-forum__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: inherit;
    font-weight: bold;
}

.page-community-forum__subsection-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: inherit;
}

.page-community-forum__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: inherit;
}

.page-community-forum__list {
    list-style: disc inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-community-forum__numbered-list {
    list-style: decimal inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-community-forum__list-item {
    margin-bottom: 10px;
    color: inherit;
}

.page-community-forum__cta-wrapper {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Categories Section */
.page-community-forum__categories-section {
    padding: 60px 20px;
}

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

.page-community-forum__category-card {
    background-color: rgba(255, 255, 255, 0.1);
    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;
    color: var(--text-color-light);
}

.page-community-forum__category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-community-forum__category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.page-community-forum__card-title {
    font-size: 1.5em;
    margin: 20px 20px 10px;
    font-weight: bold;
}

.page-community-forum__card-title a {
    color: var(--register-login-font-color);
    text-decoration: none;
}

.page-community-forum__card-title a:hover {
    text-decoration: underline;
}

.page-community-forum__card-description {
    font-size: 1em;
    margin: 0 20px 20px;
    flex-grow: 1;
}

/* FAQ Section */
.page-community-forum__faq-section {
    padding: 60px 20px;
}

.page-community-forum__faq-list {
    margin-top: 40px;
}

.page-community-forum__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-color-light);
}

.page-community-forum__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease;
}

.page-community-forum__faq-question:hover {
    background-color: darken(var(--primary-color), 5%);
}

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

.page-community-forum__faq-item.active .page-community-forum__faq-toggle {
    transform: rotate(0deg);
}

.page-community-forum__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);
}

.page-community-forum__faq-item.active .page-community-forum__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to accommodate content */
    padding: 15px 25px;
}

.page-community-forum__faq-answer p {
    margin: 0;
    color: var(--text-color-light);
}

/* Video Section */
.page-community-forum__video-section {
    padding: 60px 20px;
    text-align: center;
}

.page-community-forum__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-community-forum__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-community-forum {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-community-forum__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important;
    }

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

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

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

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

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

    .page-community-forum__subsection-title {
        font-size: 1.5em;
    }

    .page-community-forum__container,
    .page-community-forum__categories-section,
    .page-community-forum__how-to-join-section,
    .page-community-forum__faq-section,
    .page-community-forum__video-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-community-forum img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-community-forum__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        margin: 20px auto;
    }

    .page-community-forum__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

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

    .page-community-forum__category-card {
        margin-bottom: 20px;
    }

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

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

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

/* General image styling for content area to prevent small icons */
.page-community-forum__container img,
.page-community-forum__category-card img {
    min-width: 200px;
    min-height: 200px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Ensure no filter is used on images */
.page-community-forum img {
    filter: none !important;
}

/* CSS for darkening hero image, allowed as it's a background effect for text, not changing the image's inherent color */
.page-community-forum__hero-image {
    filter: brightness(0.7) !important;
}