/* style/about.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-text-color: #FFFF00;
    --border-color: #e0e0e0;
}

.page-about {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--secondary-color); /* Default light background */
}

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

.page-about__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-about__section-subtitle {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.page-about__heading {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-about__paragraph {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.page-about__list {
    list-style: disc inside;
    margin-bottom: 15px;
    padding-left: 20px;
}

.page-about__list-item {
    margin-bottom: 8px;
    color: var(--text-dark);
}

.page-about__read-more-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.page-about__read-more-link:hover {
    color: #005f2e;
}

/* Hero Section */
.page-about__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    background: var(--primary-color); /* Use primary color as background */
    color: var(--text-light);
}

.page-about__hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-about__hero-description {
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto 30px;
    color: var(--text-light);
}

.page-about__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-register-bg);
    color: var(--button-text-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-about__cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mission & Vision Section */
.page-about__mission-vision {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.page-about__grid-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.page-about__grid-two-cols--reverse {
    grid-template-columns: 1fr 1fr;
}

.page-about__content-block {
    padding: 20px 0;
}

.page-about__image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-about__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Why Choose Us Section */
.page-about__why-choose-us {
    padding: 80px 0;
    background: var(--primary-color);
    color: var(--text-light);
}

.page-about__why-choose-us .page-about__section-title,
.page-about__why-choose-us .page-about__section-subtitle {
    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: var(--secondary-color);
    padding: 30px;
    border-radius: 12px;
    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: var(--text-dark);
}

.page-about__feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-about__feature-icon {
    width: 100%; /* Ensure image fills card width responsively */
    max-width: 200px; /* Constrain icon size */
    height: auto;
    margin-bottom: 20px;
    object-fit: cover;
    border-radius: 8px;
}

.page-about__feature-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

/* Responsible Gaming Section */
.page-about__responsible-gaming {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

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

.page-about__faq-list {
    margin-top: 40px;
}

/* 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.3s ease;
  padding: 0 15px;
  opacity: 0;
  background: #fdfdfd; /* Light background for answer */
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color);
  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 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-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;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--primary-color);
}

/* 切换图标 */
.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: var(--primary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* CTA Bottom Section */
.page-about__cta-bottom {
    padding: 60px 0;
    text-align: center;
    background: var(--primary-color);
    color: var(--text-light);
}

.page-about__cta-bottom .page-about__section-title,
.page-about__cta-bottom .page-about__paragraph {
    color: var(--text-light);
}

.page-about__cta-button--register {
    background: var(--button-register-bg);
    margin-right: 15px;
}

.page-about__cta-button--login {
    background: var(--button-login-bg);
}

/* Common Dark/Light Backgrounds */
.page-about__dark-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-about__dark-section .page-about__heading,
.page-about__dark-section .page-about__paragraph,
.page-about__dark-section .page-about__list-item {
    color: var(--text-light);
}

.page-about__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-about__grid-two-cols {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .page-about__grid-two-cols--reverse {
        grid-template-columns: 1fr;
    }

    .page-about__hero-title {
        font-size: 40px;
    }

    .page-about__hero-description {
        font-size: 18px;
    }

    .page-about__section-title {
        font-size: 32px;
    }

    .page-about__heading {
        font-size: 24px;
    }

    .page-about__features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

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

    .page-about__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        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__section-title {
        font-size: 28px;
    }

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

    .page-about__heading {
        font-size: 22px;
    }

    .page-about__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-about__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-about__feature-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-about__feature-card,
    .page-about__content-block,
    .page-about__image-wrapper,
    .page-about__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* FAQ Mobile Styles */
    .page-about__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-about__faq-question h3 {
        font-size: 15px;
        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;
    }

    /* Button Mobile Styles */
    .page-about__cta-button {
        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;
        margin-right: 0;
        margin-bottom: 15px;
    }
    .page-about__cta-button:last-child {
        margin-bottom: 0;
    }
    .page-about__cta-bottom .page-about__container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}