/* style/game-rules.css */

/* Root variables for colors */
:root {
    --page-bg: #08160F; /* Background */
    --card-bg: #11271B; /* Card BG */
    --text-main: #F2FFF6; /* Text Main */
    --text-secondary: #A7D9B8; /* Text Secondary */
    --border-color: #2E7A4E; /* Border */
    --btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
    --glow-color: #57E38D; /* Glow */
    --gold-color: #F2C14E; /* Gold */
    --divider-color: #1E3A2A; /* Divider */
    --deep-green: #0A4B2C; /* Deep Green */
}

.page-game-rules {
    background-color: var(--page-bg);
    color: var(--text-main); /* Default text color for the page */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

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

/* Hero Section */
.page-game-rules__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    box-sizing: border-box;
}

.page-game-rules__hero-content-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain content width */
    display: flex;
    flex-direction: column; /* Image above, text below */
    align-items: center;
    text-align: center;
}

.page-game-rules__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    margin-bottom: 30px; /* Space between image and text */
    object-fit: cover;
}

.page-game-rules__hero-text-content {
    padding: 0 20px;
    width: 100%;
    max-width: 900px;
}

.page-game-rules__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-game-rules__intro-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-rules__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary,
.page-game-rules__btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    max-width: 100%;
}

.page-game-rules__btn-primary {
    background: var(--btn-gradient);
    color: var(--text-main); /* White-ish text for dark gradient */
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-game-rules__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-game-rules__btn-secondary {
    background: transparent;
    color: var(--gold-color); /* Gold text for secondary button */
    border: 2px solid var(--gold-color);
    box-shadow: 0 2px 10px rgba(242, 193, 78, 0.2);
}

.page-game-rules__btn-secondary:hover {
    background: var(--gold-color);
    color: var(--page-bg); /* Dark text on gold hover */
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-game-rules__btn-link {
    background: var(--deep-green);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-size: 1rem;
    margin-top: 15px;
}

.page-game-rules__btn-link:hover {
    background: var(--btn-gradient);
    color: var(--text-main);
}

/* General Section Styling */
.page-game-rules__section {
    padding: 60px 0;
    border-bottom: 1px solid var(--divider-color);
}

.page-game-rules__section:last-of-type {
    border-bottom: none;
}

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

.page-game-rules__text-block {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Rule Card Styling */
.page-game-rules__rule-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-game-rules__rule-card:last-of-type {
    margin-bottom: 0;
}

.page-game-rules__card-title {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-game-rules__card-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Specific Game Rules */
.page-game-rules__specific-rules .page-game-rules__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-game-rules__game-type-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
}

.page-game-rules__game-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.page-game-rules__game-type-card .page-game-rules__card-title {
    padding: 20px;
    margin-bottom: 0;
    font-size: 1.5rem;
}

.page-game-rules__game-type-card .page-game-rules__card-content {
    padding: 0 20px 20px;
    flex-grow: 1; /* Allow content to expand */
    display: flex;
    flex-direction: column;
}

.page-game-rules__game-type-card .page-game-rules__card-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 15px;
}

.page-game-rules__list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.page-game-rules__list li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.page-game-rules__list li::before {
    content: '•';
    color: var(--glow-color); /* Bullet point color */
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Responsible Gaming Section */
.page-game-rules__responsible-gaming .page-game-rules__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.page-game-rules__responsible-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-direction: row; /* Desktop layout */
}

.page-game-rules__responsible-image {
    width: 40%; /* Image takes 40% width on desktop */
    height: auto;
    object-fit: cover;
    display: block;
    border-right: 1px solid var(--divider-color);
    min-width: 200px; /* Minimum size for image */
    min-height: 200px;
}

.page-game-rules__responsible-card .page-game-rules__card-content {
    padding: 30px;
    width: 60%; /* Content takes 60% width */
    box-sizing: border-box;
}

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

.page-game-rules__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-game-rules__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-game-rules__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    background-color: var(--card-bg);
    border-bottom: 1px solid transparent; /* default */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-game-rules__faq-item[open] > .page-game-rules__faq-question {
    background-color: var(--deep-green); /* Darker on open */
    border-bottom-color: var(--divider-color);
}

.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;
}

.page-game-rules__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--glow-color);
}

.page-game-rules__faq-answer {
    padding: 0 20px 20px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.page-game-rules__faq-answer p {
    margin: 0;
}

/* Bottom CTA Section */
.page-game-rules__cta-bottom {
    text-align: center;
    padding-top: 40px;
    padding-bottom: 80px;
}

.page-game-rules__cta-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 50px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-game-rules__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }

    .page-game-rules__section-title {
        font-size: 2rem;
    }

    .page-game-rules__responsible-card {
        flex-direction: column; /* Stack image and content on tablet */
    }

    .page-game-rules__responsible-image {
        width: 100%;
        height: 300px; /* Adjust height for stacked layout */
        border-right: none;
        border-bottom: 1px solid var(--divider-color);
    }

    .page-game-rules__responsible-card .page-game-rules__card-content {
        width: 100%;
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .page-game-rules__hero-section {
        padding: 40px 0;
        padding-top: 10px !important; /* Ensure small top padding */
    }

    .page-game-rules__hero-image {
        margin-bottom: 20px;
    }

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

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

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

    .page-game-rules__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary,
    .page-game-rules__btn-link {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .page-game-rules__btn-link {
        margin-top: 10px;
    }

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

    .page-game-rules__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-game-rules__text-block {
        font-size: 0.95rem;
        padding: 0 15px;
    }

    .page-game-rules__rule-card,
    .page-game-rules__game-type-card,
    .page-game-rules__responsible-card,
    .page-game-rules__faq-item,
    .page-game-rules__cta-container {
        margin-left: 15px !important;
        margin-right: 15px !important;
        max-width: calc(100% - 30px) !important;
        width: calc(100% - 30px) !important;
        box-sizing: border-box !important;
        padding: 20px !important;
    }
    
    .page-game-rules__game-image {
        height: 200px; /* Smaller image height on mobile */
    }

    .page-game-rules__game-type-card .page-game-rules__card-title {
        font-size: 1.3rem;
        padding: 15px;
    }

    .page-game-rules__game-type-card .page-game-rules__card-content {
        padding: 0 15px 15px;
    }

    .page-game-rules__responsible-image {
        min-width: unset;
        min-height: unset;
    }

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

    .page-game-rules__faq-toggle {
        font-size: 1.5rem;
    }

    .page-game-rules__faq-answer {
        padding: 0 15px 15px;
    }
    
    /* Ensure all images are responsive */
    .page-game-rules img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Ensure all image containers are responsive */
    .page-game-rules__section,
    .page-game-rules__card,
    .page-game-rules__container,
    .page-game-rules__hero-content-wrapper,
    .page-game-rules__game-type-card,
    .page-game-rules__responsible-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent overflow */
    }
    
    /* Specific adjustment for hero image wrapper if it has its own padding */
    .page-game-rules__hero-content-wrapper {
        padding: 0;
    }
    
    /* Video responsiveness - if any video exists, this would apply */
    .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;
    }
}

@media (max-width: 480px) {
    .page-game-rules__cta-buttons {
        gap: 10px;
    }
}