/* style/mahjong.css */
.page-mahjong {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: var(--dark-bg-1); /* Inherit from shared.css, assumed dark */
}

.page-mahjong__section-spacing {
  padding: 80px 0;
}

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

/* Padding for the first content section to clear fixed header */
.page-mahjong__hero-banner {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, #003366, #1a4a80); /* Dark blue gradient */
  text-align: center;
}

.page-mahjong__hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-mahjong__hero-title {
  font-size: 48px;
  color: #FFCC00; /* Gold color for title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-mahjong__hero-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 40px;
}

.page-mahjong__hero-description a {
  color: #FFCC00;
  text-decoration: underline;
}

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

.page-mahjong__btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.page-mahjong__btn--primary:hover {
  background: #e6b800;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-mahjong__btn--secondary:hover {
  background: #FFCC00;
  color: #003366;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-mahjong__btn--outline {
  background: transparent;
  color: #FFCC00;
  border-color: #FFCC00;
  padding: 10px 20px;
  font-size: 16px;
}

.page-mahjong__btn--outline:hover {
  background: #FFCC00;
  color: #003366;
}

.page-mahjong__btn--small {
  padding: 8px 18px;
  font-size: 15px;
  border-radius: 6px;
}

.page-mahjong__section-title {
  font-size: 36px;
  text-align: center;
  color: #FFCC00;
  margin-bottom: 40px;
}

.page-mahjong__section-subtitle {
  font-size: 18px;
  text-align: center;
  color: #f0f0f0;
  margin-bottom: 50px;
}

.page-mahjong__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-mahjong__content-wrapper--reverse {
  flex-direction: row-reverse;
}

.page-mahjong__text-block {
  flex: 1;
}

.page-mahjong__text-block p {
  margin-bottom: 15px;
  color: #f0f0f0;
  font-size: 17px;
}

.page-mahjong__text-block ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-mahjong__text-block ul li {
  margin-bottom: 8px;
  font-size: 17px;
}

.page-mahjong__text-block a {
  color: #FFCC00;
  text-decoration: underline;
}

.page-mahjong__image-block {
  flex: 1;
  min-width: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-mahjong__image-block img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

/* Dark section styling */
.page-mahjong__dark-section {
  background-color: #003366;
  color: #ffffff;
}

.page-mahjong__dark-section .page-mahjong__section-title {
  color: #FFCC00;
}

.page-mahjong__dark-section .page-mahjong__section-subtitle,
.page-mahjong__dark-section .page-mahjong__text-block p,
.page-mahjong__dark-section .page-mahjong__text-block ul li {
  color: #f0f0f0;
}

.page-mahjong__dark-section .page-mahjong__text-block a {
  color: #FFCC00;
}

/* Card Grid */
.page-mahjong__grid {
  display: grid;
  gap: 30px;
}

.page-mahjong__grid--3-cols {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-mahjong__grid--2-cols {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.page-mahjong__card {
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-mahjong__card-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for consistent card images */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-mahjong__card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-mahjong__card-title {
  font-size: 24px;
  color: #FFCC00;
  margin-bottom: 15px;
}

.page-mahjong__card-text {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-mahjong__card-text a {
  color: #FFCC00;
  text-decoration: underline;
}

/* How to Play Steps */
.page-mahjong__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-mahjong__step-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-mahjong__step-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-mahjong__step-icon {
  width: 60px;
  height: 60px;
  background: #FFCC00;
  color: #003366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-mahjong__step-title {
  font-size: 22px;
  color: #FFCC00;
  margin-bottom: 15px;
}

.page-mahjong__step-description {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-mahjong__step-description a {
  color: #FFCC00;
  text-decoration: underline;
}

/* Promotions */
.page-mahjong__promo-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-mahjong__promo-icon {
  font-size: 40px;
  margin-bottom: 20px;
  color: #FFCC00;
}

.page-mahjong__promo-title {
  font-size: 24px;
  color: #FFCC00;
  margin-bottom: 15px;
}

.page-mahjong__promo-description {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-mahjong__promo-description a {
  color: #FFCC00;
  text-decoration: underline;
}

/* Features */
.page-mahjong__feature-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-mahjong__feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 20px auto;
  display: block; /* Ensure it's a block element */
}

.page-mahjong__feature-title {
  font-size: 22px;
  color: #FFCC00;
  margin-bottom: 10px;
}

.page-mahjong__feature-description {
  font-size: 16px;
  color: #f0f0f0;
}

/* FAQ Section */
.page-mahjong__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-mahjong__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-mahjong__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(255, 255, 255, 0.1); /* Slightly lighter background for question */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-mahjong__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
}

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

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

.page-mahjong__faq-item.active .page-mahjong__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg);
}

.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: rgba(0, 0, 0, 0.2); /* Darker background for answer */
  color: #f0f0f0;
}

.page-mahjong__faq-item.active .page-mahjong__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-mahjong__faq-answer p {
  margin-bottom: 15px;
  font-size: 16px;
}

.page-mahjong__faq-answer a {
  color: #FFCC00;
  text-decoration: underline;
}

/* Blog Section */
.page-mahjong__blog-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-mahjong__blog-image-wrapper {
  width: 100%;
  height: 220px; /* Consistent height for blog images */
  overflow: hidden;
}

.page-mahjong__blog-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-mahjong__blog-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-mahjong__blog-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.page-mahjong__blog-title a {
  color: #FFCC00;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-mahjong__blog-title a:hover {
  color: #e6b800;
}

.page-mahjong__blog-excerpt {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-mahjong__blog-excerpt a {
  color: #FFCC00;
  text-decoration: underline;
}

.page-mahjong__read-more {
  display: inline-block;
  color: #FFCC00;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: color 0.3s ease;
}

.page-mahjong__read-more:hover {
  color: #ffffff;
}

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

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

  .page-mahjong__content-wrapper {
    flex-direction: column;
  }

  .page-mahjong__content-wrapper--reverse {
    flex-direction: column;
  }

  .page-mahjong__image-block {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .page-mahjong__hero-banner {
    padding-top: 100px; /* Mobile: Adjust based on actual header height */
    padding-bottom: 40px;
  }

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

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

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

  .page-mahjong__btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

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

  .page-mahjong__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-mahjong__section-subtitle {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .page-mahjong__text-block p,
  .page-mahjong__text-block ul li,
  .page-mahjong__card-text,
  .page-mahjong__step-description,
  .page-mahjong__promo-description,
  .page-mahjong__feature-description,
  .page-mahjong__faq-answer p,
  .page-mahjong__blog-excerpt {
    font-size: 15px;
  }

  .page-mahjong__card-title,
  .page-mahjong__step-title,
  .page-mahjong__promo-title,
  .page-mahjong__feature-title,
  .page-mahjong__blog-title {
    font-size: 20px;
  }

  .page-mahjong__card-image-wrapper {
    height: 180px;
  }

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

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

  .page-mahjong__faq-toggle {
    font-size: 24px;
    width: 25px;
    height: 25px;
    margin-left: 15px;
  }

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

  .page-mahjong__blog-image-wrapper {
    height: 180px;
  }

  /* Ensure all images are responsive */
  .page-mahjong img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-mahjong__section,
  .page-mahjong__card,
  .page-mahjong__container,
  .page-mahjong__hero-banner,
  .page-mahjong__introduction,
  .page-mahjong__variants,
  .page-mahjong__how-to-play,
  .page-mahjong__strategy,
  .page-mahjong__promotions,
  .page-mahjong__features,
  .page-mahjong__faq,
  .page-mahjong__blog {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}