/* style/game-rules.css */

/* Base styles for the page content, ensuring light text on dark background */
.page-game-rules {
  font-family: 'Arial', sans-serif;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  line-height: 1.6;
  padding-bottom: 50px; /* Space above footer */
}

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

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding */
  background-color: #08160F; /* Ensure dark background */
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-game-rules__hero-content {
  text-align: center;
  padding: 40px 20px 60px;
  z-index: 1;
  max-width: 800px;
}

.page-game-rules__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-game-rules__description {
  font-size: 1.1em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

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

/* General Section Styling */
.page-game-rules__section {
  padding: 60px 0;
  border-bottom: 1px solid #1E3A2A; /* Divider */
}

.page-game-rules__section:last-of-type {
  border-bottom: none;
}

.page-game-rules__section-title {
  font-size: 2.2em;
  font-weight: 600;
  color: #F2C14E; /* Gold */
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.page-game-rules__text-block {
  font-size: 1.05em;
  color: #A7D9B8; /* Text Secondary */
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
}

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

.page-game-rules__card {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-rules__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 15px #57E38D; /* Glow */
}

.page-game-rules__card-title {
  font-size: 1.4em;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-game-rules__card p {
  font-size: 1em;
  color: #A7D9B8; /* Text Secondary */
}

.page-game-rules__content-image {
  display: block;
  margin: 50px auto 0;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Tabs for Specific Rules */
.page-game-rules__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.page-game-rules__tab-input {
  display: none;
}

.page-game-rules__tab-label {
  cursor: pointer;
  padding: 15px 25px;
  background-color: #0A4B2C; /* Deep Green */
  color: #A7D9B8; /* Text Secondary */
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  margin: 0 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
  border-bottom: none;
}

.page-game-rules__tab-input:checked + .page-game-rules__tab-label {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Text Main */
  border-color: #2AD16F;
}

.page-game-rules__tab-content {
  display: none;
  width: 100%;
  padding: 40px;
  background-color: #11271B; /* Card BG */
  border-radius: 0 0 10px 10px;
  border: 1px solid #2E7A4E; /* Border */
  margin-top: -1px; /* Overlap with tab label border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.page-game-rules__tab-input:checked + .page-game-rules__tab-label + .page-game-rules__tab-content {
  display: block;
}

.page-game-rules__tab-title {
  font-size: 1.8em;
  color: #F2C14E; /* Gold */
  margin-bottom: 20px;
  text-align: center;
}

.page-game-rules__tab-content p {
  color: #A7D9B8; /* Text Secondary */
  font-size: 1.05em;
  margin-bottom: 30px;
  text-align: left;
}

.page-game-rules__tab-image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

.page-game-rules__faq-item {
  background-color: #0A4B2C; /* Deep Green */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-game-rules__faq-item summary {
  list-style: none;
}

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

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
  background-color: #13994A; /* Darker green from button gradient */
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #F2C14E; /* Gold */
  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 25px 20px;
  color: #A7D9B8; /* Text Secondary */
  font-size: 1em;
  line-height: 1.8;
}

.page-game-rules__faq-answer p {
  margin-bottom: 0;
}

.page-game-rules__faq-answer a {
  color: #57E38D; /* Glow */
  text-decoration: underline;
}

/* Contact Support Section */
.page-game-rules__contact-methods {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Text Main */
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4), 0 0 10px #57E38D; /* Glow */
}

.page-game-rules__btn-secondary {
  background-color: transparent;
  color: #2AD16F; /* Lighter green from button gradient */
  border: 2px solid #2AD16F;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.page-game-rules__btn-secondary:hover {
  background-color: #2AD16F;
  color: #F2FFF6; /* Text Main */
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4), 0 0 10px #57E38D; /* Glow */
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-game-rules__main-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }

  .page-game-rules__section-title {
    font-size: 1.8em;
  }

  .page-game-rules__grid {
    grid-template-columns: 1fr;
  }

  .page-game-rules__tab-label {
    padding: 12px 20px;
    font-size: 0.95em;
  }

  .page-game-rules__tab-content {
    padding: 30px;
  }

  .page-game-rules__tab-title {
    font-size: 1.5em;
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-content {
    padding: 30px 15px 40px;
  }

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

  .page-game-rules__description {
    font-size: 1em;
  }

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

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

  .page-game-rules__text-block {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-game-rules__card {
    padding: 25px;
  }

  .page-game-rules__card-title {
    font-size: 1.2em;
  }

  .page-game-rules__card p {
    font-size: 0.95em;
  }

  .page-game-rules__content-image,
  .page-game-rules__tab-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-game-rules__tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .page-game-rules__tab-label {
    margin: 0;
    border-radius: 8px;
    margin-bottom: 5px;
    border-bottom: 1px solid #2E7A4E;
  }

  .page-game-rules__tab-input:checked + .page-game-rules__tab-label {
    border-bottom: 1px solid #2AD16F;
  }

  .page-game-rules__tab-content {
    padding: 25px;
    border-radius: 8px;
    margin-top: 10px;
  }

  .page-game-rules__tab-title {
    font-size: 1.3em;
  }

  .page-game-rules__tab-content p {
    font-size: 0.95em;
  }

  .page-game-rules__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-game-rules__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.9em;
  }

  .page-game-rules__contact-methods {
    flex-direction: column;
    gap: 15px;
  }

  /* Ensure all image containers are responsive */
  .page-game-rules__hero-image-wrapper,
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__tabs,
  .page-game-rules__tab-content,
  .page-game-rules__faq-list,
  .page-game-rules__contact-methods {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }
  
  /* Specific override for section to prevent double padding */
  .page-game-rules__section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Adjust padding for inner containers within sections */
  .page-game-rules__general-rules .page-game-rules__container,
  .page-game-rules__specific-rules .page-game-rules__container,
  .page-game-rules__privacy-security .page-game-rules__container,
  .page-game-rules__faq-section .page-game-rules__container,
  .page-game-rules__contact-support .page-game-rules__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

@media (max-width: 480px) {
  .page-game-rules__main-title {
    font-size: clamp(1.6em, 7vw, 2.2em);
  }

  .page-game-rules__section-title {
    font-size: 1.4em;
  }

  .page-game-rules__tab-label {
    font-size: 0.85em;
  }

  .page-game-rules__tab-content {
    padding: 20px;
  }

  .page-game-rules__tab-title {
    font-size: 1.2em;
  }
}