/* style/game-rules.css */

/* Custom Colors */
:root {
  --benvip-primary: #11A84E;
  --benvip-secondary: #22C768;
  --benvip-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --benvip-card-bg: #11271B;
  --benvip-background: #08160F;
  --benvip-text-main: #F2FFF6;
  --benvip-text-secondary: #A7D9B8;
  --benvip-border: #2E7A4E;
  --benvip-glow: #57E38D;
  --benvip-gold: #F2C14E;
  --benvip-divider: #1E3A2A;
  --benvip-deep-green: #0A4B2C;
}

/* Base styles for the page content, ensuring contrast with shared body background */
.page-game-rules {
  background-color: var(--benvip-background); /* Override shared.css if necessary */
  color: var(--benvip-text-main); /* Light text for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* HERO Section */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: var(--benvip-background);
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height to prevent overly tall hero on desktop */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum size */
}

.page-game-rules__hero-content {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: center;
  padding: 0 20px;
  z-index: 10;
  color: var(--benvip-text-main);
}

.page-game-rules__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  color: var(--benvip-gold); /* Using gold for main title */
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-game-rules__description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 30px;
  color: var(--benvip-text-secondary);
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--benvip-button-gradient);
  color: var(--benvip-text-main);
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-game-rules__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}

/* General Section Styles */
.page-game-rules__section {
  padding: 60px 0;
  background-color: var(--benvip-background);
}

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

.page-game-rules__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--benvip-primary);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  position: relative;
  padding-bottom: 10px;
}

.page-game-rules__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--benvip-gold);
  border-radius: 2px;
}

.page-game-rules__text-block {
  font-size: 1rem;
  color: var(--benvip-text-secondary);
  margin-bottom: 20px;
  text-align: justify;
}

/* Rule Cards Grid */
.page-game-rules__rule-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-game-rules__card {
  background-color: var(--benvip-card-bg); /* Card BG */
  border: 1px solid var(--benvip-border); /* Border */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: var(--benvip-text-main); /* Main text for dark card background */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 450px;
}

.page-game-rules__card-title {
  font-size: 1.5rem;
  color: var(--benvip-primary);
  margin-bottom: 20px;
  font-weight: bold;
  text-align: center;
}

.page-game-rules__card-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-height: 200px; /* Minimum image size for cards */
  max-height: 250px;
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.page-game-rules__list-item {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  font-size: 0.95rem;
  color: var(--benvip-text-secondary);
}

.page-game-rules__list-item::before {
  content: '✓';
  color: var(--benvip-gold);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
}

.page-game-rules__link {
  color: var(--benvip-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-game-rules__link:hover {
  color: var(--benvip-secondary);
  text-decoration: underline;
}

/* Game Type Cards */
.page-game-rules__game-type-card {
  background-color: var(--benvip-card-bg);
  border: 1px solid var(--benvip-border);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: var(--benvip-text-main);
  text-align: center;
}

.page-game-rules__game-type-title {
  font-size: 1.8rem;
  color: var(--benvip-primary);
  margin-bottom: 20px;
  font-weight: bold;
}

.page-game-rules__game-type-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-height: 200px;
  max-height: 400px;
}

.page-game-rules__small-button {
  padding: 10px 20px;
  font-size: 1rem;
  margin-top: 20px;
}

/* Responsibilities Section */
.page-game-rules__responsibilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* FAQ Section */
.page-game-rules__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-game-rules__faq-item {
  background-color: var(--benvip-card-bg);
  border: 1px solid var(--benvip-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--benvip-text-main);
}

.page-game-rules__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--benvip-primary);
  background-color: var(--benvip-deep-green);
  border-bottom: 1px solid var(--benvip-divider);
}

.page-game-rules__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-game-rules__faq-qtext {
  flex-grow: 1;
}

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--benvip-gold);
}

.page-game-rules__faq-answer {
  padding: 20px;
  font-size: 0.95rem;
  color: var(--benvip-text-secondary);
  line-height: 1.5;
  background-color: var(--benvip-card-bg);
}

/* Conclusion Section */
.page-game-rules__conclusion-section {
  text-align: center;
  padding-bottom: 80px;
}

.page-game-rules__final-cta-button {
  margin-top: 40px;
  padding: 18px 40px;
  font-size: 1.2rem;
}

/* Color Contrast Fixes (applied to lighter background sections) */
.page-game-rules__light-bg {
  background: var(--benvip-text-main); /* Use a very light background */
  color: #333333; /* Dark text for light background */
  border: 1px solid #e0e0e0;
}

.page-game-rules__text-contrast-fix {
  color: #333333 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__hero-content {
    max-width: 768px;
  }
  .page-game-rules__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-game-rules__description {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  }
  .page-game-rules__section-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
  }
}

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

  .page-game-rules__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-game-rules__hero-image-wrapper {
    max-height: 400px;
  }

  .page-game-rules__hero-content {
    margin-top: 30px;
    padding: 0 15px;
  }

  .page-game-rules__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-game-rules__description {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
  }

  .page-game-rules__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .page-game-rules__section {
    padding: 40px 0;
  }

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

  .page-game-rules__section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 30px;
  }

  .page-game-rules__rule-card-grid,
  .page-game-rules__responsibilities-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-rules__card {
    padding: 20px;
    min-height: auto;
  }

  .page-game-rules__card-title {
    font-size: 1.3rem;
  }

  /* Responsive image and video handling */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-game-rules video,
  .page-game-rules__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__video-section,
  .page-game-rules__video-container,
  .page-game-rules__video-wrapper,
  .page-game-rules__cta-buttons,
  .page-game-rules__button-group,
  .page-game-rules__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-game-rules__video-section {
    padding-top: 10px !important;
  }

  .page-game-rules__faq-item summary {
    font-size: 1rem;
    padding: 15px;
  }

  .page-game-rules__faq-answer {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .page-game-rules__main-title {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }
  .page-game-rules__description {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
  }
  .page-game-rules__cta-button {
    font-size: 0.95rem;
    padding: 10px 15px;
  }
  .page-game-rules__section-title {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }
  .page-game-rules__card-title {
    font-size: 1.2rem;
  }
  .page-game-rules__list-item {
    font-size: 0.9rem;
  }
  .page-game-rules__game-type-title {
    font-size: 1.6rem;
  }
  .page-game-rules__faq-item summary {
    font-size: 0.9rem;
  }
}