.page-fortunedragon {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light backgrounds */
  line-height: 1.6;
  background-color: #FFFFFF; /* Ensure page background is white, matching body default */
}

/* Color contrast enforcement */
.page-fortunedragon__dark-bg {
  background-color: #017439; /* Brand primary color */
  color: #ffffff; /* White text for dark background */
}

.page-fortunedragon__light-bg {
  background-color: #ffffff; /* Auxiliary color / light background */
  color: #333333; /* Dark text for light background */
}

/* Headings */
.page-fortunedragon__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #017439; /* Brand color for main title */
}

.page-fortunedragon__section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  color: #017439; /* Brand color for section titles */
}

.page-fortunedragon__section-title.page-fortunedragon__dark-bg {
    color: #ffffff; /* White for dark background titles */
}

.page-fortunedragon__sub-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #017439;
}

.page-fortunedragon__sub-title.page-fortunedragon__dark-bg {
    color: #ffffff; /* White for dark background subtitles */
}

.page-fortunedragon__description {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: center;
}

/* Hero Section */
.page-fortunedragon__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding */
  text-align: center;
  overflow: hidden; /* Ensure no overflow */
}

.page-fortunedragon__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height to prevent excessive size on large screens */
  overflow: hidden;
  position: relative;
}

.page-fortunedragon__hero-image {
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  display: block;
  object-fit: cover; /* Cover the container without distortion */
}

.page-fortunedragon__hero-content {
  padding: 40px 20px;
  width: 100%;
  max-width: 800px; /* Constrain content width */
  box-sizing: border-box;
}

.page-fortunedragon__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-fortunedragon__btn-primary,
.page-fortunedragon__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%; /* Button responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-fortunedragon__btn-primary {
  background-color: #017439; /* Brand primary color */
  color: #ffffff; /* White text for contrast */
  border: 2px solid #017439;
}

.page-fortunedragon__btn-primary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

.page-fortunedragon__btn-secondary {
  background-color: #C30808; /* Specific color for register/login type buttons */
  color: #ffffff; /* White text for contrast (WCAG AA compliant) */
  border: 2px solid #C30808;
}

.page-fortunedragon__btn-secondary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

/* General Container */
.page-fortunedragon__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* About Section */
.page-fortunedragon__about-section p {
  margin-bottom: 15px;
  text-align: justify;
}

.page-fortunedragon__about-section a {
  color: #017439;
  text-decoration: underline;
}

.page-fortunedragon__about-section a:hover {
  color: #005f2e;
}

/* How to Play Section */
.page-fortunedragon__how-to-play-section {
  padding-bottom: 60px;
}

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

.page-fortunedragon__step-card {
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  background-color: #ffffff;
  color: #333333;
}

.page-fortunedragon__step-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #017439;
  margin-bottom: 15px;
}

.page-fortunedragon__step-card p {
  font-size: 1rem;
}

.page-fortunedragon__cta-bottom {
  text-align: center;
  margin-top: 50px;
}

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

.page-fortunedragon__feature-card {
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  background-color: #ffffff;
  color: #333333;
}

.page-fortunedragon__feature-icon {
  width: 100%; /* Ensure images fill card width */
  height: auto;
  max-height: 250px; /* Limit height */
  object-fit: contain; /* Contain within bounds */
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-fortunedragon__feature-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #017439;
  margin-bottom: 10px;
}

/* Strategies Section */
.page-fortunedragon__strategies-section p {
  margin-bottom: 15px;
  text-align: justify;
}

.page-fortunedragon__strategy-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.page-fortunedragon__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: #017439; /* Question text color */
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.page-fortunedragon__faq-item[open] .page-fortunedragon__faq-question {
  border-bottom: 1px solid transparent;
}

.page-fortunedragon__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: #017439;
  transition: transform 0.3s ease;
}

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

.page-fortunedragon__faq-answer {
  padding: 15px 20px;
  font-size: 1rem;
  color: #333333;
}

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

.page-fortunedragon__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-fortunedragon__faq-answer a:hover {
  color: #005f2e;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-fortunedragon__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .page-fortunedragon__section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .page-fortunedragon {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-fortunedragon__hero-content {
    padding: 30px 15px;
  }

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

  .page-fortunedragon__description {
    font-size: 1rem;
  }

  .page-fortunedragon__section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }

  .page-fortunedragon__sub-title {
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-fortunedragon__cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
  }
  
  .page-fortunedragon__btn-primary,
  .page-fortunedragon__btn-secondary {
    padding: 12px 20px;
    font-size: 1rem;
    max-width: 100% !important; /* Force responsive */
    width: 100% !important; /* Force responsive */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-fortunedragon__container {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-fortunedragon__hero-section {
      padding-left: 0;
      padding-right: 0;
  }

  .page-fortunedragon__hero-image-wrapper {
      max-height: 400px; /* Adjust hero image height for mobile */
  }

  /* Image responsive rules */
  .page-fortunedragon img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-fortunedragon__hero-image,
  .page-fortunedragon__feature-icon,
  .page-fortunedragon__strategy-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Containers holding images for mobile */
  .page-fortunedragon__steps-grid,
  .page-fortunedragon__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-fortunedragon__step-card,
  .page-fortunedragon__feature-card {
    padding: 20px;
  }
  
  /* Ensure all sections and containers are responsive */
  .page-fortunedragon__about-section,
  .page-fortunedragon__how-to-play-section,
  .page-fortunedragon__features-section,
  .page-fortunedragon__strategies-section,
  .page-fortunedragon__why-choose-section,
  .page-fortunedragon__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-fortunedragon__main-title {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }
  .page-fortunedragon__section-title {
    font-size: 1.5rem;
  }
  .page-fortunedragon__sub-title {
    font-size: 1.3rem;
  }
}