/* style/resources.css */

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

/* Base styles for the page-resources scope */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark); /* Default text color for the entire main content area, assuming body is dark */
    background-color: var(--background-dark); /* This should align with shared.css body background */
}

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

.page-resources__section-title {
    font-size: 2.5em;
    color: var(--text-on-dark);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: inherit; /* Inherit from parent section */
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
    box-sizing: border-box;
}

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

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-resources__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    color: var(--text-on-dark);
    padding: 20px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--text-on-dark);
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: var(--text-on-dark);
}

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

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__btn-primary {
    background-color: var(--button-register);
    color: var(--button-text-color);
    border: 2px solid var(--button-register);
}

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

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

.page-resources__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.page-resources__cta-buttons--center {
    text-align: center;
    margin-top: 30px;
}

/* Section Styling - Color Contrast */
.page-resources__dark-bg {
    background-color: var(--background-dark);
    color: var(--text-on-dark);
}

.page-resources__light-bg {
    background-color: var(--background-light);
    color: var(--text-on-light);
}

/* Intro Section */
.page-resources__intro-section,
.page-resources__security-section,
.page-resources__games-section,
.page-resources__faq-section,
.page-resources__benefits-section,
.page-resources__cta-section {
    padding: 60px 0;
}

.page-resources__intro-section .page-resources__section-title,
.page-resources__security-section .page-resources__section-title,
.page-resources__faq-section .page-resources__section-title,
.page-resources__cta-section .page-resources__section-title {
    color: var(--text-on-light);
}

.page-resources__intro-section .page-resources__text-block,
.page-resources__security-section .page-resources__text-block,
.page-resources__faq-section .page-resources__text-block,
.page-resources__cta-section .page-resources__text-block {
    color: var(--text-on-light);
}

.page-resources__guide-section .page-resources__section-title,
.page-resources__games-section .page-resources__section-title,
.page-resources__benefits-section .page-resources__section-title {
    color: var(--text-on-dark);
}

.page-resources__guide-section .page-resources__text-block,
.page-resources__games-section .page-resources__text-block,
.page-resources__benefits-section .page-resources__text-block {
    color: var(--text-on-dark);
}

/* Images */
.page-resources__image-full-width {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 8px;
    object-fit: cover;
}

.page-resources__image-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Guide Section */
.page-resources__guide-item {
    margin-bottom: 40px;
}

.page-resources__guide-subtitle {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-resources__guide-list {
    list-style-type: decimal;
    padding-left: 25px;
    margin-bottom: 20px;
    color: var(--text-on-dark);
}

.page-resources__guide-list li {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.page-resources__guide-list li strong {
    color: var(--primary-color);
}

/* Security Section - Video */
.page-resources__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Games Section */
.page-resources__game-category {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 20px;
}

.page-resources__game-category:nth-of-type(odd) {
    flex-direction: row;
}

.page-resources__game-category:nth-of-type(even) {
    flex-direction: row-reverse;
}

.page-resources__game-category img {
    flex: 0 0 auto;
    width: 400px; /* Base width for image in layout */
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
}

.page-resources__game-category p {
    flex: 1;
    min-width: 300px;
    color: var(--text-on-dark);
}

.page-resources__category-title {
    font-size: 1.6em;
    color: var(--primary-color);
    width: 100%;
    margin-bottom: 15px;
}

/* FAQ Section */
.page-resources__faq-item {
    background-color: var(--background-light);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-on-light);
}

.page-resources__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: #f8f8f8;
    color: var(--text-on-light);
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-item[open] > .page-resources__faq-question {
    background-color: #e0e0e0;
}

.page-resources__faq-qtext {
    flex-grow: 1;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    line-height: 1;
    color: var(--primary-color);
}

.page-resources__faq-answer {
    padding: 15px 25px 25px;
    font-size: 1.05em;
    color: var(--text-on-light);
    background-color: var(--background-light);
}

/* Ensure details summary marker is hidden */
.page-resources__faq-item summary {
    list-style: none;
}

.page-resources__faq-item summary::-webkit-details-marker {
    display: none;
}

/* Benefits Section */
.page-resources__benefits-list {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 30px;
    color: var(--text-on-dark);
}

.page-resources__benefits-list li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.page-resources__benefits-list li strong {
    color: var(--primary-color);
}

/* Call to Action Section */
.page-resources__cta-section {
    text-align: center;
    padding-bottom: 80px;
}

/* 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__text-block {
        font-size: 1em;
    }
    .page-resources__game-category img {
        width: 300px;
        height: 225px;
    }
    .page-resources__game-category p {
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-resources__hero-content {
        padding: 15px;
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__guide-subtitle {
        font-size: 1.5em;
    }
    .page-resources__guide-list,
    .page-resources__benefits-list {
        padding-left: 20px;
    }
    .page-resources__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-resources__faq-answer {
        padding: 10px 20px 20px;
    }
    .page-resources__game-category {
        flex-direction: column !important; /* Force column layout on mobile */
        align-items: center;
    }
    .page-resources__game-category img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 15px;
    }
    .page-resources__game-category p {
        width: 100%;
    }

    /* Mobile image responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__intro-section,
    .page-resources__guide-section,
    .page-resources__security-section,
    .page-resources__games-section,
    .page-resources__faq-section,
    .page-resources__benefits-section,
    .page-resources__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Mobile video responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-section {
        height: 400px;
    }
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__guide-subtitle {
        font-size: 1.3em;
    }
    .page-resources__faq-question {
        font-size: 1em;
    }
    .page-resources__faq-toggle {
        font-size: 1.2em;
    }
}