/* style/mahjong.css */
.page-mahjong {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Inherited from shared.css, ensure consistency */
}

.page-mahjong__section {
  padding: 60px 0;
  margin-bottom: 0;
}

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

/* Fixed navigation bar spacing for the first content section */
.page-mahjong__hero-banner {
  padding-top: 120px; /* Adjust for fixed header */
  padding-bottom: 60px;
}

.page-mahjong__hero-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-mahjong__hero-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}

.page-mahjong__hero-content {
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 51, 102, 0.85); /* Main brand color with transparency */
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  transform: translateY(-50px);
}

.page-mahjong__hero-title {
  font-size: 3.2em;
  color: #FFA500; /* Accent color for title */
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-mahjong__hero-description {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-mahjong__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-mahjong__heading {
  font-size: 2.5em;
  color: #FFA500; /* Accent color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-mahjong__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #e0e0e0;
}

.page-mahjong__text-link {
  color: #FFA500;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-mahjong__text-link:hover {
  color: #FFD700;
  text-decoration: underline;
}

.page-mahjong__highlight-text {
  color: #FFA500;
  font-weight: 600;
}

/* Buttons */
.page-mahjong__btn-primary,
.page-mahjong__btn-secondary,
.page-mahjong__btn-tertiary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.page-mahjong__btn-primary {
  background: #FFA500;
  color: #003366;
  border-color: #FFA500;
}

.page-mahjong__btn-primary:hover {
  background: #FFD700;
  border-color: #FFD700;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 165, 0, 0.4);
}

.page-mahjong__btn-secondary {
  background: #003366;
  color: #FFA500;
  border-color: #FFA500;
}

.page-mahjong__btn-secondary:hover {
  background: #004488;
  color: #FFD700;
  border-color: #FFD700;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 51, 102, 0.4);
}

.page-mahjong__btn-tertiary {
  background: #1a1a1a;
  color: #FFA500;
  border-color: #FFA500;
  padding: 10px 20px;
  font-size: 1em;
}

.page-mahjong__btn-tertiary:hover {
  background: #2a2a2a;
  color: #FFD700;
  border-color: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 165, 0, 0.2);
}

/* Background colors */
.page-mahjong__dark-bg {
  background-color: #1a1a1a;
  color: #ffffff;
}

.page-mahjong__light-bg {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

/* Image specific styles */
.page-mahjong__image-full-width {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin: 40px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

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

.page-mahjong__feature-card {
  padding: 30px;
  border-radius: 12px;
  background: #2a2a2a; /* Lighter background for cards on dark section */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.page-mahjong__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-mahjong__feature-title {
  font-size: 1.5em;
  color: #FFA500;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-mahjong__feature-description {
  color: #cccccc;
  font-size: 1em;
}

/* How to Play section */
.page-mahjong__ordered-list,
.page-mahjong__unordered-list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
  color: #e0e0e0;
}

.page-mahjong__ordered-list {
  list-style-type: decimal;
}

.page-mahjong__list-item {
  margin-bottom: 10px;
  font-size: 1.05em;
  color: #e0e0e0;
}

/* Variants section */
.page-mahjong__variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-mahjong__variant-card {
  background: #2a2a2a; /* Lighter background for cards on dark section */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 165, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 20px;
}

.page-mahjong__variant-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-mahjong__variant-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-mahjong__variant-title {
  font-size: 1.4em;
  color: #FFA500;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-mahjong__variant-description {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

/* Strategies section */
.page-mahjong__strategy-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-mahjong__strategy-list .page-mahjong__list-item {
  background: #2a2a2a;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 5px solid #FFA500;
  font-size: 1.05em;
  color: #e0e0e0;
}

/* Promotions section */
.page-mahjong__promo-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-mahjong__promo-list .page-mahjong__list-item {
  background: #2a2a2a;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 5px solid #003366;
  font-size: 1.05em;
  color: #e0e0e0;
}

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

.page-mahjong__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 165, 0, 0.2);
}

.page-mahjong__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #2a2a2a;
  color: #FFA500;
  border-radius: 8px;
  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;
}

.page-mahjong__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: #FFA500;
}

.page-mahjong__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFA500;
  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;
  background-color: rgba(255, 165, 0, 0.1);
  border-radius: 50%;
}

.page-mahjong__faq-item.active .page-mahjong__faq-toggle {
  color: #FFD700;
  transform: rotate(45deg); /* Change from '-' to 'X' */
}

.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 25px;
  opacity: 0;
  background: #3a3a3a;
  color: #e0e0e0;
}

.page-mahjong__faq-item.active .page-mahjong__faq-answer {
  max-height: 2000px !important; /* Ensure content fits */
  padding: 20px 25px !important;
  opacity: 1;
  background: #3a3a3a;
  border-radius: 0 0 8px 8px;
}

.page-mahjong__faq-answer p {
  margin: 0;
  color: #e0e0e0;
}

/* CTA section */
.page-mahjong__cta-content {
  text-align: center;
  padding: 50px 20px;
  background: #2a2a2a;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid #003366;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-mahjong__hero-title {
    font-size: 2.8em;
  }

  .page-mahjong__heading {
    font-size: 2em;
  }

  .page-mahjong__hero-image {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .page-mahjong {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-mahjong__hero-banner {
    padding-top: 100px; /* Adjust for mobile fixed header */
    padding-bottom: 40px;
  }

  .page-mahjong__hero-content {
    transform: translateY(-30px);
    padding: 15px;
  }

  .page-mahjong__hero-title {
    font-size: 2.2em;
  }

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

  .page-mahjong__hero-actions {
    flex-direction: column;
    gap: 15px;
  }

  .page-mahjong__btn-primary,
  .page-mahjong__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
    width: 100%;
  }

  .page-mahjong__section {
    padding: 40px 0;
  }

  .page-mahjong__container {
    padding: 0 15px;
  }

  .page-mahjong__heading {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-mahjong__paragraph {
    font-size: 1em;
  }

  .page-mahjong__features-grid,
  .page-mahjong__variants-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-mahjong__feature-card,
  .page-mahjong__variant-card {
    padding: 25px;
  }

  .page-mahjong__variant-image {
    height: 150px;
  }

  .page-mahjong__strategy-list .page-mahjong__list-item,
  .page-mahjong__promo-list .page-mahjong__list-item {
    padding: 18px;
    font-size: 1em;
  }

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

  .page-mahjong__faq-question h3 {
    font-size: 1.1em;
  }

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

  .page-mahjong__faq-answer {
    padding: 0 20px;
  }

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

  .page-mahjong__cta-content {
    padding: 30px 15px;
  }

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

  /* Mobile responsive image adaptation */
  .page-mahjong img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important; /* Ensure padding/border included in width */
  }
  
  .page-mahjong__section,
  .page-mahjong__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-mahjong__hero-title {
    font-size: 1.8em;
  }

  .page-mahjong__heading {
    font-size: 1.5em;
  }

  .page-mahjong__hero-content {
    padding: 10px;
  }

  .page-mahjong__hero-image {
    max-height: 250px;
  }

  .page-mahjong__feature-card,
  .page-mahjong__variant-card {
    padding: 20px;
  }

  .page-mahjong__variant-image {
    height: 120px;
  }
}