/* style/resources.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* 确保页面内容不被固定页头遮挡 */
.page-resources {
  color: var(--text-light, #ffffff); /* Default text color for dark body bg */
  background-color: var(--bg-dark); /* Assuming shared.css sets a dark background for body */
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content clears fixed header */
  min-height: 600px;
  background-color: var(--primary-color, #017439); /* Fallback to primary color */
  overflow: hidden;
  position: relative;
  z-index: 1; /* Ensure hero content is above any potential background layers */
}

.page-resources__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image to ensure text contrast */
}

.page-resources__hero-content {
  max-width: 900px;
  margin: 0 auto;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.page-resources__hero-title {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Custom Register/Login font color */
}

.page-resources__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  line-height: 1.6;
}

.page-resources__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  text-align: center;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-resources__btn-primary {
  background-color: #C30808; /* Custom Register/Login color */
  color: #FFFF00; /* Custom Register/Login font color */
  border: 2px solid #C30808;
}

.page-resources__btn-primary:hover {
  background-color: #e02020;
  border-color: #e02020;
  transform: translateY(-2px);
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-resources__btn-secondary:hover {
  background-color: #ffffff;
  color: var(--primary-color, #017439);
  transform: translateY(-2px);
}

/* General Section Styles */
.page-resources__section {
  padding: 60px 20px;
  margin: 0 auto;
}

.page-resources__section-title {
  font-size: 2.8em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Add horizontal padding for content */
}

.page-resources__text-block {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;
}

.page-resources__text-block--cta {
  text-align: center;
  margin-top: 40px;
  font-size: 1.2em;
  font-weight: 600;
}

.page-resources__btn-primary--inline {
  margin-left: 10px;
  padding: 10px 20px;
  font-size: 1em;
}

/* Color schemes for sections */
.page-resources__dark-bg {
  background-color: var(--primary-color, #017439);
  color: #ffffff;
}

.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-resources__section--intro .page-resources__section-title {
  color: var(--primary-color, #017439);
}

/* Grid Layout for Guide Section */
.page-resources__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__grid-item {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-resources__grid-item .page-resources__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum image size */
}

.page-resources__item-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-resources__item-title a {
  color: #FFFF00; /* Link color for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__item-title a:hover {
  color: #ffffff;
}

.page-resources__grid-item .page-resources__text-block {
  font-size: 0.95em;
  line-height: 1.6;
  flex-grow: 1; /* Allow text block to take available space */
}

.page-resources__btn-link {
  display: inline-block;
  margin-top: 20px;
  color: #FFFF00;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 15px;
  border: 1px solid #FFFF00;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.page-resources__btn-link:hover {
  background-color: #FFFF00;
  color: var(--primary-color, #017439);
}

/* Feature Grid for Advantages Section */
.page-resources__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__feature-card {
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
}

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

.page-resources__feature-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum image size */
}

.page-resources__feature-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color, #017439);
}

.page-resources__feature-description {
  font-size: 0.95em;
  line-height: 1.6;
}

/* Promotion Grid Section */
.page-resources__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__promo-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ffffff;
}

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

.page-resources__promo-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum image size */
}

.page-resources__promo-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-resources__promo-title a {
  color: #FFFF00; /* Link color for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__promo-title a:hover {
  color: #ffffff;
}

.page-resources__promo-description {
  font-size: 0.95em;
  line-height: 1.6;
}

/* Responsible Gambling Section */
.page-resources__section--responsible .page-resources__section-title {
  color: var(--primary-color, #017439);
}

.page-resources__btn-link--inline {
  color: var(--primary-color, #017439);
  border-color: var(--primary-color, #017439);
}

.page-resources__btn-link--inline:hover {
  background-color: var(--primary-color, #017439);
  color: #ffffff;
}

/* FAQ Section */
.page-resources__section--faq {
  background-color: var(--primary-color, #017439);
  color: #ffffff;
}

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

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.2em;
  transition: background-color 0.3s ease;
}

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

.page-resources__faq-heading {
  margin: 0;
  color: #ffffff;
  font-size: 1.2em; /* Ensure heading is not too small */
}

.page-resources__faq-toggle {
  font-size: 1.8em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg); /* Change + to X or similar */
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  font-size: 1em;
  line-height: 1.6;
  color: #f0f0f0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px 25px 25px; /* Adjust padding for expanded state */
}

.page-resources__faq-answer p {
  margin-bottom: 0; /* Remove default paragraph margin */
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.2em;
  }
  .page-resources__section-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    min-height: 450px;
  }
  .page-resources__hero-title {
    font-size: 2.5em;
  }
  .page-resources__hero-description {
    font-size: 1.1em;
  }
  .page-resources__cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
  }
  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-resources__text-block {
    font-size: 1em;
  }
  .page-resources__grid-layout,
  .page-resources__feature-grid,
  .page-resources__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile image responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Mobile container responsiveness */
  .page-resources__section,
  .page-resources__container,
  .page-resources__grid-item,
  .page-resources__feature-card,
  .page-resources__promo-card,
  .page-resources__faq-list,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important; /* Reset padding for sections to handle inner container padding */
    padding-right: 0 !important; /* Reset padding for sections */
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-resources__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-resources__faq-question,
  .page-resources__faq-answer {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Ensure button groups wrap vertically on mobile */
  .page-resources__cta-group {
    flex-direction: column;
    align-items: center;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-resources__btn-primary--inline,
  .page-resources__btn-link--inline {
    margin-left: 0;
    margin-top: 10px;
    width: auto; /* Let content dictate width, but respect max-width */
  }
  .page-resources__text-block--cta .page-resources__btn-primary--inline {
    display: block; /* Make inline buttons block on mobile */
    margin-top: 15px;
  }
}

/* Ensure no filter on images */
.page-resources img {
  filter: none;
}