:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9;
  --border-color: #e0e0e0;
}

.page-resources-how-to-choose-tp88-platform {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--secondary-color); /* Default body background is white */
}

/* Fixed Header Offset */
.page-resources-how-to-choose-tp88-platform__hero-section {
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* Hero Section */
.page-resources-how-to-choose-tp88-platform__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #a2d9f2 100%); /* Light blue gradient */
  color: var(--text-light);
  overflow: hidden; /* Prevent image overflow */
}

.page-resources-how-to-choose-tp88-platform__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-resources-how-to-choose-tp88-platform__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources-how-to-choose-tp88-platform__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  filter: none; /* Ensure no CSS filter changes image color */
}

.page-resources-how-to-choose-tp88-platform__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
}

.page-resources-how-to-choose-tp88-platform__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  font-weight: 700;
}

.page-resources-how-to-choose-tp88-platform__intro-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: var(--text-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources-how-to-choose-tp88-platform__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.page-resources-how-to-choose-tp88-platform__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
}

.page-resources-how-to-choose-tp88-platform__btn-primary {
  background: var(--login-button-color); /* Use login color for primary CTA */
  color: var(--text-light);
  border: 2px solid var(--login-button-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources-how-to-choose-tp88-platform__btn-primary:hover {
  background: #c76706; /* Darken on hover */
  border-color: #c76706;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-resources-how-to-choose-tp88-platform__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-resources-how-to-choose-tp88-platform__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-resources-how-to-choose-tp88-platform__section {
  padding: 80px 0;
  text-align: center;
}

.page-resources-how-to-choose-tp88-platform__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-resources-how-to-choose-tp88-platform__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.page-resources-how-to-choose-tp88-platform__text-block {
  font-size: 1.1em;
  max-width: 900px;
  margin: 0 auto 50px auto;
  color: var(--text-dark);
}

/* Dark Background Section */
.page-resources-how-to-choose-tp88-platform__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources-how-to-choose-tp88-platform__dark-bg .page-resources-how-to-choose-tp88-platform__section-title,
.page-resources-how-to-choose-tp88-platform__dark-bg .page-resources-how-to-choose-tp88-platform__text-block {
  color: var(--text-light);
}

.page-resources-how-to-choose-tp88-platform__text-contrast-fix {
  color: var(--text-light); /* Ensure text is light on dark background */
}

/* Light Background Section */
.page-resources-how-to-choose-tp88-platform__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
}

/* Grid Layout for Criteria */
.page-resources-how-to-choose-tp88-platform__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-resources-how-to-choose-tp88-platform__card {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure cards have equal height */
}

.page-resources-how-to-choose-tp88-platform__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-resources-how-to-choose-tp88-platform__card-image {
  width: 100%;
  height: 200px; /* Fixed height for card images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: none; /* Ensure no CSS filter changes image color */
}

.page-resources-how-to-choose-tp88-platform__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  flex-grow: 0; /* Don't grow title */
}

.page-resources-how-to-choose-tp88-platform__card-text {
  font-size: 1em;
  color: var(--text-dark);
  flex-grow: 1; /* Allow text to grow */
}

/* Feature List (Why TP88) */
.page-resources-how-to-choose-tp88-platform__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: left;
}

.page-resources-how-to-choose-tp88-platform__feature-item {
  background: rgba(255, 255, 255, 0.15); /* Light transparent background on dark section */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.page-resources-how-to-choose-tp88-platform__feature-item:hover {
  background: rgba(255, 255, 255, 0.25);
}

.page-resources-how-to-choose-tp88-platform__feature-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: var(--text-light); /* Light text on dark background */
}

.page-resources-how-to-choose-tp88-platform__feature-description {
  font-size: 1em;
  color: var(--text-light); /* Light text on dark background */
}

/* Step-by-step Guide */
.page-resources-how-to-choose-tp88-platform__step-by-step {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}

.page-resources-how-to-choose-tp88-platform__step-item {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  flex: 1 1 calc(33% - 40px); /* Three columns, adjust for gap */
  max-width: calc(33% - 40px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
  position: relative;
  min-width: 280px; /* Minimum width for responsiveness */
}

.page-resources-how-to-choose-tp88-platform__step-number {
  position: absolute;
  top: -15px;
  left: -15px;
  background: var(--primary-color);
  color: var(--text-light);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources-how-to-choose-tp88-platform__step-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  margin-top: 20px; /* Adjust for step number */
}

.page-resources-how-to-choose-tp88-platform__step-description {
  font-size: 1em;
  color: var(--text-dark);
}

.page-resources-how-to-choose-tp88-platform__cta-center {
  margin-top: 50px;
  text-align: center;
}

/* Responsible Gambling Section */
.page-resources-how-to-choose-tp88-platform__responsible-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}

.page-resources-how-to-choose-tp88-platform__feature-card {
  flex: 1 1 calc(50% - 30px);
  max-width: calc(50% - 30px);
  text-align: left;
  min-width: 300px;
}

/* FAQ Section */
.page-resources-how-to-choose-tp88-platform__faq-list {
  margin-top: 50px;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ容器样式 */
.page-resources-how-to-choose-tp88-platform__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.page-resources-how-to-choose-tp88-platform__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;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-resources-how-to-choose-tp88-platform__faq-item.active .page-resources-how-to-choose-tp88-platform__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--background-light);
  border-radius: 0 0 5px 5px;
  color: var(--text-dark);
}

/* 问题样式 */
.page-resources-how-to-choose-tp88-platform__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources-how-to-choose-tp88-platform__faq-question:hover {
  background: var(--background-light);
  border-color: #d0d0d0;
}

.page-resources-how-to-choose-tp88-platform__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-resources-how-to-choose-tp88-platform__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-dark);
}

/* 切换图标 */
.page-resources-how-to-choose-tp88-platform__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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: 28px;
  height: 28px;
}

.page-resources-how-to-choose-tp88-platform__faq-item.active .page-resources-how-to-choose-tp88-platform__faq-toggle {
  color: var(--primary-color); /* Use primary color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Conclusion Section */
.page-resources-how-to-choose-tp88-platform__conclusion-section {
  padding-bottom: 80px;
}

/* General image styling for content area */
.page-resources-how-to-choose-tp88-platform img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: none; /* Ensure no CSS filter changes image color */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources-how-to-choose-tp88-platform__main-title {
    font-size: 2.8em;
  }
  .page-resources-how-to-choose-tp88-platform__section-title {
    font-size: 2.2em;
  }
  .page-resources-how-to-choose-tp88-platform__step-item {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  /* Mobile Header Offset */
  .page-resources-how-to-choose-tp88-platform__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources-how-to-choose-tp88-platform__hero-image {
    margin-bottom: 20px;
  }

  .page-resources-how-to-choose-tp88-platform__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-resources-how-to-choose-tp88-platform__intro-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-resources-how-to-choose-tp88-platform__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}