/* style/g.css */
/* Base styles for the page */
.page-g {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--page-g-text-main, #F2FFF6); /* Default text color for dark background */
    background-color: var(--page-g-background, #08160F); /* Default background */
}

/* Ensure body padding-top is not duplicated here, it's handled by shared.css */
/* .page-g should not have padding-top: var(--header-offset) */

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

/* Section styling */
.page-g__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: var(--page-g-text-main, #F2FFF6);
}

/* Hero Section */
.page-g__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    background-color: var(--page-g-background, #08160F); /* Deep Green */
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-g__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.page-g__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    filter: none !important; /* Ensure no filter is applied */
}

.page-g__hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1; /* Ensure text is above any potential background elements */
    color: var(--page-g-text-main, #F2FFF6);
}

.page-g__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--page-g-gold, #F2C14E); /* Gold color for main title */
}

.page-g__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--page-g-text-secondary, #A7D9B8);
}

/* CTA Buttons */
.page-g__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box;
}

.page-g__cta-buttons--center {
    margin-top: 40px;
}

.page-g__btn-primary,
.page-g__btn-secondary,
.page-g a[class*="button"],
.page-g a[class*="btn"] {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
    max-width: 100%; /* Ensure button adapts to container width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-g__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-g__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

.page-g__btn-secondary {
    background-color: transparent;
    color: var(--page-g-text-main, #F2FFF6);
    border: 2px solid var(--page-g-glow, #57E38D); /* Green Glow border */
}

.page-g__btn-secondary:hover {
    background-color: var(--page-g-glow, #57E38D);
    color: var(--page-g-background, #08160F);
}

/* Introduction Section */
.page-g__introduction-section {
    background-color: #ffffff; /* Light background for contrast */
    color: #333333; /* Dark text for contrast */
    padding: 60px 0;
}
.page-g__introduction-section .page-g__section-title {
    color: #000000;
}
.page-g__introduction-section p {
    color: #333333;
    margin-bottom: 15px;
}

/* Why Choose Section */
.page-g__why-choose-section {
    background-color: var(--page-g-card-bg, #11271B); /* Dark Card BG */
    color: var(--page-g-text-main, #F2FFF6);
    padding: 60px 0;
}
.page-g__why-choose-section .page-g__section-title {
    color: var(--page-g-gold, #F2C14E);
}

.page-g__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-g__feature-card {
    background-color: var(--page-g-deep-green, #0A4B2C); /* Deep Green background for cards */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--page-g-text-main, #F2FFF6);
}

.page-g__feature-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block; /* Ensure image behaves as block for max-width */
    filter: none !important; /* Ensure no filter is applied */
}

.page-g__card-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--page-g-gold, #F2C14E);
}

/* Game Types Section */
.page-g__game-types-section {
    background-color: #ffffff; /* Light background */
    color: #333333;
    padding: 60px 0;
}
.page-g__game-types-section .page-g__section-title {
    color: #000000;
}
.page-g__game-types-section p {
    color: #333333;
    text-align: center;
    margin-bottom: 30px;
}

.page-g__types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.page-g__type-card {
    background-color: #f9f9f9; /* Lighter background for type cards */
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #333333;
}

.page-g__type-image {
    width: 100%;
    height: 180px; /* Fixed height for type images */
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
    filter: none !important; /* Ensure no filter is applied */
}

.page-g__type-card .page-g__card-title {
    color: var(--page-g-deep-green, #0A4B2C);
}

/* Guide Section */
.page-g__guide-section {
    background-color: var(--page-g-card-bg, #11271B); /* Dark Card BG */
    color: var(--page-g-text-main, #F2FFF6);
    padding: 60px 0;
}
.page-g__guide-section .page-g__section-title {
    color: var(--page-g-gold, #F2C14E);
}
.page-g__guide-section p {
    color: var(--page-g-text-secondary, #A7D9B8);
}

.page-g__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-g__guide-list li {
    background-color: var(--page-g-deep-green, #0A4B2C);
    border-left: 5px solid var(--page-g-glow, #57E38D);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--page-g-text-main, #F2FFF6);
}

.page-g__list-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--page-g-gold, #F2C14E);
}

/* Tips Section */
.page-g__tips-section {
    background-color: #ffffff; /* Light background */
    color: #333333;
    padding: 60px 0;
}
.page-g__tips-section .page-g__section-title {
    color: #000000;
}
.page-g__tips-section p {
    color: #333333;
    margin-bottom: 30px;
}

.page-g__tips-list {
    list-style: disc;
    padding-left: 20px;
    color: #333333;
}

.page-g__tips-list li {
    margin-bottom: 10px;
    color: #333333;
}

.page-g__tips-list strong {
    color: var(--page-g-deep-green, #0A4B2C);
}

/* Promotions Section */
.page-g__promotions-section {
    background-color: var(--page-g-card-bg, #11271B); /* Dark Card BG */
    color: var(--page-g-text-main, #F2FFF6);
    padding: 60px 0;
}
.page-g__promotions-section .page-g__section-title {
    color: var(--page-g-gold, #F2C14E);
}
.page-g__promotions-section p {
    color: var(--page-g-text-secondary, #A7D9B8);
}

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

.page-g__promo-card {
    background-color: var(--page-g-deep-green, #0A4B2C);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: var(--page-g-text-main, #F2FFF6);
}

.page-g__promo-image {
    width: 100%;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
    filter: none !important; /* Ensure no filter is applied */
}

.page-g__promo-card .page-g__card-title {
    color: var(--page-g-gold, #F2C14E);
}

/* Security Section */
.page-g__security-section {
    background-color: #ffffff; /* Light background */
    color: #333333;
    padding: 60px 0;
}
.page-g__security-section .page-g__section-title {
    color: #000000;
}
.page-g__security-section p {
    color: #333333;
    margin-bottom: 15px;
}

/* Support Section */
.page-g__support-section {
    background-color: var(--page-g-card-bg, #11271B); /* Dark Card BG */
    color: var(--page-g-text-main, #F2FFF6);
    padding: 60px 0;
}
.page-g__support-section .page-g__section-title {
    color: var(--page-g-gold, #F2C14E);
}
.page-g__support-section p {
    color: var(--page-g-text-secondary, #A7D9B8);
}

/* FAQ Section */
.page-g__faq-section {
    background-color: #ffffff; /* Light background */
    color: #333333;
    padding: 60px 0;
}
.page-g__faq-section .page-g__section-title {
    color: #000000;
}

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

.page-g__faq-item {
    background-color: #f9f9f9;
    border: 1px solid var(--page-g-border, #2E7A4E); /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-g__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    background-color: var(--page-g-deep-green, #0A4B2C); /* Deep Green for question background */
    color: var(--page-g-text-main, #F2FFF6);
    user-select: none;
    list-style: none; /* Remove default marker for summary */
}

.page-g__faq-question::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit browsers */
}

.page-g__faq-qtext {
    flex-grow: 1;
}

.page-g__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: var(--page-g-gold, #F2C14E);
}

.page-g__faq-item[open] .page-g__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or '-' */
}

.page-g__faq-answer {
    padding: 20px 25px;
    background-color: #ffffff;
    color: #333333;
    border-top: 1px solid var(--page-g-divider, #1E3A2A); /* Divider color */
}

.page-g__faq-answer p {
    margin: 0;
    color: #333333;
}

/* Conclusion Section */
.page-g__conclusion-section {
    background-color: var(--page-g-background, #08160F); /* Dark background */
    color: var(--page-g-text-main, #F2FFF6);
    padding: 60px 0;
    text-align: center;
}
.page-g__conclusion-section .page-g__section-title {
    color: var(--page-g-gold, #F2C14E);
}
.page-g__conclusion-section p {
    color: var(--page-g-text-secondary, #A7D9B8);
    margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 1024px) {
    .page-g__section-title {
        font-size: 2em;
    }
    .page-g__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }
}

@media (max-width: 768px) {
    .page-g {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-g__container {
        padding: 0 15px;
    }

    .page-g__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Ensure small top padding on mobile */
    }

    .page-g__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-g__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

    .page-g__description {
        font-size: 1em;
    }

    .page-g__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-g__btn-primary,
    .page-g__btn-secondary,
    .page-g a[class*="button"],
    .page-g a[class*="btn"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

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

    .page-g__features-grid,
    .page-g__types-grid,
    .page-g__promo-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-g__feature-image,
    .page-g__type-image,
    .page-g__promo-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Allow height to adjust */
        min-height: 200px !important; /* Ensure minimum height for content images */
        object-fit: cover;
    }

    .page-g__guide-list li {
        padding: 15px;
    }

    .page-g__list-title {
        font-size: 1.2em;
    }

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

    .page-g__faq-answer {
        padding: 15px 20px;
    }

    /* All content sections and containers must adapt to mobile width */
    .page-g__introduction-section,
    .page-g__why-choose-section,
    .page-g__game-types-section,
    .page-g__guide-section,
    .page-g__tips-section,
    .page-g__promotions-section,
    .page-g__security-section,
    .page-g__support-section,
    .page-g__faq-section,
    .page-g__conclusion-section,
    .page-g__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ensure all images meet minimum size requirements */
.page-g img {
    min-width: 200px;
    min-height: 200px;
}