/* style/ban-ca.css */

:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy-color: #08162B; /* Body background from shared.css */
}

.page-ban-ca {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--deep-navy-color); /* Inherit from body or explicitly set if not inherited */
    padding-top: 10px; /* Small top padding for the first section, assuming body handles --header-offset */
}

.page-ban-ca__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.page-ban-ca__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    text-align: center;
    padding-bottom: 40px;
    overflow: hidden;
}

.page-ban-ca__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for the main image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.page-ban-ca__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover for desktop, will change to contain for mobile */
    border-radius: 10px;
}

.page-ban-ca__hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 20px;
}

.page-ban-ca__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(79, 168, 255, 0.7);
}

.page-ban-ca__hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

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

.page-ban-ca__btn-primary,
.page-ban-ca__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.page-ban-ca__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main);
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(43, 115, 246, 0.4);
}

.page-ban-ca__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(43, 115, 246, 0.6);
}

.page-ban-ca__btn-secondary {
    background: transparent;
    color: var(--glow-color);
    border: 2px solid var(--glow-color);
    box-shadow: 0 5px 15px rgba(79, 168, 255, 0.2);
}

.page-ban-ca__btn-secondary:hover {
    background: rgba(79, 168, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(79, 168, 255, 0.4);
}

/* General Sections */
.page-ban-ca__introduction-section,
.page-ban-ca__why-choose-section,
.page-ban-ca__game-list-section,
.page-ban-ca__guide-section,
.page-ban-ca__strategy-section,
.page-ban-ca__faq-section {
    padding: 60px 0;
    background-color: var(--deep-navy-color);
}

.page-ban-ca__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.5);
}

.page-ban-ca__text-block {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: justify;
}

.page-ban-ca__text-block a {
    color: var(--glow-color);
    text-decoration: none;
}

.page-ban-ca__text-block a:hover {
    text-decoration: underline;
}

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

.page-ban-ca__feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-ban-ca__feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.page-ban-ca__feature-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px var(--glow-color));
}

.page-ban-ca__feature-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.page-ban-ca__feature-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Game List Section */
.page-ban-ca__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.page-ban-ca__game-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-ban-ca__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

.page-ban-ca__game-title {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-ban-ca__game-title a {
    color: var(--text-main);
    text-decoration: none;
}

.page-ban-ca__game-title a:hover {
    color: var(--glow-color);
}

.page-ban-ca__game-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 0 15px;
}

.page-ban-ca__btn-play {
    display: inline-block;
    background: var(--button-gradient);
    color: var(--text-main);
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 90%;
}

.page-ban-ca__btn-play:hover {
    background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
}

/* Guide Section */
.page-ban-ca__guide-list {
    list-style: none;
    padding: 0;
    counter-reset: guide-step;
}

.page-ban-ca__guide-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 70px;
}

.page-ban-ca__guide-item::before {
    counter-increment: guide-step;
    content: "0" counter(guide-step);
    position: absolute;
    left: 20px;
    top: 25px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-color);
    line-height: 1;
}

.page-ban-ca__guide-step-title {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-ban-ca__guide-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Strategy Section */
.page-ban-ca__strategy-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.page-ban-ca__strategy-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.page-ban-ca__strategy-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px var(--glow-color));
}

.page-ban-ca__strategy-subtitle {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.page-ban-ca__strategy-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.page-ban-ca__cta-section {
    padding: 80px 0;
    text-align: center;
    background: var(--primary-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.page-ban-ca__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.page-ban-ca__cta-section .page-ban-ca__section-title {
    color: var(--gold-color);
    margin-bottom: 0;
}

.page-ban-ca__cta-section .page-ban-ca__text-block {
    max-width: 800px;
    margin: 0;
    font-size: 1.2rem;
}

.page-ban-ca__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
    overflow: hidden;
}

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

.page-ban-ca__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-ban-ca__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    position: relative;
}

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

.page-ban-ca__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--glow-color);
}

.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: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.page-ban-ca__faq-answer p {
    margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-ban-ca__container {
        padding: 0 15px;
    }

    .page-ban-ca__main-title {
        font-size: clamp(2rem, 3.5vw, 3rem);
    }

    .page-ban-ca__hero-description {
        font-size: 1.1rem;
    }

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

    .page-ban-ca__game-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-ban-ca {
        font-size: 16px;
        line-height: 1.6;
        padding-top: 10px !important; /* Ensure small top padding */
    }

    .page-ban-ca__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero Section */
    .page-ban-ca__hero-section {
        min-height: auto;
        padding-bottom: 30px;
    }

    .page-ban-ca__hero-image-wrapper {
        max-height: 400px;
    }

    .page-ban-ca__hero-image {
        object-fit: contain !important; /* Contain for mobile, prevent cropping */
        max-height: 100% !important;
        height: auto !important;
        width: 100% !important;
    }

    .page-ban-ca__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-ban-ca__hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .page-ban-ca__hero-buttons,
    .page-ban-ca__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 0;
        padding-right: 0;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-ban-ca__btn-primary,
    .page-ban-ca__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General Sections */
    .page-ban-ca__introduction-section,
    .page-ban-ca__why-choose-section,
    .page-ban-ca__game-list-section,
    .page-ban-ca__guide-section,
    .page-ban-ca__strategy-section,
    .page-ban-ca__faq-section {
        padding: 40px 0;
    }

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

    .page-ban-ca__text-block {
        font-size: 1rem;
    }

    /* Why Choose Section */
    .page-ban-ca__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-ban-ca__feature-card {
        padding: 25px;
    }

    .page-ban-ca__feature-icon {
        width: 80px;
        height: 80px;
    }

    .page-ban-ca__feature-title {
        font-size: 1.3rem;
    }

    /* Game List Section */
    .page-ban-ca__game-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns for mobile */
        gap: 15px;
    }

    .page-ban-ca__game-thumbnail {
        height: 150px; /* Adjust height for 2-column layout */
        object-fit: cover;
    }

    .page-ban-ca__game-card {
        padding-bottom: 15px;
    }

    .page-ban-ca__game-title {
        font-size: 1.1rem;
    }

    .page-ban-ca__game-description {
        font-size: 0.85rem;
    }

    .page-ban-ca__btn-play {
        padding: 8px 15px;
        font-size: 0.9rem;
        max-width: 90% !important;
        width: 90% !important;
    }

    /* Guide Section */
    .page-ban-ca__guide-item {
        padding: 20px;
        padding-left: 60px;
    }

    .page-ban-ca__guide-item::before {
        font-size: 1.5rem;
        left: 15px;
        top: 20px;
    }

    .page-ban-ca__guide-step-title {
        font-size: 1.2rem;
    }

    /* Strategy Section */
    .page-ban-ca__strategy-list {
        grid-template-columns: 1fr;
    }

    .page-ban-ca__strategy-item {
        padding: 15px;
    }

    .page-ban-ca__strategy-icon {
        width: 50px;
        height: 50px;
    }

    .page-ban-ca__strategy-subtitle {
        font-size: 1.1rem;
    }

    .page-ban-ca__strategy-content p {
        font-size: 0.9rem;
    }

    /* CTA Section */
    .page-ban-ca__cta-section {
        padding: 50px 0;
    }

    .page-ban-ca__cta-section .page-ban-ca__text-block {
        font-size: 1rem;
    }

    /* FAQ Section */
    .page-ban-ca__faq-question {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    .page-ban-ca__faq-toggle {
        font-size: 1.5rem;
    }

    .page-ban-ca__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95rem;
    }

    /* Ensure all images are responsive */
    .page-ban-ca img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* All containing elements for images */
    .page-ban-ca__hero-section,
    .page-ban-ca__introduction-section,
    .page-ban-ca__why-choose-section,
    .page-ban-ca__game-list-section,
    .page-ban-ca__guide-section,
    .page-ban-ca__strategy-section,
    .page-ban-ca__cta-section,
    .page-ban-ca__faq-section,
    .page-ban-ca__feature-card,
    .page-ban-ca__game-card,
    .page-ban-ca__guide-item,
    .page-ban-ca__strategy-item,
    .page-ban-ca__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    /* Specific override for game thumbnails to maintain aspect ratio */
    .page-ban-ca__game-thumbnail {
        aspect-ratio: 1/1;
        object-fit: cover;
    }
}