/* style/login.css */

/* General page styling */
.page-login {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--secondary-color); /* White background from shared */
}

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

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

/* Hero Section */
.page-login__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); /* Ensure space for fixed header */
    background-color: var(--primary-color); /* Dark section background */
    color: #ffffff; /* Light text for dark background */
}

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

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

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

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

.page-login__main-heading {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-login__intro-description {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-login__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Login/Register color */
    color: #FFFF00; /* Login/Register font color */
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__cta-button:hover {
    background: #a30606 !important; /* Slightly darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Login Form Section */
.page-login__form-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background */
    color: #333333; /* Dark text for light background */
}

.page-login__form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-login__login-form {
    margin-bottom: 30px;
}

.page-login__form-group {
    margin-bottom: 20px;
}

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555555;
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.page-login__form-input::placeholder {
    color: #aaaaaa;
}

.page-login__form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.page-login__forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
    color: #005a2e;
    text-decoration: underline;
}

.page-login__submit-button {
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__submit-button:hover {
    background-color: #a30606 !important; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.page-login__register-prompt p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #666666;
}

.page-login__register-button {
    display: inline-block;
    padding: 12px 30px;
    background: #C30808; /* Register button color */
    color: #FFFF00; /* Register font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__register-button:hover {
    background-color: #a30606 !important; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Benefits Section */
.page-login__benefits-section {
    padding: 60px 0;
    background-color: var(--primary-color); /* Dark section background */
    color: #ffffff; /* Light text for dark background */
}

.page-login__benefits-section .page-login__section-title {
    color: #ffffff;
}

.page-login__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.page-login__benefit-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white card */
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure equal height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.page-login__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-login__benefit-item img {
    width: 100%;
    max-width: 250px; /* Constrain image width within card */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    display: block;
}

.page-login__benefit-item h3 {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__benefit-item p {
    font-size: 15px;
    color: #f0f0f0;
    flex-grow: 1; /* Allow paragraph to take remaining space */
}

/* FAQ Section */
.page-login__faq-section {
    padding: 60px 0;
    background-color: #f5f5f5; /* Light background */
    color: #333333; /* Dark text for light background */
}

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

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

/* FAQ默认状态 - 答案隐藏 */
.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

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

/* 问题样式 */
.page-login__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;
}

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

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

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

/* 切换图标 */
.page-login__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-login__faq-item.active .page-login__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Plus sign rotates to X */
}

/* CTA Section */
.page-login__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--primary-color); /* Dark background */
    color: #ffffff;
}

.page-login__cta-section .page-login__section-title {
    color: #ffffff;
}

.page-login__cta-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-login__cta-content p {
    font-size: 18px;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-login__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-login__cta-button--secondary {
    background-color: #C30808;
    color: #FFFF00;
}

.page-login__cta-button--secondary:hover {
    background-color: #a30606 !important;
}

/* Image specific styles - ensure no filters */
.page-login img {
    border: none;
    filter: none; /* Ensure no CSS filters are applied */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-heading {
        font-size: 36px;
    }
    .page-login__intro-description {
        font-size: 16px;
    }
    .page-login__section-title {
        font-size: 28px;
    }
    .page-login__benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

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

    .page-login__main-heading {
        font-size: 28px;
    }
    .page-login__intro-description {
        font-size: 15px;
    }
    .page-login__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }
    .page-login__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .page-login__form-section,
    .page-login__benefits-section,
    .page-login__faq-section,
    .page-login__cta-section {
        padding: 40px 0;
    }

    .page-login__form-wrapper {
        padding: 30px 20px;
    }

    .page-login__benefits-grid {
        grid-template-columns: 1fr; /* Stack benefits on mobile */
    }

    .page-login__benefit-item {
        padding: 25px 15px;
    }

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

    /* Mobile image and button responsiveness */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-wrapper,
    .page-login__benefits-grid,
    .page-login__faq-list,
    .page-login__cta-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__cta-button,
    .page-login__submit-button,
    .page-login__register-button,
    .page-login a[class*="button"],
    .page-login a[class*="btn"] {
        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;
    }
    
    .page-login__cta-buttons {
        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 */
        gap: 15px; /* Add space between stacked buttons */
    }
}