/* style/tai-xiu.css */

/* Define custom color variables */
:root {
    --main-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

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

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

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding as per requirement */
    padding-bottom: 40px;
    display: flex;
    flex-direction: column; /* Ensure image above text */
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-tai-xiu__hero-image-wrapper {
    width: 100%;
    max-width: 1920px; /* Match request size for max-width */
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

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

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

.page-tai-xiu__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    color: var(--text-main); /* #F2FFF6 */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-tai-xiu__description {
    font-size: 1.1rem;
    color: var(--text-secondary); /* #A7D9B8 */
    margin-bottom: 30px;
}

.page-tai-xiu__hero-cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

/* General button styles */
.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main); /* #F2FFF6 */
    border: none;
}

.page-tai-xiu__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%); /* Inverted gradient on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(42, 209, 111, 0.4);
}

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--text-main); /* #F2FFF6 */
    border: 2px solid var(--main-color); /* #11A84E */
}

.page-tai-xiu__btn-secondary:hover {
    background-color: var(--main-color); /* #11A84E */
    color: var(--text-main); /* #F2FFF6 */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(17, 168, 78, 0.3);
}

.page-tai-xiu__btn-large {
    min-width: 220px;
    padding: 16px 35px;
    font-size: 1.2rem;
}

/* Section common styles */
.page-tai-xiu__introduction-section,
.page-tai-xiu__how-to-play-section,
.page-tai-xiu__tips-strategies-section,
.page-tai-xiu__why-choose-section,
.page-tai-xiu__faq-section,
.page-tai-xiu__call-to-action-section {
    padding: 60px 0;
    border-top: 1px solid var(--divider); /* #1E3A2A */
}

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

.page-tai-xiu__sub-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--text-main); /* #F2FFF6 */
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-tai-xiu__text-block {
    font-size: 1rem;
    color: var(--text-secondary); /* #A7D9B8 */
    margin-bottom: 20px;
    text-align: justify;
}

.page-tai-xiu__image-figure {
    margin: 30px auto;
    max-width: 800px; /* Recommended size for content images */
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}

.page-tai-xiu__image-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.page-tai-xiu__image-caption {
    font-size: 0.9rem;
    color: var(--text-secondary); /* #A7D9B8 */
    margin-top: 10px;
}

.page-tai-xiu__ordered-list,
.page-tai-xiu__unordered-list {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 20px;
    color: var(--text-secondary); /* #A7D9B8 */
}

.page-tai-xiu__ordered-list li,
.page-tai-xiu__unordered-list li {
    margin-bottom: 10px;
    font-size: 1rem;
}

.page-tai-xiu__list-strong {
    color: var(--text-main); /* #F2FFF6 */
}

.page-tai-xiu__nested-list {
    list-style-type: circle;
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.page-tai-xiu__list-item-label {
    color: var(--text-main); /* #F2FFF6 */
    font-weight: 500;
}

.page-tai-xiu__list-item-note {
    font-style: italic;
    color: var(--text-secondary); /* #A7D9B8 */
    font-size: 0.95rem;
}

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

/* Why Choose Section - Feature Grid */
.page-tai-xiu__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-tai-xiu__feature-card {
    background-color: var(--card-bg); /* #11271B */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border); /* #2E7A4E */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__card-title {
    font-size: 1.5rem;
    color: var(--gold); /* #F2C14E */
    margin-bottom: 15px;
    font-weight: 600;
}

.page-tai-xiu__card-text {
    font-size: 1rem;
    color: var(--text-secondary); /* #A7D9B8 */
    line-height: 1.7;
}

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

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

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main); /* #F2FFF6 */
    position: relative;
    list-style: none; /* For details/summary */
}

/* Hide default details marker */
.page-tai-xiu__faq-item summary::-webkit-details-marker {
    display: none;
}
.page-tai-xiu__faq-item summary::marker {
    display: none;
}

.page-tai-xiu__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--gold); /* #F2C14E */
    transition: transform 0.3s ease;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg); /* Change to X or rotate for open state */
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    color: var(--text-secondary); /* #A7D9B8 */
    line-height: 1.7;
    transition: max-height 0.3s ease-out; /* For JS accordion if not details */
    overflow: hidden;
}

.page-tai-xiu__faq-answer p {
    margin-bottom: 0; /* Remove default paragraph margin */
}

/* Call to Action Section - Large Buttons */
.page-tai-xiu__call-to-action-section {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(90deg, var(--deep-green) 0%, var(--main-color) 100%); /* #0A4B2C to #11A84E */
}

.page-tai-xiu__call-to-action-section .page-tai-xiu__section-title {
    color: var(--text-main); /* #F2FFF6 */
}

.page-tai-xiu__call-to-action-section .page-tai-xiu__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-main); /* #F2FFF6 */
    font-size: 1.1rem;
}

.page-tai-xiu__cta-buttons-large {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Media Queries */
@media (max-width: 1024px) {
    .page-tai-xiu__container {
        padding: 0 15px;
    }

    .page-tai-xiu__hero-section {
        padding-bottom: 30px;
    }

    .page-tai-xiu__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .page-tai-xiu__description {
        font-size: 1rem;
    }

    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        min-width: unset;
        width: auto;
        padding: 12px 25px;
        font-size: 1rem;
    }

    .page-tai-xiu__btn-large {
        min-width: 180px;
        padding: 14px 30px;
        font-size: 1.1rem;
    }

    .page-tai-xiu__introduction-section,
    .page-tai-xiu__how-to-play-section,
    .page-tai-xiu__tips-strategies-section,
    .page-tai-xiu__why-choose-section,
    .page-tai-xiu__faq-section,
    .page-tai-xiu__call-to-action-section {
        padding: 40px 0;
    }

    .page-tai-xiu__section-title {
        font-size: clamp(1.6rem, 4vw, 2.5rem);
        margin-bottom: 30px;
    }

    .page-tai-xiu__sub-title {
        font-size: clamp(1.2rem, 2.8vw, 1.8rem);
    }

    .page-tai-xiu__feature-grid {
        gap: 20px;
    }

    .page-tai-xiu__card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    /* 1. Top Section / Hero */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Enforce small top padding */
        padding-bottom: 25px;
    }

    .page-tai-xiu__hero-content {
        padding: 0 15px;
    }

    .page-tai-xiu__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-tai-xiu__description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .page-tai-xiu__hero-cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%;
        max-width: 300px; /* Limit button group width */
        margin: 0 auto;
    }

    /* 4. Buttons and button containers */
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary,
    .page-tai-xiu a[class*="button"],
    .page-tai-xiu a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 1rem; /* Ensure readability on small screens */
    }

    .page-tai-xiu__cta-bottom {
        width: 100%;
        max-width: 300px; /* Limit button group width */
        margin: 40px auto 0 auto;
    }

    .page-tai-xiu__cta-buttons-large {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Limit button group width */
        margin: 40px auto 0 auto;
    }

    /* 2. Single-column long text containers */
    .page-tai-xiu__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__introduction-section,
    .page-tai-xiu__how-to-play-section,
    .page-tai-xiu__tips-strategies-section,
    .page-tai-xiu__why-choose-section,
    .page-tai-xiu__faq-section,
    .page-tai-xiu__call-to-action-section {
        padding: 30px 0;
    }

    .page-tai-xiu__section-title {
        font-size: 1.7rem;
        margin-bottom: 25px;
    }

    .page-tai-xiu__sub-title {
        font-size: 1.3rem;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .page-tai-xiu__text-block {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .page-tai-xiu__ordered-list,
    .page-tai-xiu__unordered-list {
        padding-left: 20px;
        font-size: 0.95rem;
    }

    .page-tai-xiu__ordered-list li,
    .page-tai-xiu__unordered-list li {
        margin-bottom: 8px;
    }

    /* 3. Universal images and figures */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-tai-xiu__image-figure {
        margin: 20px auto;
        max-width: 100%;
    }

    .page-tai-xiu__image-caption {
        font-size: 0.85rem;
    }

    .page-tai-xiu__feature-grid {
        grid-template-columns: 1fr; /* Single column for features */
        gap: 20px;
    }

    .page-tai-xiu__feature-card {
        padding: 20px;
    }

    .page-tai-xiu__card-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .page-tai-xiu__card-text {
        font-size: 0.9rem;
    }

    /* 5. FAQ Block */
    .page-tai-xiu__faq-item {
        margin-bottom: 10px;
    }

    .page-tai-xiu__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .page-tai-xiu__faq-toggle {
        font-size: 1.5rem;
    }

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

    .page-tai-xiu__call-to-action-section {
        padding: 50px 0;
    }
}