/* style/index-platform-features.css */

:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-dark: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

.page-index-platform-features {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color for dark background */
  background-color: var(--background-dark);
}

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

.page-index-platform-features__section-title {
  font-size: clamp(28px, 3.5vw, 48px); /* Use clamp for H1-like titles */
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.page-index-platform-features__section-title--dark {
  color: var(--background-dark);
}

.page-index-platform-features__section-subtitle {
  font-size: clamp(16px, 1.8vw, 20px);
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index-platform-features__section-subtitle--dark {
  color: var(--deep-green);
}

/* Buttons */
.page-index-platform-features__btn-primary,
.page-index-platform-features__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

.page-index-platform-features__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-index-platform-features__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-index-platform-features__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-index-platform-features__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Card Styles */
.page-index-platform-features__card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  color: var(--text-main);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
}

.page-index-platform-features__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-index-platform-features__card--dark-bg {
  background-color: var(--card-bg);
  color: var(--text-main);
}

/* Hero Section */
.page-index-platform-features__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--background-dark);
  overflow: hidden;
}

.page-index-platform-features__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
}

.page-index-platform-features__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

.page-index-platform-features__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
}

.page-index-platform-features__hero-title {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -1px;
}

.page-index-platform-features__hero-description {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-index-platform-features__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features Section */
.page-index-platform-features__features-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

.page-index-platform-features__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index-platform-features__feature-image {
  width: 100%;
  height: auto;
  max-width: 400px; /* Ensure content images are not too small */
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index-platform-features__feature-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 15px;
}

.page-index-platform-features__feature-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-index-platform-features__feature-btn {
  background: var(--button-gradient);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.3s ease;
  align-self: center;
  margin-top: auto;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

.page-index-platform-features__feature-btn:hover {
  opacity: 0.9;
}

/* Game Categories Section */
.page-index-platform-features__game-categories {
  padding: 80px 0;
  background-color: var(--text-main);
}

.page-index-platform-features__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index-platform-features__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  height: 100%;
}

.page-index-platform-features__category-image {
  width: 100%;
  height: auto;
  max-width: 300px; /* Ensure content images are not too small */
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-index-platform-features__category-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.page-index-platform-features__category-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Why Choose Section */
.page-index-platform-features__why-choose-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

.page-index-platform-features__advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index-platform-features__advantage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index-platform-features__advantage-icon {
  width: 200px; /* Min size for content images */
  height: 150px; /* Min size for content images */
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index-platform-features__advantage-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 15px;
}

.page-index-platform-features__advantage-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-index-platform-features__advantage-link {
  color: var(--gold-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-index-platform-features__advantage-link:hover {
  color: #ffffff;
}

/* News/Blog Section */
.page-index-platform-features__news-blog-section {
  padding: 80px 0;
  background-color: var(--text-main);
}

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

.page-index-platform-features__news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-main);
  height: 100%;
  overflow: hidden;
}

.page-index-platform-features__news-image {
  width: 100%;
  height: auto;
  max-width: 400px; /* Ensure content images are not too small */
  max-height: 225px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.page-index-platform-features__news-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.page-index-platform-features__news-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-index-platform-features__news-title a {
  color: var(--text-main);
  text-decoration: none;
}

.page-index-platform-features__news-title a:hover {
  color: var(--primary-color);
}

.page-index-platform-features__news-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.page-index-platform-features__news-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index-platform-features__news-readmore {
  color: var(--gold-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-index-platform-features__news-readmore:hover {
  color: var(--primary-color);
}

.page-index-platform-features__news-cta {
  text-align: center;
  margin-top: 50px;
}

/* FAQ Section */
.page-index-platform-features__faq-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

.page-index-platform-features__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-index-platform-features__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-main);
}

.page-index-platform-features__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.3s ease;
}

.page-index-platform-features__faq-question::-webkit-details-marker {
  display: none;
}

.page-index-platform-features__faq-question:hover {
  background-color: var(--deep-green);
}

.page-index-platform-features__faq-qtext {
  flex-grow: 1;
}

.page-index-platform-features__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  margin-left: 15px;
}

.page-index-platform-features__faq-item[open] .page-index-platform-features__faq-question {
  background-color: var(--deep-green);
}

.page-index-platform-features__faq-answer {
  padding: 0 25px 20px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page-index-platform-features__faq-cta {
  text-align: center;
  margin-top: 40px;
}

/* CTA Bottom Section */
.page-index-platform-features__cta-bottom {
  padding: 80px 0;
  background-color: var(--text-main);
}

.page-index-platform-features__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index-platform-features__hero-image-wrapper {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-index-platform-features {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index-platform-features__container {
    padding: 0 15px;
  }

  .page-index-platform-features__hero-section,
  .page-index-platform-features__features-section,
  .page-index-platform-features__game-categories,
  .page-index-platform-features__why-choose-section,
  .page-index-platform-features__news-blog-section,
  .page-index-platform-features__faq-section,
  .page-index-platform-features__cta-bottom {
    padding: 40px 0 !important;
  }
  
  .page-index-platform-features__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
  }

  .page-index-platform-features__section-title {
    margin-bottom: 15px;
  }

  .page-index-platform-features__section-subtitle {
    margin-bottom: 30px;
  }

  .page-index-platform-features__hero-title {
    font-size: 32px;
  }

  .page-index-platform-features__hero-description {
    font-size: 16px;
  }

  .page-index-platform-features__hero-cta-buttons,
  .page-index-platform-features__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index-platform-features__btn-primary,
  .page-index-platform-features__btn-secondary,
  .page-index-platform-features a[class*="button"],
  .page-index-platform-features a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index-platform-features__hero-cta-buttons,
  .page-index-platform-features__button-group,
  .page-index-platform-features__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    overflow: hidden !important;
  }

  .page-index-platform-features img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-index-platform-features__hero-image-wrapper,
  .page-index-platform-features__feature-item,
  .page-index-platform-features__category-card,
  .page-index-platform-features__advantage-item,
  .page-index-platform-features__news-card,
  .page-index-platform-features__faq-item,
  .page-index-platform-features__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-index-platform-features__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }

  .page-index-platform-features__faq-answer {
    padding: 0 20px 15px;
    font-size: 15px;
  }

  .page-index-platform-features__features-grid,
  .page-index-platform-features__categories-grid,
  .page-index-platform-features__advantages-grid,
  .page-index-platform-features__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index-platform-features__feature-image,
  .page-index-platform-features__category-image,
  .page-index-platform-features__advantage-icon,
  .page-index-platform-features__news-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure content images are not displayed smaller than 200px (desktop) */
  .page-index-platform-features__feature-image,
  .page-index-platform-features__category-image,
  .page-index-platform-features__advantage-icon,
  .page-index-platform-features__news-image {
      min-width: 200px;
      min-height: 150px;
  }

  /* Override for mobile to ensure max-width: 100% */
  @media (max-width: 768px) {
      .page-index-platform-features__feature-image,
      .page-index-platform-features__category-image,
      .page-index-platform-features__advantage-icon,
      .page-index-platform-features__news-image {
          min-width: unset !important;
          min-height: unset !important;
      }
  }
}