.page-casino {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light background */
  background: var(--secondary-color, #FFFFFF); /* Body background is light */
}

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

.page-casino__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color, #017439);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-casino__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: justify;
}

.page-casino__image-content {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 25px 0;
  display: block;
  object-fit: cover;
}

/* Hero Section */
.page-casino__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); /* Ensure content is below fixed header */
  color: #ffffff; /* White text on dark background */
}

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

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

.page-casino__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

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

.page-casino__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFFF00; /* Custom font color for titles in hero */
  line-height: 1.2;
}

.page-casino__hero-description {
  font-size: 19px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-casino__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color, #017439);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-casino__cta-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-casino__btn-register {
  background: #C30808; /* Custom register button color */
  color: #FFFF00; /* Custom register font color */
}

.page-casino__btn-login {
  background: #C30808; /* Custom login button color */
  color: #FFFF00; /* Custom login font color */
}

/* Game Categories Section */
.page-casino__games-section {
  padding-top: 60px;
  padding-bottom: 60px;
  color: #ffffff;
}

.page-casino__games-section .page-casino__section-title {
  color: #FFFF00; /* Yellow title on dark background */
}

.page-casino__games-section .page-casino__text-block {
  color: #f0f0f0;
}

.page-casino__game-category {
  margin-bottom: 60px;
  text-align: center;
}

.page-casino__game-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 25px;
  color: #FFFF00; /* Yellow title on dark background */
}

.page-casino__game-content-wrapper {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.page-casino__game-content-wrapper img {
  flex-shrink: 0;
  width: 50%;
  height: auto;
  border-radius: 8px;
}

.page-casino__game-content-wrapper p {
  flex-grow: 1;
  text-align: justify;
  font-size: 17px;
  color: #f0f0f0;
}

.page-casino__game-category:nth-child(even) .page-casino__game-content-wrapper {
  flex-direction: row-reverse; /* Alternate image/text layout */
}

.page-casino__btn-primary {
  background: var(--primary-color, #017439);
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  display: inline-block;
  margin-top: 15px;
}

.page-casino__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-casino__btn-secondary {
  background: #ffffff;
  color: var(--primary-color, #017439);
  border: 2px solid var(--primary-color, #017439);
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  display: inline-block;
  margin-top: 15px;
  margin-left: 10px;
}

.page-casino__btn-secondary:hover {
  background: var(--primary-color, #017439);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-casino__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* Promotions Section */
.page-casino__promotions-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-casino__promotion-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.page-casino__promotion-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color, #017439);
  margin-bottom: 15px;
}

.page-casino__promotion-item p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-casino__image-full-width {
  margin-top: 40px;
}

/* Security & Support Section */
.page-casino__security-support-section {
  padding-top: 60px;
  padding-bottom: 60px;
  color: #ffffff;
}

.page-casino__security-support-section .page-casino__section-title {
  color: #FFFF00;
}

.page-casino__security-support-section .page-casino__text-block {
  color: #f0f0f0;
}

/* FAQ Section */
.page-casino__faq-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-casino__faq-list {
  margin-top: 40px;
}

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

/* FAQ默认状态 - 答案隐藏 */
.page-casino__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;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo mở rộng */
.page-casino__faq-item.active .page-casino__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: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

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

.page-casino__faq-item.active .page-casino__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

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

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

/* Phong cách tiêu đề vấn đề */
.page-casino__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn h3 chặn sự kiện nhấp */
}

/* Biểu tượng chuyển đổi */
.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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-casino__faq-item.active .page-casino__faq-toggle {
  color: var(--primary-color, #017439);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* CTA Bottom Section */
.page-casino__cta-bottom-section {
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

.page-casino__cta-bottom-section .page-casino__section-title {
  color: #FFFF00;
}

.page-casino__cta-bottom-section .page-casino__text-block {
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

/* Background color classes */
.page-casino__dark-bg {
  background: var(--primary-color, #017439);
  color: #ffffff;
}

.page-casino__light-bg {
  background: #ffffff;
  color: #333333;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-casino__hero-title {
    font-size: 40px;
  }

  .page-casino__section-title {
    font-size: 30px;
  }

  .page-casino__game-content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .page-casino__game-content-wrapper img {
    width: 100%;
  }

  .page-casino__game-category:nth-child(even) .page-casino__game-content-wrapper {
    flex-direction: column; /* Reset order for mobile */
  }
}

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

  .page-casino__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-casino__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-casino__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-casino__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 15px;
  }

  .page-casino__container {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-casino__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-casino__text-block {
    font-size: 16px;
    text-align: left;
  }

  .page-casino img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-casino__game-content-wrapper img {
    width: 100%;
  }

  .page-casino__promotion-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-casino__promotion-item {
    padding: 20px;
  }

  .page-casino__promotion-title {
    font-size: 18px;
  }

  /* FAQ Mobile Styles */
  .page-casino__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-casino__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-casino__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-casino__faq-answer {
    padding: 0 15px;
  }
  
  .page-casino__faq-item.active .page-casino__faq-answer {
    padding: 15px !important;
  }

  .page-casino__button-group {
    flex-direction: column;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-casino__btn-primary, .page-casino__btn-secondary {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .page-casino__cta-bottom-section {
    padding: 60px 15px;
  }
}