/* style/game-rules.css */

/* Custom properties for colors */
:root {
  --primary-color: #F2C14E; /* Main color */
  --secondary-color: #FFD36B; /* Auxiliary color / Glow */
  --button-gradient-start: #FFD86A;
  --button-gradient-end: #DDA11D;
  --card-bg: #111111;
  --page-bg: #0A0A0A; /* From shared, but using custom property here for consistency */
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
}

/* Base styles for the page content */
.page-game-rules {
  background-color: var(--page-bg); /* Body background is dark */
  color: var(--text-main); /* Text should be light for contrast */
  font-family: 'Arial', sans-serif; /* Example font */
  line-height: 1.6;
}

/* Sections */
.page-game-rules__section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-game-rules__section--intro,
.page-game-rules__section--general-rules,
.page-game-rules__section--game-types,
.page-game-rules__section--giftcode-terms,
.page-game-rules__section--player-responsibility,
.page-game-rules__section--dispute-resolution,
.page-game-rules__section--faq,
.page-game-rules__section--contact-support {
  background-color: var(--page-bg); /* Consistent with body */
}

.page-game-rules__dark-section {
  background-color: var(--primary-color);
  color: #000000; /* Force dark text on light brand color */
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
}
.page-game-rules__section-title--light {
  color: #000000; /* Dark text on primary color background */
}
.page-game-rules__text-block--light {
  color: #333333; /* Darker text for readability on primary color */
}
.page-game-rules__dark-section .page-game-rules__highlight {
  color: #8B4513; /* A darker brown/gold for contrast on primary color */
}


.page-game-rules__container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Titles */
.page-game-rules__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.page-game-rules__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 600;
  line-height: 1.3;
}

.page-game-rules__card-title,
.page-game-rules__game-card-title {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.page-game-rules__card-title a,
.page-game-rules__game-card-title a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-game-rules__card-title a:hover,
.page-game-rules__game-card-title a:hover {
  color: var(--primary-color);
}

/* Text blocks */
.page-game-rules__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text-main); /* Ensure contrast */
}

.page-game-rules__hero-description {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-main);
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-game-rules__highlight {
  color: var(--secondary-color); /* Highlight important keywords */
  font-weight: bold;
}

/* Links */
.page-game-rules a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-game-rules__read-more-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 500;
  margin-top: 10px;
}
.page-game-rules__read-more-link:hover {
  color: var(--secondary-color);
  text-decoration: none;
}
.page-game-rules__arrow {
  margin-left: 5px;
  transition: transform 0.3s ease;
}
.page-game-rules__read-more-link:hover .page-game-rules__arrow {
  transform: translateX(5px);
}

/* Buttons */
.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
  color: #ffffff; /* White text for button */
  border: 2px solid transparent;
}

.page-game-rules__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
}

.page-game-rules__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-game-rules__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(242, 193, 78, 0.2);
}

.page-game-rules__cta-button--large {
  padding: 18px 40px;
  font-size: 1.25rem;
}

/* Lists */
.page-game-rules__list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.page-game-rules__list-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--text-main);
}

.page-game-rules__list-item::before {
  content: '✓'; /* Checkmark icon */
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Images */
.page-game-rules img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  /* No CSS filters for color manipulation */
}

.page-game-rules__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-height: 500px; /* Limit hero image height */
  overflow: hidden;
}

.page-game-rules__hero-image img {
  width: 100%;
  height: 100%; /* Fill container */
  object-fit: cover;
}

.page-game-rules__image-block {
  margin: 40px 0;
  text-align: center;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-game-rules__content-image {
  margin: 0 auto 20px;
  width: 100%; /* Ensure content images fill their container */
  min-width: 200px; /* Minimum size for content images */
  min-height: 200px;
}

/* Card Grid */
.page-game-rules__content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-game-rules__card {
  background-color: var(--card-bg); /* Dark background for cards */
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  color: var(--text-main); /* Light text on dark card */
}

/* Game Type Cards */
.page-game-rules__game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.page-game-rules__game-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-rules__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(242, 193, 78, 0.2);
}

.page-game-rules__cta-area {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* FAQ Section */
.page-game-rules__faq-list {
  margin-top: 30px;
}

details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg); /* Dark background for FAQ items */
  color: var(--text-main); /* Light text */
}
details.page-rules__faq-item summary.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question:hover {
  background: rgba(var(--primary-color), 0.1); /* Slightly lighter hover */
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--secondary-color); /* Highlight question text */
}
.page-game-rules__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 25px 25px;
  background: rgba(var(--primary-color), 0.05); /* Slightly different background for answer */
  border-radius: 0 0 10px 10px;
  font-size: 1rem;
  color: var(--text-main);
}
details.page-game-rules__faq-item .page-game-rules__faq-answer p {
  margin-bottom: 0;
}


/* HERO Section Specifics */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--page-bg); /* Match body background */
}

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

.page-game-rules__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-game-rules__section {
    padding: 40px 15px;
  }

  .page-game-rules__hero-section {
    padding-top: 10px !important; /* Keep small top padding */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-game-rules__main-title {
    font-size: 2rem;
  }

  .page-game-rules__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  .page-game-rules__card-title,
  .page-game-rules__game-card-title {
    font-size: 1.2rem;
  }

  .page-game-rules__text-block,
  .page-game-rules__list-item,
  .page-game-rules__faq-answer p {
    font-size: 0.95rem;
  }

  .page-game-rules__cta-buttons,
  .page-game-rules__cta-area {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
  }

  .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__hero-image img,
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__dark-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-game-rules__content-grid,
  .page-game-rules__game-cards {
    grid-template-columns: 1fr; /* Single column for cards */
    gap: 20px;
  }

  details.page-game-rules__faq-item summary.page-game-rules__faq-question {
    padding: 15px 20px;
  }
  .page-game-rules__faq-qtext {
    font-size: 1rem;
  }
  .page-game-rules__faq-toggle {
    font-size: 24px;
    width: 25px;
  }
  details.page-game-rules__faq-item .page-game-rules__faq-answer {
    padding: 0 20px 20px;
  }
}

/* Ensure content area images are never too small */
.page-game-rules img:not(.page-game-rules__hero-image img) {
  min-width: 200px;
  min-height: 200px;
}
.page-game-rules__content-image {
  min-width: 200px;
  min-height: 200px;
}

/* Contrast Fixes - applying to specific elements as needed */
/* For example, if .page-game-rules__dark-section is too bright for brand text: */
.page-game-rules__dark-section .page-game-rules__text-block {
  color: #333333; /* Darker text for better contrast on primary color background */
}
.page-game-rules__dark-section .page-game-rules__cta-button--large {
  color: #ffffff; /* Ensure button text is white */
}