:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --login-color: #EA7C07;
    --background-color: #FFFFFF;
    --black-color: #000000;
}

/* Base styles for the page content */
.page-index {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background: var(--background-color); /* Default body background is white, so text is dark */
}

/* Utility classes for background and text colors based on contrast needs */
.page-index__light-bg {
    background-color: var(--secondary-color); /* White background */
    color: var(--text-dark); /* Dark text */
}

.page-index__dark-bg {
    background-color: var(--primary-color); /* Brand primary color */
    color: var(--text-light); /* Light text */
}

.page-index__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

.page-index__section-title--light {
    color: var(--text-light);
}

.page-index__text-block {
    font-size: 17px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.page-index__text-block--light {
    color: var(--text-light);
}

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

/* CTA Button Base Style */
.page-index__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-index__cta-button--primary {
    background: var(--primary-color);
    color: var(--text-light);
    border: 2px solid transparent;
}

.page-index__cta-button--primary:hover {
    background: #1e87b7; /* Darker shade of primary */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__cta-button--secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.page-index__cta-button--secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Generic button link styles to ensure responsiveness */
.page-index a[class*="button"],
.page-index a[class*="btn"] {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

/* HERO Section */
.page-index__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background-color: #f0f8ff; /* Light background for contrast */
    min-height: 500px;
}

.page-index__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-index__hero-image-wrapper {
    width: 100%;
    margin-bottom: 30px;
}

.page-index__hero-image-wrapper img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Ensure minimum image size */
    min-height: 200px;
}

.page-index__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-index__hero-title {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-index__hero-description {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-index__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Module 1: Introduction Section */
.page-index__introduction-section {
    padding: 80px 0;
}

.page-index__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-index__feature-item {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.page-index__feature-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

/* Module 2: Quick Access Section */
.page-index__quick-access-section {
    padding: 80px 0;
}

.page-index__quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.page-index__quick-link-button {
    display: block;
    padding: 15px 20px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-index__quick-link-button:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Module 3: Core Games Section */
.page-index__games-section {
    padding: 80px 0;
}

.page-index__game-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-index__game-category-item {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.page-index__game-category-item img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-index__game-category-title {
    font-size: 22px;
    color: var(--primary-color);
    margin: 20px 15px 10px 15px;
}

.page-index__game-category-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-index__game-category-title a:hover {
    color: #1e87b7;
    text-decoration: underline;
}

.page-index__game-category-item p {
    padding: 0 15px 20px 15px;
    color: var(--text-dark);
}

/* Module 4: Promotions Section */
.page-index__promotions-section {
    padding: 80px 0;
}

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

.page-index__promotion-card {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 44px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.page-index__promotion-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-index__promotion-title {
    font-size: 22px;
    color: var(--primary-color);
    margin: 20px 15px 10px 15px;
}

.page-index__promotion-card p {
    padding: 0 15px;
    color: var(--text-dark);
}

.page-index__promotion-button {
    display: inline-block;
    padding: 10px 25px;
    margin-bottom: 20px;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-index__promotion-button:hover {
    background: #1e87b7;
}

.page-index__view-all-promos {
    text-align: center;
    margin-top: 50px;
}

/* Module 5: Security & Support Section */
.page-index__security-support-section {
    padding: 80px 0;
}

.page-index__security-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-index__contact-cta {
    text-align: center;
    margin-top: 50px;
}

/* Module 6: FAQ Section */
.page-index__faq-section {
    padding: 80px 0;
}

.page-index__faq-list {
    max-width: 900px;
    margin: 50px auto 0 auto;
}

/* FAQ容器样式 */
.page-index__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.page-index__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    background: #f9f9f9; /* Light background for answer */
    color: var(--text-dark); /* Dark text for answer */
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-index__faq-item.active .page-index__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px 15px !important;
    opacity: 1;
    background: var(--secondary-color); /* Nền trắng cho câu trả lời khi hoạt động */
    border-radius: 0 0 5px 5px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

/* Vấn đề phong cách */
.page-index__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: var(--text-dark); /* Dark text for question */
}

.page-index__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-index__faq-question:active {
    background: #eeeeee;
}

/* Tiêu đề câu hỏi phong cách */
.page-index__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
    color: var(--primary-color); /* Primary color for question title */
}

/* Chuyển đổi biểu tượng */
.page-index__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Ngăn biểu tượng chặn sự kiện nhấp */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
    color: #333;
    transform: rotate(180deg); /* Xoay để tạo hiệu ứng dấu trừ */
}


/* Module 7: Latest Blog Section */
.page-index__blog-section {
    padding: 80px 0;
}

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

.page-index__blog-card {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.page-index__blog-card img {
    width: 100%;
    height: 200px; /* Chiều cao cố định để nhất quán */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-index__blog-title {
    font-size: 20px;
    margin: 20px 15px 10px 15px;
    line-height: 1.3;
}

.page-index__blog-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
    color: #1e87b7;
    text-decoration: underline;
}

.page-index__blog-excerpt {
    padding: 0 15px;
    color: var(--text-dark);
    font-size: 15px;
}

.page-index__blog-read-more {
    display: inline-block;
    padding: 8px 15px;
    margin: 15px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Quan trọng cho nút phản hồi */
    white-space: normal; /* Cho phép ngắt dòng văn bản */
    word-wrap: break-word; /* Cho phép ngắt dòng văn bản */
}