/* style/game-guides.css */

/* Custom CSS Variables for easier management */
:root {
  --primary-color: #017439;
  --auxiliary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --button-register-bg: #C30808;
  --button-register-text: #FFFF00;
  --border-color: #e0e0e0;
  --card-bg: #FFFFFF;
}

/* Base styles for the page content */
.page-game-guides {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background: var(--auxiliary-color); /* Matches body background from shared.css */
}

/* Hero Section */
.page-game-guides__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #004d26 100%); /* Dark gradient background */
  color: var(--text-light); /* Light text for dark background */
  overflow: hidden; /* Prevent image overflow */
}

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

.page-game-guides__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-game-guides__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px; /* Apply border-radius to the image itself */
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-game-guides__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 15px;
}

.page-game-guides__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

.page-game-guides__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
  opacity: 0.9;
}

.page-game-guides__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Prevent overflow */
  box-sizing: border-box;
}

.page-game-guides__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  flex-shrink: 0; /* Prevent shrinking */
}

.page-game-guides__btn-primary {
  background: var(--button-register-bg); /* #C30808 */
  color: var(--button-register-text); /* #FFFF00 */
  border: 2px solid var(--button-register-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-game-guides__btn-primary:hover {
  background: #a30707; /* Darker red */
  border-color: #a30707;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-game-guides__btn-secondary {
  background: transparent;
  color: var(--button-register-text); /* #FFFF00 */
  border: 2px solid var(--button-register-text); /* #FFFF00 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-game-guides__btn-secondary:hover {
  background: rgba(255, 255, 0, 0.1); /* Slightly transparent yellow */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-game-guides__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

.page-game-guides__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-game-guides__section-title--white {
  color: var(--text-light);
}

.page-game-guides__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--text-dark);
}

.page-game-guides__text-block--white {
  color: var(--text-light);
}

/* Introduction Section */
.page-game-guides__introduction {
  background: var(--auxiliary-color); /* White background */
  color: var(--text-dark);
}

/* Game Section (Cards) */
.page-game-guides__game-section {
  background: var(--primary-color); /* Dark green background */
  color: var(--text-light);
}

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

.page-game-guides__game-card {
  background: var(--card-bg); /* White card background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-game-guides__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-game-guides__game-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-game-guides__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
}

.page-game-guides__card-title {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-color); /* Dark green title */
  font-weight: 600;
}

.page-game-guides__card-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-game-guides__card-title a:hover {
  color: #005c2e; /* Darker primary color */
}

.page-game-guides__game-card p {
  font-size: 1em;
  margin-bottom: 20px;
  line-height: 1.7;
}

.page-game-guides__card-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  margin-top: auto; /* Push link to bottom of card */
  transition: color 0.3s ease;
}

.page-game-guides__card-link:hover {
  color: #005c2e; /* Darker primary color */
  text-decoration: underline;
}

/* Other Games Section (List) */
.page-game-guides__other-games {
  background: var(--auxiliary-color); /* White background */
  color: var(--text-dark);
}

.page-game-guides__list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-game-guides__list-item {
  background: var(--card-bg); /* White item background */
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-guides__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-game-guides__list-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-game-guides__list-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-game-guides__list-title a:hover {
  color: #005c2e;
}

.page-game-guides__list-item p {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Responsible Gaming Section */
.page-game-guides__responsible-gaming-section {
  background: var(--primary-color); /* Dark green background */
  color: var(--text-light);
}

.page-game-guides__responsible-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.page-game-guides__responsible-text {
  flex: 1;
  min-width: 300px;
}

.page-game-guides__responsible-text p {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-game-guides__responsible-image {
  flex: 1;
  min-width: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-game-guides__responsible-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

/* Why Choose Us Section */
.page-game-guides__why-choose-us {
  background: var(--auxiliary-color); /* White background */
  color: var(--text-dark);
}

.page-game-guides__feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-game-guides__feature-item {
  background: var(--card-bg); /* White feature item background */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-guides__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-game-guides__feature-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-game-guides__feature-item p {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-dark);
}

.page-game-guides__cta-center {
  text-align: center;
  margin-top: 40px;
}

/* FAQ Section */
.page-game-guides__faq-section {
  background: #f8f8f8; /* Light grey background for contrast */
  color: var(--text-dark);
}

.page-game-guides__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-game-guides__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-game-guides__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-game-guides__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-game-guides__faq-question:active {
  background: #eeeeee;
}

.page-game-guides__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: var(--primary-color);
}

.page-game-guides__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-game-guides__faq-item.active .page-game-guides__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
  color: var(--button-register-bg); /* Red for active toggle */
}

.page-game-guides__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-dark);
}

.page-game-guides__faq-item.active .page-game-guides__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-game-guides__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.7;
}

/* Conclusion Section */
.page-game-guides__conclusion {
  background: linear-gradient(135deg, #004d26 0%, var(--primary-color) 100%); /* Dark green gradient */
  color: var(--text-light);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-game-guides__main-title {
    font-size: 2.8em;
  }
  .page-game-guides__section-title {
    font-size: 2em;
  }
  .page-game-guides__hero-description {
    font-size: 1.1em;
  }
}

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

  /* Hero Section Mobile */
  .page-game-guides__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Override desktop padding */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-game-guides__hero-image img {
    border-radius: 4px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-game-guides__hero-content {
    padding: 0;
  }

  .page-game-guides__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-game-guides__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-game-guides__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to button container */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-guides__cta-button {
    width: 100% !important; /* Full width for mobile buttons */
    max-width: 100% !important;
    padding: 12px 25px;
    font-size: 16px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General Sections Mobile */
  .page-game-guides__container {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  /* Game Cards Mobile */
  .page-game-guides__game-card-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }

  .page-game-guides__game-card img {
    height: 200px; /* Adjust height for mobile */
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

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

  /* Other Games List Mobile */
  .page-game-guides__list-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }

  .page-game-guides__list-item {
    padding: 20px;
  }

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

  /* Responsible Gaming Mobile */
  .page-game-guides__responsible-content {
    flex-direction: column; /* Stack image and text */
    gap: 30px;
  }

  .page-game-guides__responsible-image {
    order: -1; /* Image above text */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-guides__responsible-image img {
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Why Choose Us Mobile */
  .page-game-guides__feature-list {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }

  .page-game-guides__feature-item {
    padding: 25px;
  }

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

  /* FAQ Mobile */
  .page-game-guides__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-game-guides__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-game-guides__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-game-guides__faq-answer {
    padding: 0 15px;
  }
  
  .page-game-guides__faq-item.active .page-game-guides__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all images inside page-game-guides are responsive */
  .page-game-guides img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Content sections should have padding to prevent edge-to-edge content */
  .page-game-guides__introduction .page-game-guides__container,
  .page-game-guides__game-section .page-game-guides__container,
  .page-game-guides__other-games .page-game-guides__container,
  .page-game-guides__responsible-gaming-section .page-game-guides__container,
  .page-game-guides__why-choose-us .page-game-guides__container,
  .page-game-guides__faq-section .page-game-guides__container,
  .page-game-guides__conclusion .page-game-guides__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Color Contrast Fixes */
.page-game-guides__dark-bg {
  background: var(--primary-color);
  color: var(--text-light); /* Enforce white text on dark green */
}

.page-game-guides__light-bg {
  background: var(--auxiliary-color);
  color: var(--text-dark); /* Enforce dark text on white */
}