/* Nếu body là深色背景 */
.page-contact {
  color: #f0f0f0; /* 必须使用浅色文字 */
}

.page-contact__card {
  background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
  color: #f0f0f0; /* 浅色文字 */
}

/* 如果 body 是浅色背景 (default assumption for var(--background-color) if not explicitly dark) */
.page-contact {
  color: #1F2D3D; /* 必须使用深色文字 */
}

.page-contact__card {
  background: #ffffff; /* 白色背景 */
  color: #1F2D3D; /* 深色文字 */
  border: 1px solid #D6E2FF;
}

.page-contact__dark-bg {
  color: #ffffff; /* 深色背景配浅色文字 */
  background: #2F6BFF; /* 使用品牌色但确保对比度 */
}

.page-contact__light-bg {
  color: #1F2D3D; /* 浅色背景配深色文字 */
  background: #ffffff;
}

.page-contact__medium-bg {
  /* Trung bình sáng background cần phân tích thông minh */
  color: #000000; /* Mặc định sử dụng chữ đậm */
  background: #6FA3FF;
}

/* 正文内容区域 - 最高优先级 */
.page-contact__content-area,
.page-contact__text-block {
  color: #1F2D3D; /* Đảm bảo dễ đọc trên hầu hết các nền */
  background: #F4F7FB; /* Nền trắng mặc định */
}

/* 页面内容区域内的段落和列表项 */
.page-contact p,
.page-contact li {
  color: #1F2D3D; /* Đảm bảo dễ đọc trên hầu hết các nền */
}

/* 卡片和容器 - 智能背景选择 */
.page-contact__card {
  background: #ffffff; /* Ưu tiên sử dụng nền trắng để đảm bảo dễ đọc */
  color: #1F2D3D;
  border: 1px solid #D6E2FF; /* Thêm viền để tăng cường khả năng đọc */
}

/* 深色区域特殊处理 */
.page-contact__dark-section {
  background: #2F6BFF;
  color: #ffffff; /* Chữ trắng bắt buộc */
}

/* 按钮文字对比度保障 */
.page-contact__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff; /* Chữ nút luôn dùng màu trắng */
  border: 2px solid transparent;
}

.page-contact__btn-secondary {
  background: #ffffff;
  color: #2F6BFF; /* Sử dụng màu thương hiệu đảm bảo độ tương phản */
  border: 2px solid #2F6BFF;
}

/* Contrast fix */
.page-contact__contrast-fix {
  background: #ffffff !important;
  color: #1F2D3D !important;
  border: 1px solid #D6E2FF !important;
}

.page-contact__text-contrast-fix {
  color: #1F2D3D !important;
  text-shadow: none !important;
}

.page-contact {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #F4F7FB;
  color: #1F2D3D;
}

.page-contact__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-contact__section {
  padding: 60px 0;
  text-align: center;
}

.page-contact__dark-section {
  background: #2F6BFF;
  color: #ffffff;
}

.page-contact__main-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-contact__section-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #1F2D3D;
}

.page-contact__dark-section .page-contact__section-title {
  color: #ffffff;
}

.page-contact__description,
.page-contact__section-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

.page-contact__btn-primary,
.page-contact__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-contact__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.page-contact__hero-section {
  padding: 80px 0;
  display: flex;
  align-items: center;
  text-align: left;
}

.page-contact__hero-section .page-contact__container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-contact__hero-content {
  flex: 1;
}

.page-contact__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-contact__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.page-contact__card {
  text-align: left;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-contact__card:hover {
  transform: translateY(-5px);
}

.page-contact__card-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-contact__card-title {
  font-size: 24px;
  font-weight: bold;
  color: #1F2D3D;
  margin-bottom: 15px;
}

.page-contact__card-text {
  font-size: 16px;
  line-height: 1.6;
  color: #1F2D3D;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-contact__form-group {
  margin-bottom: 20px;
  text-align: left;
}

.page-contact__form-label {
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #1F2D3D;
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D6E2FF;
  border-radius: 8px;
  font-size: 16px;
  color: #1F2D3D;
  background-color: #F4F7FB;
  box-sizing: border-box;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
  color: #777;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  outline: none;
  border-color: #2F6BFF;
  box-shadow: 0 0 0 3px #A5C4FF;
}

.page-contact__form-submit-btn {
  width: auto;
  padding: 12px 30px;
}

.page-contact__social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.page-contact__social-btn {
  display: inline-flex;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #F4F7FB;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.page-contact__social-btn img {
  
  
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.page-contact__social-btn:hover {
  background: #D6E2FF;
}

.page-contact__commitment-section {
  padding: 80px 0;
}

.page-contact__commitment-list {
  list-style: none;
  padding: 0;
  margin: 40px auto 0 auto;
  max-width: 800px;
  text-align: left;
}

.page-contact__commitment-item {
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-left: 30px;
  color: #ffffff;
}

.page-contact__commitment-item::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #A5C4FF;
  font-weight: bold;
}

.page-contact__faq-section {
  padding: 60px 0;
  background-color: #F4F7FB;
}

.page-contact__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

details.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid #D6E2FF;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

details.page-contact__faq-item summary.page-contact__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;
}

details.page-contact__faq-item summary.page-contact__faq-question::-webkit-details-marker {
  display: none;
}

details.page-contact__faq-item summary.page-contact__faq-question:hover {
  background: #f5f5f5;
}

.page-contact__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D;
}

.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #2F6BFF;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-contact__faq-item .page-contact__faq-answer {
  padding: 0 25px 25px;
  background: #f9fbfd;
  border-radius: 0 0 12px 12px;
  color: #1F2D3D;
  font-size: 16px;
  line-height: 1.7;
}

.page-contact__why-choose-us {
  padding: 60px 0;
}

.page-contact__feature-list {
  list-style: none;
  padding: 0;
  margin: 40px auto 0 auto;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  text-align: left;
}

.page-contact__feature-item {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-size: 17px;
  color: #1F2D3D;
  position: relative;
  padding-left: 45px;
}

.page-contact__feature-item::before {
  content: '⭐';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.page-contact__call-to-action {
  padding: 80px 0;
  text-align: center;
}

.page-contact__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 1023px) {
  .page-contact__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-contact__hero-brand,
  .page-contact__hero-jackpot {
    display: none !important;
  }
  .page-contact__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-contact__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-contact__game-trial-topbar,
  .page-contact__game-trial-bottombar {
    display: none !important;
  }
  .page-contact__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-contact__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-contact__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-contact__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  .page-contact__hero-section .page-contact__container {
    flex-direction: column;
    text-align: center;
  }
  .page-contact__main-title {
    font-size: 36px;
  }
  .page-contact__hero-image-wrapper {
    margin-top: 30px;
  }
  .page-contact__contact-methods .page-contact__methods-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .page-contact__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-contact__hero-brand,
  .page-contact__hero-jackpot,
  .page-contact__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-contact__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-contact__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-contact__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-contact__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-contact__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  .page-contact__promo-strip {
    margin-top: 16px;
  }
}

@media (max-width: 768px) {
  /* 首屏试玩 (đã được bao phủ bởi 1023px, không cần lặp lại trừ khi có khác biệt cụ thể) */
  
  /* Ưu đãi __promo-strip */
  .page-contact__promo-strip-track {
    grid-template-columns: repeat(4, 1fr) !important; /* Đảm bảo 4 cột để không bị tràn */
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }
  .page-contact__promo-card {
    display: flex;
    flex-direction: column;
    text-align: center;
  }
  .page-contact__promo-card-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
  .page-contact__promo-card-content {
    padding: 10px;
  }
  .page-contact__promo-card-title {
    font-size: 16px;
    line-height: 1.3;
  }
  .page-contact__promo-card-text {
    font-size: 13px;
    line-height: 1.5;
  }
  .page-contact__promo-card-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 10px;
    font-size: 14px;
  }

  /* Hạng mục __hot-games */
  .page-contact__hot-games-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* 2 cột */
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }
  .page-contact__hot-game-card {
    text-align: center;
  }
  .page-contact__hot-game-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
  .page-contact__hot-game-name,
  .page-contact__hot-game-rtp,
  .page-contact__hot-game-desc {
    display: none !important; /* Ẩn các thông tin này trên di động */
  }

  /* Thương hiệu __brand-intro (nếu có) */
  .page-contact__brand-intro {
    padding: 30px 15px;
  }
  .page-contact__brand-intro-content {
    text-align: center;
  }

  /* Thanh thông báo người thắng __winner-ticker */
  .page-contact__winner-ticker {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999;
    padding: 8px 10px !important;
    box-sizing: border-box;
  }
  body {
    padding-bottom: 40px !important; /* Điều chỉnh padding body để không bị ticker che */
  }

  /* Hình ảnh và vùng chứa chung */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-contact__section,
  .page-contact__card,
  .page-contact__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Nút và vùng chứa nút */
  .page-contact__cta-button,
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact a[class*="button"],
  .page-contact 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;
    padding-right: 15px;
  }
  .page-contact__cta-buttons,
  .page-contact__button-group,
  .page-contact__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;
    flex-direction: column; /* Thêm để đảm bảo xếp chồng */
  }

  /* Các quy tắc 768px khác cho trang liên hệ */
  .page-contact__hero-section {
    padding: 40px 0;
  }
  .page-contact__main-title {
    font-size: 28px;
  }
  .page-contact__section-title {
    font-size: 28px;
  }
  .page-contact__description,
  .page-contact__section-description {
    font-size: 15px;
  }
  .page-contact__card {
    padding: 20px;
  }
  .page-contact__card-title {
    font-size: 20px;
  }
  .page-contact__card-text {
    font-size: 14px;
  }
  .page-contact__form-input,
  .page-contact__form-textarea {
    font-size: 14px;
    padding: 10px;
  }
  .page-contact__social-btn {
    width: 40px;
    height: 40px;
  }
  .page-contact__social-btn img {
    
    
  }
  .page-contact__commitment-item {
    font-size: 15px;
    padding-left: 25px;
  }
  .page-contact__commitment-item::before {
    font-size: 16px;
  }
  details.page-contact__faq-item summary.page-contact__faq-question {
    padding: 15px;
  }
  .page-contact__faq-qtext {
    font-size: 16px;
  }
  .page-contact__faq-toggle {
    font-size: 24px;
  }
  details.page-contact__faq-item .page-contact__faq-answer {
    padding: 0 15px 15px;
  }
  .page-contact__feature-list {
    grid-template-columns: 1fr;
  }
  .page-contact__feature-item {
    font-size: 15px;
    padding-left: 40px;
  }
  .page-contact__feature-item::before {
    font-size: 18px;
  }
}

.page-contact__game-trial-overlay{z-index:5;pointer-events:auto;}
.page-contact__game-trial-overlay.is-hidden{display:none!important;pointer-events:none!important;}
.page-contact__game-trial-start{z-index:6;pointer-events:auto;touch-action:manipulation;}
.page-contact__game-trial-shell{border:1px solid rgba(212,175,55,.45);border-radius:10px;overflow:hidden;}
.page-contact__reward-modal{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.7);visibility:hidden;opacity:0;transition:visibility .3s,opacity .3s;}
.page-contact__reward-modal[aria-hidden="false"]{visibility:visible;opacity:1;}
.page-contact__reward-modal-content{background:#fff;padding:30px;border-radius:10px;text-align:center;max-width:500px;width:90%;position:relative;}
.page-contact__reward-modal-close{position:absolute;top:10px;right:10px;background:none;border:none;font-size:24px;cursor:pointer;color:#333;}
.page-contact__reward-modal-title{font-size:28px;margin-bottom:15px;color:#2F6BFF;}
.page-contact__reward-modal-text{font-size:18px;margin-bottom:25px;color:#1F2D3D;}
.page-contact__reward-modal-btn{padding:12px 30px;font-size:18px;}

/* Ensure body padding for fixed header is handled by shared.css */
/* The page-contact__hero-section should have a small top padding, not var(--header-offset) */
.page-contact__hero-section { 
  padding-top: 10px; 
}

@media (max-width: 768px) {
  .page-contact {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-contact__card {
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
}