/* style/fortunedragon.css */

/* Base styles for the page content, ensuring light text on dark background */
.page-fortunedragon {
  background-color: #08160F; /* Custom background color from palette */
  color: #F2FFF6; /* Main text color for readability on dark background */
  font-family: Arial, sans-serif; /* Example font */
  line-height: 1.6;
  padding-bottom: 40px; /* General padding for main content area */
}

/* Section styling */
.page-fortunedragon__hero-section,
.page-fortunedragon__introduction-section,
.page-fortunedragon__features-section,
.page-fortunedragon__how-to-play-section,
.page-fortunedragon__strategy-section,
.page-fortunedragon__why-choose-section,
.page-fortunedragon__other-games-section,
.page-fortunedragon__faq-section,
.page-fortunedragon__cta-section {
  padding: 60px 20px;
  text-align: center;
  position: relative;
}

/* Specific padding for the first section, avoiding double padding with header */
.page-fortunedragon__hero-section {
  padding-top: 10px; /* Small top padding for the first section */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Ensure no overflow from images */
}

/* Hero Image Wrapper for proper ordering (image then content) */
.page-fortunedragon__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.page-fortunedragon__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 300px; /* Minimum height for hero image */
}

.page-fortunedragon__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin-top: 20px; /* Space between image and content */
  padding: 0 20px;
}

/* Background color variants based on content */
.page-fortunedragon__light-bg {
  background-color: #0A4B2C; /* Deep Green from palette */
  color: #F2FFF6; /* Main text color */
}

.page-fortunedragon__dark-bg {
  background-color: #08160F; /* Background color from palette */
  color: #F2FFF6; /* Main text color */
}

.page-fortunedragon__section-title {
  font-size: 2.5em;
  color: #F2C14E; /* Gold color for titles */
  margin-bottom: 30px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.page-fortunedragon__main-title {
  font-weight: bold;
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: #F2C14E; /* Gold color for main title */
  margin-bottom: 20px;
}

.page-fortunedragon__hero-description,
.page-fortunedragon__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #F2FFF6; /* Main text color */
}

.page-fortunedragon__highlight {
  color: #F2C14E; /* Gold color for highlighted text */
  font-weight: bold;
}

/* Container for content width */
.page-fortunedragon__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* CTA Buttons */
.page-fortunedragon__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  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: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't exceed container width */
}

.page-fortunedragon__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: #F2FFF6; /* Main text color */
  border: none;
}

.page-fortunedragon__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-fortunedragon__btn-secondary {
  background-color: transparent;
  color: #F2C14E; /* Gold color for secondary button text */
  border: 2px solid #F2C14E; /* Gold border */
}

.page-fortunedragon__btn-secondary:hover {
  background-color: #F2C14E; /* Gold background on hover */
  color: #08160F; /* Dark text on hover */
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* General image styling */
.page-fortunedragon img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Slightly rounded corners for images */
  margin: 0 auto; /* Center images */
}

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

.page-fortunedragon__feature-card {
  background-color: #11271B; /* Card BG color from palette */
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* Ensure cards are same height */
  box-sizing: border-box;
  border: 1px solid #2E7A4E; /* Border color from palette */
}

.page-fortunedragon__card-image {
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Minimum image size */
}

.page-fortunedragon__card-title {
  font-size: 1.5em;
  color: #F2C14E; /* Gold color for card titles */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-fortunedragon__card-text {
  font-size: 1em;
  color: #A7D9B8; /* Secondary text color */
}

/* How to Play / Strategy Lists */
.page-fortunedragon__steps-list,
.page-fortunedragon__strategy-list,
.page-fortunedragon__benefits-list {
  list-style: none;
  padding: 0;
  text-align: left;
  margin-top: 30px;
}

.page-fortunedragon__list-item {
  background-color: #11271B; /* Card BG color */
  padding: 25px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #2E7A4E; /* Border color from palette */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-fortunedragon__list-title {
  font-size: 1.3em;
  color: #F2C14E; /* Gold color for list titles */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-fortunedragon__list-description {
  font-size: 1em;
  color: #A7D9B8; /* Secondary text color */
}

/* Image blocks within content */
.page-fortunedragon__content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-fortunedragon__text-block,
.page-fortunedragon__image-block {
  flex: 1;
  min-width: 300px;
}

.page-fortunedragon__block-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-height: 200px; /* Minimum image size */
}

/* Other Fortune Games Grid */
.page-fortunedragon__games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-fortunedragon__game-card {
  background-color: #11271B; /* Card BG color */
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border color from palette */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-fortunedragon__game-image {
  margin-bottom: 15px;
  object-fit: cover;
  min-height: 150px; /* Minimum image size for game cards */
}

.page-fortunedragon__game-title {
  font-size: 1.3em;
  color: #F2C14E; /* Gold color for game titles */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-fortunedragon__game-description {
  font-size: 0.95em;
  color: #A7D9B8; /* Secondary text color */
}

/* FAQ Section */
.page-fortunedragon__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.page-fortunedragon__faq-item {
  background-color: #11271B; /* Card BG color */
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2E7A4E; /* Border color from palette */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-fortunedragon__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #F2FFF6; /* Main text color */
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-fortunedragon__faq-question:hover {
  background-color: rgba(46, 122, 78, 0.2); /* Slightly lighter hover for border color */
}

.page-fortunedragon__faq-item[open] .page-fortunedragon__faq-question {
  background-color: rgba(46, 122, 78, 0.3);
}

.page-fortunedragon__faq-qtext {
  flex-grow: 1;
}

.page-fortunedragon__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 20px;
  color: #F2C14E; /* Gold color for toggle icon */
}

.page-fortunedragon__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #A7D9B8; /* Secondary text color */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding-top 0.3s ease-out;
}

.page-fortunedragon__faq-item[open] .page-fortunedragon__faq-answer {
  max-height: 500px; /* Sufficiently large to show content */
  padding-top: 10px;
}

/* For details tag, hide default marker */
.page-fortunedragon__faq-item summary::-webkit-details-marker {
  display: none;
}
.page-fortunedragon__faq-item summary {
  list-style: none;
}

/* Links within content */
.page-fortunedragon a {
  color: #2AD16F; /* Green color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-fortunedragon a:hover {
  color: #57E38D; /* Lighter green on hover */
  text-decoration: underline;
}

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

@media (max-width: 768px) {
  .page-fortunedragon__hero-section {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-fortunedragon__hero-content {
    margin-top: 15px;
  }
  .page-fortunedragon__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem); /* Further adjust H1 for mobile */
  }
  .page-fortunedragon__hero-description {
    font-size: 1em;
  }
  .page-fortunedragon__section-title {
    font-size: 1.8em;
  }
  .page-fortunedragon__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-fortunedragon__btn-primary,
  .page-fortunedragon__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-fortunedragon__grid,
  .page-fortunedragon__games-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page-fortunedragon__content-wrapper {
    flex-direction: column; /* Stack image and text blocks */
    gap: 20px;
  }

  .page-fortunedragon__text-block,
  .page-fortunedragon__image-block {
    min-width: unset; /* Remove min-width restriction */
    width: 100%;
  }

  /* Mobile image and video responsive rules */
  .page-fortunedragon img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px; /* Maintain minimum image size */
  }
  .page-fortunedragon video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-fortunedragon__section,
  .page-fortunedragon__card,
  .page-fortunedragon__container,
  .page-fortunedragon__video-section,
  .page-fortunedragon__video-container,
  .page-fortunedragon__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }
  .page-fortunedragon__video-section {
    padding-top: 10px !important; /* Small top padding for video section */
  }

  /* Ensure text contrast on small screens if background changes */
  .page-fortunedragon p,
  .page-fortunedragon li,
  .page-fortunedragon__card-text,
  .page-fortunedragon__game-description,
  .page-fortunedragon__faq-answer {
    font-size: 0.95em;
  }
}

/* Ensure minimum image size for content images */
.page-fortunedragon__card-image,
.page-fortunedragon__block-image,
.page-fortunedragon__game-image {
  min-width: 200px;
  min-height: 200px;
}