/* style/resources.css */

/* Variables */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-login-bg: #C30808;
    --register-login-font: #FFFF00;
    --text-dark: #333333;
    --text-light: #ffffff;
    --card-bg-light: #ffffff;
    --card-bg-dark: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
    --border-light: #e0e0e0;
    --neon-dark-bg-1: #0d0d0d; /* Assuming this is a dark background from shared.css */
}

/* Base styles for the page content */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--neon-dark-bg-1); /* Assume body background from shared.css */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px; 
    text-align: center;
    overflow: hidden;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background-color: var(--primary-color); /* Fallback, image will cover */
    color: var(--text-light);
}

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

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    border-radius: 8px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

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

/* Section common styles */
.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-light); /* Default for dark background sections */
}

.page-resources__paragraph {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-light); /* Default for dark background sections */
}

.page-resources__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 60px 0;
}

.page-resources__light-bg .page-resources__section-title,
.page-resources__light-bg .page-resources__paragraph,
.page-resources__light-bg .page-resources__card-title a,
.page-resources__light-bg .page-resources__card-text,
.page-resources__light-bg .page-resources__btn-link {
    color: var(--text-dark);
}

.page-resources__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0;
}

.page-resources__dark-bg.page-resources__hero-section {
    background-color: var(--neon-dark-bg-1); /* Hero background is typically darker */
}

.page-resources__dark-bg .page-resources__section-title,
.page-resources__dark-bg .page-resources__paragraph,
.page-resources__dark-bg .page-resources__card-title a,
.page-resources__dark-bg .page-resources__card-text,
.page-resources__dark-bg .page-resources__btn-link {
    color: var(--text-light);
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-resources__btn-primary {
    background-color: var(--register-login-bg); /* Custom color for register/login */
    color: var(--register-login-font); /* Custom font color for register/login */
    border: 2px solid var(--register-login-bg);
}

.page-resources__btn-primary:hover {
    background-color: #a30707; /* Darken for hover */
    border-color: #a30707;
    color: var(--register-login-font);
}

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

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

.page-resources__btn-link {
    background-color: transparent;
    color: var(--primary-color); /* Link color on light background */
    border: none;
    padding: 0;
    text-decoration: underline;
}

.page-resources__dark-bg .page-resources__btn-link {
    color: var(--secondary-color); /* Link color on dark background */
}

.page-resources__btn-link:hover {
    color: #005a2e; /* Darken for hover */
}

.page-resources__dark-bg .page-resources__btn-link:hover {
    color: #e6e6e6; /* Lighten for hover */
}

/* Grid for cards */
.page-resources__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Cards */
.page-resources__card {
    background-color: var(--card-bg-dark); /* Default for dark background sections */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-resources__light-bg .page-resources__card {
    background-color: var(--card-bg-light);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.page-resources__card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-resources__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-resources__card-title a {
    text-decoration: none;
    color: inherit; /* Inherit color from parent card */
}

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

.page-resources__card-text {
    font-size: 0.95em;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* CTA Section */
.page-resources__cta-section {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly lighter background for CTA */
    border-radius: 10px;
}

.page-resources__light-bg .page-resources__cta-section {
    background-color: #f0f0f0;
}

.page-resources__cta-section .page-resources__paragraph {
    margin-bottom: 30px;
    font-size: 1.2em;
}

/* Responsible Gaming Section */
.page-resources__responsible-gaming-section .page-resources__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-resources__responsible-gaming-section .page-resources__text-content {
    flex: 1;
}

.page-resources__responsible-gaming-section .page-resources__image-right {
    flex: 0 0 500px; /* Fixed width for desktop */
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    display: block;
}

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

.page-resources__faq-item {
    background-color: var(--card-bg-light); /* Light background for FAQ items */
    color: var(--text-dark);
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-resources__light-bg .page-resources__faq-item {
    background-color: var(--card-bg-light);
    color: var(--text-dark);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding 0 */
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--card-bg-light);
    color: var(--text-dark);
}

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

.page-resources__faq-answer p {
    margin-bottom: 0;
    color: var(--text-dark);
}

/* Download App Section */
.page-resources__download-app-section {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

.page-resources__download-app-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-resources__download-app-content .page-resources__text-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-resources__download-app-content .page-resources__section-title {
    text-align: left;
    color: var(--secondary-color);
}

.page-resources__download-app-content .page-resources__paragraph {
    text-align: left;
    color: var(--secondary-color);
}

.page-resources__app-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.page-resources__image-app-mockup {
    flex: 0 0 500px; /* Fixed width for desktop */
    max-width: 40%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

    .page-resources__responsible-gaming-section .page-resources__content-wrapper,
    .page-resources__download-app-content {
        flex-direction: column;
        text-align: center;
    }

    .page-resources__responsible-gaming-section .page-resources__image-right,
    .page-resources__image-app-mockup {
        max-width: 80%;
        margin-top: 40px;
        flex: none;
    }

    .page-resources__download-app-content .page-resources__text-content,
    .page-resources__download-app-content .page-resources__section-title,
    .page-resources__download-app-content .page-resources__paragraph {
        text-align: center;
    }

    .page-resources__app-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        min-height: 400px;
        padding: 40px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

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

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

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

    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-link {
        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;
    }

    .page-resources__hero-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

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

    .page-resources__paragraph {
        font-size: 1em;
    }

    .page-resources__container {
        padding: 0 15px;
    }

    .page-resources__grid {
        grid-template-columns: 1fr;
    }

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

    .page-resources__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }

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

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

    .page-resources__responsible-gaming-section .page-resources__image-right,
    .page-resources__image-app-mockup {
        max-width: 100%;
        width: 100%;
        margin-top: 30px;
    }

    .page-resources__download-app-content .page-resources__text-content {
        min-width: unset;
    }

    /* Mobile image responsive optimization */
    .page-resources img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
    }

    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__content-wrapper,
    .page-resources__download-app-content {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-resources__app-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .page-resources__app-buttons .page-resources__btn-primary {
        width: 80%; /* Adjust button width within app-buttons */
    }
}