/* style/game-rules.css */

:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --page-bg: #F4F7FB;
    --text-main: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
    --dark-section-bg: #252b38; /* Custom dark background for contrast */
    --light-text: #ffffff;
    --default-paragraph-color: #333333;
}

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

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

/* Hero Section */
.page-game-rules__hero-section {
    padding-top: 10px; /* Small top padding, assuming body has header offset */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--dark-section-bg);
    color: var(--light-text);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
    width: 100%;
    max-height: 675px; /* Max height to prevent excessively tall image */
    overflow: hidden;
}

.page-game-rules__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-game-rules__hero-content {
    padding: 40px 20px;
    max-width: 900px;
    z-index: 1; /* Ensure content is above any potential background layers */
}

.page-game-rules__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--light-text);
}

.page-game-rules__description {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.page-game-rules__cta-button {
    display: inline-block;
    background: var(--button-gradient);
    color: var(--light-text);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-rules__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Intro Section (Dark Background) */
.page-game-rules__intro-section {
    background-color: var(--dark-section-bg);
    color: var(--light-text);
    padding: 60px 0;
    text-align: center;
}

.page-game-rules__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 30px;
    color: inherit;
}

.page-game-rules__text-block {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: inherit;
}

.page-game-rules__text-block strong {
    color: var(--secondary-color);
}

/* Main Content Area (Light Background) */
.page-game-rules__content-area {
    background-color: var(--page-bg);
    color: var(--text-main);
    padding: 60px 0;
}

.page-game-rules__content-area .page-game-rules__section-title {
    color: var(--text-black);
    margin-bottom: 40px;
    text-align: center;
}

.page-game-rules__sub-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-game-rules__text-block ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.page-game-rules__text-block li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.page-game-rules__content-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-game-rules__faq-section {
    background-color: var(--card-bg);
    color: var(--text-main);
    padding: 60px 0;
}

.page-game-rules__faq-section .page-game-rules__section-title {
    color: var(--text-black);
    margin-bottom: 40px;
    text-align: center;
}

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

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

.page-game-rules__faq-item[open] {
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-black);
    cursor: pointer;
    list-style: none; /* For details/summary */
}

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

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

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

.page-game-rules__faq-answer {
    padding: 0 20px 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--default-paragraph-color);
}

.page-game-rules__faq-answer p {
    margin-bottom: 10px;
}

/* CTA Section (Dark Background) */
.page-game-rules__cta-section {
    background-color: var(--dark-section-bg);
    color: var(--light-text);
    padding: 60px 0;
    text-align: center;
}

.page-game-rules__cta-section .page-game-rules__section-title {
    color: var(--light-text);
    margin-bottom: 20px;
}

.page-game-rules__cta-section .page-game-rules__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

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

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal;
    word-wrap: break-word;
}

.page-game-rules__btn-primary {
    background: var(--button-gradient);
    color: var(--light-text);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-rules__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-rules__btn-secondary {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-rules__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-rules__container {
        padding: 20px 30px;
    }

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

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

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

    .page-game-rules__sub-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .page-game-rules__hero-section {
        padding-top: 10px !important; /* Fixed small top padding */
        min-height: auto;
    }

    .page-game-rules__hero-image-wrapper {
        max-height: 400px; /* Adjust max height for mobile hero image */
    }

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

    .page-game-rules__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
        margin-bottom: 10px;
    }

    .page-game-rules__description {
        font-size: 1rem !important;
        margin-bottom: 20px;
    }

    .page-game-rules__cta-button {
        padding: 12px 25px !important;
        font-size: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Intro Section */
    .page-game-rules__intro-section {
        padding: 40px 0 !important;
    }

    .page-game-rules__intro-section .page-game-rules__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Main Content Area */
    .page-game-rules__content-area {
        padding: 40px 0 !important;
    }

    .page-game-rules__content-area .page-game-rules__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

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

    .page-game-rules__sub-title {
        font-size: 1.4rem !important;
        margin-top: 30px !important;
        margin-bottom: 15px !important;
    }

    .page-game-rules__text-block {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .page-game-rules__text-block ul {
        padding-left: 20px !important;
    }

    /* General Images and Containers */
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-game-rules__container,
    .page-game-rules__text-block,
    .page-game-rules__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* FAQ Section */
    .page-game-rules__faq-section {
        padding: 40px 0 !important;
    }

    .page-game-rules__faq-section .page-game-rules__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

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

    .page-game-rules__faq-toggle {
        font-size: 1.3rem !important;
    }

    .page-game-rules__faq-answer {
        padding: 0 15px 15px !important;
        font-size: 0.9rem !important;
    }

    /* CTA Section */
    .page-game-rules__cta-section {
        padding: 40px 0 !important;
    }

    .page-game-rules__cta-section .page-game-rules__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-game-rules__cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
    }

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

@media (max-width: 549px) {
    .page-game-rules__hero-content {
        padding: 25px 10px;
    }
    .page-game-rules__main-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    }
    .page-game-rules__description {
        font-size: 0.9rem !important;
    }
    .page-game-rules__section-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem) !important;
    }
    .page-game-rules__sub-title {
        font-size: 1.2rem !important;
    }
    .page-game-rules__cta-button, .page-game-rules__btn-primary, .page-game-rules__btn-secondary {
        font-size: 0.95rem !important;
        padding: 10px 15px !important;
    }
}