.page-casino-table-games {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Ensure this is defined in shared.css */
}

/* Hero Section */
.page-casino-table-games__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Use shared offset */
  padding-bottom: 60px;
  overflow: hidden;
  background: linear-gradient(135deg, #CC0000, #990000);
}

.page-casino-table-games__hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 0 20px;
}

.page-casino-table-games__hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 1;
}

.page-casino-table-games__hero-title {
  font-size: 48px;
  font-weight: 700;
  color: #FFD700; /* Gold for title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-casino-table-games__hero-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-casino-table-games__hero-cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

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

.page-casino-table-games__btn-primary {
  background-color: #FFD700;
  color: #CC0000; /* Red text on gold button */
  border: 2px solid #FFD700;
}

.page-casino-table-games__btn-primary:hover {
  background-color: #e6c200;
  border-color: #e6c200;
  transform: translateY(-2px);
}

.page-casino-table-games__btn-secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-casino-table-games__btn-secondary:hover {
  background-color: #FFD700;
  color: #CC0000;
  transform: translateY(-2px);
}

.page-casino-table-games__hero-image-wrapper {
  flex: 1;
  max-width: 600px;
  text-align: right;
}

.page-casino-table-games__hero-image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: block;
}

/* General Section Styles */
.page-casino-table-games__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-casino-table-games__section-title {
  font-size: 38px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #FFD700; /* Gold for section titles */
}

.page-casino-table-games__section-description {
  font-size: 17px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
  color: #f0f0f0;
}

/* Introduction Section */
.page-casino-table-games__introduction-section {
  padding: 80px 0;
  background-color: #1a1a1a; /* Slightly lighter dark background */
}

.page-casino-table-games__feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-casino-table-games__card {
  background: rgba(255, 255, 255, 0.08); /* Light background for cards on dark section */
  color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino-table-games__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.page-casino-table-games__card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #FFD700;
}

/* Games Showcase Section */
.page-casino-table-games__games-showcase-section {
  padding: 80px 0;
  background-color: #0d0d0d; /* Darker background */
}

.page-casino-table-games__games-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

.page-casino-table-games__game-card-large {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino-table-games__game-card-large:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.page-casino-table-games__game-card-large img {
  width: 100%;
  height: 300px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-casino-table-games__game-card-content {
  padding: 25px;
  color: #f0f0f0;
}

.page-casino-table-games__game-card-title-large {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #FFD700;
}

/* Benefits Section */
.page-casino-table-games__benefits-section {
  padding: 80px 0;
  background-color: #1a1a1a;
}

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

.page-casino-table-games__benefit-item {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino-table-games__benefit-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.page-casino-table-games__benefit-item img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-casino-table-games__benefit-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFD700;
}

/* How to Play Section */
.page-casino-table-games__how-to-play-section {
  padding: 80px 0;
  background-color: #CC0000; /* Main brand color for this section */
}

.page-casino-table-games__how-to-play-section .page-casino-table-games__section-title,
.page-casino-table-games__how-to-play-section .page-casino-table-games__section-description {
  color: #ffffff;
}

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

.page-casino-table-games__step-card {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-casino-table-games__step-number {
  width: 60px;
  height: 60px;
  background-color: #FFD700;
  color: #CC0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-casino-table-games__step-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-casino-table-games__step-card .page-casino-table-games__btn-primary,
.page-casino-table-games__step-card .page-casino-table-games__btn-secondary {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* FAQ Section */
.page-casino-table-games__faq-section {
  padding: 80px 0;
  background-color: #1a1a1a;
}

.page-casino-table-games__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-casino-table-games__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #2a2a2a; /* Darker background for FAQ items */
}

.page-casino-table-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #CC0000; /* Brand red for question background */
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  border: 1px solid #CC0000;
}

.page-casino-table-games__faq-question:hover {
  background: #990000;
  border-color: #990000;
}

.page-casino-table-games__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: #ffffff;
}

.page-casino-table-games__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-casino-table-games__faq-item.active .page-casino-table-games__faq-toggle {
  transform: rotate(45deg);
  color: #ffffff;
}

.page-casino-table-games__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 25px;
  opacity: 0;
  background-color: #2a2a2a;
  color: #f0f0f0;
}

.page-casino-table-games__faq-item.active .page-casino-table-games__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-casino-table-games__hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .page-casino-table-games__hero-content {
    max-width: 100%;
    margin-bottom: 40px;
  }

  .page-casino-table-games__hero-title {
    font-size: 40px;
  }

  .page-casino-table-games__hero-image-wrapper {
    max-width: 80%;
    margin: 0 auto;
  }

  .page-casino-table-games__games-grid-full {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .page-casino-table-games__game-card-large img {
    height: 250px;
  }

  .page-casino-table-games__game-card-title-large {
    font-size: 24px;
  }
}

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

  .page-casino-table-games__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure offset on mobile */
    padding-bottom: 40px;
  }

  .page-casino-table-games__hero-container {
    padding: 0 15px;
    gap: 20px;
  }

  .page-casino-table-games__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-casino-table-games__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-casino-table-games__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-casino-table-games__btn-primary,
  .page-casino-table-games__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-casino-table-games__hero-image-wrapper {
    max-width: 100%;
  }

  .page-casino-table-games__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-casino-table-games__section-description {
    font-size: 15px;
    margin-bottom: 40px;
  }

  .page-casino-table-games__introduction-section,
  .page-casino-table-games__games-showcase-section,
  .page-casino-table-games__benefits-section,
  .page-casino-table-games__how-to-play-section,
  .page-casino-table-games__faq-section {
    padding: 50px 0;
  }

  .page-casino-table-games__container {
    padding: 0 15px;
  }

  .page-casino-table-games__feature-cards,
  .page-casino-table-games__games-grid-full,
  .page-casino-table-games__benefits-grid,
  .page-casino-table-games__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-casino-table-games__card,
  .page-casino-table-games__game-card-large,
  .page-casino-table-games__benefit-item,
  .page-casino-table-games__step-card {
    padding: 20px;
  }

  .page-casino-table-games__card-title {
    font-size: 20px;
  }

  .page-casino-table-games__game-card-large img {
    height: 200px;
  }

  .page-casino-table-games__game-card-title-large {
    font-size: 22px;
  }

  .page-casino-table-games__benefit-title {
    font-size: 20px;
  }

  .page-casino-table-games__step-number {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .page-casino-table-games__step-title {
    font-size: 20px;
  }

  .page-casino-table-games__faq-question {
    padding: 15px 20px;
  }

  .page-casino-table-games__faq-question h3 {
    font-size: 16px;
  }

  .page-casino-table-games__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-casino-table-games__faq-answer {
    padding: 0 20px;
  }

  .page-casino-table-games__faq-item.active .page-casino-table-games__faq-answer {
    padding: 15px 20px !important;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-casino-table-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-casino-table-games__hero-image-wrapper img,
  .page-casino-table-games__game-card-large img,
  .page-casino-table-games__benefit-item img {
    width: 100% !important;
    height: auto !important; /* Allow auto height for content images */
  }
  
  .page-casino-table-games__container,
  .page-casino-table-games__feature-cards,
  .page-casino-table-games__games-grid-full,
  .page-casino-table-games__benefits-grid,
  .page-casino-table-games__steps-grid,
  .page-casino-table-games__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }
}