/* style/beginner-guide.css */
.page-beginner-guide {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #0a0a0a; /* Ensure consistency with body background */
}

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

.page-beginner-guide__hero-section {
  position: relative;
  padding: 120px 0 60px; /* Adjusted padding to account for header, then responsive */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  min-height: 600px;
  padding-top: var(--header-offset, 120px); /* Ensures space below fixed header */
}

.page-beginner-guide__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3;
}

.page-beginner-guide__hero-title {
  font-size: 3.5em;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-beginner-guide__hero-description {
  font-size: 1.2em;
  color: #ffffff;
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-beginner-guide__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-beginner-guide__btn-primary,
.page-beginner-guide__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
  text-align: center;
  box-sizing: border-box;
}

.page-beginner-guide__btn-primary {
  background-color: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

.page-beginner-guide__btn-primary:hover {
  background-color: #e02a2a;
  border-color: #e02a2a;
}

.page-beginner-guide__btn-secondary {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
}

.page-beginner-guide__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-beginner-guide__content-section {
  padding: 60px 0;
}

.page-beginner-guide__section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  text-align: center;
  color: #017439;
}

.page-beginner-guide__subsection-title {
  font-size: 1.8em;
  margin-top: 40px;
  margin-bottom: 25px;
  color: #017439;
}

.page-beginner-guide__text-block {
  max-width: 900px;
  margin: 0 auto 30px;
  font-size: 1.1em;
  line-height: 1.8;
}

.page-beginner-guide__text-block p {
  color: #333333; /* Dark text for light background */
}

.page-beginner-guide__card {
  background: #ffffff;
  color: #333333; /* Dark text for light background */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.page-beginner-guide__card--dark {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff; /* Light text for dark background */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-beginner-guide__card p,
.page-beginner-guide__card--dark p {
  margin-bottom: 20px;
}

.page-beginner-guide__numbered-list,
.page-beginner-guide__bullet-list {
  list-style-position: inside;
  margin-left: 20px;
  margin-bottom: 20px;
}

.page-beginner-guide__numbered-list li,
.page-beginner-guide__bullet-list li {
  margin-bottom: 10px;
  color: #333333; /* Dark text for light background */
}

.page-beginner-guide__card--dark .page-beginner-guide__numbered-list li,
.page-beginner-guide__card--dark .page-beginner-guide__bullet-list li {
  color: #ffffff; /* Light text for dark background */
}

.page-beginner-guide__content-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

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

.page-beginner-guide__game-card {
  background: #ffffff;
  color: #333333;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
}

.page-beginner-guide__game-card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 15px;
}

.page-beginner-guide__game-card-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-beginner-guide__game-card-title a {
  color: #017439;
  text-decoration: none;
}

.page-beginner-guide__game-card-title a:hover {
  text-decoration: underline;
}

.page-beginner-guide__game-card-description {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-beginner-guide__faq-section {
  padding: 60px 0;
}

.page-beginner-guide__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

.page-beginner-guide__faq-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-beginner-guide__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  list-style: none;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -khtml-user-select: none;    /* Konqueror HTML */
  -moz-user-select: none;      /* Old versions of Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

.page-beginner-guide__faq-item[open] > .page-beginner-guide__faq-question {
  border-bottom: 1px solid #d0d0d0;
  background-color: #f0f0f0;
}

.page-beginner-guide__faq-question::-webkit-details-marker {
  display: none;
}

.page-beginner-guide__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

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

.page-beginner-guide__faq-answer {
  padding: 15px 20px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #e0e0e0;
}

.page-beginner-guide__faq-answer p {
  margin: 0;
  color: #555555; /* Dark text for light background */
}

/* Background color specific styles */
.page-beginner-guide__dark-bg {
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-beginner-guide__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-beginner-guide__light-bg .page-beginner-guide__section-title,
.page-beginner-guide__light-bg .page-beginner-guide__subsection-title {
  color: #017439;
}

.page-beginner-guide__dark-bg .page-beginner-guide__section-title,
.page-beginner-guide__dark-bg .page-beginner-guide__subsection-title {
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-beginner-guide__hero-title {
    font-size: 3em;
  }

  .page-beginner-guide__section-title {
    font-size: 2em;
  }

  .page-beginner-guide__subsection-title {
    font-size: 1.5em;
  }

  .page-beginner-guide__game-card-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-beginner-guide__container {
    padding: 0 15px; /* Add padding for mobile */
  }

  .page-beginner-guide__hero-section {
    padding: 80px 15px 40px; /* Adjust padding for mobile */
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset */
    min-height: 450px;
  }

  .page-beginner-guide__hero-title {
    font-size: 2.2em;
  }

  .page-beginner-guide__hero-description {
    font-size: 1em;
  }

  .page-beginner-guide__hero-cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px; /* Constrain button group width */
    margin: 0 auto;
  }

  .page-beginner-guide__btn-primary,
  .page-beginner-guide__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 0.9em;
  }

  .page-beginner-guide__content-section {
    padding: 40px 0;
  }

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

  .page-beginner-guide__subsection-title {
    font-size: 1.3em;
    margin-top: 30px;
    margin-bottom: 20px;
  }

  .page-beginner-guide__text-block p {
    font-size: 0.95em;
  }

  .page-beginner-guide__card {
    padding: 20px;
  }

  .page-beginner-guide__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-beginner-guide__game-card-image {
    height: 180px;
  }

  .page-beginner-guide__game-card-title {
    font-size: 1.1em;
  }

  .page-beginner-guide__faq-question {
    font-size: 1em;
    padding: 15px;
  }

  .page-beginner-guide__faq-answer {
    padding: 10px 15px;
    font-size: 0.95em;
  }

  /* Image responsive adaptation */
  .page-beginner-guide img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-beginner-guide__section,
  .page-beginner-guide__card,
  .page-beginner-guide__container,
  .page-beginner-guide__game-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Override for elements that might have their own padding */
  .page-beginner-guide__hero-section .page-beginner-guide__container,
  .page-beginner-guide__content-section .page-beginner-guide__container,
  .page-beginner-guide__faq-section .page-beginner-guide__container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-beginner-guide__hero-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-beginner-guide__game-grid {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-beginner-guide__game-card {
    padding-left: 0;
    padding-right: 0;
  }
  .page-beginner-guide__game-card-title,
  .page-beginner-guide__game-card-description {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-beginner-guide__faq-list {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Ensure no horizontal scroll */
  .page-beginner-guide {
    overflow-x: hidden;
  }

  .page-beginner-guide__game-card .page-beginner-guide__btn-secondary {
    max-width: calc(100% - 30px) !important;
    width: calc(100% - 30px) !important;
    margin: 0 15px;
  }
}