/* style/game-rules.css */

/* Custom Colors */
:root {
    --page-game-rules-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-game-rules-card-bg: #11271B;
    --page-game-rules-background: #08160F;
    --page-game-rules-text-main: #F2FFF6;
    --page-game-rules-text-secondary: #A7D9B8;
    --page-game-rules-border: #2E7A4E;
    --page-game-rules-glow: #57E38D;
    --page-game-rules-gold: #F2C14E;
    --page-game-rules-divider: #1E3A2A;
    --page-game-rules-deep-green: #0A4B2C;
}

.page-game-rules {
    font-family: 'Arial', sans-serif; /* Example font */
    color: var(--page-game-rules-text-main); /* Default text color for the page */
    background-color: var(--page-game-rules-background); /* Default background for the page */
    line-height: 1.6;
}

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

/* Hero Section */
.page-game-rules__hero-section {
    position: relative;
    width: 100%; /* Ensure full width for flex item */
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    text-align: center;
    padding: 60px 0;
    background-color: var(--page-game-rules-deep-green); /* Example background for hero */
    overflow: hidden; /* Ensure no overflow */
}

.page-game-rules__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    margin-bottom: 30px; /* Space between image and text */
}

.page-game-rules__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* Slightly rounded corners */
}

.page-game-rules__hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.page-game-rules__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    color: var(--page-game-rules-gold);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.page-game-rules__description {
    font-size: 1.15rem;
    color: var(--page-game-rules-text-secondary);
    margin-bottom: 30px;
}

/* Primary Button Style */
.page-game-rules__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: var(--page-game-rules-btn-gradient);
    color: var(--page-game-rules-text-main); /* Light text on dark button */
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-game-rules__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    opacity: 0.9;
}

/* General Section Styling */
.page-game-rules__section {
    padding: 80px 0;
    border-bottom: 1px solid var(--page-game-rules-divider);
}

.page-game-rules__section:last-of-type {
    border-bottom: none;
}

.page-game-rules__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem); /* Responsive font size for H2 */
    color: var(--page-game-rules-gold);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
}

.page-game-rules__sub-title {
    font-size: clamp(1.5rem, 3vw, 2rem); /* Responsive font size for H3 */
    color: var(--page-game-rules-text-main);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.page-game-rules__content-wrapper {
    background-color: var(--page-game-rules-card-bg); /* Card background color */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    color: var(--page-game-rules-text-main);
}

.page-game-rules__content-wrapper p {
    margin-bottom: 15px;
    color: var(--page-game-rules-text-main);
}

.page-game-rules__content-wrapper strong {
    color: var(--page-game-rules-gold);
}

.page-game-rules__content-wrapper ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: var(--page-game-rules-text-main);
}

.page-game-rules__content-wrapper ul li {
    margin-bottom: 10px;
    color: var(--page-game-rules-text-main);
}

.page-game-rules__content-wrapper a {
    color: var(--page-game-rules-glow); /* Link color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-game-rules__content-wrapper a:hover {
    text-decoration: underline;
    color: var(--page-game-rules-gold);
}

.page-game-rules__image {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Minimum image size */
    min-height: 200px; /* Minimum image size */
}

/* FAQ Section */
.page-game-rules__faq-section {
    padding-bottom: 80px;
}

.page-game-rules__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-game-rules__faq-item {
    background-color: var(--page-game-rules-card-bg);
    border: 1px solid var(--page-game-rules-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--page-game-rules-text-main);
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--page-game-rules-text-main);
    cursor: pointer;
    background-color: var(--page-game-rules-deep-green);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-game-rules__faq-question:hover {
    background-color: #1a5c3a; /* Slightly lighter green on hover */
}

.page-game-rules__faq-qtext {
    flex-grow: 1;
    color: var(--page-game-rules-text-main);
}

.page-game-rules__faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--page-game-rules-gold);
    margin-left: 15px;
}

.page-game-rules__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--page-game-rules-text-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* For <details> tag, native open state */
.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
    max-height: 1000px; /* Sufficiently large to show content */
    transition: max-height 0.5s ease-in;
}

/* CTA Section */
.page-game-rules__cta-section {
    text-align: center;
    padding: 60px 0;
    background-color: var(--page-game-rules-deep-green);
    border-top: 1px solid var(--page-game-rules-border);
}

.page-game-rules__cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--page-game-rules-gold);
    margin-bottom: 20px;
    font-weight: 700;
}

.page-game-rules__cta-description {
    font-size: 1.2rem;
    color: var(--page-game-rules-text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-rules__hero-section {
        padding: 40px 0;
    }

    .page-game-rules__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }

    .page-game-rules__section {
        padding: 60px 0;
    }

    .page-game-rules__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }

    .page-game-rules__sub-title {
        font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    }

    .page-game-rules__content-wrapper {
        padding: 30px;
    }
}

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

    /* All images responsive */
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* All image containers responsive */
    .page-game-rules__hero-image-wrapper,
    .page-game-rules__content-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important; /* Add padding to prevent content touching edges */
        padding-right: 15px !important; /* Add padding to prevent content touching edges */
        overflow: hidden !important;
    }

    /* All sections and main containers responsive */
    .page-game-rules__section,
    .page-game-rules__container,
    .page-game-rules__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-game-rules__hero-section {
        padding-top: 10px !important; /* body handles --header-offset, this is for visual top spacing */
        padding-bottom: 40px !important;
    }

    .page-game-rules__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-top: 15px;
    }

    .page-game-rules__description {
        font-size: 1rem;
    }

    .page-game-rules__btn-primary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 15px 20px !important; /* Adjust padding for smaller screens */
    }

    .page-game-rules__section {
        padding: 40px 0;
    }

    .page-game-rules__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 30px;
    }

    .page-game-rules__sub-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .page-game-rules__content-wrapper {
        padding: 20px;
    }

    .page-game-rules__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .page-game-rules__faq-answer {
        padding: 0 20px 15px;
    }

    .page-game-rules__cta-section {
        padding: 40px 0;
    }

    .page-game-rules__cta-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .page-game-rules__cta-description {
        font-size: 1rem;
    }
}