.page-resources-safe-gambling {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for the page, as body background is dark */
    background-color: #1a1a2e; /* Inherit from shared.css or set explicitly for consistency */
}

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

/* Hero Section */
.page-resources-safe-gambling__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height 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 */
}

.page-resources-safe-gambling__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-radius: 0; /* No specific border-radius for full-width hero image */
}

.page-resources-safe-gambling__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-safe-gambling__hero-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    max-width: 900px;
    padding: 20px;
}

.page-resources-safe-gambling__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

.page-resources-safe-gambling__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-resources-safe-gambling__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* General Sections */
.page-resources-safe-gambling__introduction-section,
.page-resources-safe-gambling__protection-section,
.page-resources-safe-gambling__security-section,
.page-resources-safe-gambling__conclusion-section {
    background-color: #ffffff; /* Light background for content sections */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-resources-safe-gambling__tools-section,
.page-resources-safe-gambling__addiction-section,
.page-resources-safe-gambling__faq-section {
    background-color: #017439; /* Brand green background */
    color: #ffffff; /* White text for brand green background */
    padding: 60px 0;
}

.page-resources-safe-gambling__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    color: inherit; /* Inherit color from parent section */
}

.page-resources-safe-gambling__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
    color: inherit; /* Inherit color from parent section */
}

.page-resources-safe-gambling__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.7;
    color: inherit; /* Inherit color from parent section */
}

/* Buttons */
.page-resources-safe-gambling__btn-primary,
.page-resources-safe-gambling__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 responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    text-align: center;
}

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

.page-resources-safe-gambling__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-resources-safe-gambling__btn-secondary {
    background-color: #ffffff;
    color: #017439; /* Brand green text */
    border: 2px solid #017439;
}

.page-resources-safe-gambling__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005f2e;
}

/* Feature Grid (Self-Control Tools) */
.page-resources-safe-gambling__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-resources-safe-gambling__feature-card {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark section */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

.page-resources-safe-gambling__feature-icon {
    width: 100%; /* Ensure image takes full width of card */
    max-width: 200px; /* Max width for icon-like images */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px; /* Slightly rounded corners for images */
    display: block; /* Ensure no extra space below image */
}

.page-resources-safe-gambling__feature-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: bold;
    color: #ffffff;
}

.page-resources-safe-gambling__feature-description {
    font-size: 1em;
    color: #f0f0f0;
}

/* Content Rows (Protection & Security) */
.page-resources-safe-gambling__content-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-resources-safe-gambling__content-row--reverse {
    flex-direction: row-reverse;
}

.page-resources-safe-gambling__content-text {
    flex: 1;
}

.page-resources-safe-gambling__content-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-resources-safe-gambling__content-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

.page-resources-safe-gambling__resource-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 20px;
    color: inherit;
}

.page-resources-safe-gambling__resource-list li {
    margin-bottom: 10px;
    color: inherit;
}

.page-resources-safe-gambling__resource-list li a {
    color: #017439; /* Brand green for links in light sections */
    text-decoration: underline;
}

.page-resources-safe-gambling__resource-list li a:hover {
    color: #005f2e;
}

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

.page-resources-safe-gambling__faq-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark section */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
}

.page-resources-safe-gambling__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.page-resources-safe-gambling__faq-question:hover {
    background: rgba(255, 255, 255, 0.2);
}

.page-resources-safe-gambling__faq-item[open] .page-resources-safe-gambling__faq-question {
    border-bottom: 1px solid transparent; /* Remove border when open */
}

.page-resources-safe-gambling__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: #ffffff;
}

.page-resources-safe-gambling__faq-item[open] .page-resources-safe-gambling__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or just change to '-' */
}
/* For details/summary, the toggle behavior is handled by browser, JS only updates text */

.page-resources-safe-gambling__faq-answer {
    padding: 0 25px 20px;
    font-size: 1.1em;
    color: #f0f0f0;
}

.page-resources-safe-gambling__faq-answer p {
    margin-bottom: 10px;
}

/* Conclusion Section */
.page-resources-safe-gambling__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources-safe-gambling__hero-title {
        font-size: 2.8em;
    }
    .page-resources-safe-gambling__section-title {
        font-size: 2em;
    }
    .page-resources-safe-gambling__sub-title {
        font-size: 1.5em;
    }
    .page-resources-safe-gambling__content-row {
        flex-direction: column;
        text-align: center;
    }
    .page-resources-safe-gambling__content-row--reverse {
        flex-direction: column; /* Keep column for reverse on mobile */
    }
    .page-resources-safe-gambling__content-image-wrapper {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .page-resources-safe-gambling {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-resources-safe-gambling__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile hero respects header offset */
    }

    .page-resources-safe-gambling__hero-title {
        font-size: 2.2em;
    }

    .page-resources-safe-gambling__hero-description {
        font-size: 1em;
    }

    .page-resources-safe-gambling__hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-resources-safe-gambling__btn-primary,
    .page-resources-safe-gambling__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources-safe-gambling__cta-group {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent overflow */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-resources-safe-gambling__section-title {
        font-size: 1.8em;
    }

    .page-resources-safe-gambling__sub-title {
        font-size: 1.3em;
    }

    .page-resources-safe-gambling__feature-grid {
        grid-template-columns: 1fr;
    }

    .page-resources-safe-gambling__feature-card {
        padding: 25px;
    }

    .page-resources-safe-gambling__content-row {
        gap: 20px;
    }

    .page-resources-safe-gambling__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-resources-safe-gambling__content-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Ensure all content sections and containers have mobile padding/width */
    .page-resources-safe-gambling__section,
    .page-resources-safe-gambling__card,
    .page-resources-safe-gambling__container,
    .page-resources-safe-gambling__introduction-section,
    .page-resources-safe-gambling__tools-section,
    .page-resources-safe-gambling__protection-section,
    .page-resources-safe-gambling__addiction-section,
    .page-resources-safe-gambling__security-section,
    .page-resources-safe-gambling__faq-section,
    .page-resources-safe-gambling__conclusion-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* FAQ specific CSS for details/summary */
.page-resources-safe-gambling__faq-item summary {
    list-style: none; /* Remove default marker */
}
.page-resources-safe-gambling__faq-item summary::-webkit-details-marker {
    display: none; /* Remove default marker for webkit */
}

/* Image styles - NO FILTER properties */
.page-resources-safe-gambling img {
    border-radius: 8px; /* Example allowed style */
    /* NO filter properties */
}