/* style/game-rules.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --background-color: #1a1a2e; /* From shared.css body background */
    --text-on-dark: #ffffff;
    --text-on-light: #333333;
}

.page-game-rules {
    color: var(--text-on-dark); /* Default text color for the page body */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Body background is handled by shared.css */
}

.page-game-rules a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-game-rules a:hover {
    text-decoration: underline;
}

/* Hero Section */
.page-game-rules__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
    background-color: var(--background-color);
}

.page-game-rules__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit height for aesthetic */
    margin-bottom: 30px;
}

.page-game-rules__hero-content {
    max-width: 900px;
    padding: 0 20px;
    color: var(--text-on-dark);
}

.page-game-rules__main-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.page-game-rules__description {
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Section General */
.page-game-rules__section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-game-rules__content-area {
    background-color: var(--secondary-color);
    color: var(--text-on-light);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -40px; /* Overlap with hero for visual flow */
    position: relative;
    z-index: 1;
}

.page-game-rules__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.page-game-rules__text-block {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
}

/* Card Styles */
.page-game-rules__card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-rules__card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

/* Game Type Sections */
.page-game-rules__game-type {
    margin-bottom: 50px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.page-game-rules__game-type-title {
    font-size: 1.8em;
    color: var(--login-button-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

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

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.page-game-rules__btn-primary {
    background-color: var(--login-button-color);
    color: var(--secondary-color);
    border: 2px solid var(--login-button-color);
    margin-right: 15px;
}

.page-game-rules__btn-primary:hover {
    background-color: darken(var(--login-button-color), 10%);
    border-color: darken(var(--login-button-color), 10%);
}

.page-game-rules__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-game-rules__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.page-game-rules__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

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

.page-game-rules__faq-item {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--text-on-light);
    cursor: pointer;
    list-style: none;
    position: relative;
}

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

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

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

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

.page-game-rules__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-on-light);
}

/* Responsive Design */

/* Default desktop styles for H1 */
.page-game-rules__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 size */
}

/* All images base responsive styles */
.page-game-rules img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* All image containers base responsive styles */
.page-game-rules__section,
.page-game-rules__card,
.page-game-rules__container,
.page-game-rules__game-type {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* All video containers base responsive styles (if applicable) */
.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;
}

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

    .page-game-rules__hero-section {
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-game-rules__main-title {
        font-size: clamp(2em, 8vw, 2.8em);
        margin-bottom: 15px;
    }

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

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

    .page-game-rules__content-area {
        margin-top: -20px;
    }

    .page-game-rules__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

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

    .page-game-rules__card-title {
        font-size: 1.3em;
    }

    .page-game-rules__game-type {
        padding: 15px;
        margin-bottom: 30px;
    }

    .page-game-rules__game-type-title {
        font-size: 1.5em;
    }

    .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;
        margin-right: 0 !important; /* Remove horizontal margin */
        margin-bottom: 15px; /* Add vertical spacing between buttons */
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-game-rules__cta-buttons {
        flex-direction: column;
        gap: 0; /* Gap handled by margin-bottom on buttons */
        padding: 0 15px;
    }

    .page-game-rules__cta-buttons a:last-child {
        margin-bottom: 0; /* No bottom margin for the last button */
    }

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

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

    /* Mobile image and container overrides */
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container,
    .page-game-rules__game-type {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Mobile video and container overrides */
    .page-game-rules video,
    .page-game-rules__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !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;
    }
}