/* style/resources.css */

/* Base styles for the page content */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared, default to white */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #017439, #005a2d); /* Darker gradient for hero */
    color: #ffffff;
}

.page-resources__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 900px; /* Limit hero image width */
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
    font-weight: bold;
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.page-resources__hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

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

.page-resources__btn-login:hover {
    background: #a30606;
    border-color: #a30606;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-resources__btn-promotions:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-resources__section {
    padding: 80px 20px;
}

.page-resources__container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

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

.page-resources__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555555;
}

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

.page-resources__light-bg .page-resources__section-title {
    color: #017439;
}

.page-resources__light-bg .page-resources__section-description {
    color: #555555;
}

.page-resources__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

.page-resources__dark-bg .page-resources__section-title {
    color: #ffffff;
}

.page-resources__dark-bg .page-resources__section-description {
    color: #f0f0f0;
}

.page-resources__dark-bg p {
    color: #f0f0f0;
}

/* Overview Section */
.page-resources__overview-section .page-resources__content-area {
    font-size: 1.1em;
    margin-bottom: 40px;
    line-height: 1.8;
}

.page-resources__overview-section .page-resources__image-full {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    margin: 40px auto 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Guide Grid & Game Grid */
.page-resources__guide-grid,
.page-resources__games-grid,
.page-resources__policy-grid,
.page-resources__news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-resources__guide-card,
.page-resources__game-card,
.page-resources__policy-card,
.page-resources__news-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__guide-card:hover,
.page-resources__game-card:hover,
.page-resources__policy-card:hover,
.page-resources__news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-resources__guide-card .page-resources__card-title,
.page-resources__game-card .page-resources__card-title,
.page-resources__policy-card .page-resources__card-title,
.page-resources__news-card .page-resources__card-title {
    font-size: 1.4em;
    margin: 20px 15px 10px;
    color: #017439;
    font-weight: 600;
}

.page-resources__guide-card .page-resources__card-title a,
.page-resources__game-card .page-resources__card-title a,
.page-resources__policy-card .page-resources__card-title a,
.page-resources__news-card .page-resources__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__guide-card .page-resources__card-title a:hover,
.page-resources__game-card .page-resources__card-title a:hover,
.page-resources__policy-card .page-resources__card-title a:hover,
.page-resources__news-card .page-resources__card-title a:hover {
    color: #005a2d;
    text-decoration: underline;
}

.page-resources__card-text {
    font-size: 1em;
    margin: 0 15px 20px;
    color: #666666;
    flex-grow: 1;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    margin: 0 15px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    max-width: calc(100% - 30px); /* Account for horizontal padding */
    box-sizing: border-box;
}

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

.page-resources__btn-primary:hover {
    background: #005a2d;
    border-color: #005a2d;
    transform: translateY(-2px);
}

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

.page-resources__btn-secondary:hover {
    background: #f0f0f0;
    color: #005a2d;
    border-color: #005a2d;
    transform: translateY(-2px);
}

/* More News Button */
.page-resources__more-news {
    text-align: center;
    margin-top: 50px;
}

/* FAQ Section */
.page-resources__faq-section {
    padding-bottom: 80px;
}

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

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #333333;
}

.page-resources__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: #017439;
}

.page-resources__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #f9f9f9;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
    color: #C30808;
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background: #f9f9f9;
    color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain content */
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.page-resources__faq-answer p {
    margin: 0;
    color: #555555;
    font-size: 1em;
}

/* Contact Section */
.page-resources__contact-info {
    text-align: center;
    font-size: 1.1em;
    line-height: 1.8;
}

.page-resources__contact-info p {
    margin-bottom: 15px;
    color: #333333;
}

.page-resources__contact-info a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

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

.page-resources__contact-info .page-resources__btn-primary,
.page-resources__contact-info .page-resources__btn-secondary {
    margin-top: 20px;
    margin-left: 10px;
    margin-right: 10px;
}

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

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

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure content is not hidden by fixed header on mobile */
    }

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

    .page-resources__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

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

    .page-resources__hero-cta {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .page-resources__cta-button,
    .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;
        padding-right: 15px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .page-resources__hero-cta .page-resources__cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }

    .page-resources__section {
        padding: 50px 15px;
    }

    .page-resources__container {
        padding-left: 0;
        padding-right: 0;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

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

    .page-resources__content-area,
    .page-resources__guide-grid,
    .page-resources__games-grid,
    .page-resources__policy-grid,
    .page-resources__news-grid,
    .page-resources__faq-list {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .page-resources__card-image {
        height: 180px;
    }

    .page-resources__guide-card .page-resources__card-title,
    .page-resources__game-card .page-resources__card-title,
    .page-resources__policy-card .page-resources__card-title,
    .page-resources__news-card .page-resources__card-title {
        font-size: 1.2em;
        margin: 15px 10px 8px;
    }

    .page-resources__card-text {
        font-size: 0.9em;
        margin: 0 10px 15px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 10px 20px;
        font-size: 0.9em;
        margin: 0 10px 15px;
    }

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

    .page-resources__faq-question h3 {
        font-size: 1em;
    }

    .page-resources__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }

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

    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }

    .page-resources__contact-info .page-resources__btn-primary,
    .page-resources__contact-info .page-resources__btn-secondary {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        margin-bottom: 15px;
    }
    .page-resources__contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}