/* style/resources.css */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--bg-color, #ffffff); /* Fallback to white if var not defined */
}

/* Fixed header offset - apply to the first content section */
.page-resources__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background-color: #f5f5f5; /* Light background for hero */
    text-align: center;
    overflow: hidden; /* Prevent content overflow */
    padding-left: 20px;
    padding-right: 20px;
}

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

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent white background for readability */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__hero-title {
    font-size: 3.2em;
    color: #017439; /* Brand primary color */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-resources__hero-description {
    font-size: 1.2em;
    color: #555555;
    margin-bottom: 30px;
}

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

.page-resources__section {
    padding: 60px 20px;
    text-align: center;
}

.page-resources__section-title {
    font-size: 2.5em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-resources__section-description {
    font-size: 1.1em;
    color: #555555;
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-resources__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-resources__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}

.page-resources__content-wrapper--reverse {
    flex-direction: row-reverse;
}

.page-resources__text-block {
    flex: 1;
}

.page-resources__text-block p {
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #333333;
}

.page-resources__text-block p a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-resources__text-block p a:hover {
    text-decoration: underline;
}

.page-resources__image {
    flex-shrink: 0;
    width: 500px; /* Example display width */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    max-width: 100%; /* Ensure image is responsive by default */
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-resources__image--right {
    margin-left: 20px;
}

.page-resources__image--left {
    margin-right: 20px;
}

/* Dark section styling */
.page-resources__dark-section {
    background-color: #017439; /* Primary brand color as background */
    color: #ffffff; /* White text for contrast */
}

.page-resources__dark-section .page-resources__section-title,
.page-resources__dark-section .page-resources__section-description,
.page-resources__dark-section .page-resources__text-block p,
.page-resources__dark-section .page-resources__text-block p a,
.page-resources__dark-section .page-resources__step-title,
.page-resources__dark-section .page-resources__step-item p,
.page-resources__dark-section .page-resources__game-title,
.page-resources__dark-section .page-resources__game-description,
.page-resources__dark-section .page-resources__cta-title,
.page-resources__dark-section .page-resources__cta-description {
    color: #ffffff; /* Ensure all text is white */
}

.page-resources__dark-section .page-resources__text-block p a:hover {
    text-decoration: underline;
}

/* How to Play Steps */
.page-resources__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.page-resources__step-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__step-item:hover {
    transform: translateY(-5px);
}

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

.page-resources__step-item p {
    font-size: 1em;
    color: #f0f0f0;
}

/* Strategies section */
.page-resources__strategy-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    text-align: left;
}

.page-resources__strategy-list li {
    margin-bottom: 10px;
    font-size: 1.05em;
    color: #333333;
    padding-left: 25px;
    position: relative;
}

.page-resources__strategy-list li::before {
    content: '✓';
    color: #017439;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Benefits section */
.page-resources__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources__benefit-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333; /* Default text color for light background card */
}

.page-resources__benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-resources__benefit-icon {
    width: 300px; /* Example display width */
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-resources__benefit-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
}

.page-resources__benefit-title a {
    color: #017439;
    text-decoration: none;
}

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

.page-resources__benefit-card p {
    font-size: 1em;
    color: #555555;
}

/* Latest Games section */
.page-resources__game-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources__game-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__game-card:hover {
    transform: translateY(-5px);
}

.page-resources__game-card a {
    text-decoration: none;
    color: inherit;
}

.page-resources__game-image {
    width: 100%;
    height: 267px; /* Fixed height for consistency based on 400x267 */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-resources__game-title {
    font-size: 1.3em;
    color: #ffffff;
    margin: 15px 10px 5px;
}

.page-resources__game-description {
    font-size: 0.95em;
    color: #f0f0f0;
    padding: 0 15px 20px;
}

/* FAQ Section */
.page-resources__faq-list {
    margin-top: 40px;
    text-align: left;
}

.page-resources__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333333; /* Default text color for light background */
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: #f9f9f9;
    font-size: 1.15em;
    font-weight: bold;
    color: #017439;
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: #f0f0f0;
}

.page-resources__faq-question h3 {
    margin: 0;
    color: #017439;
    font-size: 1em; /* Adjust to fit parent font size */
}

.page-resources__faq-question h3 a {
    color: #017439;
    text-decoration: none;
}

.page-resources__faq-question h3 a:hover {
    text-decoration: underline;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #017439;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg);
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px; /* Initial padding, will be adjusted on active */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
    text-align: left;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show all content */
    padding: 15px 20px 20px; /* Final padding when active */
}

.page-resources__faq-answer p {
    margin-bottom: 10px;
    color: #555555;
}

.page-resources__faq-answer p a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-resources__faq-answer p a:hover {
    text-decoration: underline;
}

/* Call to action section */
.page-resources__cta-section {
    padding: 80px 20px;
    text-align: center;
}

.page-resources__cta-content {
    max-width: 900px;
}

.page-resources__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff; /* For dark section */
}

.page-resources__cta-description {
    font-size: 1.2em;
    color: #f0f0f0; /* For dark section */
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__cta-description a {
    color: #FFFF00; /* Yellow for register/login font */
    text-decoration: none;
    font-weight: bold;
}

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

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

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

.page-resources__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-resources__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2d;
    border-color: #005a2d;
}

.page-resources__cta-bottom {
    margin-top: 50px;
}

/* Brand Name Highlight */
.page-resources__brand-name {
    font-weight: bold;
    color: #017439; /* Primary brand color */
}

/* Keyword Highlight */
.page-resources__keyword {
    font-weight: bold;
    color: #017439; /* Primary brand color */
}

.page-resources__dark-section .page-resources__brand-name,
.page-resources__dark-section .page-resources__keyword {
    color: #ffff00; /* Yellow for keywords/brand in dark sections */
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }

    .page-resources__hero-description {
        font-size: 1.1em;
    }

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

    .page-resources__content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .page-resources__content-wrapper--reverse {
        flex-direction: column; /* Keep consistent on smaller screens */
    }

    .page-resources__image {
        width: 100%;
        max-width: 600px; /* Limit max width for images */
        margin: 0 auto;
    }

    .page-resources__image--right,
    .page-resources__image--left {
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .page-resources__hero-section {
        min-height: 400px;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-resources__hero-content {
        padding: 15px;
    }

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

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

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

    .page-resources__section {
        padding: 40px 15px !important;
    }

    .page-resources__section-title {
        font-size: 1.8em;
    }

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

    .page-resources__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__benefit-card {
        padding: 20px;
    }

    .page-resources__cta-section {
        padding: 60px 15px !important;
    }

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

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

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

    /* Mobile image responsive adaptation */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources__section,
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__what-is-nohu,
    .page-resources__how-to-play,
    .page-resources__strategies,
    .page-resources__benefits,
    .page-resources__latest-games,
    .page-resources__faq,
    .page-resources__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Mobile button responsive adaptation */
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources a[class*="button"],
    .page-resources 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 !important;
        padding-right: 15px !important;
    }
    
    .page-resources__hero-cta-buttons,
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0px !important; /* Inner buttons already have padding */
        padding-right: 0px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        flex-direction: column !important; /* Stack buttons vertically */
    }

    .page-resources__faq-question {
        font-size: 1.05em;
        padding: 15px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 15px 20px;
    }
}