/* style/game-rules.css */
:root {
    --color-primary: #11A84E;
    --color-secondary: #22C768;
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --color-card-bg: #11271B;
    --color-background: #08160F;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

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

.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%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0 60px 0; /* body already handles padding-top, this is decorative */
    overflow: hidden;
    box-sizing: border-box;
}

.page-game-rules__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px; /* Space between image and content */
}

.page-game-rules__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

.page-game-rules__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-game-rules__main-title {
    color: var(--color-gold);
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    /* No fixed font-size, rely on viewport scaling and responsiveness */
    font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.page-game-rules__description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-main);
    margin-bottom: 30px;
}

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

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-game-rules__btn-primary {
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-game-rules__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-game-rules__btn-secondary {
    background-color: transparent;
    color: var(--color-text-main);
    border: 2px solid var(--color-border);
}

.page-game-rules__btn-secondary:hover {
    background-color: var(--color-deep-green);
    color: #ffffff;
}

/* General Section Styling */
.page-game-rules__section {
    padding: 60px 0;
}

.page-game-rules__section.page-game-rules__dark-section {
    background-color: var(--color-deep-green);
    color: var(--color-text-main);
}

.page-game-rules__heading {
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 40px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.3;
}

.page-game-rules__text-block {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-main);
    margin-bottom: 20px;
}

.page-game-rules__dark-section .page-game-rules__text-block {
    color: var(--color-text-secondary);
}

.page-game-rules__list {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
    color: var(--color-text-main);
}

.page-game-rules__dark-section .page-game-rules__list {
    color: var(--color-text-secondary);
}

.page-game-rules__list-item {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Game Categories Grid */
.page-game-rules__game-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-game-rules__game-card.page-game-rules__card {
    background-color: var(--color-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}

.page-game-rules__game-card.page-game-rules__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.page-game-rules__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

.page-game-rules__card-title {
    color: var(--color-gold);
    font-size: 1.4rem;
    margin: 20px 20px 10px 20px;
    flex-grow: 1;
}

.page-game-rules__card-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 20px 20px 20px;
    flex-grow: 1;
}

.page-game-rules__game-card .page-game-rules__btn-secondary {
    margin: 0 20px;
    text-align: center;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

.page-game-rules__game-card .page-game-rules__btn-secondary:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

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

.page-game-rules__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--color-text-main);
    cursor: pointer;
    background-color: var(--color-deep-green);
    border-bottom: 1px solid var(--color-divider);
    transition: background-color 0.3s ease;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
    background-color: var(--color-primary);
    color: #ffffff;
    border-bottom: none;
}

.page-game-rules__faq-question:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

.page-game-rules__faq-qtext {
    flex-grow: 1;
}

.page-game-rules__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--color-gold);
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
    color: #ffffff;
}

.page-game-rules__faq-answer {
    padding: 15px 25px 20px 25px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* Call to Action Section */
.page-game-rules__cta {
    text-align: center;
    padding: 80px 0;
    background-color: var(--color-deep-green);
}

.page-game-rules__cta .page-game-rules__heading {
    color: var(--color-gold);
}

.page-game-rules__cta .page-game-rules__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    color: var(--color-text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-game-rules__hero-image-wrapper {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .page-game-rules__container {
        padding: 0 15px;
    }

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

    .page-game-rules__hero-image-wrapper {
        max-height: 300px;
    }

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

    .page-game-rules__description {
        font-size: 1rem;
        padding: 0 10px;
    }

    .page-game-rules__cta-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: stretch; /* Stretch buttons to full width */
    }

    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary {
        width: 100% !important; /* Force full width */
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
    }

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

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

    .page-game-rules__text-block,
    .page-game-rules__list-item,
    .page-game-rules__faq-question,
    .page-game-rules__faq-answer p {
        font-size: 0.95rem;
    }

    .page-game-rules__game-card-grid {
        grid-template-columns: 1fr;
    }

    .page-game-rules__game-card.page-game-rules__card {
        margin: 0 auto;
        width: 100%;
        max-width: 400px; /* Optional: limit card width on mobile if needed */
    }

    /* Mobile image and video responsiveness */
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-game-rules video,
    .page-game-rules__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container,
    .page-game-rules__hero-image-wrapper,
    .page-game-rules__cta-buttons,
    .page-game-rules__game-card-grid,
    .page-game-rules__faq-list,
    .page-game-rules__video-section,
    .page-game-rules__video-container,
    .page-game-rules__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-game-rules__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

/* Ensure images within content areas are not too small */
.page-game-rules__game-card-grid img {
    min-width: 200px;
    min-height: 200px;
}

/* No filter on images */
.page-game-rules img {
    filter: none;
}