/* Base styles for the Tài Xỉu page */
.page-tai-xiu {
    background: #B71C1C; /* Custom Background color */
    color: #FFF5E1; /* Custom Text Main color */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-bottom: 50px;
}

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

.page-tai-xiu__container--center {
    text-align: center;
}

.page-tai-xiu__section {
    padding: 40px 0;
}

.page-tai-xiu__section--about {
    padding-top: 10px; /* Small top padding for the first content section */
}

.page-tai-xiu__dark-section {
    background: #7A0E0E; /* Deep Red for contrast */
    color: #FFF5E1;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #FFD86A; /* Gold-like for title */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #FFD86A; /* Gold-like for section titles */
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__description {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #FFF5E1;
}

.page-tai-xiu__article-body {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1rem;
    color: #FFF5E1;
}

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

.page-tai-xiu__article-body strong {
    color: #FFD86A;
}

.page-tai-xiu__article-body a {
    color: #FFCC66; /* Glow color for links */
    text-decoration: underline;
}

.page-tai-xiu__article-body a:hover {
    color: #E6B800; /* Darker gold on hover */
}

.page-tai-xiu__article-figure {
    margin: 20px 0;
    text-align: center;
}

.page-tai-xiu__article-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__article-figure figcaption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #F2B544; /* Border color for figcaption */
}

.page-tai-xiu__article-figure--right {
    float: right;
    margin-left: 30px;
    width: 40%;
}

.page-tai-xiu__unordered-list,
.page-tai-xiu__ordered-list {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 15px;
    color: #FFF5E1;
}

.page-tai-xiu__ordered-list {
    list-style-type: decimal;
}

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

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding */
}

.page-tai-xiu__hero-image {
    width: 100%;
    overflow: hidden;
}

.page-tai-xiu__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.page-tai-xiu__hero-content {
    padding: 40px 20px;
    text-align: center;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    box-sizing: border-box;
    max-width: 300px;
}

.page-tai-xiu__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom Button color */
    color: #333333; /* Dark text for light button */
    border: none;
    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: #D32F2F; /* Card BG color */
    color: #FFF5E1; /* Text Main color */
    border: 2px solid #F2B544; /* Border color */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #7A0E0E; /* Deep Red on hover */
}

/* Card styles */
.page-tai-xiu__grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

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

.page-tai-xiu__card {
    background: #D32F2F; /* Custom Card BG color */
    color: #FFF5E1; /* Custom Text Main color */
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid #F2B544; /* Border color */
}

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

.page-tai-xiu__card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #FFD86A; /* Gold-like for card titles */
    margin-bottom: 10px;
}

.page-tai-xiu__card p {
    font-size: 0.95rem;
    text-align: justify;
    flex-grow: 1;
}

/* FAQ Section */
details.page-tai-xiu__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #F2B544; /* Border color */
    overflow: hidden;
    background: #D32F2F; /* Card BG color */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    background: #C91F17; /* Main color */
    color: #FFF5E1;
    font-weight: 600;
}
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: #E53935; /* Auxiliary color on hover */
}
.page-tai-xiu__faq-qtext {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: left;
    color: #FFF5E1;
}
.page-tai-xiu__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #FFD86A; /* Gold-like 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: 15px 25px 20px;
    background: #D32F2F; /* Card BG color */
    color: #FFF5E1;
    border-top: 1px solid #F2B544;
    border-radius: 0 0 8px 8px;
}

/* Media Queries for Responsive Design */

/* General image responsiveness */
.page-tai-xiu img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hero image object-fit for smaller screens */
@media (max-width: 849px) {
    .page-tai-xiu__hero-image img {
        object-fit: contain !important;
        aspect-ratio: unset !important;
    }
}

@media (max-width: 1024px) {
    .page-tai-xiu__main-title {
        font-size: clamp(2.2rem, 4.5vw, 3rem);
    }

    .page-tai-xiu__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }

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

    .page-tai-xiu__article-body {
        font-size: 0.95rem;
    }

    .page-tai-xiu__grid-2-col {
        grid-template-columns: 1fr;
    }

    .page-tai-xiu__grid-3-col {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

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

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

    /* General Sections & Content */
    .page-tai-xiu__section {
        padding: 30px 0;
    }
    .page-tai-xiu__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-tai-xiu__section-title {
        font-size: clamp(1.6rem, 7vw, 2rem) !important;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    .page-tai-xiu__article-body {
        font-size: 0.9rem;
        padding: 0 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-tai-xiu__article-figure {
        float: none;
        width: 100%;
        margin: 20px 0;
    }
    .page-tai-xiu__article-figure img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__unordered-list,
    .page-tai-xiu__ordered-list {
        padding-left: 20px;
    }

    /* Cards & Grids */
    .page-tai-xiu__grid-2-col,
    .page-tai-xiu__grid-3-col {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin-top: 20px;
    }
    .page-tai-xiu__card {
        padding: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-tai-xiu__card img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__card-title {
        font-size: 1.2rem;
    }

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

    /* Ensure all images are responsive */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}