/* style/resources.css */

/* Variables and base styles */
:root {
    --page-primary-color: #26A9E0;
    --page-secondary-color: #FFFFFF;
    --page-text-dark: #333333;
    --page-text-light: #ffffff;
    --page-bg-light: #ffffff;
    --page-bg-dark: #26A9E0; /* Using primary color for dark sections */
    --page-login-color: #EA7C07;
}

.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--page-text-dark); /* Default text color for light backgrounds */
    background-color: var(--page-bg-light); /* Default light background */
}

.page-resources__hero-section {
    position: relative;
    color: var(--page-text-light);
    background-color: var(--page-bg-dark); /* Dark background for hero */
    padding: 100px 0;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-resources__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay for text readability */
    z-index: 1;
}

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

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 2;
}

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

.page-resources__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--page-text-light);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--page-text-light);
}

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

.page-resources__btn-primary,
.page-resources__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;
    box-sizing: border-box; /* Crucial for button responsiveness */
    max-width: 100%; /* Ensure button does not overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    text-align: center;
}

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

.page-resources__btn-primary:hover {
    background-color: #1a88bb; /* Adjusted manually */
    border-color: #1a88bb; /* Adjusted manually */
}

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

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

.page-resources__btn-center {
    display: block;
    margin: 30px auto 0 auto;
    width: fit-content;
    min-width: 200px;
}

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

.page-resources__introduction,
.page-resources__game-guides,
.page-resources__responsible-gambling,
.page-resources__faq-section {
    padding: 80px 0;
    background-color: var(--page-bg-light);
    color: var(--page-text-dark);
}

.page-resources__dark-section {
    background-color: var(--page-bg-dark); /* Use primary color for dark sections */
    color: var(--page-text-light);
    padding: 80px 0;
}
.page-resources__dark-section .page-resources__section-title {
    color: var(--page-text-light);
}
.page-resources__dark-section .page-resources__card-title {
    color: var(--page-text-light);
}
.page-resources__dark-section .page-resources__read-more {
    color: var(--page-secondary-color); /* White text for links */
}
.page-resources__dark-section .page-resources__read-more:hover {
    color: var(--page-primary-color); /* Primary color on hover */
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-resources__grid-2-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources__card {
    background-color: var(--page-bg-light);
    color: var(--page-text-dark);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.page-resources__dark-section .page-resources__card {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards on dark background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.page-resources__dark-section .page-resources__card-description {
    color: var(--page-text-light);
}

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--page-primary-color);
}
.page-resources__dark-section .page-resources__card-title {
    color: var(--page-text-light);
}

.page-resources__card-title a {
    color: inherit;
    text-decoration: none;
}
.page-resources__card-title a:hover {
    text-decoration: underline;
}

.page-resources__card-description {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__read-more {
    display: inline-block;
    color: var(--page-primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: auto; /* Push to bottom */
}

.page-resources__read-more:hover {
    text-decoration: underline;
}

.page-resources__video-section {
    padding: 80px 0;
    background-color: var(--page-bg-dark);
    color: var(--page-text-light);
    text-align: center;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 40px auto 0 auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-resources__video-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

.page-resources__text-center {
    text-align: center;
}

/* FAQ Section */
.page-resources__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
}

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    color: var(--page-primary-color);
}

.page-resources__faq-item[open] .page-resources__faq-question {
    border-bottom-color: transparent;
}

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

.page-resources__faq-qtext {
    flex-grow: 1;
    color: var(--page-text-dark); /* Ensure question text is dark */
}

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

.page-resources__faq-answer {
    padding: 20px;
    font-size: 1em;
    color: var(--page-text-dark);
    background-color: var(--page-bg-light);
}
.page-resources__faq-answer p {
    margin-bottom: 10px;
}
.page-resources__faq-answer p:last-child {
    margin-bottom: 0;
}
.page-resources__faq-answer .page-resources__btn-primary {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 0.9em;
}

.page-resources__cta-bottom {
    padding: 80px 0;
    background-color: var(--page-bg-dark);
    color: var(--page-text-light);
}
.page-resources__cta-bottom .page-resources__section-title {
    color: var(--page-text-light);
}
.page-resources__cta-bottom .page-resources__text-block {
    color: var(--page-text-light);
}
.page-resources__cta-bottom .page-resources__cta-buttons {
    margin-top: 40px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.5em;
    }
    .page-resources__hero-description {
        font-size: 1.1em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__grid-3-cols,
    .page-resources__grid-2-cols {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 80px 0;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__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: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__text-block {
        font-size: 0.95em;
    }
    .page-resources__card-title {
        font-size: 1.3em;
    }
    .page-resources__card-description {
        font-size: 0.9em;
    }
    .page-resources__grid-3-cols,
    .page-resources__grid-2-cols {
        grid-template-columns: 1fr;
    }
    .page-resources__card-image {
        height: 180px;
    }

    /* 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__video-wrapper,
    .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: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
    /* Mobile video responsiveness */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}