/* style/about.css */

/* --- General Page Styling (Scope within .page-about) --- */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light background */
  background-color: var(--secondary-color); /* White background from shared.css */
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

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

.page-about__section {
  padding: 60px 0;
  text-align: center;
}

.page-about__section:nth-of-type(even) {
  background-color: #f9f9f9; /* Light grey for alternating sections */
}

.page-about__section-title {
  font-size: 36px;
  color: #26A9E0; /* Primary color for titles */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-about__section-intro {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* --- Hero Section --- */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px; /* Base padding */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* 淡蓝色配色方案 */
}

.page-about__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-about__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-about__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  filter: none; /* Ensure no CSS filter is used for image color change */
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #333333; /* Dark text for readability on gradient */
}

.page-about__main-title {
  font-size: 48px;
  margin-bottom: 20px;
  color: #000000; /* Ensure high contrast */
  font-weight: bold;
  line-height: 1.2;
}

.page-about__intro-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #333333;
}

.page-about__button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 180px; /* Ensure button minimum width */
  box-sizing: border-box; /* Include padding in width */
}

.page-about__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid transparent;
}

.page-about__btn-primary:hover {
  background: #1e87c0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-about__btn-secondary:hover {
  background: #e0f2f7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Mission & Vision Section --- */
.page-about__mission-vision .page-about__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-about__mission-vision .page-about__feature-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease;
}

.page-about__mission-vision .page-about__feature-item:hover {
  transform: translateY(-5px);
}

.page-about__mission-vision .page-about__feature-item img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Minimum image size */
  min-height: 200px; /* Minimum image size */
  filter: none; /* Ensure no CSS filter is used for image color change */
}

.page-about__mission-vision .page-about__feature-title {
  font-size: 24px;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-about__mission-vision .page-about__feature-description {
  font-size: 16px;
  color: #555555;
}

/* --- Values Section --- */
.page-about__values .page-about__value-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-about__values .page-about__value-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.page-about__values .page-about__value-heading {
  font-size: 22px;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-about__values .page-about__value-item p {
  font-size: 16px;
  color: #555555;
}

/* --- Milestones Section --- */
.page-about__milestones .page-about__timeline {
  position: relative;
  max-width: 1000px;
  margin: 60px auto 0 auto;
  padding: 20px 0;
}

.page-about__milestones .page-about__timeline::before {
  content: '';
  position: absolute;
  width: 4px;
  background-color: #26A9E0;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.page-about__milestones .page-about__timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.page-about__milestones .page-about__timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.page-about__milestones .page-about__timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.page-about__milestones .page-about__timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #26A9E0;
  border: 4px solid #ffffff;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.page-about__milestones .page-about__timeline-item:nth-child(odd)::after {
  right: -10px;
}

.page-about__milestones .page-about__timeline-item:nth-child(even)::after {
  left: -10px;
}

.page-about__milestones .page-about__timeline-year {
  font-size: 24px;
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 5px;
}

.page-about__milestones .page-about__timeline-description {
  font-size: 16px;
  color: #555555;
}

/* --- Responsible Gambling Section --- */
.page-about__responsible-gambling {
  background-color: #e0f2f7; /* Light blue background */
}

.page-about__responsible-gambling .page-about__responsible-features {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-about__responsible-gambling .page-about__responsible-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  max-width: 450px;
  flex: 1;
  min-width: 280px;
}

.page-about__responsible-gambling .page-about__responsible-item img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Minimum image size */
  min-height: 200px; /* Minimum image size */
  filter: none; /* Ensure no CSS filter is used for image color change */
}

.page-about__responsible-gambling .page-about__responsible-title {
  font-size: 24px;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-about__responsible-gambling .page-about__responsible-item p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
}

/* --- Contact Section --- */
.page-about__contact .page-about__contact-info {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  max-width: 600px;
  margin: 40px auto 30px auto;
  text-align: left;
}

.page-about__contact .page-about__contact-info p {
  font-size: 18px;
  color: #333333;
  margin-bottom: 10px;
}

.page-about__contact .page-about__contact-info strong {
  color: #26A9E0;
}

/* --- FAQ Section --- */
.page-about__faq-section {
  padding-bottom: 80px;
}

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

/* FAQ容器样式 */
.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-about__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;
  text-align: left;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  text-align: left;
}

.page-about__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-about__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-about__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-about__faq-item.active .page-about__faq-toggle {
  color: #26A9E0; /* Primary color when active */
  transform: rotate(180deg); /* Rotate for minus sign */
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
  .page-about {
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
    font-size: 15px;
    line-height: 1.5;
  }

  .page-about__container {
    padding: 0 15px;
  }

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

  .page-about__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-about__section-intro {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Hero Section Mobile */
  .page-about__hero-section {
    padding: 40px 15px;
  }

  .page-about__hero-image {
    margin-bottom: 20px;
  }

  .page-about__hero-image img {
    border-radius: 4px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-about__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-about__intro-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-about__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    margin: 8px 0; /* Stack buttons vertically */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-about__button-group {
    flex-direction: column !important;
    gap: 10px;
  }

  /* Feature Grid Mobile */
  .page-about__mission-vision .page-about__feature-grid,
  .page-about__values .page-about__value-list {
    grid-template-columns: 1fr; /* Single column */
    gap: 20px;
  }

  .page-about__mission-vision .page-about__feature-item,
  .page-about__values .page-about__value-item {
    padding: 25px;
  }

  .page-about__mission-vision .page-about__feature-item img {
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Timeline Mobile */
  .page-about__milestones .page-about__timeline::before {
    left: 18px; /* Move timeline to left */
  }

  .page-about__milestones .page-about__timeline-item {
    width: 100%;
    padding-left: 50px; /* Adjust padding */
    padding-right: 15px;
    text-align: left;
  }

  .page-about__milestones .page-about__timeline-item:nth-child(odd),
  .page-about__milestones .page-about__timeline-item:nth-child(even) {
    left: 0;
    text-align: left;
  }

  .page-about__milestones .page-about__timeline-item::after {
    left: 10px; /* Adjust dot position */
  }

  .page-about__milestones .page-about__timeline-item:nth-child(odd)::after,
  .page-about__milestones .page-about__timeline-item:nth-child(even)::after {
    left: 8px; /* Align dots */
  }

  /* Responsible Gambling Mobile */
  .page-about__responsible-gambling .page-about__responsible-features {
    flex-direction: column; /* Stack vertically */
    gap: 20px;
  }

  .page-about__responsible-gambling .page-about__responsible-item {
    padding: 25px;
    min-width: unset;
  }

  .page-about__responsible-gambling .page-about__responsible-item img {
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Contact Section Mobile */
  .page-about__contact .page-about__contact-info {
    padding: 25px;
  }

  .page-about__contact .page-about__contact-info p {
    font-size: 16px;
  }

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

  /* Ensure all images and containers are responsive */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Additional button styles for mobile overflow prevention */
  .page-about a[class*="button"],
  .page-about a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-about__cta-buttons,
  .page-about__button-group,
  .page-about__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically on mobile */
    gap: 10px;
  }
}