/* Base styles for the Tài Xỉu page */
.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: #FFF6D6; /* Main text color for dark background */
    background-color: #0A0A0A; /* Page background */
    line-height: 1.6;
    padding-bottom: 50px; /* Ensure space above footer */
}

/* Ensure first section has appropriate top padding, considering shared header */
.page-tai-xiu__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    margin-bottom: 40px;
    display: flex;
    flex-direction: column; /* Ensure image is above text */
    align-items: center;
    text-align: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    max-width: 1920px;
    height: auto;
    display: block;
    object-fit: cover;
    margin-bottom: 30px; /* Space between image and content */
    border-radius: 8px;
}

.page-tai-xiu__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-tai-xiu__main-title {
    font-size: 3.2em;
    color: #FFD36B; /* Glow color for main title */
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 211, 107, 0.5); /* Subtle glow effect */
    line-height: 1.2;
}

.page-tai-xiu__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #FFF6D6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Ensure button adapts to container */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-tai-xiu__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #111111; /* Dark text for bright button */
    border: none;
}

.page-tai-xiu__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 211, 107, 0.4);
}

.page-tai-xiu__btn-secondary {
    background: #111111;
    color: #FFD36B;
    border: 2px solid #3A2A12;
}

.page-tai-xiu__btn-secondary:hover {
    transform: translateY(-2px);
    background: #1A1A1A;
    border-color: #FFD36B;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General section styling */
.page-tai-xiu__section {
    padding: 40px 0;
    margin-bottom: 30px;
}

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

.page-tai-xiu__section-title {
    font-size: 2.5em;
    color: #FFD36B;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 211, 107, 0.3);
}

.page-tai-xiu__sub-title {
    font-size: 1.8em;
    color: #F2C14E;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-tai-xiu__text-block p,
.page-tai-xiu__list li,
.page-tai-xiu__list-ordered li {
    font-size: 1.1em;
    margin-bottom: 1em;
    color: #FFF6D6;
}

.page-tai-xiu__text-block strong {
    color: #FFD36B;
}

.page-tai-xiu__content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.page-tai-xiu__image-block {
    text-align: center;
}

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

/* Rules section */
.page-tai-xiu__content-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-tai-xiu__card {
    background: #111111; /* Card background */
    border: 1px solid #3A2A12; /* Border color */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FFF6D6;
}

.page-tai-xiu__card-title {
    font-size: 1.5em;
    color: #F2C14E;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-tai-xiu__list,
.page-tai-xiu__list-ordered {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-tai-xiu__list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.page-tai-xiu__list li::before {
    content: '•';
    color: #FFD36B;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.page-tai-xiu__list-ordered li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    counter-increment: list-counter;
}

.page-tai-xiu__list-ordered li::before {
    content: counter(list-counter) ".";
    color: #FFD36B;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Versions section */
.page-tai-xiu__version-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-tai-xiu__version-card {
    background: #111111;
    border: 1px solid #3A2A12;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FFF6D6;
    text-align: center;
}

/* Strategies section */
.page-tai-xiu__strategy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start; /* Align text to top */
}

/* Registration section */
.page-tai-xiu__registration-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-tai-xiu__step-card {
    background: #111111;
    border: 1px solid #3A2A12;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FFF6D6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-tai-xiu__step-image {
    width: 100%;
    max-width: 400px; /* Max width for step images */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-tai-xiu__btn-small {
    padding: 10px 20px;
    font-size: 0.95em;
    margin-top: auto; /* Push button to bottom */
}

/* Promotions section */
.page-tai-xiu__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-tai-xiu__promo-card {
    background: #111111;
    border: 1px solid #3A2A12;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FFF6D6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-tai-xiu__promo-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 100%; /* Ensure image fits card */
}

.page-tai-xiu__btn-promo {
    margin-top: auto; /* Push button to bottom */
}

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

details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger radius */
  border: 1px solid #3A2A12; /* Darker border */
  overflow: hidden;
  background: #111111; /* Card background */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* More padding */
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  color: #FFF6D6; /* Light text */
}
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: #1A1A1A; /* Slightly lighter dark background on hover */
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 1.15em; /* Slightly larger font */
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F2C14E; /* Brand color for questions */
}
.page-tai-xiu__faq-toggle {
  font-size: 28px; /* Larger toggle */
  font-weight: bold;
  color: #FFD36B; /* Glow color for toggle */
  flex-shrink: 0;
  margin-left: 15px;
  width: 32px; /* Larger hit area */
  text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
  padding: 0 25px 25px;
  background: #0A0A0A; /* Page background for answer area */
  border-radius: 0 0 8px 8px;
  color: #FFF6D6; /* Light text */
}
.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
}

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

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .page-tai-xiu__main-title {
        font-size: 2.8em;
    }
    .page-tai-xiu__section-title {
        font-size: 2.2em;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.6em;
    }
    .page-tai-xiu__text-block p,
    .page-tai-xiu__list li,
    .page-tai-xiu__list-ordered li {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    /* 1. Top section __top-text / __hero-section top padding */
    .page-tai-xiu__hero-section {
        padding-top: 10px; /* Small top padding, body handles header offset */
        margin-bottom: 20px;
    }

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

    .page-tai-xiu__main-title {
        font-size: clamp(2em, 8vw, 2.5em); /* Responsive H1 size */
        margin-bottom: 15px;
    }

    .page-tai-xiu__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-tai-xiu__hero-actions {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%;
        max-width: 400px; /* Limit button stack width */
        margin: 0 auto;
    }

    /* Buttons responsive adaptation */
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary,
    .page-tai-xiu__btn-small,
    .page-tai-xiu__btn-promo,
    .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;
        font-size: 1em; /* Adjust font size for mobile */
    }

    /* Button containers responsive adaptation */
    .page-tai-xiu__hero-actions,
    .page-tai-xiu__button-group,
    .page-tai-xiu__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-tai-xiu__hero-actions {
        flex-direction: column; /* Ensure vertical stacking for hero buttons */
    }


    /* 2. Landing page two-column modules: __casino-main, __sports-section, __rating-section */
    .page-tai-xiu__content-grid,
    .page-tai-xiu__strategy-content {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 30px;
    }

    .page-tai-xiu__content-grid .page-tai-xiu__image-block {
        order: -1; /* Image appears before text block */
    }

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

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

    .page-tai-xiu__text-block p,
    .page-tai-xiu__list li,
    .page-tai-xiu__list-ordered li {
        font-size: 0.95em;
    }

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

    /* All images and containers responsiveness */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container,
    .page-tai-xiu__promo-grid,
    .page-tai-xiu__registration-steps,
    .page-tai-xiu__version-cards,
    .page-tai-xiu__content-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ specific mobile styles */
    details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
        padding: 15px 18px;
    }
    .page-tai-xiu__faq-qtext {
        font-size: 1em;
    }
    .page-tai-xiu__faq-toggle {
        font-size: 24px;
        width: 28px;
    }
    details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
        padding: 0 18px 18px;
    }
}