/* style/mahjong.css */

/* Base Styles & Typography */
.page-mahjong {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #000000; /* Assuming body background is #000 */
}

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

.page-mahjong__section {
  padding: 80px 0;
  position: relative;
  /* Fixed header spacing */
  padding-top: 120px; /* Desktop padding to clear fixed header */
}

.page-mahjong__section:first-of-type {
  padding-top: 80px; /* Adjust if hero banner is the first section and has its own padding */
}

.page-mahjong__dark-bg {
  background-color: #0d0d0d; /* Slightly lighter than #000 for contrast on sections */
  color: #ffffff;
}

.page-mahjong__light-bg {
  background-color: #f5f5f5;
  color: #333333;
}

.page-mahjong__main-title {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  color: #FFD700; /* Gold color */
  margin-bottom: 20px;
}

.page-mahjong__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #FFD700; /* Gold color for dark backgrounds */
}

.page-mahjong__section-title--dark {
  color: #DC143C; /* Red color for light backgrounds */
}

.page-mahjong__sub-title {
  font-size: 28px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #FFD700;
}

.page-mahjong__text-block {
  font-size: 18px;
  margin-bottom: 20px;
  line-height: 1.8;
  text-align: justify;
}

.page-mahjong__text-block--dark {
  color: #333333;
}

.page-mahjong__highlight {
  color: #FFD700;
  font-weight: bold;
}

.page-mahjong__list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
}

.page-mahjong__list--dark {
  color: #333333;
}

.page-mahjong__numbered-list {
  list-style-type: decimal;
  margin-left: 25px;
  margin-bottom: 20px;
}

.page-mahjong__numbered-list--dark {
  color: #333333;
}

.page-mahjong__list-item {
  font-size: 17px;
  margin-bottom: 10px;
}

.page-mahjong__list-item--dark {
  color: #333333;
}

.page-mahjong__internal-link {
  color: #DC143C; /* Red for links */
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-mahjong__internal-link:hover {
  color: #FFD700; /* Gold on hover */
}

/* Buttons */
.page-mahjong__btn-primary {
  display: inline-block;
  background-color: #FFD700; /* Gold background */
  color: #000000; /* Black text for contrast */
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  margin-top: 20px;
  border: none;
  cursor: pointer;
}

.page-mahjong__btn-primary:hover {
  background-color: #e6c200; /* Darker gold on hover */
  color: #ffffff;
  transform: translateY(-3px);
}

/* Image Styles */
.page-mahjong__image-content {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Hero Banner Specific Styles */
.page-mahjong__hero-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 100px 0; /* Adjust padding-top to clear fixed header */
  background: linear-gradient(to right, #1a1a1a, #000000); /* Dark gradient */
  color: #ffffff;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.page-mahjong__hero-content {
  flex: 1;
  padding: 0 40px;
  max-width: 600px;
  z-index: 1;
}

.page-mahjong__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
}

.page-mahjong__hero-link {
  color: #FFD700;
  font-weight: bold;
  text-decoration: none;
}

.page-mahjong__hero-link:hover {
  text-decoration: underline;
}

.page-mahjong__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
}

.page-mahjong__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

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

.page-mahjong__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;
  color: #333333; /* Ensure dark text on light background */
}

.page-mahjong__faq-item.active .page-mahjong__faq-answer {
  max-height: 2000px !important; /* !important to ensure it expands */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-mahjong__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #2a2a2a; /* Darker background for questions */
  border: 1px solid #3a3a3a;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-mahjong__faq-question:hover {
  background: #3a3a3a;
  border-color: #4a4a4a;
}

.page-mahjong__faq-question:active {
  background: #4a4a4a;
}

.page-mahjong__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff; /* White text for dark question background */
  pointer-events: none;
}

.page-mahjong__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold color for toggle */
  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: 32px;
  height: 32px;
}

.page-mahjong__faq-item.active .page-mahjong__faq-toggle {
  color: #DC143C; /* Red color when active */
  transform: rotate(45deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-mahjong__hero-banner {
    flex-direction: column;
    padding: 80px 0;
  }

  .page-mahjong__hero-content {
    max-width: 100%;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 40px;
  }

  .page-mahjong__hero-image-wrapper {
    padding: 0 20px;
  }

  .page-mahjong__main-title {
    font-size: 40px;
  }

  .page-mahjong__section-title {
    font-size: 32px;
  }

  .page-mahjong__sub-title {
    font-size: 24px;
  }

  .page-mahjong__text-block {
    font-size: 17px;
  }

  .page-mahjong__faq-question h3 {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-mahjong__section {
    padding: 60px 0; /* Mobile padding */
    padding-top: 100px !important; /* Mobile padding to clear fixed header */
  }

  .page-mahjong__hero-banner {
    padding: 60px 0;
  }

  .page-mahjong__hero-content {
    margin-bottom: 30px;
  }

  .page-mahjong__main-title {
    font-size: 32px;
  }

  .page-mahjong__hero-description {
    font-size: 16px;
  }

  .page-mahjong__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-mahjong__sub-title {
    font-size: 22px;
  }

  .page-mahjong__text-block {
    font-size: 16px;
    line-height: 1.7;
  }

  .page-mahjong__list-item {
    font-size: 15px;
  }

  .page-mahjong__btn-primary {
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-mahjong__faq-question {
    padding: 15px;
  }

  .page-mahjong__faq-question h3 {
    font-size: 16px;
  }

  .page-mahjong__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-mahjong__faq-item.active .page-mahjong__faq-answer {
    padding: 15px !important;
  }

  /* Mobile image responsiveness */
  .page-mahjong img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-mahjong__container,
  .page-mahjong__hero-content,
  .page-mahjong__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}