/* style/tai-xiu.css */

:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --card-bg: #FFFFFF;
    --background-color: #F5F7FA;
    --text-main-color: #333333;
    --border-color: #E0E0E0;
    --header-offset: 122px; /* Default, will be overridden by shared if present */
}

.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color); /* Default text color for light body bg */
    background-color: var(--background-color);
}

.page-tai-xiu__hero-carousel-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, assuming body handles header offset */
}

.page-tai-xiu__hero-slider {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height for desktop carousel */
    display: flex;
    overflow: hidden;
}

.page-tai-xiu__hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-tai-xiu__hero-slide.is-active {
    opacity: 1;
}

.page-tai-xiu__hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-tai-xiu__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    max-width: 900px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.page-tai-xiu__hero-title {
    font-size: clamp(2em, 3.5vw, 3.5em);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-tai-xiu__hero-description {
    font-size: clamp(1em, 1.5vw, 1.2em);
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-tai-xiu__hero-slider-prev,
.page-tai-xiu__hero-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.page-tai-xiu__hero-slider-prev:hover,
.page-tai-xiu__hero-slider-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.page-tai-xiu__hero-slider-prev {
    left: 20px;
}

.page-tai-xiu__hero-slider-next {
    right: 20px;
}

.page-tai-xiu__hero-slider-prev::before {
    content: '\2039'; /* Left arrow */
}

.page-tai-xiu__hero-slider-next::before {
    content: '\203A'; /* Right arrow */
}

.page-tai-xiu__guide-box {
    max-width: 1200px;
    margin: 40px auto;
    padding: 16px 20px 24px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-tai-xiu__guide-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: bold;
}

.page-tai-xiu__guide-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-tai-xiu__guide-card {
    flex: 0 0 calc(20% - 12px); /* 5 cards per row with gap */
    max-width: calc(20% - 12px);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.page-tai-xiu__guide-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical images */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
}

.page-tai-xiu__guide-card--pos-1,
.page-tai-xiu__guide-card--pos-5 {
    padding-top: 50px;
}

.page-tai-xiu__guide-card--pos-2,
.page-tai-xiu__guide-card--pos-4 {
    padding-top: 25px;
}

.page-tai-xiu__home-content-box {
    max-width: 91%;
    margin: 40px auto;
    padding: 20px 25px;
    border: 5px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(var(--primary-color), 0.5);
    height: 700px; /* Fixed height for desktop */
    background-color: var(--card-bg);
}

.page-tai-xiu__home-content-inner {
    height: 100%;
    overflow-y: auto;
    padding-right: 15px; /* For scrollbar */
}

.page-tai-xiu__content-section {
    margin-bottom: 40px;
}

.page-tai-xiu__section-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.page-tai-xiu__sub-title {
    font-size: 1.5em;
    color: var(--text-main-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

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

.page-tai-xiu__list {
    list-style: disc inside;
    margin-bottom: 15px;
    padding-left: 20px;
}

.page-tai-xiu__list--ordered {
    list-style: decimal inside;
}

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

.page-tai-xiu__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__text-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
}

.page-tai-xiu__text-link:hover {
    color: var(--secondary-color);
}

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

.page-tai-xiu__btn-primary {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: none;
    margin-right: 15px;
}

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

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

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

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

.page-tai-xiu__cta-buttons--center {
    text-align: center;
    justify-content: center;
}

.page-tai-xiu__faq-list {
    margin-top: 30px;
}

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

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-color);
    background-color: #f9f9f9;
    border-bottom: 1px solid var(--border-color);
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
    border-bottom: none;
}

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

.page-tai-xiu__faq-qtext {
    flex-grow: 1;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

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

.page-tai-xiu__faq-answer {
    padding: 15px 20px;
    color: var(--text-main-color);
    font-size: 0.95em;
}

.page-tai-xiu__blog-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: var(--background-color);
}

.page-tai-xiu__blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.page-tai-xiu__blog-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.page-tai-xiu__blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-tai-xiu__blog-card-image {
    width: 100%;
    height: 200px; /* Fixed height for blog card images */
    object-fit: cover;
    display: block;
}

.page-tai-xiu__blog-card-content {
    padding: 15px;
}

.page-tai-xiu__blog-card-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    min-height: 50px; /* Ensure consistent height for titles */
}

.page-tai-xiu__blog-card-date {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.page-tai-xiu__blog-card-excerpt {
    font-size: 0.9em;
    color: var(--text-main-color);
    line-height: 1.5;
}

.page-tai-xiu__cta-section {
    max-width: 1000px;
    margin: 60px auto;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__cta-section .page-tai-xiu__section-title {
    color: #ffffff;
    margin-bottom: 25px;
}

.page-tai-xiu__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-slider {
        height: 500px;
    }

    .page-tai-xiu__guide-card {
        flex: 0 0 calc(33.333% - 10px);
        max-width: calc(33.333% - 10px);
    }

    .page-tai-xiu__guide-card--pos-1,
    .page-tai-xiu__guide-card--pos-5 {
        padding-top: 25px;
    }

    .page-tai-xiu__guide-card--pos-2,
    .page-tai-xiu__guide-card--pos-4 {
        padding-top: 0;
    }

    .page-tai-xiu__blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .page-tai-xiu__hero-carousel-section {
        padding-top: 10px !important; /* Ensure small top padding */
    }

    .page-tai-xiu__hero-slider {
        height: 400px !important;
    }

    .page-tai-xiu__hero-title {
        font-size: clamp(1.8em, 6vw, 2.5em) !important;
    }

    .page-tai-xiu__hero-description {
        font-size: clamp(0.9em, 3.5vw, 1.1em) !important;
        margin-bottom: 20px;
    }

    .page-tai-xiu__hero-slider-prev,
    .page-tai-xiu__hero-slider-next {
        padding: 10px !important;
        font-size: 20px !important;
        left: 10px !important;
        right: 10px !important;
    }

    .page-tai-xiu__hero-content {
        padding: 15px;
        max-width: 95%;
    }

    .page-tai-xiu__guide-box {
        margin: 20px auto;
        padding: 15px;
    }

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

    .page-tai-xiu__guide-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr); /* 2+3+3 mobile layout */
        gap: 10px;
    }

    .page-tai-xiu__guide-card {
        padding-top: 0 !important; /* Reset desktop padding */
        flex: unset;
        max-width: unset;
    }

    .page-tai-xiu__guide-card--pos-1,
    .page-tai-xiu__guide-card--pos-2 {
        grid-column: span 3;
    }

    .page-tai-xiu__guide-card--pos-3,
    .page-tai-xiu__guide-card--pos-4,
    .page-tai-xiu__guide-card--pos-5 {
        grid-column: span 2;
    }

    .page-tai-xiu__guide-card img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 250 / 350 !important;
    }

    .page-tai-xiu__home-content-box {
        max-width: 100% !important;
        height: auto !important; /* Full content visible */
        margin: 20px auto !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__home-content-inner {
        height: auto !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    .page-tai-xiu__content-section {
        margin-bottom: 30px;
    }

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

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

    .page-tai-xiu p,
    .page-tai-xiu li {
        font-size: 1em;
    }

    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .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 !important;
        padding-right: 15px !important;
        margin-right: 0 !important; /* Remove right margin for single column */
    }

    .page-tai-xiu__cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-tai-xiu__blog-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 20px;
        padding: 0 15px;
    }

    .page-tai-xiu__blog-card-image {
        height: auto !important; /* Adjust height for mobile */
    }

    .page-tai-xiu__cta-section {
        margin: 40px auto !important;
        padding: 30px 15px !important;
    }

    .page-tai-xiu__cta-description {
        font-size: 1em;
    }
}