/* style/casino.css */
/* body đã có padding-top: var(--header-offset) từ shared.css, không lặp lại ở đây */

.page-casino {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Default body background is white */
}

/* --- Hero Section --- */
.page-casino__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* 图在上，文案在下 */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* 小顶距，body已承担 --header-offset */
  background-color: #017439; /* Dark background for hero section */
  color: #ffffff; /* White text for dark background */
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-casino__hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 30px; /* Space between image and content */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-casino__hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-casino__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* H1字号 clamp 规则 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-casino__tagline {
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-casino__btn-primary,
.page-casino__btn-secondary,
.page-casino__btn-tertiary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  max-width: 100%; /* Ensure button does not exceed container width */
}

.page-casino__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-casino__btn-primary:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-casino__btn-secondary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-casino__btn-secondary:hover {
  background-color: #005a2e;
  transform: translateY(-2px);
}

.page-casino__btn-tertiary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
  padding: 10px 20px;
  font-size: 0.9em;
}

.page-casino__btn-tertiary:hover {
  background-color: #f0f0f0;
  transform: translateY(-1px);
}

.page-casino__btn-large {
  padding: 18px 40px;
  font-size: 1.1em;
}

/* --- General Section Styling --- */
.page-casino__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-casino__section-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  color: #017439; /* Brand color for titles */
}

.page-casino__dark-section .page-casino__section-title {
  color: #ffffff; /* White title for dark sections */
}

.page-casino__paragraph {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-casino__dark-section .page-casino__paragraph {
  color: #f0f0f0;
}

/* --- About Section --- */
.page-casino__about-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333;
}

/* --- Games Section --- */
.page-casino__games-section {
  padding: 80px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff;
}

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

.page-casino__game-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-bottom: 20px;
  color: #333333; /* Dark text for light card background */
}

.page-casino__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 15px;
}

.page-casino__game-card .page-casino__card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 15px;
  color: #017439;
}

.page-casino__game-card .page-casino__card-description {
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow description to take available space */
  padding: 0 15px;
}

/* --- Promotions Section --- */
.page-casino__promotions-section {
  padding: 80px 0;
  background-color: #f8f8f8; /* Light background */
  color: #333333;
}

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

.page-casino__promo-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-bottom: 20px;
}

.page-casino__promo-image {
  width: 100%;
  height: 250px; /* Fixed height for promo images */
  object-fit: cover;
  margin-bottom: 15px;
}

.page-casino__promo-card .page-casino__card-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 15px;
  color: #017439;
}

.page-casino__promo-card .page-casino__card-description {
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
  padding: 0 15px;
}

/* --- Live Experience Section --- */
.page-casino__live-experience-section {
  padding: 80px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff;
}

.page-casino__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 40px auto;
  max-width: 1000px; /* Max width for video */
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-casino__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block; /* Ensure no extra space below video */
  cursor: pointer; /* Indicate clickable */
}

.page-casino__video-caption {
  text-align: center;
  font-size: 0.9em;
  color: #f0f0f0;
  margin-top: 15px;
}

/* --- Safety Section --- */
.page-casino__safety-section {
  padding: 80px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-casino__security-image {
  max-width: 800px;
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-casino__security-list {
  list-style: disc;
  max-width: 800px;
  margin: 30px auto;
  padding-left: 40px;
  font-size: 1.1em;
  line-height: 1.8;
  color: #333333;
}

.page-casino__security-list li {
  margin-bottom: 10px;
}

/* --- Register CTA Section --- */
.page-casino__register-cta {
  padding: 60px 20px;
  background-color: #017439; /* Dark background */
  color: #ffffff;
  text-align: center;
}

.page-casino__flex-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- FAQ Section --- */
.page-casino__faq-section {
  padding: 80px 0;
  background-color: #f8f8f8;
  color: #333333;
}

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

.page-casino__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-casino__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  background-color: #fefefe;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

.page-casino__faq-item[open] .page-casino__faq-question {
  background-color: #eaf7ed;
  border-bottom-color: transparent;
}

.page-casino__faq-question:hover {
  background-color: #eaf7ed;
}

.page-casino__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-casino__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

  .page-casino__section-title {
    font-size: 2em;
  }

  .page-casino__game-grid,
  .page-casino__promo-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-casino__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body已承担 --header-offset，此处禁止 var(--header-offset) */
  }

  .page-casino__main-title {
    font-size: clamp(1.8em, 6vw, 2.8em);
  }

  .page-casino__tagline {
    font-size: 1em;
  }

  .page-casino__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Limit button group width */
    margin: 0 auto;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-casino__btn-primary,
  .page-casino__btn-secondary,
  .page-casino__btn-tertiary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-casino__section-title {
    font-size: 1.8em;
  }

  .page-casino__paragraph {
    font-size: 0.95em;
  }

  .page-casino__game-grid,
  .page-casino__promo-cards {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .page-casino__game-image,
  .page-casino__promo-image {
    height: 180px; /* Adjust image height for mobile */
  }

  .page-casino__video-wrapper {
    margin: 20px auto;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-casino__video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  .page-casino__security-image {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box !important;
  }

  .page-casino__security-list {
    padding-left: 20px;
    margin-left: 15px;
    margin-right: 15px;
  }

  /* All images must be responsive */
  .page-casino img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All image containers must be responsive */
  .page-casino__section,
  .page-casino__card,
  .page-casino__container,
  .page-casino__game-card,
  .page-casino__promo-card,
  .page-casino__video-section,
  .page-casino__live-experience-section,
  .page-casino__safety-section,
  .page-casino__register-cta,
  .page-casino__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Only add padding to outer sections to avoid double padding */
  }
  
  .page-casino__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Ensure images don't have filters */
.page-casino img {
  filter: none !important;
}

/* Contrast Fixes (if needed, but design should prevent) */
.page-casino__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-casino__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}