/* style/tai-xiu.css */

/* Core Styles for .page-tai-xiu */
.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color); /* Use light text on dark body background */
    background-color: var(--deep-navy-color); /* Body background from shared.css */
}

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

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

/* Section Titles */
.page-tai-xiu__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--gold-color); /* Gold color for titles */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Highlight Text */
.page-tai-xiu__highlight-text {
    color: var(--gold-color);
    font-weight: bold;
}

/* Buttons */
.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: #ffffff; /* White text for primary button */
    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);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-tai-xiu__btn-secondary:hover {
    background: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 80px;
    background-color: var(--deep-navy-color); /* Ensure dark background */
}

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

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

.page-tai-xiu__hero-title {
    font-size: clamp(2.2em, 4vw, 3.2em); /* Use clamp for H1 */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gold-color); /* Gold color for H1 */
}

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

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

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

.page-tai-xiu__hero-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: block; /* Ensure no extra space below image */
}

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

.page-tai-xiu__content-block {
    font-size: 1.05em;
    color: var(--text-secondary-color);
}

.page-tai-xiu__content-block p {
    margin-bottom: 15px;
}

/* Rules and Strategy Sections (flex row layout) */
.page-tai-xiu__flex-row {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-tai-xiu__flex-row--reverse {
    flex-direction: row-reverse;
}

.page-tai-xiu__image-block {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: center;
}

.page-tai-xiu__text-block {
    flex: 1 1 45%;
    min-width: 300px;
    color: var(--text-secondary-color);
}

.page-tai-xiu__content-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block;
}

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

.page-tai-xiu__list-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main-color);
}

.page-tai-xiu__list-item::before {
    content: "✓";
    color: var(--gold-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* Advantages Section */
.page-tai-xiu__advantages-section {
    padding: 60px 0;
    background-color: var(--deep-navy-color);
}

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

.page-tai-xiu__card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-secondary-color); /* Text on card */
}

.page-tai-xiu__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
    object-fit: cover;
}

.page-tai-xiu__card-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main-color); /* Main text color for card titles */
}

.page-tai-xiu__card-description {
    font-size: 0.95em;
    color: var(--text-secondary-color);
}

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

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

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

.page-tai-xiu__guide-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--text-secondary-color);
}

.page-tai-xiu__guide-icon {
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: var(--button-gradient);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0 auto 20px;
}

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

.page-tai-xiu__guide-description {
    font-size: 0.95em;
    color: var(--text-secondary-color);
}

.page-tai-xiu__guide-description .page-tai-xiu__link {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: bold;
}

.page-tai-xiu__guide-description .page-tai-xiu__link:hover {
    text-decoration: underline;
}

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

/* FAQ Section */
.page-tai-xiu__faq-section {
    padding: 60px 0;
    background-color: var(--deep-navy-color);
}

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

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

.page-tai-xiu__faq-item summary {
    list-style: none; /* Hide default marker */
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-main-color);
    position: relative;
    user-select: none;
}

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

.page-tai-xiu__faq-question {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 18px 25px;
    font-size: 1em;
    color: var(--text-secondary-color);
}

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

/* --- Responsive Design --- */

/* Mobile: max-width 768px */
@media (max-width: 768px) {
    .page-tai-xiu {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-tai-xiu__container {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    /* HERO Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }

    .page-tai-xiu__hero-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    .page-tai-xiu__hero-content,
    .page-tai-xiu__hero-image {
        flex: 1 1 100%;
        min-width: unset;
    }

    .page-tai-xiu__hero-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        text-align: center;
    }

    .page-tai-xiu__hero-description {
        font-size: 1em;
        text-align: center;
    }

    .page-tai-xiu__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .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-left: 15px;
        padding-right: 15px;
    }

    /* Rules and Strategy Sections (flex row layout) */
    .page-tai-xiu__flex-row {
        flex-direction: column;
        gap: 30px;
    }

    .page-tai-xiu__flex-row--reverse {
        flex-direction: column;
    }

    .page-tai-xiu__image-block,
    .page-tai-xiu__text-block {
        flex: 1 1 100%;
        min-width: unset;
    }

    .page-tai-xiu__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-tai-xiu__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Advantages Section */
    .page-tai-xiu__grid-3-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Guide Section */
    .page-tai-xiu__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-tai-xiu__guide-item {
        padding: 20px;
    }

    .page-tai-xiu__guide-icon {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.5em;
    }

    .page-tai-xiu__guide-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-tai-xiu__faq-list {
        max-width: 100%;
        margin: 0 auto 30px;
    }

    .page-tai-xiu__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }

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

    /* General image and container rules for mobile */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container,
    .page-tai-xiu__content-block,
    .page-tai-xiu__text-block,
    .page-tai-xiu__image-block,
    .page-tai-xiu__hero-content,
    .page-tai-xiu__hero-image,
    .page-tai-xiu__cta-buttons,
    .page-tai-xiu__button-group,
    .page-tai-xiu__btn-container,
    .page-tai-xiu__guide-steps,
    .page-tai-xiu__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Specific for multi-button groups */
    .page-tai-xiu__hero-cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}