/* style/casino.css */

/* Custom properties for colors */
:root {
  --primary-color: #26A9E0; /* Main brand color (light blue) */
  --secondary-color: #EA7C07; /* Login button color (orange) */
  --white-color: #FFFFFF;
  --dark-text-color: #333333;
  --light-text-color: #FFFFFF;
  --bg-light: #f9f9f9;
  --bg-dark: #26A9E0; /* Using primary color for dark sections */
  --border-color: #e0e0e0;
}

/* Base styles for .page-casino to ensure text contrast with default white body background */
.page-casino {
  font-family: 'Arial', sans-serif;
  color: var(--dark-text-color); /* Default text color for light backgrounds */
  line-height: 1.6;
  font-size: 16px;
  background-color: var(--white-color); /* Ensure content area uses light background */
}

/* Ensure sections have appropriate padding and max-width */
.page-casino__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box; /* Include padding in element's total width */
}

/* Section titles */
.page-casino__section-title {
  font-size: 36px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-casino__section-description {
  font-size: 18px;
  color: var(--dark-text-color);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Text blocks for general content */
.page-casino__text-block {
  margin-bottom: 20px;
  line-height: 1.7;
  text-align: justify;
}

/* CTA Buttons */
.page-casino__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--light-text-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-casino__cta-button:hover {
  background: #2087b3; /* Slightly darker primary color */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-casino__cta-button--login {
  background: var(--secondary-color); /* Orange for login */
}

.page-casino__cta-button--login:hover {
  background: #c26106; /* Slightly darker secondary color */
}

.page-casino__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: var(--white-color);
  color: var(--primary-color);
  text-decoration: none;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-casino__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--light-text-color);
}

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

/* Images styles */
.page-casino img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  filter: none; /* Ensure no filter changes image color */
}

.page-casino__image-content {
  margin: 30px auto;
  display: block;
  max-width: 80%; /* Example: not full width */
}

/* 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); /* Fixed header spacing */
  background: linear-gradient(135deg, var(--primary-color), #4CAF50); /* Gradient to make it more vibrant, ensuring contrast */
  overflow: hidden; /* Prevent content overflow */
}

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

.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;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-casino__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--light-text-color); /* Light text for dark/gradient background */
}

.page-casino__main-title {
  font-size: 48px;
  margin-bottom: 15px;
  font-weight: 800;
  color: var(--light-text-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-casino__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: var(--light-text-color);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-casino__hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}


/* Intro Section */
.page-casino__intro-section {
  padding: 60px 0;
  background-color: var(--bg-light); /* Light background for intro */
  color: var(--dark-text-color);
}

/* Game Grid Section */
.page-casino__games-section {
  padding: 60px 0;
  background-color: var(--bg-dark); /* Dark background for games section */
  color: var(--light-text-color);
}

.page-casino__games-section .page-casino__section-title,
.page-casino__games-section .page-casino__section-description {
  color: var(--light-text-color);
}

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

.page-casino__game-card {
  background: var(--white-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text-color); /* Ensure dark text on white card */
}

.page-casino__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.page-casino__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.page-casino__card-title {
  font-size: 22px;
  font-weight: 700;
  padding: 15px 20px 5px;
  margin: 0;
}

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

.page-casino__card-title a:hover {
  color: #2087b3;
}

.page-casino__card-text {
  font-size: 15px;
  color: #666;
  padding: 0 20px 20px;
}

/* Promotions Section */
.page-casino__promotions-section {
  padding: 60px 0;
  background-color: var(--bg-light);
  color: var(--dark-text-color);
}

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

.page-casino__promo-card {
  background: var(--white-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 20px; /* Space for button */
  display: flex;
  flex-direction: column;
}

.page-casino__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.page-casino__promo-card .page-casino__card-image {
  height: 220px;
  margin-bottom: 15px;
}

.page-casino__promo-card .page-casino__card-title {
  padding-top: 0;
  margin-bottom: 10px;
}

.page-casino__promo-card .page-casino__card-text {
  flex-grow: 1; /* Make text take available space */
}

.page-casino__promo-card .page-casino__btn-secondary {
  margin: 0 20px;
  align-self: flex-start; /* Align button to start within card */
}

/* Security and Support Section */
.page-casino__security-support-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
  color: var(--light-text-color);
}

.page-casino__security-support-section .page-casino__section-title,
.page-casino__security-support-section .page-casino__section-description {
  color: var(--light-text-color);
}

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

.page-casino__feature-item {
  text-align: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.page-casino__feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-casino__feature-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  border-radius: 0;
  filter: none; /* Ensure icons retain their original color */
}

.page-casino__feature-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--light-text-color);
}

.page-casino__feature-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

/* How to Play Section */
.page-casino__how-to-play-section {
  padding: 60px 0;
  background-color: var(--bg-light);
  color: var(--dark-text-color);
}

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

.page-casino__step-card {
  background: var(--white-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-casino__step-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1;
}

.page-casino__step-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-casino__step-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-casino__faq-section {
  padding: 60px 0;
  background-color: var(--bg-light);
  color: var(--dark-text-color);
}

.page-casino__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

/* FAQ容器样式 */
.page-casino__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* 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 20px; /* Reduced initial padding */
  opacity: 0;
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể 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 !important; /* Đảm bảo padding được áp dụng khi hoạt động */
  opacity: 1;
  background: #f9f9f9; /* Nền hơi khác cho câu trả lời */
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-casino__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

/* Question title style */
.page-casino__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: var(--dark-text-color);
}

/* Toggle icon */
.page-casino__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Primary color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger hit area */
  height: 32px;
}

.page-casino__faq-item.active .page-casino__faq-toggle {
  color: #2087b3;
  transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* Why Choose Section */
.page-casino__why-choose-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
  color: var(--light-text-color);
}

.page-casino__why-choose-section .page-casino__section-title,
.page-casino__why-choose-section .page-casino__section-description {
  color: var(--light-text-color);
}

.page-casino__advantages-list {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
}

.page-casino__advantage-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.page-casino__advantage-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-casino__advantage-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--light-text-color);
}

.page-casino__advantage-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}


/* Global Image Responsiveness (important) */
.page-casino img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .page-casino__container {
    padding: 30px 15px; /* Adjust padding for mobile */
  }

  .page-casino__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-casino__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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