/* style/guides.css */

/* --- Base Styles --- */
.page-guides {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-secondary); /* Default text color, light for dark background */
  background-color: var(--background); /* Default background from shared */
}

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

.page-guides__section {
  padding: 60px 0;
}

.page-guides__section-title {
  font-size: 2.5rem;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-guides__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: bold;
  line-height: 1.2;
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 20px;
  max-width: 800px; /* Limit width for readability */
}

.page-guides__intro-text {
  font-size: 1.1rem;
  color: var(--text-secondary); /* #A7D9B8 */
  margin-bottom: 30px;
  max-width: 700px;
}

/* --- Hero Section --- */
.page-guides__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-bottom: 60px; /* Space below content */
  background-color: var(--deep-green); /* Fallback background */
}

.page-guides__hero-image-wrapper {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.page-guides__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Enforce minimum size */
}

.page-guides__hero-content {
  position: relative; /* Ensure content is above image */
  z-index: 1;
  padding: 40px 20px 0; /* Add padding to content area */
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}

.page-guides__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* --- Buttons --- */
.page-guides__btn-primary,
.page-guides__btn-secondary,
.page-guides__game-card-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
  text-align: center;
}

.page-guides__btn-primary {
  background: var(--button-gradient);
  color: var(--text-main); /* Text Main */
  border: none;
}

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

.page-guides__btn-secondary {
  background: transparent;
  color: var(--secondary-color); /* #22C768 */
  border: 2px solid var(--secondary-color);
}

.page-guides__btn-secondary:hover {
  background: rgba(34, 199, 104, 0.1);
  transform: translateY(-2px);
}

.page-guides__game-card-button {
  background: var(--button-gradient);
  color: var(--text-main);
  border: none;
  padding: 10px 20px;
  font-size: 0.95rem;
}

.page-guides__game-card-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.page-guides__btn-inline {
  margin-top: 20px;
  display: table; /* Allow it to center if needed, but not block */
  margin-left: auto;
  margin-right: auto;
}

/* --- Game Types Grid --- */
.page-guides__game-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-guides__game-card {
  background-color: var(--card-bg); /* #11271B */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border); /* #2E7A4E */
}

.page-guides__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-guides__game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-guides__game-card-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 20px 20px 10px;
}

.page-guides__game-card-title a {
  color: var(--text-main); /* #F2FFF6 */
  text-decoration: none;
}

.page-guides__game-card-title a:hover {
  color: var(--gold); /* #F2C14E */
}

.page-guides__game-card-description {
  color: var(--text-secondary); /* #A7D9B8 */
  font-size: 0.95rem;
  padding: 0 20px 20px;
  flex-grow: 1; /* Push button to bottom */
}

.page-guides__game-card-button {
  margin: 0 20px 20px;
  align-self: center; /* Center button in card */
  width: calc(100% - 40px); /* Adjust width for padding */
}

/* --- Strategy and Tips Sections --- */
.page-guides__strategy-item,
.page-guides__tip-item {
  background-color: var(--card-bg); /* #11271B */
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid var(--border); /* #2E7A4E */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
}

.page-guides__strategy-item:last-child,
.page-guides__tip-item:last-child {
  margin-bottom: 0;
}

.page-guides__strategy-title,
.page-guides__tip-title {
  font-size: 1.8rem;
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-guides__strategy-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 20px;
  object-fit: cover;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

/* --- Safety & Security --- */
.page-guides__safety-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  color: var(--text-secondary);
}

.page-guides__safety-list li {
  background-color: rgba(17, 168, 78, 0.1); /* Light green tint */
  border-left: 4px solid var(--primary-color); /* #11A84E */
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 1rem;
}

.page-guides__safety-highlight {
  color: var(--text-main); /* #F2FFF6 */
}

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

.page-guides__faq-item {
  background-color: var(--card-bg); /* #11271B */
  border: 1px solid var(--border); /* #2E7A4E */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-guides__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  cursor: pointer;
  outline: none;
  list-style: none; /* Hide default marker */
}

.page-guides__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-guides__faq-question {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-guides__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--gold); /* Gold color for toggle */
  transition: transform 0.3s ease;
}

.page-guides__faq-item[open] .page-guides__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or similar */
}

.page-guides__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: var(--text-secondary); /* #A7D9B8 */
}

.page-guides__faq-answer p {
  margin-bottom: 10px;
}

.page-guides__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-guides__faq-answer a {
  color: var(--primary-color); /* #11A84E */
  text-decoration: underline;
}

.page-guides__faq-answer a:hover {
  color: var(--gold); /* #F2C14E */
}

/* --- Conclusion Section --- */
.page-guides__conclusion p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  text-align: center;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-guides__section-title {
    font-size: 2rem;
  }
  .page-guides__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
}

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

  .page-guides__section {
    padding: 40px 0;
  }

  .page-guides__container {
    padding: 0 15px;
  }

  .page-guides__hero-content {
    padding: 30px 15px 0;
  }

  .page-guides__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-guides__intro-text {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-guides__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-guides__btn-primary,
  .page-guides__btn-secondary,
  .page-guides__game-card-button {
    width: 100%; /* Full width for stacked buttons */
    padding: 12px 20px;
    font-size: 0.95rem;
  }

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

  .page-guides__game-card {
    padding-bottom: 0; /* Adjust padding for button */
  }

  .page-guides__game-card-button {
    margin-bottom: 20px;
    width: calc(100% - 40px); /* Adjust for card padding */
  }

  .page-guides__strategy-item,
  .page-guides__tip-item {
    padding: 20px;
    margin-bottom: 20px;
  }

  .page-guides__strategy-title,
  .page-guides__tip-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .page-guides__safety-list li {
    padding: 12px 15px;
    font-size: 0.95rem;
  }

  .page-guides__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-guides__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }

  /* --- Mobile Image Responsiveness (Mandatory) --- */
  .page-guides img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-guides__section,
  .page-guides__card,
  .page-guides__container,
  .page-guides__game-card,
  .page-guides__strategy-item,
  .page-guides__tip-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-guides__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* Video responsiveness (if any, though none currently in HTML) */
  .page-guides video,
  .page-guides__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-guides__video-section,
  .page-guides__video-container,
  .page-guides__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-guides__video-section {
    padding-top: 10px !important;
  }
  
  .page-guides__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Button responsiveness (Mandatory) */
  .page-guides__cta-button,
  .page-guides__btn-primary,
  .page-guides__btn-secondary,
  .page-guides a[class*="button"],
  .page-guides a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px; /* Ensure text inside button has padding */
    padding-right: 15px;
  }
  
  .page-guides__cta-buttons,
  .page-guides__button-group,
  .page-guides__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  
  .page-guides__cta-buttons {
    flex-direction: column !important; /* Force column for main CTAs */
  }
}

/* --- Color Contrast & Brand Colors --- */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C; /* Used for hero section background */
}

/* Base text color for the page, assuming dark background from shared */
.page-guides {
  color: var(--text-secondary); /* A light color for dark background */
  background-color: var(--background);
}

.page-guides h1,
.page-guides h2,
.page-guides h3,
.page-guides h4,
.page-guides h5,
.page-guides h6 {
  color: var(--text-main);
}

.page-guides a {
  color: var(--primary-color);
}

.page-guides a:hover {
  color: var(--gold);
}

.page-guides__dark-bg {
  color: var(--text-main);
  background-color: var(--deep-green);
}

/* Ensure images don't have filters */
.page-guides img {
  filter: none !important;
}

/* Content area image size enforcement */
.page-guides__container img,
.page-guides__game-card-image,
.page-guides__strategy-image {
  min-width: 200px;
  min-height: 200px;
}