/* style/about.css */

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

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

.page-about__section {
    padding: 60px 0;
    position: relative;
}

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

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

.page-about__section-description {
    font-size: 18px;
    color: var(--text-dark);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* 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);
    background: linear-gradient(135deg, var(--primary-color), #00A65A);
    color: var(--text-light);
}

.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;
}

.page-about__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-about__main-heading {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    color: var(--text-light);
}

.page-about__sub-heading {
    font-size: 22px;
    margin-bottom: 30px;
    color: var(--text-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-about__cta-button:hover {
    background: #FF4500; /* Slightly darker red for hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-about__introduction .page-about__content-grid {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-about__introduction .page-about__text-block {
    flex: 1;
    font-size: 17px;
}

.page-about__introduction .page-about__text-block p {
    margin-bottom: 15px;
}

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

.page-about__introduction .page-about__image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

/* Commitments Section */
.page-about__commitments {
    background-color: var(--primary-color);
    color: var(--text-light);
}

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

.page-about__commitments .page-about__section-description {
    color: var(--text-light);
}

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

.page-about__commitment-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-about__commitment-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.page-about__commitment-item .page-about__card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-about__commitment-item p {
    font-size: 16px;
    color: var(--text-light);
}

/* Games Section */
.page-about__games .page-about__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-about__game-card {
    display: block;
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.page-about__game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-about__game-card .page-about__card-title {
    font-size: 20px;
    font-weight: 700;
    padding: 15px 20px 5px;
    color: var(--primary-color);
}

.page-about__game-card p {
    font-size: 15px;
    padding: 0 20px 20px;
    color: var(--text-dark);
}

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

.page-about__why-choose-us .page-about__section-title {
    color: var(--text-light);
}

.page-about__why-choose-us .page-about__section-description {
    color: var(--text-light);
}

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

.page-about__why-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-about__why-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.page-about__why-item .page-about__card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-about__why-item p {
    font-size: 16px;
    color: var(--text-light);
}

/* FAQ Section */
.page-about__faq-list {
    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: #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 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: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-dark);
}

/* 切换图标 */
.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: #333;
  transform: rotate(45deg); /* Change to X or rotate for active state */
}

/* Call to Action Section */
.page-about__call-to-action {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 80px 20px;
}

.page-about__call-to-action .page-about__section-title {
    color: var(--text-light);
    font-size: 40px;
    margin-bottom: 20px;
}

.page-about__call-to-action .page-about__section-description {
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 20px;
}

.page-about__text-center {
    text-align: center;
}

/* General Image Styles */
.page-about img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__main-heading {
        font-size: 40px;
    }
    .page-about__sub-heading {
        font-size: 20px;
    }
    .page-about__section-title {
        font-size: 32px;
    }
    .page-about__section-description {
        font-size: 16px;
    }
    .page-about__commitment-item .page-about__card-title,
    .page-about__why-item .page-about__card-title {
        font-size: 22px;
    }
    .page-about__game-card .page-about__card-title {
        font-size: 18px;
    }
}

@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-image img {
        border-radius: 4px;
    }
    .page-about__hero-content {
        padding: 0 15px;
    }
    .page-about__main-heading {
        font-size: 32px;
    }
    .page-about__sub-heading {
        font-size: 18px;
    }
    .page-about__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: auto;
        margin-right: auto;
    }
    .page-about__section {
        padding: 40px 0;
    }
    .page-about__container {
        padding: 0 15px;
    }
    .page-about__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    .page-about__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-about__introduction .page-about__content-grid {
        flex-direction: column;
    }
    .page-about__introduction .page-about__image-block {
        margin-top: 30px;
    }
    .page-about__commitment-grid,
    .page-about__game-grid,
    .page-about__why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-about__commitment-item,
    .page-about__why-item {
        padding: 25px;
    }
    .page-about__commitment-item .page-about__card-title,
    .page-about__why-item .page-about__card-title {
        font-size: 20px;
    }
    .page-about__game-card img {
        
    }
    .page-about__game-card .page-about__card-title {
        font-size: 17px;
    }
    .page-about__game-card p {
        font-size: 14px;
    }

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

    .page-about__call-to-action {
        padding: 60px 15px;
    }
    .page-about__call-to-action .page-about__section-title {
        font-size: 30px;
    }
    .page-about__call-to-action .page-about__section-description {
        font-size: 17px;
    }
    /* Ensure all images 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__game-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .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-wrap: wrap !important;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .page-about__main-heading {
        font-size: 28px;
    }
    .page-about__sub-heading {
        font-size: 16px;
    }
    .page-about__section-title {
        font-size: 24px;
    }
    .page-about__commitment-item .page-about__card-title,
    .page-about__why-item .page-about__card-title {
        font-size: 18px;
    }
    .page-about__call-to-action .page-about__section-title {
        font-size: 26px;
    }
    .page-about__call-to-action .page-about__section-description {
        font-size: 16px;
    }
}