/* style/about.css */

/* CSS Variables */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --btn-register-bg: #C30808;
    --btn-login-bg: #C30808;
    --btn-register-login-text: #FFFF00;
    --background-color: #FFFFFF; /* Default background for light sections */
    --border-color: #e0e0e0;
}

/* Base styles for the about page content */
.page-about {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-color); /* Assuming shared.css sets body background, this is for page sections */
}

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

.page-about__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

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

/* Hero Intro Section */
.page-about__intro-section {
    padding: 80px 20px;
    text-align: center;
    padding-top: var(--header-offset, 120px);
}

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

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

.page-about__intro-cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* General Section Styling */
.page-about__section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: inherit; /* Inherits color from parent section (dark or light bg) */
}

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

.page-about__section-title.page-about__light-bg {
    color: var(--text-color-dark);
}

.page-about__grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
}

.page-about__grid-layout--reverse {
    grid-template-areas: "image content"; /* For desktop, image on left */
}

.page-about__grid-layout--reverse .page-about__content-block {
    grid-area: content;
}

.page-about__grid-layout--reverse .page-about__image-wrapper {
    grid-area: image;
}

.page-about__content-block p {
    margin-bottom: 15px;
    font-size: 17px;
}

.page-about__image-wrapper {
    text-align: center;
}

.page-about__image-wrapper--center {
    grid-column: 1 / -1; /* Span full width for centered image */
}

.page-about__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* Buttons */
.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;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-about__btn-primary:hover {
    background: darken(var(--btn-register-bg), 10%); /* Example hover effect */
    border-color: darken(var(--btn-register-bg), 10%);
    transform: translateY(-2px);
    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);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-about__feature-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure cards have equal height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

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

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

/* Values Section */
.page-about__value-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.page-about__value-list li {
    background: var(--background-color);
    border-left: 5px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 17px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-about__value-list li strong {
    color: var(--primary-color);
}

/* Contact List */
.page-about__contact-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    font-size: 17px;
}

.page-about__contact-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.page-about__contact-list li::before {
    content: '✅'; /* Example icon */
    position: absolute;
    left: 0;
    top: 0;
}

/* Milestones Section */
.page-about__milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding-bottom: 40px;
}

.page-about__milestone-item {
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.page-about__milestone-year {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

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

/* FAQ Section */
.page-about__faq-section {
    padding: 60px 20px;
}

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

/* 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;
  color: var(--text-color-dark);
}

/* 问题样式 */
.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;
  color: var(--text-color-dark);
}

.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标签阻止点击事件 */
}

/* 切换图标 */
.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(180deg);
}

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

    .page-about__grid-layout--reverse {
        grid-template-areas: unset;
    }

    .page-about__grid-layout--reverse .page-about__content-block,
    .page-about__grid-layout--reverse .page-about__image-wrapper {
        grid-area: unset;
    }

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

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

@media (max-width: 768px) {
    .page-about__intro-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    }

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

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

    .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__intro-cta-group {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }

    .page-about__container {
        padding: 15px;
    }

    .page-about__section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .page-about__content-block p,
    .page-about__value-list li,
    .page-about__contact-list li,
    .page-about__milestone-description,
    .page-about__feature-card p {
        font-size: 15px;
    }

    .page-about__feature-card {
        padding: 20px;
    }

    .page-about__card-title {
        font-size: 20px;
    }

    .page-about__milestone-year {
        font-size: 28px;
    }

    /* Mobile specific image handling */
    .page-about img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-about__section,
    .page-about__card,
    .page-about__container,
    .page-about__image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* FAQ mobile */
    .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;
    }
}