/* style/ban-ca.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    /* Prioritizing contrast: button text will be white, not yellow */
    --text-on-dark-bg: #FFFFFF;
    --text-on-light-bg: #333333;
    --text-contrast-safe: #333333;
}

.page-ban-ca {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-on-light-bg);
    background-color: var(--secondary-color); /* Default light background for body */
}

.page-ban-ca__container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-ban-ca__text-center {
    text-align: center;
}

/* --- Hero Section --- */
.page-ban-ca__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Small top padding */
    background-color: var(--primary-color);
    color: var(--text-on-dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-ban-ca__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
}

.page-ban-ca__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-ban-ca__hero-content {
    position: relative;
    z-index: 10;
    padding: 40px 20px;
    text-align: center;
    max-width: 900px;
    box-sizing: border-box;
}

.page-ban-ca__main-title {
    font-size: clamp(2em, 4vw, 3.5em);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-on-dark-bg);
}

.page-ban-ca__description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-ban-ca__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-ban-ca__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-ban-ca__btn-primary {
    background-color: var(--button-register-bg);
    color: var(--text-on-dark-bg); /* Ensuring contrast */
    border: 2px solid var(--button-register-bg);
}

.page-ban-ca__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-ban-ca__btn-secondary {
    background-color: transparent;
    color: var(--text-on-dark-bg);
    border: 2px solid var(--text-on-dark-bg);
}

.page-ban-ca__btn-secondary:hover {
    background-color: var(--text-on-dark-bg);
    color: var(--primary-color);
}

/* --- General Section Styles --- */
.page-ban-ca__section {
    padding: 60px 0;
}

.page-ban-ca__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-on-light-bg);
}

.page-ban-ca__dark-section {
    background-color: var(--primary-color);
    color: var(--text-on-dark-bg);
}

.page-ban-ca__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

/* Adjust title color based on section background */
.page-ban-ca__light-bg .page-ban-ca__section-title {
    color: var(--primary-color);
}

.page-ban-ca__dark-section .page-ban-ca__section-title {
    color: var(--text-on-dark-bg);
}

.page-ban-ca__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-ban-ca__text-block:last-child {
    margin-bottom: 0;
}

/* --- Features Section --- */
.page-ban-ca__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-ban-ca__feature-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.page-ban-ca__feature-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

.page-ban-ca__feature-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-on-dark-bg);
}

.page-ban-ca__feature-description {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
    flex-grow: 1;
}

/* --- Popular Games Section --- */
.page-ban-ca__game-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-ban-ca__game-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.page-ban-ca__game-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
    display: block;
}

.page-ban-ca__game-name {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-ban-ca__game-description {
    font-size: 0.95em;
    color: var(--text-contrast-safe);
    margin-bottom: 20px;
    padding: 0 15px;
    flex-grow: 1;
}

.page-ban-ca__btn-play {
    background-color: var(--primary-color);
    color: var(--text-on-dark-bg);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: auto; /* Push button to bottom */
    align-self: center;
}

.page-ban-ca__btn-play:hover {
    background-color: #005a2d;
}

/* --- Guide Section --- */
.page-ban-ca__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-ban-ca__step-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.page-ban-ca__step-title {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-ban-ca__step-description {
    font-size: 1em;
    color: var(--text-contrast-safe);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-ban-ca__btn-action {
    background-color: var(--primary-color);
    color: var(--text-on-dark-bg);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: auto;
    align-self: center;
}

.page-ban-ca__btn-action:hover {
    background-color: #005a2d;
}

/* --- Tips Section --- */
.page-ban-ca__tips-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-ban-ca__tips-list li {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 5px solid var(--secondary-color);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.page-ban-ca__tips-list li:last-child {
    margin-bottom: 0;
}

.page-ban-ca__tip-title {
    font-size: 1.3em;
    color: var(--text-on-dark-bg);
    margin-bottom: 5px;
}

.page-ban-ca__tips-list p {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Promo Section --- */
.page-ban-ca__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-ban-ca__promo-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.page-ban-ca__promo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
    display: block;
}

.page-ban-ca__promo-title {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-ban-ca__promo-description {
    font-size: 0.95em;
    color: var(--text-contrast-safe);
    margin-bottom: 20px;
    padding: 0 15px;
    flex-grow: 1;
}

.page-ban-ca__btn-view-promo {
    background-color: var(--primary-color);
    color: var(--text-on-dark-bg);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: auto;
    align-self: center;
}

.page-ban-ca__btn-view-promo:hover {
    background-color: #005a2d;
}

.page-ban-ca__promo-cta {
    text-align: center;
    margin-top: 40px;
}

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

.page-ban-ca__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-ban-ca__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none;
    position: relative;
    user-select: none;
}

.page-ban-ca__faq-question::-webkit-details-marker {
    display: none;
}

.page-ban-ca__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-ban-ca__faq-item[open] .page-ban-ca__faq-toggle {
    transform: rotate(45deg);
}

.page-ban-ca__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--text-contrast-safe);
    line-height: 1.6;
}

/* --- Conclusion Section --- */
.page-ban-ca__conclusion-section {
    padding: 80px 0;
}

/* --- Responsive Styles (Desktop/Tablet - max-width: 1024px) --- */
@media (max-width: 1024px) {
    .page-ban-ca__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

    .page-ban-ca__description {
        font-size: 1.1em;
    }

    .page-ban-ca__section-title {
        font-size: 2em;
    }

    .page-ban-ca__feature-card,
    .page-ban-ca__game-card,
    .page-ban-ca__step-item,
    .page-ban-ca__promo-card {
        padding: 20px;
    }

    .page-ban-ca__game-name,
    .page-ban-ca__promo-title {
        font-size: 1.4em;
    }

    .page-ban-ca__btn {
        padding: 10px 20px;
        font-size: 1em;
    }
}

/* --- Responsive Styles (Mobile - max-width: 768px) --- */
@media (max-width: 768px) {
    /* 1. Top Section Title + Dual CTA */
    .page-ban-ca__hero-section {
        padding-top: 10px !important; /* Small top padding */
    }
    .page-ban-ca__hero-content {
        padding: 30px 15px;
    }
    .page-ban-ca__main-title {
        font-size: 2em !important;
        margin-bottom: 15px;
    }
    .page-ban-ca__description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-ban-ca__cta-buttons {
        flex-direction: column !important;
        gap: 10px;
        padding: 0 15px;
    }
    .page-ban-ca__btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px !important;
        font-size: 1em !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 2. Single Column Long Text Container */
    .page-ban-ca__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-ban-ca__section {
        padding: 40px 0;
    }

    .page-ban-ca__section-title {
        font-size: 1.8em !important;
        margin-bottom: 30px;
    }

    .page-ban-ca__text-block {
        font-size: 0.95em;
    }

    /* 3. General Images and Figure */
    .page-ban-ca img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-ban-ca__hero-image-wrapper, .page-ban-ca__feature-image, .page-ban-ca__game-thumbnail, .page-ban-ca__promo-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }
    .page-ban-ca__game-thumbnail, .page-ban-ca__promo-image {
        height: 180px; /* Adjust height for mobile */
    }

    /* 4. Buttons and Button Containers */
    .page-ban-ca__btn-play, .page-ban-ca__btn-action, .page-ban-ca__btn-view-promo {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 15px !important;
        font-size: 0.95em !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-ban-ca__game-list, .page-ban-ca__guide-steps, .page-ban-ca__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 5. Tutorial and FAQ Block */
    .page-ban-ca__step-item,
    .page-ban-ca__promo-card,
    .page-ban-ca__feature-card,
    .page-ban-ca__game-card {
        padding: 20px 15px;
    }
    .page-ban-ca__step-title {
        font-size: 1.2em;
    }
    .page-ban-ca__faq-question {
        font-size: 1em !important;
        padding: 15px 20px;
    }
    .page-ban-ca__faq-answer {
        font-size: 0.95em;
        padding: 0 20px 15px;
    }
    .page-ban-ca__tips-list li {
        padding: 15px;
    }
    .page-ban-ca__tip-title {
        font-size: 1.1em;
    }

    .page-ban-ca__conclusion-section {
        padding: 50px 0;
    }
}