/* style/game-rules.css */
/* body đã padding-top: var(--header-offset)；trang này cấm viết lại biến đó */
.page-game-rules {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #F2FFF6; /* Text Main */
    background-color: #08160F; /* Background */
}

.page-game-rules__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding as body handles header offset */
    background-color: #08160F; /* Background color for hero section */
    overflow: hidden;
}

.page-game-rules__hero-image-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    margin-bottom: 20px;
}

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

.page-game-rules__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.page-game-rules__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* H1 font size with clamp */
    font-weight: 700;
    line-height: 1.2;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 20px;
}

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

.page-game-rules__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box;
    overflow: hidden;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure button takes full width on small screens */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-game-rules__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
    color: #F2FFF6; /* Text Main */
    border: none;
}

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

.page-game-rules__btn-secondary {
    background: transparent;
    color: #57E38D; /* Glow color for border and text */
    border: 2px solid #57E38D; /* Glow color for border */
}

.page-game-rules__btn-secondary:hover {
    background-color: rgba(87, 227, 141, 0.1); /* Light hover effect */
    transform: translateY(-2px);
}

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

.page-game-rules__content-area {
    background-color: #0A4B2C; /* Deep Green for content sections */
    border-radius: 12px;
    margin-bottom: 40px;
    padding: 60px 40px;
}

.page-game-rules__dark-bg {
    background-color: #08160F; /* Background color */
}

.page-game-rules__section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #F2FFF6; /* Text Main */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.page-game-rules__text-main {
    color: #F2FFF6; /* Text Main */
}

.page-game-rules__text-secondary {
    color: #A7D9B8; /* Text Secondary */
}

.page-game-rules__paragraph {
    font-size: 1.05rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
    text-align: justify;
}

.page-game-rules__feature-grid,
.page-game-rules__content-grid,
.page-game-rules__game-rules-grid,
.page-game-rules__policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-game-rules__card {
    background-color: #11271B; /* Card BG */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #F2FFF6; /* Text Main */
    border: 1px solid #2E7A4E; /* Border color */
}

.page-game-rules__feature-image,
.page-game-rules__game-image {
    width: 100%;
    max-width: 400px; /* Recommended size for content images */
    height: auto;
    display: block;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

.page-game-rules__feature-title,
.page-game-rules__card-title,
.page-game-rules__game-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #F2FFF6; /* Text Main */
    margin-bottom: 15px;
}

.page-game-rules__feature-text {
    font-size: 1rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 20px;
}

.page-game-rules__list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
    width: 100%;
}

.page-game-rules__list li {
    font-size: 1rem;
    color: #A7D9B8; /* Text Secondary */
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.page-game-rules__list li::before {
    content: '•';
    color: #57E38D; /* Glow color for list bullets */
    position: absolute;
    left: 0;
    font-size: 1.2em;
    line-height: 1;
}

.page-game-rules__download-cta {
    text-align: center;
    padding: 80px 20px;
    background-color: #0A4B2C; /* Deep Green */
    margin-top: 40px;
    border-radius: 12px;
}

.page-game-rules__download-image {
    width: 100%;
    max-width: 600px; /* Recommended size */
    height: auto;
    display: block;
    margin: 40px auto 0 auto;
    border-radius: 12px;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

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

.page-game-rules__faq-item {
    background-color: #11271B; /* Card BG */
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #2E7A4E; /* Border color */
    color: #F2FFF6; /* Text Main */
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    color: #F2FFF6; /* Text Main */
}

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

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

.page-game-rules__faq-qtext {
    flex-grow: 1;
    color: #F2FFF6; /* Text Main */
}

.page-game-rules__faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #57E38D; /* Glow color */
    margin-left: 20px;
}

.page-game-rules__faq-answer {
    padding: 0 30px 20px;
    font-size: 1rem;
    color: #A7D9B8; /* Text Secondary */
    line-height: 1.6;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
    content: '−';
}

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

    .page-game-rules__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body đã xử lý --header-offset */
    }

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

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

    .page-game-rules__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

    .page-game-rules__section-title {
        font-size: clamp(1.8rem, 7vw, 2.2rem);
        margin-bottom: 30px;
    }

    .page-game-rules__feature-grid,
    .page-game-rules__content-grid,
    .page-game-rules__game-rules-grid,
    .page-game-rules__policy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-game-rules__card {
        padding: 20px;
    }

    .page-game-rules__feature-image,
    .page-game-rules__game-image,
    .page-game-rules__download-image,
    .page-game-rules__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container,
    .page-game-rules__download-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }

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

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

/* Ensure no image filters are applied */
.page-game-rules img {
    filter: none !important;
}

/* Content area image size enforcement */
.page-game-rules img:not(.page-game-rules__hero-image) { /* Apply to all content images except hero */
    min-width: 200px;
    min-height: 200px;
}

/* For any video if added */
.page-game-rules video,
.page-game-rules__video {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

.page-game-rules__video-section,
.page-game-rules__video-container,
.page-game-rules__video-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-game-rules video,
    .page-game-rules__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .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: hidden !important;
    }
    
    .page-game-rules__video-section {
        padding-top: 10px !important;
    }
    
    .page-game-rules__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}