/* style/game-rules.css */

/* --- General Styles for page-game-rules --- */
.page-game-rules {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #F2FFF6; /* Default text color for the page, as overall theme is dark green */
    background-color: #08160F; /* Background */
}

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

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

.page-game-rules__section-title {
    font-size: clamp(28px, 3.5vw, 48px); /* H1 font size rule applied to H2 as well for consistency */
    color: #F2FFF6; /* Text Main */
    margin-bottom: 30px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.page-game-rules__sub-title {
    font-size: clamp(22px, 2.5vw, 32px);
    color: #F2C14E; /* Gold */
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.page-game-rules__paragraph {
    font-size: 18px;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-rules__list {
    list-style: none;
    padding: 0;
    margin: 30px auto;
    max-width: 900px;
    text-align: left;
}

.page-game-rules__list-item {
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main */
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #2E7A4E; /* Border */
    font-size: 17px;
    line-height: 1.5;
}

.page-game-rules__list-item strong {
    color: #F2C14E; /* Gold */
}

/* --- Buttons --- */
.page-game-rules__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    min-width: 200px;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-game-rules__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #F2FFF6; /* Text Main */
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-game-rules__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
    transform: translateY(-2px);
}

.page-game-rules__btn-secondary {
    background-color: transparent;
    color: #2AD16F; /* Match primary gradient start color for contrast */
    border: 2px solid #2AD16F;
}

.page-game-rules__btn-secondary:hover {
    background-color: rgba(42, 209, 111, 0.1);
    color: #F2FFF6;
    border-color: #F2FFF6;
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.page-game-rules__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    padding-bottom: 60px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-game-rules__hero-image-wrapper a {
    cursor: pointer;
    display: block;
}

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

.page-game-rules__hero-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    margin-top: -80px; /* Pull content slightly over image for visual flow */
    position: relative;
    z-index: 1;
    background-color: #0A4B2C; /* Deep Green for contrast */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding-bottom: 60px; /* Ensure space for buttons */
}

.page-game-rules__main-title {
    font-size: clamp(32px, 4.5vw, 56px); /* H1 font size */
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.page-game-rules__intro-text {
    font-size: 20px;
    color: #A7D9B8; /* Text Secondary */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

/* --- Image Styling within Content --- */
.page-game-rules__image-inline {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    margin: 40px auto;
    display: block;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    min-height: 200px; /* Enforce minimum size */
}

/* --- Dark Section (e.g., FAQ) --- */
.page-game-rules__dark-section {
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main */
    padding: 80px 0;
}

.page-game-rules__dark-section .page-game-rules__section-title {
    color: #F2FFF6; /* Text Main */
}

.page-game-rules__dark-section .page-game-rules__paragraph {
    color: #A7D9B8; /* Text Secondary */
}

/* --- FAQ Section --- */
.page-game-rules__faq-list {
    max-width: 800px;
    margin: 40px auto;
    text-align: left;
}

.page-game-rules__faq-item {
    background-color: #08160F; /* Background */
    border: 1px solid #2E7A4E; /* 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: 20px 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #F2FFF6; /* Text Main */
    background-color: #0A4B2C; /* Deep Green */
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
    border-bottom-color: #2E7A4E; /* Border */
}

.page-game-rules__faq-question:hover {
    background-color: #1E3A2A; /* Divider for hover */
}

.page-game-rules__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-game-rules__faq-toggle {
    font-size: 24px;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #57E38D; /* Glow */
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or just change to '-' */
    color: #F2C14E; /* Gold */
}

.page-game-rules__faq-answer {
    padding: 0 25px 20px;
    font-size: 16px;
    color: #A7D9B8; /* Text Secondary */
    line-height: 1.6;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
    max-height: 500px; /* Sufficiently large for content */
    opacity: 1;
    padding-top: 15px;
}

/* Hide default details marker */
.page-game-rules__faq-item summary::-webkit-details-marker {
    display: none;
}
.page-game-rules__faq-item summary {
    list-style: none;
}


/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .page-game-rules__hero-content {
        margin-top: -60px;
        padding: 30px 20px;
    }
    .page-game-rules__main-title {
        font-size: clamp(28px, 4vw, 48px);
    }
    .page-game-rules__intro-text {
        font-size: 18px;
    }
    .page-game-rules__section {
        padding: 40px 0;
    }
}

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

    /* Mobile image responsiveness */
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-height: 200px !important; /* Ensure min size on mobile */
    }

    /* All containing elements for images/videos/buttons */
    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container,
    .page-game-rules__hero-section,
    .page-game-rules__hero-image-wrapper,
    .page-game-rules__hero-content,
    .page-game-rules__cta-buttons,
    .page-game-rules__faq-list,
    .page-game-rules__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Mobile button responsiveness */
    .page-game-rules__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
    }

    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        min-width: unset; /* Remove min-width for mobile */
    }

    .page-game-rules__hero-content {
        margin-top: -40px;
        padding: 25px 15px;
    }

    .page-game-rules__main-title {
        font-size: clamp(24px, 8vw, 38px);
    }

    .page-game-rules__intro-text {
        font-size: 16px;
    }

    .page-game-rules__section-title {
        font-size: clamp(24px, 7vw, 36px);
    }

    .page-game-rules__sub-title {
        font-size: clamp(20px, 6vw, 28px);
    }

    .page-game-rules__paragraph {
        font-size: 16px;
    }

    .page-game-rules__list-item {
        font-size: 16px;
        padding: 12px 15px;
    }

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

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

@media (max-width: 480px) {
    .page-game-rules__hero-content {
        margin-top: -20px;
        padding: 20px 10px;
    }
    .page-game-rules__main-title {
        font-size: clamp(22px, 7vw, 32px);
    }
    .page-game-rules__cta-buttons {
        gap: 10px;
    }
}