/* style/about.css */

/* CSS Variables */
:root {
    --primary-color: #017439; /* Main brand color */
    --secondary-color: #FFFFFF; /* Auxiliary brand color */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #ffffff;
    --bg-dark: #017439;
    --btn-register-bg: #C30808;
    --btn-login-bg: #C30808;
    --btn-font-color: #FFFF00;
    --border-light: #e0e0e0;
}

/* Base styles for the About Us page */
.page-about {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--bg-light); /* Assuming body background is light */
}

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

.page-about__section-title {
    font-size: 32px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-about__section-title--white {
    color: var(--text-light);
}

.page-about__text-block {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: justify;
}

.page-about__text-block--white {
    color: var(--text-light);
}

/* CTA Button Styles */
.page-about__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-about__btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    border: 2px solid transparent;
}

.page-about__btn-primary:hover {
    background: #005a2e; /* Darken effect for primary color */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-about__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-register {
    background: var(--btn-register-bg);
    color: var(--btn-font-color);
    border: 2px solid transparent;
}

.page-about__btn-register:hover {
    background: #9c0606; /* Darken effect for register button */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

/* 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;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    overflow: hidden; /* Ensure content doesn't overflow */
}

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

.page-about__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
}

.page-about__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px; /* Constrain content width */
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
    color: var(--text-light);
}

.page-about__hero-title {
    font-size: 48px;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--btn-font-color); /* Use yellow for title in hero */
    line-height: 1.2;
    font-weight: 800;
}

.page-about__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--text-light);
}

/* Introduction Section */
.page-about__introduction-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: var(--bg-light);
}

/* Why Choose Us Section */
.page-about__why-choose-us-section {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

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

.page-about__feature-card {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards on dark bg */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-about__feature-card img {
    width: 100%;
    max-width: 250px; /* Constrain feature icon size */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

.page-about__feature-title {
    font-size: 22px;
    color: var(--btn-font-color); /* Use yellow for feature titles */
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-about__feature-description {
    font-size: 15px;
    color: var(--text-light);
}

/* Mission & Vision Section */
.page-about__mission-vision-section {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: var(--bg-light);
}

.page-about__container--reversed {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
}

.page-about__content-block {
    flex: 1;
}

.page-about__image-block {
    flex: 1;
    text-align: center;
}

.page-about__image-block img {
    width: 100%;
    height: auto;
    max-width: 600px; /* Max width for content images */
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Team Section */
.page-about__team-section {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    text-align: center;
}

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

.page-about__team-image {
    width: 100%;
    height: auto;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Responsible Gaming Section */
.page-about__responsible-gaming-section {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: var(--bg-light);
}

.page-about__content-block--two-cols {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-about__text-content {
    flex: 1;
}

/* FAQ Section */
.page-about__faq-section {
    padding-top: 80px;
    padding-bottom: 80px;
    background-color: #f9f9f9; /* Slightly off-white background for FAQ */
}

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

/* FAQ容器样式 */
.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* 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;
}

/* 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: #f0f0f0; /* Slightly darker than section bg */
  border-radius: 0 0 5px 5px;
}

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

.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; /* Slightly larger for better readability */
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color); /* Use primary color for question title */
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Use primary color for toggle icon */
  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: var(--primary-color);
  transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__hero-title {
        font-size: 40px;
    }
    .page-about__hero-description {
        font-size: 18px;
    }
    .page-about__container {
        padding: 30px 15px;
    }
    .page-about__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-about__container--reversed,
    .page-about__content-block--two-cols {
        flex-direction: column;
    }
    .page-about__image-block {
        order: -1; /* Image above text on smaller screens */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-about {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-about__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-about__hero-title {
        font-size: 32px;
    }
    .page-about__hero-description {
        font-size: 16px;
    }
    .page-about__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        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 {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-about__section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    .page-about__features-grid {
        grid-template-columns: 1fr;
    }
    .page-about__feature-card {
        padding: 20px;
    }
    .page-about__feature-title {
        font-size: 20px;
    }
    .page-about__feature-description {
        font-size: 14px;
    }
    .page-about__container--reversed,
    .page-about__content-block--two-cols {
        gap: 30px;
    }
    .page-about__team-gallery {
        grid-template-columns: 1fr;
    }

    /* Mobile image adaptation */
    .page-about img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-about__section,
    .page-about__card,
    .page-about__container,
    .page-about__hero-container,
    .page-about__features-grid,
    .page-about__team-gallery {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .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;
    }
}