/* style/mahjong.css */

/* Base Styles for Page Mahjong */
.page-mahjong {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

/* First content section top spacing for fixed header */
.page-mahjong__hero-banner {
  padding-top: 120px; /* Desktop spacing */
}

/* Responsive spacing for mobile */
@media (max-width: 768px) {
  .page-mahjong__hero-banner {
    padding-top: 100px; /* Mobile spacing */
  }
}

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

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

.page-mahjong__dark-bg {
  background-color: #000080; /* Navy Blue */
  color: #ffffff;
}

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

.page-mahjong__section-description {
  font-size: 18px;
  color: #f0f0f0;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-mahjong__link {
  color: #FFD700; /* Gold for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-mahjong__link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Hero Banner */
.page-mahjong__hero-banner {
  background: linear-gradient(135deg, #000080, #0a0a0a); /* Dark gradient */
  padding: 80px 0;
  text-align: center;
}

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

.page-mahjong__hero-subtitle {
  font-size: 22px;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-mahjong__btn-primary {
  display: inline-block;
  background-color: #FFD700; /* Gold */
  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;
  border: none;
}

.page-mahjong__btn-primary:hover {
  background-color: #ffffff; /* White on hover */
  color: #000080; /* Navy Blue text on hover */
}

.page-mahjong__btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #FFD700; /* Gold text */
  padding: 12px 25px;
  border: 2px solid #FFD700; /* Gold border */
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-mahjong__btn-secondary:hover {
  background-color: #FFD700; /* Gold background on hover */
  color: #000000; /* Black text on hover */
  border-color: #FFD700;
}

/* About Mahjong Section */
.page-mahjong__about-mahjong {
  background-color: #1a1a1a;
  padding-bottom: 0;
}

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

.page-mahjong__text-block {
  flex: 1;
  font-size: 17px;
  color: #e0e0e0;
}

.page-mahjong__text-block p {
  margin-bottom: 15px;
}

.page-mahjong__image-wrapper {
  flex: 1;
  text-align: center;
}

.page-mahjong__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
}

/* Why Choose Us Section */
.page-mahjong__why-choose-us {
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-mahjong__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-mahjong__feature-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.page-mahjong__feature-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
}

.page-mahjong__feature-title {
  font-size: 24px;
  color: #FFD700; /* Gold */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-mahjong__feature-text {
  font-size: 16px;
  color: #e0e0e0;
}

/* How To Play Section */
.page-mahjong__how-to-play {
  background-color: #1a1a1a;
}

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

.page-mahjong__step-card {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-mahjong__step-icon {
  width: 120px; /* Min size 200x200px, but visually scaled down */
  height: 120px;
  object-fit: contain;
  margin-bottom: 20px;
}

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

.page-mahjong__step-text {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.page-mahjong__sub-section-title {
  font-size: 28px;
  color: #FFD700;
  text-align: center;
  margin-top: 50px;
  margin-bottom: 20px;
  font-weight: bold;
}

/* Features List Section */
.page-mahjong__features {
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-mahjong__features-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.page-mahjong__feature-item {
  display: flex;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.page-mahjong__feature-icon {
  width: 150px; /* Min size 200x200px, but visually scaled down */
  height: 150px;
  object-fit: contain;
  margin-right: 25px;
  flex-shrink: 0;
}

.page-mahjong__feature-details {
  flex-grow: 1;
}

.page-mahjong__feature-item-title {
  font-size: 24px;
  color: #FFD700;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-mahjong__feature-item-text {
  font-size: 17px;
  color: #e0e0e0;
}

/* FAQ Section */
.page-mahjong__faq {
  background-color: #1a1a1a;
}

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

.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: #e0e0e0;
}

.page-mahjong__faq-item.active .page-mahjong__faq-answer {
  max-height: 2000px !important; /* Use !important to ensure priority */
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
}

.page-mahjong__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  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: rgba(255, 255, 255, 0.15);
  border-color: #FFD700;
}

.page-mahjong__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

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

.page-mahjong__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  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: #ffffff;
  transform: rotate(45deg); /* Plus to X */
}

/* Blog Posts Section */
.page-mahjong__blog-posts {
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-mahjong__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-mahjong__blog-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

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

.page-mahjong__blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-mahjong__blog-content {
  padding: 20px;
}

.page-mahjong__blog-title {
  font-size: 20px;
  color: #FFD700; /* Gold */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-mahjong__blog-excerpt {
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 15px;
}

.page-mahjong__blog-date {
  font-size: 14px;
  color: #aaaaaa;
  display: block;
}

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

  .page-mahjong__hero-subtitle {
    font-size: 20px;
  }

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

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

  .page-mahjong__image-wrapper {
    order: -1; /* Image above text on smaller screens */
  }

  .page-mahjong__feature-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-mahjong__feature-icon {
    margin-right: 0;
    margin-bottom: 20px;
  }
}

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

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

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

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

  .page-mahjong__hero-subtitle {
    font-size: 18px;
  }

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

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

  .page-mahjong__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

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

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

  .page-mahjong__feature-text,
  .page-mahjong__step-text {
    font-size: 15px;
  }

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

  .page-mahjong__feature-item-title {
    font-size: 20px;
  }

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

  .page-mahjong__blog-title {
    font-size: 18px;
  }

  .page-mahjong__blog-excerpt {
    font-size: 14px;
  }

  .page-mahjong__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-mahjong__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-mahjong__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-mahjong__faq-answer {
    padding: 0 15px;
  }
  
  .page-mahjong__faq-item.active .page-mahjong__faq-answer {
    padding: 15px !important;
  }

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

  .page-mahjong__section,
  .page-mahjong__card,
  .page-mahjong__container,
  .page-mahjong__content-wrapper,
  .page-mahjong__features-grid,
  .page-mahjong__steps-grid,
  .page-mahjong__features-list,
  .page-mahjong__feature-item,
  .page-mahjong__blog-grid,
  .page-mahjong__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}