/* style/game-rules.css */
/* body đã padding-top: var(--header-offset) từ shared.css, không lặp lại ở đây */

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

.page-game-rules {
  font-family: 'Arial', sans-serif;
  color: var(--page-game-rules-text-main); /* Mặc định chữ sáng trên nền tối */
  background-color: var(--page-game-rules-background-color); /* Nền tối */
}

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

.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Chỉ 10px padding-top, không dùng var(--header-offset) */
  background-color: var(--page-game-rules-background-color);
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  height: 100%;
  max-height: 700px; /* Limit hero image height */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

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

.page-game-rules__hero-content {
  max-width: 900px;
  padding: 0 20px;
  z-index: 1;
  color: var(--page-game-rules-text-main);
}

.page-game-rules__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--page-game-rules-gold-color);
  font-size: clamp(2.5rem, 5vw, 3.8rem); /* Sử dụng clamp cho font-size H1 */
}

.page-game-rules__description {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--page-game-rules-text-secondary);
}

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

.page-game-rules__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-rules__content-area {
  background-color: var(--page-game-rules-text-main); /* Nền trắng cho nội dung chính */
  color: #333333; /* Chữ đen trên nền trắng */
  padding: 60px 0;
}

.page-game-rules__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--page-game-rules-primary-color);
  margin-bottom: 30px;
  text-align: center;
}

.page-game-rules__section-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 40px;
  color: #555555;
}

.page-game-rules__text-block {
  margin-bottom: 40px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.page-game-rules__text-block p {
  margin-bottom: 15px;
}

.page-game-rules__image-inline {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 25px 0;
  display: block;
  object-fit: cover;
  min-width: 200px; /* Đảm bảo kích thước tối thiểu */
  min-height: 200px;
}

.page-game-rules__list-section {
  margin-bottom: 40px;
}

.page-game-rules__sub-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--page-game-rules-deep-green);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-game-rules__list-section p {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-game-rules__specific-rules-section {
  background-color: var(--page-game-rules-background-color);
  padding: 60px 0;
  color: var(--page-game-rules-text-main);
}

.page-game-rules__specific-rules-section .page-game-rules__section-title {
  color: var(--page-game-rules-gold-color);
}

.page-game-rules__specific-rules-section .page-game-rules__section-intro {
  color: var(--page-game-rules-text-secondary);
}

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

.page-game-rules__game-type-card {
  background-color: var(--page-game-rules-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--page-game-rules-border-color);
  min-height: 500px; /* Đảm bảo chiều cao tối thiểu cho card */
}

.page-game-rules__card-image {
  width: 100%;
  height: 200px; /* Chiều cao cố định cho ảnh card */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

.page-game-rules__card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--page-game-rules-text-main);
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-game-rules__card-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-game-rules__card-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--page-game-rules-text-secondary);
  line-height: 1.6;
}

.page-game-rules__card-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--page-game-rules-glow-color);
  font-weight: 700;
}

.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background-color: transparent;
  color: var(--page-game-rules-glow-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--page-game-rules-glow-color);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: auto; /* Đẩy button xuống cuối card */
}

.page-game-rules__btn-secondary:hover {
  background-color: var(--page-game-rules-glow-color);
  color: var(--page-game-rules-background-color);
}

.page-game-rules__player-responsibilities-section {
  background-color: var(--page-game-rules-text-main);
  color: #333333;
  padding: 60px 0;
}

.page-game-rules__player-responsibilities-section .page-game-rules__section-title {
  color: var(--page-game-rules-primary-color);
}

.page-game-rules__player-responsibilities-section .page-game-rules__sub-title {
  color: var(--page-game-rules-deep-green);
}

.page-game-rules__dispute-resolution-section {
  background-color: var(--page-game-rules-background-color);
  color: var(--page-game-rules-text-main);
  padding: 60px 0;
}

.page-game-rules__dispute-resolution-section .page-game-rules__section-title {
  color: var(--page-game-rules-gold-color);
}

.page-game-rules__dispute-resolution-section .page-game-rules__section-intro {
  color: var(--page-game-rules-text-secondary);
}

.page-game-rules__dispute-resolution-section .page-game-rules__sub-title {
  color: var(--page-game-rules-text-main);
}

.page-game-rules__faq-section {
  background-color: var(--page-game-rules-text-main);
  color: #333333;
  padding: 60px 0;
}

.page-game-rules__faq-section .page-game-rules__section-title {
  color: var(--page-game-rules-primary-color);
}

.page-game-rules__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--page-game-rules-deep-green);
  cursor: pointer;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
  background-color: #f0f0f0;
}

.page-game-rules__faq-item[open] > .page-game-rules__faq-question {
  background-color: #e8e8e8;
}

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

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  transform: rotate(45deg);
}

.page-game-rules__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1rem;
  line-height: 1.7;
  color: #555555;
  transition: max-height 0.3s ease-out;
}

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

.page-game-rules__conclusion-section {
  background-color: var(--page-game-rules-background-color);
  padding: 60px 0;
  text-align: center;
  color: var(--page-game-rules-text-main);
}

.page-game-rules__conclusion-section .page-game-rules__section-title {
  color: var(--page-game-rules-gold-color);
}

.page-game-rules__conclusion-section .page-game-rules__text-block {
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: var(--page-game-rules-text-secondary);
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-game-rules__main-title {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  }
  .page-game-rules__description {
    font-size: 1rem;
  }
  .page-game-rules__game-type-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-game-rules__container,
  .page-game-rules__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-game-rules__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px !important;
  }

  .page-game-rules__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-game-rules__hero-image {
    max-height: 400px; /* Adjust hero image height for mobile */
  }

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

  .page-game-rules__description {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

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

  .page-game-rules__content-area,
  .page-game-rules__specific-rules-section,
  .page-game-rules__player-responsibilities-section,
  .page-game-rules__dispute-resolution-section,
  .page-game-rules__faq-section,
  .page-game-rules__conclusion-section {
    padding: 40px 0;
  }

  .page-game-rules__section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 25px;
  }

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

  .page-game-rules__sub-title {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-game-rules__text-block,
  .page-game-rules__list-section p,
  .page-game-rules__card-list li,
  .page-game-rules__faq-answer p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .page-game-rules__image-inline,
  .page-game-rules__card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px;
    min-height: 200px;
  }

  .page-game-rules__game-type-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-rules__game-type-card {
    padding: 20px;
    min-height: auto;
  }

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

  .page-game-rules__btn-secondary {
    font-size: 0.95rem;
    padding: 10px 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-game-rules__faq-toggle {
    font-size: 1.2rem;
  }

  /* Ensure all containers and elements handle overflow to prevent horizontal scroll */
  .page-game-rules__hero-section,
  .page-game-rules__content-area,
  .page-game-rules__specific-rules-section,
  .page-game-rules__player-responsibilities-section,
  .page-game-rules__dispute-resolution-section,
  .page-game-rules__faq-section,
  .page-game-rules__conclusion-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-game-rules__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .page-game-rules__section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }
  .page-game-rules__hero-image {
    max-height: 300px;
  }
}