/* General Styles for page-login */
.page-login {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: var(--page-bg, #F4F7FB); /* Background */
  line-height: 1.6;
}

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

.page-login__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-login__section-subtitle {
  font-size: 18px;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
}

.page-login__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-login__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Desktop: cover */
  display: block;
}

.page-login__hero-content-wrapper {
  position: relative;
  z-index: 1;
  padding: 20px;
  max-width: 900px;
  background-color: rgba(0, 0, 0, 0.4); /* Overlay for readability */
  border-radius: 10px;
}

.page-login__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-login__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-login__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: none;
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  transform: translateY(-2px);
}

.page-login__btn-secondary {
  background: #ffffff;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
}

.page-login__btn-secondary:hover {
  background: #f0f0f0;
  color: #1F5BCC;
  border-color: #1F5BCC;
  transform: translateY(-2px);
}

/* Login Form Section */
.page-login__login-form-section {
  padding: 80px 0;
  background-color: #F4F7FB; /* Background */
}

.page-login__login-form {
  max-width: 500px;
  margin: 0 auto;
  background: #FFFFFF; /* Card BG */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #D6E2FF; /* Border */
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1F2D3D; /* Text Main */
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
  color: #1F2D3D;
}

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

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 15px;
}

.page-login__checkbox-container {
  display: block;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
  color: #1F2D3D; /* Text Main */
}

.page-login__checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.page-login__checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 3px;
  border: 1px solid #D6E2FF;
}

.page-login__checkbox-container:hover input ~ .page-login__checkmark {
  background-color: #ccc;
}

.page-login__checkbox-container input:checked ~ .page-login__checkmark {
  background-color: #2F6BFF;
  border-color: #2F6BFF;
}

.page-login__checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.page-login__checkbox-container input:checked ~ .page-login__checkmark:after {
  display: block;
}

.page-login__checkbox-container .page-login__checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.page-login__forgot-password-link {
  color: #2F6BFF;
  text-decoration: none;
  font-weight: 500;
}

.page-login__forgot-password-link:hover {
  text-decoration: underline;
}

.page-login__btn-submit {
  width: 100%;
  padding: 15px 20px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  transition: background 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
}

.page-login__btn-submit:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  transform: translateY(-2px);
}

.page-login__register-prompt {
  text-align: center;
  margin-top: 30px;
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
}

.page-login__register-link {
  color: #2F6BFF;
  text-decoration: none;
  font-weight: 600;
}

.page-login__register-link:hover {
  text-decoration: underline;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 0;
  background-color: #FFFFFF; /* Card BG */
}

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

.page-login__benefit-card {
  background: #F4F7FB; /* Background */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid #D6E2FF; /* Border */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.page-login__benefit-icon {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-login__card-title {
  font-size: 24px;
  font-weight: 700;
  color: #2F6BFF;
  margin-bottom: 10px;
}

.page-login__card-description {
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background-color: #F4F7FB; /* Background */
}

details.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #D6E2FF; /* Border */
  overflow: hidden;
  background: #FFFFFF; /* Card BG */
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

details.page-login__faq-item summary.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-login__faq-item summary.page-login__faq-question::-webkit-details-marker {
  display: none;
}

details.page-login__faq-item summary.page-login__faq-question:hover {
  background: #F9F9F9;
}

.page-login__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D; /* Text Main */
}

.page-login__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #2F6BFF;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg); /* Change + to X or rotate */
}

details.page-login__faq-item .page-login__faq-answer {
  padding: 0 25px 20px;
  background: #F9F9F9;
  border-radius: 0 0 8px 8px;
  color: #1F2D3D; /* Text Main */
}

.page-login__faq-answer p {
  margin-top: 10px;
  margin-bottom: 0;
}

/* CTA Section */
.page-login__cta-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #2F6BFF 0%, #6FA3FF 100%);
  color: #ffffff;
  text-align: center;
}

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

.page-login__cta-section .page-login__cta-buttons {
  margin-top: 40px;
}

.page-login__cta-section .page-login__btn-secondary {
  background: #ffffff;
  color: #2F6BFF;
  border-color: #ffffff;
}

.page-login__cta-section .page-login__btn-secondary:hover {
  background: #f0f0f0;
  color: #1F5BCC;
  border-color: #f0f0f0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-login__container {
    padding: 15px;
  }

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

  .page-login__hero-content-wrapper {
    max-width: 700px;
  }

  .page-login__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-login__hero-description {
    font-size: 1rem;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
    min-width: 160px;
  }

  .page-login__login-form {
    padding: 30px;
  }

  .page-login__benefits-grid {
    gap: 20px;
  }

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

  .page-login__faq-qtext {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-login__hero-section {
    padding-top: 10px; /* 約 10px 級頂距 */
    padding-bottom: 40px;
    min-height: 400px;
  }

  .page-login__hero-image {
    object-fit: contain !important; /* Mobile: contain */
    aspect-ratio: unset !important;
    position: relative; /* Adjust for contain */
  }

  .page-login__hero-image-wrapper {
    position: relative;
    height: 250px; /* Fixed height for mobile contain */
  }

  .page-login__hero-content-wrapper {
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay for better contrast */
    padding: 15px;
    width: calc(100% - 30px); /* Adjust width for padding */
    margin-top: 20px;
  }

  .page-login__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-login__hero-description {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 通用图片与容器 */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__login-form,
  .page-login__benefits-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login a[class*="button"],
  .page-login a[class*="btn"],
  .page-login__btn-submit {
    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,
  .page-login__button-group,
  .page-login__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;
    flex-direction: column; /* Ensure vertical stacking for buttons */
  }

  /* Login Form Section */
  .page-login__login-form-section {
    padding: 40px 0;
  }

  .page-login__login-form {
    padding: 25px;
  }

  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Benefits Section */
  .page-login__benefits-section {
    padding: 40px 0;
  }

  .page-login__benefits-grid {
    grid-template-columns: 1fr; /* Single column for benefits on mobile */
    gap: 20px;
  }

  /* FAQ Section */
  .page-login__faq-section {
    padding: 40px 0;
  }

  details.page-login__faq-item summary.page-login__faq-question {
    padding: 15px 20px;
  }

  .page-login__faq-qtext {
    font-size: 15px;
  }

  .page-login__faq-toggle {
    font-size: 24px;
    width: 24px;
  }

  details.page-login__faq-item .page-login__faq-answer {
    padding: 0 20px 15px;
  }

  /* CTA Section */
  .page-login__cta-section {
    padding: 40px 0;
  }

  .page-login__cta-section .page-login__cta-buttons {
    margin-top: 30px;
  }

  .page-login__section-title {
    font-size: 26px;
  }

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

  /* Content area images: width/height not less than 200px */
  .page-login__benefit-icon {
    max-width: 150px !important;
    height: auto !important;
    width: 100% !important;
  }
}