/* style/game-rules.css */

/* Base styles for the page content */
.page-game-rules {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: var(--black-color); /* Inherited from shared.css, assuming dark */
}

/* Hero Section */
.page-game-rules__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1a1a1a; /* Darker background for hero */
    overflow: hidden;
}

.page-game-rules__hero-content {
    max-width: 900px;
    z-index: 1;
    position: relative;
}

.page-game-rules__hero-title {
    font-size: 3.2em;
    color: #26A9E0; /* Brand color for title */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-game-rules__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Ensure buttons wrap on small screens */
}

.page-game-rules__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.page-game-rules__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    /* filter: brightness(0.7); No filter property for color change */
}

/* General Section Styles */
.page-game-rules__section {
    padding: 60px 20px;
    background-color: var(--black-color); /* Consistent dark background */
    color: #ffffff;
}

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

.page-game-rules__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    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: 4px;
    background-color: #EA7C07; /* Login orange for accent */
    border-radius: 2px;
}

.page-game-rules__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-rules__section-footer-text {
    font-size: 1em;
    text-align: center;
    margin-top: 40px;
    color: #cccccc;
}

.page-game-rules__subsection-title {
    font-size: 1.8em;
    color: #26A9E0;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: left;
}

.page-game-rules__list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.page-game-rules__list li {
    margin-bottom: 10px;
}

/* Card Grid Layout */
.page-game-rules__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-game-rules__card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for cards */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #ffffff; /* Ensure light text on card background */
}

.page-game-rules__card-title {
    font-size: 1.5em;
    color: #26A9E0;
    margin-bottom: 15px;
    text-align: left;
}

.page-game-rules__card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    min-height: 200px; /* Enforce min size */
}

.page-game-rules__card-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 15px;
    color: #f0f0f0;
}

.page-game-rules__card-list li {
    margin-bottom: 8px;
}

/* Game Category Specific Rules */
.page-game-rules__game-category {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-game-rules__category-title {
    font-size: 2em;
    color: #EA7C07; /* Orange for category titles */
    margin-bottom: 20px;
    text-align: left;
}

.page-game-rules__category-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: 25px;
    object-fit: cover;
    min-height: 200px; /* Enforce min size */
}

.page-game-rules__category-list {
    list-style: square;
    margin-left: 25px;
    margin-top: 20px;
    color: #f0f0f0;
}

.page-game-rules__category-list li {
    margin-bottom: 10px;
    font-weight: bold;
    color: #26A9E0;
}

.page-game-rules__category-list li strong {
    color: #f0f0f0;
}

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

.page-game-rules__btn-primary {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
    border: 2px solid #26A9E0;
}

.page-game-rules__btn-primary:hover {
    background-color: #1e87b7;
    border-color: #1e87b7;
}

.page-game-rules__btn-secondary {
    background-color: transparent;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-game-rules__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-game-rules__btn-center {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 300px; /* Limit width for centered buttons */
}

/* Links within content */
.page-game-rules a {
    color: #26A9E0; /* Brand color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-game-rules a:hover {
    color: #EA7C07; /* Orange on hover */
    text-decoration: underline;
}

/* FAQ Section */
.page-game-rules__faq-section {
    background-color: #1a1a1a; /* Slightly different dark background */
}

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

.page-game-rules__faq-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.page-game-rules__faq-title {
    font-size: 1.2em;
    color: #f0f0f0;
    margin: 0;
}

.page-game-rules__faq-toggle {
    font-size: 1.5em;
    color: #26A9E0;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.page-game-rules__faq-item.active .page-game-rules__faq-toggle {
    transform: rotate(45deg); /* Change to X or - */
    color: #EA7C07;
}

.page-game-rules__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    color: #cccccc;
}