/* style/tai-xiu.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: #08162B; /* Assuming shared.css defines body background with this */
}

.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Default text color for dark body background */
    background-color: var(--deep-navy);
}

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

/* Hero Section */
.page-tai-xiu__hero-section {
    display: flex;
    flex-direction: column; /* Enforce image-above-text */
    align-items: center;
    text-align: center;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, assuming body has header offset */
}

.page-tai-xiu__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.page-tai-xiu__hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative;
    padding: 0 20px;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.2em, 4vw, 3.2em);
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-tai-xiu__hero-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal;
    word-wrap: break-word;
}

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

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

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--gold-color);
    color: var(--deep-navy);
    transform: translateY(-3px);
}

/* General Section Styles */
.page-tai-xiu__introduction-section,
.page-tai-xiu__game-variants-section,
.page-tai-xiu__promotions-section,
.page-tai-xiu__faq-section {
    padding: 60px 0;
    background-color: var(--deep-navy);
}

.page-tai-xiu__rules-section,
.page-tai-xiu__strategy-section,
.page-tai-xiu__guide-section,
.page-tai-xiu__conclusion-section {
    padding: 60px 0;
    background-color: var(--card-bg);
}

.page-tai-xiu__section-title {
    font-size: clamp(1.8em, 3vw, 2.8em);
    font-weight: 700;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.page-tai-xiu__text-block {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: justify;
    padding: 0 15px;
}

.page-tai-xiu__image-wrapper {
    text-align: center;
    margin: 40px 0;
    padding: 0 15px;
}

.page-tai-xiu__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    margin: 0 auto;
}

.page-tai-xiu__list {
    list-style: none;
    padding: 0;
    margin: 0 15px 20px;
}

.page-tai-xiu__list-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 5px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-main);
}

.page-tai-xiu__list-title {
    color: var(--gold-color);
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* Game Grid */
.page-tai-xiu__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 15px;
}

.page-tai-xiu__game-tile {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%; /* Ensure consistent height */
}

.page-tai-xiu__game-tile img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

.page-tai-xiu__game-title {
    font-size: 1.3em;
    color: var(--gold-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.page-tai-xiu__game-description {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-tai-xiu__btn-play {
    background: var(--button-gradient);
    color: var(--text-main);
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Promotions Section */
.page-tai-xiu__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 15px;
}

.page-tai-xiu__promo-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-tai-xiu__promo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}

.page-tai-xiu__promo-title {
    font-size: 1.4em;
    color: var(--gold-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.page-tai-xiu__promo-description {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.page-tai-xiu__promo-note {
    margin-top: 40px;
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
}

/* Guide Section (Numbered List) */
.page-tai-xiu__step-list {
    list-style: none;
    padding: 0;
    margin: 0 15px 20px;
}

.page-tai-xiu__step-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 5px solid var(--secondary-color);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-main);
    position: relative;
    counter-increment: step-counter;
}

.page-tai-xiu__step-item::before {
    content: counter(step-counter);
    position: absolute;
    left: -25px;
    top: 15px;
    background-color: var(--secondary-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2em;
    border: 3px solid var(--card-bg);
}

/* FAQ Section */
.page-tai-xiu__faq-list {
    padding: 0 15px;
}

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

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    background-color: var(--primary-color);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

.page-tai-xiu__faq-question::-webkit-details-marker {
    display: none;
}

.page-tai-xiu__faq-question:hover {
    background-color: #1a4e9b;
}

.page-tai-xiu__faq-qtext {
    flex-grow: 1;
    color: var(--gold-color);
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    margin-left: 20px;
    color: var(--gold-color);
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question .page-tai-xiu__faq-toggle {
    content: '−';
}

.page-tai-xiu__faq-answer {
    padding: 15px 25px 20px;
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: rgba(16, 35, 63, 0.8);
    border-top: 1px solid var(--border-color);
}

.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Conclusion Section */
.page-tai-xiu__conclusion-section {
    text-align: center;
    padding-bottom: 80px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-content {
        padding: 0 40px;
    }
    .page-tai-xiu__section-title {
        font-size: 2.2em;
    }
    .page-tai-xiu__game-grid,
    .page-tai-xiu__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* General mobile reset */
    .page-tai-xiu__container {
        padding: 0 15px;
    }

    /* Hero Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }
    .page-tai-xiu__hero-image-wrapper {
        margin-bottom: 30px;
    }
    .page-tai-xiu__hero-image {
        object-fit: contain !important; /* Mobile: contain, not cover */
        aspect-ratio: unset !important;
        max-height: none !important;
    }
    .page-tai-xiu__hero-content {
        padding: 0 15px;
    }
    .page-tai-xiu__main-title {
        font-size: 2em; /* Smaller H1 for mobile */
        margin-bottom: 15px;
    }
    .page-tai-xiu__hero-description {
        font-size: 0.95em;
        margin-bottom: 25px;
    }
}