/* style/register.css */

/* Custom CSS Variables */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f9f9f9;
  --border-color: #e0e0e0;
}

.page-register {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--secondary-color); /* Default body background is white */
}

/* --- Hero Section --- */
.page-register__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 content is below fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #aee3f7 100%); /* Light blue gradient */
  color: var(--text-light);
  overflow: hidden; /* Prevent content overflow */
}

.page-register__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any potential background effects */
}

.page-register__hero-image {
  width: 100%;
  max-width: 800px; /* Adjust max-width for image */
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-register__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

.page-register__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 900px;
}

.page-register__main-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-register__subtitle {
  font-size: 1.3em;
  line-height: 1.6;
  margin-bottom: 40px;
  color: var(--text-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.page-register__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  margin: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box; /* Include padding/border in width */
}

.page-register__cta-button--primary {
  background: var(--login-color); /* Orange for primary action */
  color: var(--text-light);
  border: 2px solid var(--login-color);
}

.page-register__cta-button--primary:hover {
  background: #c76505;
  border-color: #c76505;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-register__cta-button--secondary:hover {
  background: #e0f4ff;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-register__cta-button--large {
    padding: 18px 50px;
    font-size: 1.3em;
}

.page-register__cta-button--wide {
    min-width: 250px;
}

/* --- General Section Styling --- */
.page-register__section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-register__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

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


.page-register__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-register__section-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 25px;
  line-height: 1.3;
  color: inherit; /* Inherit color from parent section */
}

.page-register__section-description {
  font-size: 1.1em;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 50px auto;
  color: inherit; /* Inherit color from parent section */
}

/* --- Why Join Section --- */
.page-register__why-join-section {
    background-color: var(--bg-light);
}

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

.page-register__feature-card {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  color: var(--text-dark);
}

.page-register__feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-register__feature-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-register__feature-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-register__feature-card p {
  font-size: 1em;
  line-height: 1.7;
}

/* --- Steps Section --- */
.page-register__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

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

.page-register__step-item:hover {
    transform: translateY(-5px);
}

.page-register__step-icon {
  width: 60px;
  height: 60px;
  background: var(--login-color);
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  margin: 0 auto 25px auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-register__step-title {
  font-size: 1.6em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-register__step-item p {
  font-size: 1em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Security Section --- */
.page-register__security-section {
    background-color: var(--secondary-color);
}

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

.page-register__security-item {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-register__security-item img {
   /* Small icons are forbidden, so use larger meaningful images */
  
  object-fit: contain;
  margin-bottom: 20px;
}

.page-register__security-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-register__security-item p {
  font-size: 0.95em;
  line-height: 1.6;
}

.page-register__security-footer-text {
    font-size: 1.1em;
    font-style: italic;
    color: var(--text-dark);
    max-width: 900px;
    margin: 40px auto 0 auto;
    padding-top: 30px;
    border-top: 1px dashed var(--border-color);
}

/* --- Promotions Section --- */
.page-register__promotions-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-register__promo-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-register__promo-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.25);
}

.page-register__promo-card img {
  width: 100%;
  
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-register__promo-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-register__promo-card p {
  font-size: 0.95em;
  line-height: 1.7;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.page-register__btn-link {
  display: inline-block;
  color: var(--login-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box; /* Include padding/border in width */
}

.page-register__btn-link:hover {
  border-color: var(--login-color);
  color: #c76505;
}

.page-register__btn-link--white {
    color: var(--text-light);
}

.page-register__btn-link--white:hover {
    border-color: var(--text-light);
    color: #e0e0e0;
}

/* --- FAQ Section --- */
.page-register__faq-section {
  background-color: var(--bg-light);
}

.page-register__faq-list {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

/* FAQ容器样式 */
.page-register__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger radius */
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-register__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 20px; /* Adjust padding */
  opacity: 0;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-register__faq-item.active .page-register__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important and a large value */
  padding: 20px !important; /* Adjust padding */
  opacity: 1;
  background: var(--secondary-color); /* White background for answer */
  border-radius: 0 0 8px 8px; /* Match item radius */
  border-top: 1px solid var(--border-color);
}

/* 问题样式 */
.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjust padding */
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px; /* Match item radius */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-register__faq-question:hover {
  background: var(--bg-light); /* Lighter hover background */
  border-color: #c0c0c0;
}

.page-register__faq-question:active {
  background: #e9e9e9;
}

/* 问题标题样式 */
.page-register__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: var(--primary-color); /* Primary color for questions */
}

/* 切换图标 */
.page-register__faq-toggle {
  font-size: 26px; /* Slightly larger icon */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Primary color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Slightly larger hit area */
  height: 30px;
}

.page-register__faq-item.active .page-register__faq-toggle {
  color: var(--login-color); /* Orange when active */
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* --- Final CTA Section --- */
.page-register__final-cta-section {
  padding: 100px 20px;
  background-color: var(--primary-color); /* Using primary brand color */
  color: var(--text-light);
}

.page-register__final-cta-section .page-register__section-title,
.page-register__final-cta-section .page-register__section-description {
  color: var(--text-light);
}

.page-register__final-cta-section .page-register__cta-button {
  margin-top: 40px;
  margin-bottom: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-register__hero-image {
    max-width: 600px;
  }
  .page-register__main-title {
    font-size: 2.8em;
  }
  .page-register__subtitle {
    font-size: 1.2em;
  }
  .page-register__section-title {
    font-size: 2em;
  }
  .page-register__section-description {
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  /* Ensure header offset is correctly applied for mobile */
  .page-register__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-register__hero-image {
    max-width: 100%; /* Ensure image fills container */
    margin-bottom: 20px;
    border-radius: 8px;
  }

  .page-register__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
  }

  .page-register__hero-content {
    padding: 0 10px;
  }

  .page-register__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-register__subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-register__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    margin: 8px;
    max-width: 100% !important; /* Ensure button doesn't overflow */
    width: 100% !important;
    box-sizing: border-box !important; /* Include padding/border */
    white-space: normal !important; /* Allow text wrapping */
    word-wrap: break-word !important; /* Allow long words to break */
  }
  
  /* Buttons container for multiple buttons side-by-side */
  .page-register__hero-content {
      display: flex;
      flex-direction: column; /* Stack buttons vertically on mobile */
      align-items: center;
      gap: 10px;
  }

  .page-register__section {
    padding: 40px 15px;
  }

  .page-register__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-register__section-description {
    font-size: 0.95em;
    margin-bottom: 40px;
  }

  .page-register__features-grid,
  .page-register__steps-grid,
  .page-register__security-grid,
  .page-register__promo-grid {
    grid-template-columns: 1fr; /* Stack columns on mobile */
    gap: 25px;
  }

  .page-register__feature-card,
  .page-register__step-item,
  .page-register__security-item,
  .page-register__promo-card {
    padding: 25px;
  }

  .page-register__feature-card img,
  .page-register__promo-card img {
     /* Adjust image height for mobile cards */
  }

  .page-register__feature-title,
  .page-register__step-title,
  .page-register__security-title,
  .page-register__promo-title {
    font-size: 1.3em;
  }

  /* FAQ Mobile Adjustments */
  .page-register__faq-question {
    padding: 15px 20px;
  }
  
  .page-register__faq-question h3 {
    font-size: 1em;
  }
  
  .page-register__faq-toggle {
    font-size: 22px;
    width: 26px;
    height: 26px;
  }
  
  .page-register__faq-item.active .page-register__faq-answer {
    padding: 15px !important;
  }

  /* Image and container responsive safety */
  .page-register img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-register__section,
  .page-register__card,
  .page-register__container,
  .page-register__hero-section,
  .page-register__hero-container,
  .page-register__hero-image,
  .page-register__hero-content,
  .page-register__features-grid,
  .page-register__steps-grid,
  .page-register__security-grid,
  .page-register__promo-grid,
  .page-register__faq-list,
  .page-register__final-cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left and padding-right are handled by .page-register__container for general sections */
  }
}

@media (max-width: 480px) {
  .page-register__main-title {
    font-size: 1.8em;
  }
  .page-register__subtitle {
    font-size: 0.9em;
  }
  .page-register__section-title {
    font-size: 1.6em;
  }
}