/* style/game-rules.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-login-color: #EA7C07;
}

.page-game-rules {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default to dark text for light body background */
    background-color: var(--secondary-color);
}

.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: var(--header-offset, 120px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
}

.page-game-rules__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-game-rules__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

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

.page-game-rules__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-game-rules__hero-title {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-game-rules__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-game-rules__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-login-color); /* Using login color for primary CTA */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-rules__cta-button:hover {
    background: darken(var(--button-login-color), 10%); /* Darken for hover effect */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.page-game-rules__dark-section .page-game-rules__section-title,
.page-game-rules__dark-section .page-game-rules__text-block {
    color: var(--text-light);
}

.page-game-rules__introduction-section,
.page-game-rules__fair-play-section,
.page-game-rules__faq-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.page-game-rules__specific-rules-section,
.page-game-rules__dispute-section,
.page-game-rules__cta-section .page-game-rules__container {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-game-rules__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-game-rules__text-block a {
    color: var(--button-login-color);
    text-decoration: none;
}

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

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

.page-game-rules__game-card {
    background: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
}

.page-game-rules__game-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

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

.page-game-rules__card-description {
    font-size: 1em;
    margin: 0 15px 20px;
    flex-grow: 1;
}

.page-game-rules__card-link {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-game-rules__card-link:hover {
    background-color: darken(var(--primary-color), 10%);
}

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

.page-game-rules__feature-item {
    background: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    color: var(--text-dark);
}

.page-game-rules__feature-item img {
    width: 100%;
    max-width: 400px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 20px;
}

.page-game-rules__feature-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-game-rules__feature-description {
    font-size: 1em;
    color: var(--text-dark);
}

.page-game-rules__dispute-steps {
    list-style: decimal;
    padding-left: 25px;
    margin-top: 20px;
    color: var(--text-light);
}

.page-game-rules__dispute-steps li {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.page-game-rules__dispute-steps li strong {
    color: var(--button-login-color);
}

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

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

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-game-rules__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-game-rules__faq-question:active {
    background: #eeeeee;
}

.page-game-rules__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-dark);
}

.page-game-rules__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-game-rules__faq-item.active .page-game-rules__faq-toggle {
    color: #333;
    transform: rotate(45deg);
}

.page-game-rules__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    color: var(--text-dark);
}

.page-game-rules__faq-item.active .page-game-rules__faq-answer {
    max-height: 2000px !important;
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* CTA Section */
.page-game-rules__cta-section {
    padding: 80px 0;
    text-align: center;
}

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

.page-game-rules__cta-section .page-game-rules__text-block {
    font-size: 1.2em;
    color: var(--text-light);
    margin-bottom: 40px;
}

.page-game-rules__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.page-game-rules__btn-primary {
    background: var(--button-login-color);
    color: var(--text-light);
    border: 2px solid var(--button-login-color);
}

.page-game-rules__btn-primary:hover {
    background: darken(var(--button-login-color), 10%);
    border-color: darken(var(--button-login-color), 10%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-game-rules__btn-secondary:hover {
    background: lighten(var(--primary-color), 40%);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-game-rules__hero-title {
        font-size: 2.5em;
    }
    .page-game-rules__hero-description {
        font-size: 1.1em;
    }
    .page-game-rules__section-title {
        font-size: 2em;
    }
    .page-game-rules__game-card img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-game-rules__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-game-rules__hero-image img {
        border-radius: 4px;
    }
    
    .page-game-rules__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }

    .page-game-rules__container {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-game-rules__hero-title {
        font-size: 2em;
    }

    .page-game-rules__hero-description {
        font-size: 1em;
    }

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

    .page-game-rules__text-block {
        font-size: 1em;
    }

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

    .page-game-rules__game-card img,
    .page-game-rules__feature-item img {
        
        max-width: 100% !important;
        width: 100% !important;
        object-fit: cover;
    }

    .page-game-rules__game-card,
    .page-game-rules__feature-item {
        padding: 20px;
    }

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

    .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,
    .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-left: 15px;
        padding-right: 15px;
    }

    .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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-game-rules__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-game-rules__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-game-rules__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-game-rules__faq-answer {
        padding: 0 15px;
    }
    
    .page-game-rules__faq-item.active .page-game-rules__faq-answer {
        padding: 15px !important;
    }
}

/* Ensure content area images are not too small */
.page-game-rules__game-card img,
.page-game-rules__feature-item img {
    min-width: 200px;
    min-height: 200px;
}

/* Contrast fix for potential issues */
.page-game-rules__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-game-rules__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}