/* style/ban-ca.css */
:root {
  --page-ban-ca-primary-color: #113B7A;
  --page-ban-ca-secondary-color: #1D5FD1;
  --page-ban-ca-text-main: #F3F8FF;
  --page-ban-ca-text-secondary: #AFC4E8;
  --page-ban-ca-card-bg: #10233F;
  --page-ban-ca-border-color: #244D84;
  --page-ban-ca-glow-color: #4FA8FF;
  --page-ban-ca-gold-color: #F2C14E;
  --page-ban-ca-divider-color: #1B3357;
  --page-ban-ca-deep-navy: #08162B;
  --page-ban-ca-button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

.page-ban-ca {
  color: var(--page-ban-ca-text-main);
  background-color: #000; /* Body background is black from shared.css */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
}

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

.page-ban-ca__dark-bg {
  background-color: var(--page-ban-ca-deep-navy);
  color: var(--page-ban-ca-text-main);
}

.page-ban-ca__card {
  background-color: var(--page-ban-ca-card-bg);
  border: 1px solid var(--page-ban-ca-border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--page-ban-ca-text-main);
  box-sizing: border-box;
}

.page-ban-ca__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-ban-ca__section-title {
  font-size: 2.8em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--page-ban-ca-gold-color);
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.6);
  line-height: 1.2;
}

.page-ban-ca__main-title {
  font-size: 3.5em;
  font-weight: 900;
  text-align: center;
  margin-bottom: 20px;
  color: var(--page-ban-ca-gold-color);
  text-shadow: 0 0 12px rgba(242, 193, 78, 0.8);
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-ban-ca__section-description,
.page-ban-ca__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: var(--page-ban-ca-text-secondary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-ban-ca__btn-primary,
.page-ban-ca__btn-secondary,
.page-ban-ca__btn-play,
.page-ban-ca__text-link {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-ban-ca__btn-primary {
  background: var(--page-ban-ca-button-gradient);
  color: var(--page-ban-ca-text-main);
  border: 2px solid var(--page-ban-ca-glow-color);
  box-shadow: 0 0 10px rgba(79, 168, 255, 0.5);
}

.page-ban-ca__btn-primary:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  box-shadow: 0 0 15px rgba(79, 168, 255, 0.8);
  transform: translateY(-2px);
}

.page-ban-ca__btn-secondary {
  background-color: transparent;
  color: var(--page-ban-ca-glow-color);
  border: 2px solid var(--page-ban-ca-glow-color);
}

.page-ban-ca__btn-secondary:hover {
  background-color: var(--page-ban-ca-glow-color);
  color: var(--page-ban-ca-deep-navy);
  transform: translateY(-2px);
}

.page-ban-ca__text-link {
  color: var(--page-ban-ca-glow-color);
  text-decoration: underline;
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
}

.page-ban-ca__text-link:hover {
  color: var(--page-ban-ca-gold-color);
  text-decoration: none;
}

/* Hero Section */
.page-ban-ca__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 60px;
  background-color: var(--page-ban-ca-deep-navy);
  padding-top: 10px; /* Small top padding */
}

.page-ban-ca__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 40px;
}

.page-ban-ca__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

.page-ban-ca__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-ban-ca__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Features Section */
.page-ban-ca__features-section {
  padding: 60px 0;
}

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

.page-ban-ca__feature-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-ban-ca__feature-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 2px solid var(--page-ban-ca-glow-color);
  box-shadow: 0 0 15px rgba(79, 168, 255, 0.4);
}

.page-ban-ca__feature-title {
  font-size: 1.6em;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--page-ban-ca-gold-color);
}

.page-ban-ca__feature-text {
  font-size: 1em;
  color: var(--page-ban-ca-text-secondary);
}

/* How-to-Play Section */
.page-ban-ca__how-to-play-section {
  padding: 60px 0;
}

.page-ban-ca__how-to-play-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.page-ban-ca__how-to-play-steps {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-ban-ca__step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}

.page-ban-ca__step-number {
  background: var(--page-ban-ca-gold-color);
  color: var(--page-ban-ca-deep-navy);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  font-weight: 700;
  flex-shrink: 0;
}

.page-ban-ca__step-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--page-ban-ca-gold-color);
  margin-top: 5px;
}

.page-ban-ca__step-text {
  font-size: 1em;
  color: var(--page-ban-ca-text-secondary);
  flex: 1;
}

.page-ban-ca__how-to-play-image-wrapper {
  flex: 1;
  max-width: 500px;
  position: sticky;
  top: calc(var(--header-offset, 0px) + 20px);
}

.page-ban-ca__how-to-play-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--page-ban-ca-glow-color);
  box-shadow: 0 0 20px rgba(79, 168, 255, 0.6);
}

/* Popular Games Section */
.page-ban-ca__popular-games-section {
  padding: 60px 0;
}

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

.page-ban-ca__game-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1.3; /* Adjusted aspect ratio to accommodate iframe */
}

.page-ban-ca__game-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.page-ban-ca__game-title {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--page-ban-ca-gold-color);
  margin-bottom: 5px;
}

.page-ban-ca__game-provider {
  font-size: 0.9em;
  color: var(--page-ban-ca-text-secondary);
  margin-bottom: 15px;
}

.page-ban-ca__game-trial-frame {
  width: 100%;
  height: 100%; /* Take up available space */
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
}

.page-ban-ca__game-card:hover .page-ban-ca__game-trial-frame {
  opacity: 1;
  visibility: visible;
}

.page-ban-ca__btn-play {
  background: var(--page-ban-ca-button-gradient);
  color: var(--page-ban-ca-text-main);
  border: 2px solid var(--page-ban-ca-glow-color);
  padding: 10px 20px;
  font-size: 1em;
  width: calc(100% - 40px); /* Adjust for padding */
  max-width: 200px;
  margin-top: auto; /* Push button to bottom */
  margin-bottom: 15px;
}

.page-ban-ca__btn-play:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  box-shadow: 0 0 10px rgba(79, 168, 255, 0.8);
  transform: translateY(-2px);
}

/* Promotions Section */
.page-ban-ca__promotions-section {
  padding: 60px 0;
}

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

.page-ban-ca__promotion-card {
  text-align: left;
}

.page-ban-ca__promotion-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--page-ban-ca-border-color);
}

.page-ban-ca__promotion-title {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--page-ban-ca-gold-color);
  margin-bottom: 10px;
}

.page-ban-ca__promotion-text {
  font-size: 1em;
  color: var(--page-ban-ca-text-secondary);
  margin-bottom: 20px;
}

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

/* Tips Section */
.page-ban-ca__tips-section {
  padding: 60px 0;
}

.page-ban-ca__tips-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.page-ban-ca__tips-list {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-ban-ca__tip-item {
  text-align: left;
}

.page-ban-ca__tip-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--page-ban-ca-gold-color);
  margin-bottom: 10px;
}

.page-ban-ca__tip-text {
  font-size: 1em;
  color: var(--page-ban-ca-text-secondary);
}

.page-ban-ca__tips-image-wrapper {
  flex: 1;
  max-width: 500px;
  position: sticky;
  top: calc(var(--header-offset, 0px) + 20px);
}

.page-ban-ca__tips-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--page-ban-ca-glow-color);
  box-shadow: 0 0 20px rgba(79, 168, 255, 0.6);
}

/* FAQ Section */
.page-ban-ca__faq-section {
  padding: 60px 0;
}

.page-ban-ca__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 40px;
}

.page-ban-ca__faq-item {
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.page-ban-ca__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3em;
  font-weight: 700;
  color: var(--page-ban-ca-gold-color);
  padding: 15px 20px;
  list-style: none;
  background-color: var(--page-ban-ca-primary-color);
  border-radius: 8px;
  border: 1px solid var(--page-ban-ca-border-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-ban-ca__faq-item summary:hover {
  background-color: var(--page-ban-ca-secondary-color);
}

.page-ban-ca__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-ban-ca__faq-qtext {
  flex: 1;
}

.page-ban-ca__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--page-ban-ca-text-main);
}

.page-ban-ca__faq-item[open] .page-ban-ca__faq-toggle {
  content: "−";
}

.page-ban-ca__faq-answer {
  padding: 20px;
  font-size: 1em;
  color: var(--page-ban-ca-text-secondary);
  background-color: var(--page-ban-ca-card-bg);
  border-top: 1px solid var(--page-ban-ca-divider-color);
  border-radius: 0 0 8px 8px;
}

.page-ban-ca__faq-answer p {
  margin: 0;
}

/* CTA Section */
.page-ban-ca__cta-section {
  padding: 60px 0;
  text-align: center;
}

.page-ban-ca__cta-section .page-ban-ca__btn-primary {
  margin-top: 30px;
}

/* General image rules */
.page-ban-ca img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-ban-ca__main-title {
    font-size: 3em;
  }

  .page-ban-ca__section-title {
    font-size: 2.5em;
  }

  .page-ban-ca__hero-image-wrapper {
    padding: 0 15px;
  }

  .page-ban-ca__how-to-play-content,
  .page-ban-ca__tips-content {
    flex-direction: column;
    align-items: center;
  }

  .page-ban-ca__how-to-play-image-wrapper,
  .page-ban-ca__tips-image-wrapper {
    max-width: 100%;
    position: static;
  }

  .page-ban-ca__how-to-play-steps,
  .page-ban-ca__tips-list {
    width: 100%;
  }

  .page-ban-ca__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-ban-ca__container {
    padding: 30px 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-ban-ca__main-title {
    font-size: 2.2em !important;
    padding: 0 10px;
  }

  .page-ban-ca__section-title {
    font-size: 2em !important;
    padding: 0 10px;
  }

  .page-ban-ca__description,
  .page-ban-ca__section-description {
    font-size: 1em !important;
    padding: 0 10px;
  }

  /* Hero Section */
  .page-ban-ca__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important;
  }

  .page-ban-ca__hero-image {
    object-fit: contain !important; /* Mobile main image contain */
    aspect-ratio: unset !important;
    max-height: none !important;
    border-radius: 8px;
  }

  .page-ban-ca__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
    padding: 0 15px;
  }

  .page-ban-ca__btn-primary,
  .page-ban-ca__btn-secondary,
  .page-ban-ca__btn-play,
  .page-ban-ca a[class*="button"],
  .page-ban-ca 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 !important;
    padding-right: 15px !important;
  }

  /* Features Section */
  .page-ban-ca__features-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-ban-ca__feature-icon {
    width: 150px;
    height: 150px;
  }

  /* How-to-Play Section */
  .page-ban-ca__how-to-play-content {
    gap: 20px;
  }

  .page-ban-ca__step-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-ban-ca__step-number {
    margin-bottom: 10px;
  }

  .page-ban-ca__how-to-play-image {
    border-radius: 8px;
  }

  /* Popular Games Section */
  .page-ban-ca__game-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* 2 columns for mobile */
    gap: 15px !important;
    overflow-x: hidden !important;
  }

  .page-ban-ca__game-card {
    aspect-ratio: 1 / 1.3 !important;
    padding: 10px;
  }

  .page-ban-ca__game-image {
    margin-bottom: 10px;
  }

  .page-ban-ca__game-title {
    font-size: 1.2em;
  }

  .page-ban-ca__game-provider {
    font-size: 0.8em;
  }

  /* Promotions Section */
  .page-ban-ca__promotion-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-ban-ca__promotion-image {
    border-radius: 8px;
  }

  /* Tips Section */
  .page-ban-ca__tips-content {
    gap: 20px;
  }

  .page-ban-ca__tips-image {
    border-radius: 8px;
  }

  /* FAQ Section */
  .page-ban-ca__faq-item summary {
    font-size: 1.1em;
    padding: 12px 15px;
  }

  .page-ban-ca__faq-answer {
    padding: 15px;
  }

  /* General images */
  .page-ban-ca img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* General containers for overflow */
  .page-ban-ca__section,
  .page-ban-ca__card,
  .page-ban-ca__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

@media (max-width: 480px) {
  .page-ban-ca__main-title {
    font-size: 1.8em !important;
  }

  .page-ban-ca__section-title {
    font-size: 1.6em !important;
  }

  .page-ban-ca__game-grid {
    grid-template-columns: 1fr !important; /* Single column for very small screens */
  }
}