/* style/beginner-guide.css */

/* General Styles */
.page-beginner-guide {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color, #F2FFF6); /* Default text color from palette */
  background-color: var(--background-color, #08160F); /* Default background color from palette */
}

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

.page-beginner-guide h1,
.page-beginner-guide h2,
.page-beginner-guide h3 {
  color: var(--text-main-color);
  margin-bottom: 1em;
  font-weight: bold;
}

.page-beginner-guide h1 {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Using clamp for H1 font size */
  text-align: center;
  line-height: 1.2;
}

.page-beginner-guide h2 {
  font-size: clamp(2em, 4vw, 2.8em);
  text-align: center;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--divider-color);
  margin-bottom: 1.5em;
}

.page-beginner-guide h3 {
  font-size: clamp(1.5em, 3vw, 2em);
  margin-top: 1.5em;
  color: var(--gold-color); /* Using gold for H3 for emphasis */
}

.page-beginner-guide p {
  margin-bottom: 1em;
  color: var(--text-secondary-color);
}

.page-beginner-guide a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-beginner-guide a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Section and Container Layout */
.page-beginner-guide__section {
  padding: 60px 20px;
  text-align: center;
  position: relative;
}

.page-beginner-guide__dark-section {
  background-color: var(--deep-green-color); /* Use Deep Green for dark sections */
  color: var(--text-main-color);
}

.page-beginner-guide__dark-section h2 {
  color: var(--text-main-color);
  border-bottom-color: var(--border-color);
}

.page-beginner-guide__dark-section p {
  color: var(--text-secondary-color);
}

.page-beginner-guide__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Add padding for content inside container */
}

/* Hero Section */
.page-beginner-guide__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  padding-bottom: 60px; /* Space below content */
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--background-color);
}

.page-beginner-guide__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 30px; /* Space between image and content */
}

.page-beginner-guide__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.page-beginner-guide__hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 15px;
}

.page-beginner-guide__main-title {
  color: var(--text-main-color);
  margin-bottom: 20px;
}

.page-beginner-guide__description {
  font-size: 1.1em;
  color: var(--text-secondary-color);
  margin-bottom: 30px;
}

/* Buttons */
.page-beginner-guide__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-beginner-guide__btn-primary,
.page-beginner-guide__btn-secondary,
.page-beginner-guide__btn-game {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
}

.page-beginner-guide__btn-primary {
  background: var(--button-gradient);
  color: var(--text-main-color); /* White text for primary button */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-beginner-guide__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-beginner-guide__btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-beginner-guide__btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--background-color);
  border-color: var(--secondary-color);
}

.page-beginner-guide__btn-game {
  background-color: var(--card-bg-color);
  color: var(--gold-color);
  border: 1px solid var(--border-color);
  font-size: 1em;
  padding: 12px 25px;
}

.page-beginner-guide__btn-game:hover {
  background-color: var(--deep-green-color);
  color: var(--text-main-color);
  border-color: var(--gold-color);
}

/* Step Cards */
.page-beginner-guide__step-card-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-beginner-guide__step-card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--text-secondary-color);
  border: 1px solid var(--border-color);
}

.page-beginner-guide__step-card .page-beginner-guide__step-title {
  color: var(--gold-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.page-beginner-guide__step-card .page-beginner-guide__step-image {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* Ensure it behaves as a block element */
}

.page-beginner-guide__step-card .page-beginner-guide__btn-primary {
  margin-top: auto; /* Push button to bottom */
  align-self: center;
  width: auto;
  max-width: 80%;
}

.page-beginner-guide__game-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}

/* Tip List */
.page-beginner-guide__tip-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  text-align: left;
}

.page-beginner-guide__tip-item {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.page-beginner-guide__tip-item .page-beginner-guide__tip-heading {
  color: var(--gold-color);
  margin-top: 0;
  margin-bottom: 10px;
}

.page-beginner-guide__tip-item .page-beginner-guide__text-block {
  margin-bottom: 15px;
}

/* FAQ Section */
.page-beginner-guide__faq-list {
  margin-top: 30px;
  text-align: left;
}

.page-beginner-guide__faq-item {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  overflow: hidden; /* For smooth transition on details */
}

.page-beginner-guide__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-main-color);
  background-color: var(--card-bg-color);
  transition: background-color 0.3s ease;
  list-style: none; /* For details summary */
}

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

.page-beginner-guide__faq-item summary {
  list-style: none;
}

.page-beginner-guide__faq-question:hover {
  background-color: var(--deep-green-color);
}

.page-beginner-guide__faq-qtext {
  flex-grow: 1;
  font-size: 1.1em;
  color: var(--text-main-color);
}

.page-beginner-guide__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--gold-color);
}

.page-beginner-guide__faq-answer {
  padding: 0 25px 20px;
  color: var(--text-secondary-color);
  font-size: 0.95em;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-beginner-guide__faq-item[open] .page-beginner-guide__faq-answer {
  max-height: 500px; /* Sufficient height for content */
  padding-top: 10px;
  transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.page-beginner-guide__faq-item[open] .page-beginner-guide__faq-toggle {
  content: "−";
}

.page-beginner-guide__faq-answer .page-beginner-guide__btn-primary {
  margin-top: 15px;
  align-self: flex-start;
  width: auto;
  max-width: 100%;
}

.page-beginner-guide__image-in-text {
  width: 100%;
  height: auto;
  display: block;
  margin: 15px 0;
  border-radius: 8px;
  max-height: 300px;
  object-fit: cover;
}

/* Contact Section */
.page-beginner-guide__contact-methods {
  margin-top: 30px;
  text-align: left;
}

.page-beginner-guide__contact-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

.page-beginner-guide__contact-item {
  background-color: var(--card-bg-color);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 10px;
  color: var(--text-secondary-color);
  border: 1px solid var(--border-color);
}

.page-beginner-guide__contact-item:last-child {
  margin-bottom: 0;
}

.page-beginner-guide__contact-methods .page-beginner-guide__btn-primary {
  margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .page-beginner-guide {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-beginner-guide__section {
    padding: 40px 15px;
  }

  .page-beginner-guide__hero-section {
    padding-bottom: 40px;
  }

  .page-beginner-guide__main-title {
    font-size: clamp(2em, 8vw, 2.5em);
  }

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

  .page-beginner-guide__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-beginner-guide__btn-primary,
  .page-beginner-guide__btn-secondary,
  .page-beginner-guide__btn-game {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 1em;
  }

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

  .page-beginner-guide__step-card {
    padding: 20px;
  }

  .page-beginner-guide__step-card .page-beginner-guide__btn-primary {
    max-width: 100%;
  }

  .page-beginner-guide__game-links {
    flex-direction: column;
    gap: 10px;
  }

  .page-beginner-guide__faq-question {
    padding: 15px 20px;
  }

  .page-beginner-guide__faq-qtext {
    font-size: 1em;
  }

  .page-beginner-guide__faq-answer {
    padding: 0 20px 15px;
  }

  /* Images and Video Responsive Rules */
  .page-beginner-guide img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-beginner-guide video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-beginner-guide__section,
  .page-beginner-guide__card,
  .page-beginner-guide__container,
  .page-beginner-guide__hero-section,
  .page-beginner-guide__step-card-wrapper,
  .page-beginner-guide__step-card,
  .page-beginner-guide__tip-item,
  .page-beginner-guide__faq-item,
  .page-beginner-guide__contact-item,
  .page-beginner-guide__cta-buttons,
  .page-beginner-guide__game-links {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
  
  .page-beginner-guide__hero-section {
    padding-top: 10px !important; /* Small top padding for hero */
  }
}

/* Ensure images in text blocks are also responsive */
.page-beginner-guide__text-block img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
  border-radius: 8px;
}

/* Color contrast adjustments for specific elements if needed - based on body background */
/* Assuming body background is dark (var(--background-color: #08160F)) based on palette */
/* Most colors are already set for dark background, but adding explicit rules for safety */
.page-beginner-guide p,
.page-beginner-guide li {
  color: var(--text-secondary-color); /* Lighter color for dark background */
}

.page-beginner-guide__faq-answer p {
  color: var(--text-secondary-color);
}