/* style/beginner-guide.css */

:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-light: #f8f9fa;
  --background-dark: #002244; /* Slightly darker than primary for contrast */
  --border-color: #e0e0e0;
}

.page-beginner-guide {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default for light backgrounds */
}

/* Ensure content is not hidden by fixed header */
.page-beginner-guide__intro-section {
  padding-top: 120px; /* Desktop: Adjust based on header height */
}

/* General container styling */
.page-beginner-guide__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section backgrounds and text colors for contrast */
.page-beginner-guide__dark-bg {
  background: var(--background-dark);
  color: var(--text-color-light);
}

.page-beginner-guide__light-bg {
  background: var(--background-light);
  color: var(--text-color-dark);
}

.page-beginner-guide__main-title,
.page-beginner-guide__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
  color: inherit; /* Inherit from parent section for contrast */
}

.page-beginner-guide__highlight {
  color: var(--secondary-color);
}

.page-beginner-guide__intro-text {
  font-size: 18px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.page-beginner-guide__cta-button {
  display: block;
  width: fit-content;
  margin: 30px auto 0 auto;
  padding: 15px 30px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000000; /* Black text for contrast on yellow/gold */
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-beginner-guide__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #FFA500, #FFC107);
}

.page-beginner-guide__small-button {
  font-size: 16px;
  padding: 10px 20px;
  margin-top: 20px;
}

/* Card Styling */
.page-beginner-guide__card {
  background: #ffffff;
  color: var(--text-color-dark);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-beginner-guide__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-beginner-guide__card-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 15px;
}

.page-beginner-guide__card-text {
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
}

/* Feature Grid */
.page-beginner-guide__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-beginner-guide__feature-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* Steps Section */
.page-beginner-guide__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-beginner-guide__step-item {
  position: relative;
  padding-top: 60px; /* Space for step number */
}

.page-beginner-guide__step-number {
  position: absolute;
  top: 0px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: var(--text-color-dark);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  border: 3px solid var(--background-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-beginner-guide__step-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 10px;
  margin-bottom: 10px;
}

.page-beginner-guide__step-text {
  font-size: 15px;
  color: #555555;
  margin-bottom: 15px;
}

.page-beginner-guide__step-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 6px;
  margin-top: 20px;
}

/* Game Types Section */
.page-beginner-guide__section-description {
  font-size: 17px;
  text-align: center;
  max-width: 800px;
  margin: -20px auto 40px auto;
  color: var(--text-color-dark);
}

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

.page-beginner-guide__game-type-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 15px;
}

.page-beginner-guide__game-type-card .page-beginner-guide__card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-beginner-guide__game-type-card .page-beginner-guide__card-title a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-beginner-guide__button-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-beginner-guide__button-link:hover {
  background: #004488;
  transform: translateY(-2px);
}

/* Tips Section */
.page-beginner-guide__tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-beginner-guide__tip-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 6px;
  margin-top: 20px;
}

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

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

.page-beginner-guide__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  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-beginner-guide__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-beginner-guide__faq-question:active {
  background: #eeeeee;
}

.page-beginner-guide__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-color-dark);
}

.page-beginner-guide__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-beginner-guide__faq-item.active .page-beginner-guide__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-beginner-guide__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;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

.page-beginner-guide__faq-item.active .page-beginner-guide__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-beginner-guide__main-title,
  .page-beginner-guide__section-title {
    font-size: 32px;
  }
  .page-beginner-guide__intro-text {
    font-size: 16px;
  }
  .page-beginner-guide__container {
    padding: 30px 15px;
  }
  .page-beginner-guide__cta-button {
    font-size: 18px;
    padding: 12px 25px;
  }
  .page-beginner-guide__card {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .page-beginner-guide__intro-section {
    padding-top: 100px !important; /* Mobile: Adjust based on header height */
  }
  .page-beginner-guide__main-title,
  .page-beginner-guide__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-beginner-guide__intro-text {
    font-size: 15px;
  }
  .page-beginner-guide__cta-button {
    font-size: 16px;
    padding: 10px 20px;
  }
  .page-beginner-guide__grid-layout,
  .page-beginner-guide__steps-grid,
  .page-beginner-guide__game-types-grid,
  .page-beginner-guide__tips-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-beginner-guide__card {
    padding: 20px;
  }
  .page-beginner-guide__card-title {
    font-size: 20px;
  }
  .page-beginner-guide__card-text {
    font-size: 14px;
  }
  .page-beginner-guide__step-number {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .page-beginner-guide__step-title {
    font-size: 18px;
  }
  .page-beginner-guide__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-beginner-guide__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-beginner-guide__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-beginner-guide__faq-answer {
    padding: 0 15px;
  }
  .page-beginner-guide__faq-item.active .page-beginner-guide__faq-answer {
    padding: 15px !important;
  }
  /* Mobile image fallback to prevent overflow */
  .page-beginner-guide img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  .page-beginner-guide__container,
  .page-beginner-guide__intro-section,
  .page-beginner-guide__criteria-section,
  .page-beginner-guide__steps-section,
  .page-beginner-guide__game-types-section,
  .page-beginner-guide__tips-section,
  .page-beginner-guide__faq-section,
  .page-beginner-guide__card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-beginner-guide__intro-section .page-beginner-guide__container,
  .page-beginner-guide__criteria-section .page-beginner-guide__container,
  .page-beginner-guide__steps-section .page-beginner-guide__container,
  .page-beginner-guide__game-types-section .page-beginner-guide__container,
  .page-beginner-guide__tips-section .page-beginner-guide__container,
  .page-beginner-guide__faq-section .page-beginner-guide__container {
    padding-left: 0px !important;
    padding-right: 0px !important;
  }
}