/* Base styles for the game rules page */
.page-game-rules {
    font-family: Arial, sans-serif;
    color: #FFF6D6; /* Text Main */
    background-color: #0A0A0A; /* Background */
    line-height: 1.6;
    padding-bottom: 50px; /* Add some padding at the bottom */
}

/* Hero Section */
.page-game-rules__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
    margin-bottom: 40px;
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-game-rules__hero-image {
    width: 100%;
    height: 675px; /* Fixed height for desktop, will be responsive */
    object-fit: cover;
    display: block;
    filter: brightness(0.6); /* Slightly darken image for text readability */
}

.page-game-rules__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 800px;
    width: 90%;
    z-index: 2;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text */
    border-radius: 10px;
}

.page-game-rules__main-title {
    font-size: 3.2em; /* Adjusted for better scale */
    color: #FFD36B; /* Glow color for title */
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 211, 107, 0.5);
    font-weight: bold;
}

.page-game-rules__hero-description {
    font-size: 1.2em;
    color: #FFF6D6;
    margin-bottom: 30px;
}

/* General Section Styling */
.page-game-rules__section {
    padding: 40px 0;
    margin-bottom: 30px;
}

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

.page-game-rules__section-title {
    font-size: 2.5em;
    color: #F2C14E; /* Main color */
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.page-game-rules__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #FFD36B; /* Glow color */
    border-radius: 2px;
}

.page-game-rules__paragraph {
    font-size: 1.1em;
    color: #FFF6D6;
    margin-bottom: 20px;
    text-align: justify;
}

.page-game-rules__highlight {
    color: #FFD36B;
    font-weight: bold;
}

.page-game-rules__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 211, 107, 0.2);
    object-fit: cover;
}

/* Rule Item */
.page-game-rules__rule-item {
    background: #111111; /* Card BG */
    border: 1px solid #3A2A12; /* Border */
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-rules__rule-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 211, 107, 0.15);
}

.page-game-rules__rule-title {
    font-size: 1.6em;
    color: #F2C14E; /* Main color */
    margin-bottom: 10px;
    font-weight: bold;
}

.page-game-rules__rule-description {
    font-size: 1em;
    color: #FFF6D6;
    line-height: 1.7;
}

/* Game Category Specific Rules */
.page-game-rules__game-category {
    background: #111111; /* Card BG */
    border: 1px solid #3A2A12; /* Border */
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-rules__game-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 211, 107, 0.15);
}

.page-game-rules__category-title {
    font-size: 2em;
    color: #F2C14E; /* Main color */
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.page-game-rules__category-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #FFD36B; /* Glow color */
    border-radius: 1px;
}

.page-game-rules__rule-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.page-game-rules__list-item {
    background: rgba(255, 255, 255, 0.05); /* Slightly lighter background for list items */
    padding: 15px 20px;
    margin-bottom: 10px;
    border-left: 4px solid #F2C14E; /* Main color accent */
    border-radius: 4px;
    font-size: 1.05em;
    color: #FFF6D6;
    line-height: 1.6;
}

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-rules__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
    color: #1A1A1A; /* Dark text for contrast on gold button */
    border: none;
    margin-top: 20px;
}

.page-game-rules__btn-primary:hover {
    background: linear-gradient(180deg, #FFD36B 0%, #C78F1A 100%);
    box-shadow: 0 5px 15px rgba(255, 211, 107, 0.4);
}

.page-game-rules__btn-secondary {
    background: #111111; /* Card BG */
    color: #F2C14E; /* Main color */
    border: 2px solid #F2C14E; /* Main color border */
    margin-top: 15px;
}

.page-game-rules__btn-secondary:hover {
    background: #F2C14E; /* Main color */
    color: #1A1A1A; /* Dark text for contrast */
    box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
}

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

.page-game-rules__faq-list {
    margin-top: 30px;
}

details.page-game-rules__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #3A2A12; /* Border */
    overflow: hidden;
    background: #111111; /* Card BG */
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question::-webkit-details-marker {
    display: none;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question:hover {
    background: rgba(242, 193, 78, 0.1); /* Slight highlight on hover */
}
.page-game-rules__faq-qtext {
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #FFF6D6;
}
.page-game-rules__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #F2C14E; /* Main color */
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
    padding: 0 20px 20px;
    background: rgba(17, 17, 17, 0.8); /* Slightly darker for answer */
    border-radius: 0 0 5px 5px;
    color: #FFF6D6;
}
.page-game-rules__faq-answer p {
    margin: 0;
    padding-top: 10px;
    font-size: 1em;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-rules__main-title {
        font-size: 2.8em;
    }
    .page-game-rules__hero-description {
        font-size: 1.1em;
    }
    .page-game-rules__section-title {
        font-size: 2.2em;
    }
    .page-game-rules__rule-title {
        font-size: 1.4em;
    }
    .page-game-rules__category-title {
        font-size: 1.8em;
    }
    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    /* General Mobile Adjustments */
    .page-game-rules {
        padding-bottom: 30px;
        font-size: 15px;
    }

    /* Hero Section */
    .page-game-rules__hero-section {
        margin-bottom: 30px;
    }
    .page-game-rules__hero-image {
        height: 400px; /* Adjust height for mobile */
        object-fit: cover;
        object-position: center;
        max-width: 100% !important; /* Mobile image max-width */
        width: 100% !important;
        height: auto !important; /* Mobile image height auto */
    }
    .page-game-rules__hero-content {
        padding: 15px;
        width: 95%;
    }
    .page-game-rules__main-title {
        font-size: 2em; /* Smaller title for mobile */
        margin-bottom: 10px;
    }
    .page-game-rules__hero-description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    /* Sections */
    .page-game-rules__section {
        padding: 30px 0;
        margin-bottom: 20px;
    }
    .page-game-rules__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-game-rules__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }
    .page-game-rules__paragraph {
        font-size: 1em;
    }
    .page-game-rules__image {
        max-width: 100% !important; /* Mobile image max-width */
        width: 100% !important;
        height: auto !important; /* Mobile image height auto */
        margin: 20px auto;
    }

    /* Rule Items & Categories */
    .page-game-rules__rule-item,
    .page-game-rules__game-category {
        padding: 20px;
        margin-bottom: 15px;
    }
    .page-game-rules__rule-title {
        font-size: 1.3em;
    }
    .page-game-rules__category-title {
        font-size: 1.6em;
    }
    .page-game-rules__list-item {
        font-size: 0.95em;
        padding: 12px 15px;
    }

    /* Buttons */
    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary,
    .page-game-rules a[class*="button"],
    .page-game-rules a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px !important; /* Adjust padding for mobile */
        font-size: 1em;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .page-game-rules__cta-buttons,
    .page-game-rules__button-group,
    .page-game-rules__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        display: flex; /* Ensure flex context for wrap/column */
        flex-direction: column; /* Stack buttons vertically */
    }

    /* FAQ Section */
    details.page-game-rules__faq-item summary.page-game-rules__faq-question {
        padding: 15px;
    }
    .page-game-rules__faq-qtext {
        font-size: 1em;
    }
    .page-game-rules__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    details.page-game-rules__faq-item .page-game-rules__faq-answer {
        padding: 0 15px 15px;
    }
    .page-game-rules__faq-answer p {
        font-size: 0.95em;
    }
}