/* style/game-rules.css */

/* Custom Color Variables */
:root {
  --kkwin-bg-dark: #08160F;
  --kkwin-card-bg: #11271B;
  --kkwin-text-main: #F2FFF6;
  --kkwin-text-secondary: #A7D9B8;
  --kkwin-border: #2E7A4E;
  --kkwin-glow: #57E38D;
  --kkwin-gold: #F2C14E;
  --kkwin-divider: #1E3A2A;
  --kkwin-deep-green: #0A4B2C;
  --kkwin-btn-gradient-start: #2AD16F;
  --kkwin-btn-gradient-end: #13994A;
}

.page-game-rules {
  font-family: Arial, sans-serif;
  color: var(--kkwin-text-main); /* Default text color for the page, as body is dark */
  background-color: var(--kkwin-bg-dark);
}

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--kkwin-card-bg);
  gap: 30px;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  order: 1; /* Ensure image is above content */
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.page-game-rules__hero-content {
  width: 100%;
  max-width: 1200px;
  text-align: center;
  order: 2; /* Ensure content is below image */
  color: var(--kkwin-text-main);
}

.page-game-rules__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--kkwin-gold);
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
}

.page-game-rules__description {
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--kkwin-text-secondary);
}

.page-game-rules__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons fit in container */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, var(--kkwin-btn-gradient-start) 0%, var(--kkwin-btn-gradient-end) 100%);
  color: var(--kkwin-text-main);
  border: 2px solid transparent;
}

.page-game-rules__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-game-rules__btn-secondary:hover {
  background: var(--kkwin-btn-gradient-start);
  color: var(--kkwin-text-main);
}

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

.page-game-rules__heading {
  font-size: 2.5rem; /* 40px */
  font-weight: bold;
  color: var(--kkwin-gold);
  margin-bottom: 30px;
  text-align: center;
}

.page-game-rules__sub-heading {
  font-size: 1.75rem; /* 28px */
  font-weight: bold;
  color: var(--kkwin-text-main);
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-game-rules__text-block {
  font-size: 1rem; /* 16px */
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--kkwin-text-secondary);
}

.page-game-rules__image-content {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-game-rules__list-item {
  background-color: var(--kkwin-card-bg);
  border: 1px solid var(--kkwin-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--kkwin-text-main);
}

.page-game-rules__list-item strong {
  color: var(--kkwin-gold);
}

.page-game-rules__faq-list {
  margin-top: 30px;
}

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

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.125rem; /* 18px */
  font-weight: bold;
  color: var(--kkwin-text-main);
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-game-rules__faq-item[open] > .page-game-rules__faq-question {
  background-color: var(--kkwin-deep-green);
}

.page-game-rules__faq-question:hover {
  background-color: var(--kkwin-deep-green);
}

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--kkwin-gold);
}

.page-game-rules__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--kkwin-text-secondary);
}

/* Ensure content area images are never too small by CSS */
.page-game-rules__content-area img {
  min-width: 200px;
  min-height: 200px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__hero-section {
    padding: 40px 15px;
  }

  .page-game-rules__main-title {
    font-size: clamp(24px, 5vw, 40px);
  }

  .page-game-rules__heading {
    font-size: 2rem; /* 32px */
  }

  .page-game-rules__sub-heading {
    font-size: 1.5rem; /* 24px */
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-section {
    padding: 30px 15px;
    flex-direction: column;
    gap: 20px;
  }

  .page-game-rules__hero-image-wrapper {
    order: 1;
  }

  .page-game-rules__hero-content {
    order: 2;
  }

  .page-game-rules__main-title {
    font-size: clamp(22px, 6vw, 36px);
    margin-bottom: 15px;
  }

  .page-game-rules__description {
    font-size: 0.9375rem; /* 15px */
    margin-bottom: 20px;
  }

  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.9375rem; /* 15px */
  }

  .page-game-rules__section {
    padding: 30px 15px;
  }

  .page-game-rules__heading {
    font-size: 1.75rem; /* 28px */
    margin-bottom: 20px;
  }

  .page-game-rules__sub-heading {
    font-size: 1.25rem; /* 20px */
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-game-rules__text-block,
  .page-game-rules__list-item,
  .page-game-rules__faq-answer {
    font-size: 0.9375rem; /* 15px */
  }

  .page-game-rules__faq-question {
    font-size: 1rem; /* 16px */
    padding: 15px;
  }

  /* Mobile image and container responsiveness */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: unset !important; /* Override min-width for mobile */
    min-height: unset !important; /* Override min-height for mobile */
  }
  
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__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__hero-section,
  .page-game-rules__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}