/* style/resources.css */

/* Base styles for the page-resources content */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--bg-color, #ffffff); /* Fallback to white if --bg-color is not set */
}

/* Ensure padding-top for fixed header offset */
.page-resources__hero-section {
    padding-top: var(--header-offset, 120px); /* Applies to desktop and mobile based on shared CSS var */
    position: relative;
    overflow: hidden; /* Ensure image doesn't overflow */
}

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

/* Dark background sections (e.g., Hero, Video, Responsible Gambling, CTA) */
.page-resources__dark-bg {
    background-color: #017439; /* Main brand color */
    color: #ffffff; /* White text for contrast */
    padding: 60px 0;
}

/* Light background sections */
.page-resources__light-bg {
    background-color: #ffffff;
    color: #333333;
    padding: 60px 0;
}

/* Hero Section */
.page-resources__hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    min-height: 500px; /* Minimum height for hero */
}

.page-resources__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay for 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-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

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

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

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

/* Section Titles */
.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: inherit; /* Inherit color from parent section (dark-bg or light-bg) */
}

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

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    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;
    cursor: pointer;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure button doesn't overflow */
}

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

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: #ffffff; /* White text for secondary button on dark background */
    border: 2px solid #ffffff;
}

.page-resources__dark-bg .page-resources__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}
.page-resources__light-bg .page-resources__btn-secondary {
    background-color: transparent;
    color: #017439; /* Brand color text for secondary button on light background */
    border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.page-resources__light-bg .page-resources__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}


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

.page-resources__feature-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-resources__feature-icon {
    width: 200px; /* Min size 200px */
    height: 150px; /* Maintain aspect ratio */
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-resources__feature-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #017439; /* Brand color for titles */
}

.page-resources__feature-title a {
    text-decoration: none;
    color: #017439;
    transition: color 0.3s ease;
}

.page-resources__feature-title a:hover {
    color: #005a2d;
}

.page-resources__feature-description {
    font-size: 1em;
    color: #555555;
    flex-grow: 1; /* Allow description to take available space */
}

/* Video Section */
.page-resources__video-section {
    text-align: center;
    padding: 60px 0;
    background-color: #017439;
    color: #ffffff;
}

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

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    cursor: pointer; /* Indicate video is clickable */
}

.page-resources__video-cta {
    margin-top: 30px;
}

/* Article Grid (Guides Section) */
.page-resources__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-resources__article-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

.page-resources__article-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    flex-grow: 1; /* Allow title to take available space */
}

.page-resources__article-title a {
    text-decoration: none;
    color: #017439;
    transition: color 0.3s ease;
}

.page-resources__article-title a:hover {
    color: #005a2d;
}

.page-resources__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
}

.page-resources__read-more-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto; /* Push to bottom */
    transition: color 0.3s ease;
}

.page-resources__read-more-link:hover {
    color: #005a2d;
    text-decoration: underline;
}

/* Responsible Gambling Section */
.page-resources__responsible-gambling-section {
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 60px 0;
}

.page-resources__responsible-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    object-fit: cover;
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 60px 0;
}

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

.page-resources__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

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

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

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #017439;
    border-radius: 50%;
    color: #017439;
    transition: transform 0.3s ease;
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px; /* Initial padding 0 */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 15px 20px 20px; /* Adjust padding when active */
}

.page-resources__faq-answer p {
    margin: 0;
    padding-bottom: 10px; /* Space between paragraphs in answer */
}

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

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

/* CTA Section */
.page-resources__cta-section {
    text-align: center;
    padding: 80px 0;
}

/* Images: No filter property allowed, maintain original color */
.page-resources img {
    filter: none; /* Ensure no CSS filters are applied */
}


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

@media (max-width: 768px) {
    .page-resources__hero-section {
        min-height: 400px;
    }
    .page-resources__hero-title {
        font-size: 2.5em;
    }
    .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%;
        max-width: 300px; /* Max width for buttons on mobile */
        margin: 0 auto; /* Center buttons */
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__text-block {
        font-size: 0.95em;
        padding: 0 15px; /* Add padding to text blocks */
    }

    .page-resources__feature-grid,
    .page-resources__article-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .page-resources__feature-card,
    .page-resources__article-card {
        padding: 20px;
    }
    .page-resources__feature-icon {
        width: 150px;
        height: 120px;
    }
    .page-resources__article-image {
        height: 180px;
    }

    .page-resources__video-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    /* Mobile image responsiveness (MUST be !important) */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Mobile video responsiveness (MUST be !important) */
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Container responsiveness for images/videos/buttons (MUST be !important) */
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__video-section,
    .page-resources__video-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;
        overflow: hidden !important; /* Prevent horizontal scroll */
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Specific padding for sections */
    .page-resources__dark-bg,
    .page-resources__light-bg {
        padding: 40px 0 !important;
    }

    /* Video section padding top for mobile */
    .page-resources__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }

    /* FAQ item padding */
    .page-resources__faq-item {
        margin-left: 15px;
        margin-right: 15px;
    }
    .page-resources__faq-question,
    .page-resources__faq-answer {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 15px 20px !important;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100%;
    }
}