: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; /* This is the body background from shared.css */
}

/* Base styles for the page content */
.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default for dark body background */
    background-color: var(--deep-navy); /* Body background is dark */
}

/* Ensure text in dark sections is light */
.page-tai-xiu__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-main); /* Light text for dark background */
}

.page-tai-xiu__light-bg {
    background-color: #ffffff;
    color: #333333; /* Dark text for light background */
}

.page-tai-xiu__text-block--light {
    color: var(--text-main);
}

.page-tai-xiu__section-title--light {
    color: var(--gold-color);
}

.page-tai-xiu__sub-title--light {
    color: var(--text-main);
}

.page-tai-xiu__list--light .page-tai-xiu__list-item {
    color: var(--text-secondary);
}

.page-tai-xiu__ordered-list--light .page-tai-xiu__list-item {
    color: var(--text-secondary);
}

.page-tai-xiu__image-caption--light {
    color: var(--text-secondary);
}

.page-tai-xiu__keyword-highlight {
    color: var(--gold-color);
    font-weight: bold;
}

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    width: 100%;
    padding-top: 10px; /* Small top padding if body handles header offset */
    margin-bottom: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    background-color: var(--primary-color);
}

.page-tai-xiu__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for desktop */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover; /* Cover for desktop, contain for mobile */
    display: block;
    max-width: 1920px; /* Max width of the image itself */
}

.page-tai-xiu__hero-content {
    padding: 40px 20px;
    text-align: center;
    max-width: 900px;
    z-index: 1;
    color: var(--text-main);
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gold-color);
    text-shadow: 0 0 10px rgba(79, 168, 255, 0.5); /* Glow effect */
}

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

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.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.1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-tai-xiu__btn-secondary {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
}

/* General Section Styles */
.page-tai-xiu__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-tai-xiu__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.page-tai-xiu__sub-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-tai-xiu__article-body {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

.page-tai-xiu__article-body p {
    margin-bottom: 15px;
}

.page-tai-xiu__article-body ul,
.page-tai-xiu__article-body ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.page-tai-xiu__article-body li {
    margin-bottom: 8px;
}

.page-tai-xiu__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px;
}

.page-tai-xiu__image-block {
    text-align: center;
    margin: 30px 0;
}

.page-tai-xiu__image-caption {
    font-size: 0.95rem;
    color: #666;
    margin-top: 10px;
}

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

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

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

details.page-tai-xiu__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg); /* Dark background for FAQ items */
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question::-webkit-details-marker {
    display: none;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question:hover {
    background: #153059; /* Slightly lighter dark background on hover */
}
.page-tai-xiu__faq-qtext {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: var(--text-main); /* Light text for dark FAQ question */
}
.page-tai-xiu__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: var(--gold-color); /* Gold color for toggle icon */
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
    padding: 0 20px 20px;
    background: var(--deep-navy); /* Darker background for answer */
    border-radius: 0 0 5px 5px;
    color: var(--text-secondary); /* Secondary light text for answer */
}
.page-tai-xiu__faq-answer p {
    margin-bottom: 10px;
}
.page-tai-xiu__faq-answer a {
    color: var(--gold-color);
    text-decoration: underline;
}

/* Bottom CTA */
.page-tai-xiu__cta-bottom {
    padding: 60px 20px;
    text-align: center;
}

.page-tai-xiu__cta-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-image-wrapper {
        max-height: 500px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-tai-xiu__hero-description {
        font-size: 1.1rem;
    }
    .page-tai-xiu__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }
    .page-tai-xiu__sub-title {
        font-size: 1.6rem;
    }
    .page-tai-xiu__article-body {
        font-size: 1rem;
    }
    .page-tai-xiu__faq-qtext {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px; /* Keep small top padding */
        margin-bottom: 30px;
    }
    .page-tai-xiu__hero-image-wrapper {
        max-height: 300px; /* Adjust height for mobile */
    }
    .page-tai-xiu__hero-image {
        object-fit: contain !important; /* Mobile: contain to show full image */
        aspect-ratio: unset !important; /* Remove fixed aspect ratio */
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__hero-content {
        padding: 30px 15px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem); /* Adjust clamp for mobile */
        margin-bottom: 15px;
    }
    .page-tai-xiu__hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        padding: 12px 20px;
        font-size: 1rem;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0 auto; /* Center individual buttons */
    }

    /* General Section Styles */
    .page-tai-xiu__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-tai-xiu__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 30px;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.4rem;
        margin-top: 25px;
        margin-bottom: 10px;
    }
    .page-tai-xiu__article-body {
        font-size: 0.95rem;
    }
    .page-tai-xiu__article-body ul,
    .page-tai-xiu__article-body ol {
        padding-left: 20px;
    }
    .page-tai-xiu__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Ensure minimum size */
        min-height: 200px !important;
    }

    /* FAQ Section */
    details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
        padding: 15px;
    }
    .page-tai-xiu__faq-qtext {
        font-size: 0.95rem;
    }
    .page-tai-xiu__faq-toggle {
        font-size: 20px;
        width: 24px;
        margin-left: 10px;
    }
    details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
        padding: 0 15px 15px;
    }

    /* Bottom CTA */
    .page-tai-xiu__cta-bottom {
        padding: 40px 15px;
    }
    .page-tai-xiu__cta-text {
        font-size: 1rem;
        margin-bottom: 25px;
    }
}