/* style/tai-xiu.css */

/* Variables from shared.css or global context (assuming dark theme) */
:root {
    --primary-color: #F2C14E; /* Main */
    --secondary-color: #FFD36B; /* Accent */
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --card-bg: #111111;
    --background-color: #0A0A0A;
    --text-main-color: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --header-offset: 122px; /* Default, will be overridden by shared.css body padding-top */
}

.page-tai-xiu {
    background-color: var(--background-color);
    color: var(--text-main-color);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.page-tai-xiu__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-tai-xiu__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.page-tai-xiu__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.page-tai-xiu__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-main-color);
}

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* As per fixed header rule, assuming body handles main padding */
    padding-bottom: 60px;
    background-color: var(--background-color);
}

.page-tai-xiu__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-tai-xiu__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: var(--text-main-color);
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Using clamp for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-tai-xiu__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-main-color);
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: #ffffff; /* White text for contrast on gradient */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

.page-tai-xiu__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.page-tai-xiu__hero-image {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-tai-xiu__main-game-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: block; /* Ensure it behaves as a block element */
}

/* Introduction Section */
.page-tai-xiu__introduction-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--background-color);
}

/* Features Section */
.page-tai-xiu__features-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--card-bg); /* Slightly different background for visual separation */
}

.page-tai-xiu__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

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

.page-tai-xiu__feature-card:hover {
    transform: translateY(-5px);
}

.page-tai-xiu__feature-icon {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    display: block; /* Ensure it behaves as a block element */
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
}

.page-tai-xiu__feature-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-tai-xiu__feature-description {
    color: var(--text-main-color);
}

.page-tai-xiu__cta-center {
    text-align: center;
    margin-top: 40px;
}

/* Guide Section */
.page-tai-xiu__guide-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--background-color);
}

.page-tai-xiu__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-tai-xiu__guide-step {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.page-tai-xiu__step-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-tai-xiu__step-description {
    color: var(--text-main-color);
    margin-bottom: 20px;
}

.page-tai-xiu__guide-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    margin: 40px auto 0;
    display: block; /* Ensure it behaves as a block element */
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
}

/* FAQ Section */
.page-tai-xiu__faq-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--card-bg);
}

.page-tai-xiu__faq-list {
    max-width: 800px;
    margin: 0 auto 40px;
}

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

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: var(--primary-color);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    list-style: none; /* For details/summary */
}

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

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

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

.page-tai-xiu__faq-answer {
    padding: 15px 25px;
    font-size: 1em;
    color: var(--text-main-color);
    border-top: 1px solid var(--border-color);
}

.page-tai-xiu__faq-answer p {
    margin: 0;
}

/* Universal image styles to enforce min-size and responsiveness */
.page-tai-xiu img {
    min-width: 200px;
    min-height: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-container {
        flex-direction: column;
        text-align: center;
    }
    .page-tai-xiu__hero-content,
    .page-tai-xiu__hero-image {
        flex: 1 1 100%;
        min-width: unset;
    }
    .page-tai-xiu__cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* HERO Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Fixed header rule */
        padding-bottom: 40px;
    }
    .page-tai-xiu__hero-container {
        padding: 20px 15px;
        gap: 20px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }
    .page-tai-xiu__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to container */
    }
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    /* General Sections */
    .page-tai-xiu__container {
        padding: 20px 15px;
    }
    .page-tai-xiu__section-title {
        font-size: 2em;
        margin-bottom: 20px;
    }
    .page-tai-xiu__text-block {
        font-size: 1em;
    }

    /* Features Section */
    .page-tai-xiu__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-tai-xiu__feature-card {
        padding: 20px;
    }
    .page-tai-xiu__feature-icon {
        min-width: 200px !important; /* Ensure min size */
        min-height: 200px !important; /* Ensure min size */
        width: 100% !important;
        height: auto !important;
    }

    /* Guide Section */
    .page-tai-xiu__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-tai-xiu__guide-step {
        padding: 20px;
    }
    .page-tai-xiu__guide-image {
        min-width: 200px !important; /* Ensure min size */
        min-height: 200px !important; /* Ensure min size */
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-tai-xiu__faq-list {
        padding: 0 15px;
    }
    .page-tai-xiu__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    .page-tai-xiu__faq-answer {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    /* Universal image styles for mobile */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    /* All containers that might hold images or buttons */
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container,
    .page-tai-xiu__hero-container,
    .page-tai-xiu__features-grid,
    .page-tai-xiu__guide-steps,
    .page-tai-xiu__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by specific sections/elements */
    }
}