/* style/login.css */

/* --- General Page Styles --- */
.page-login {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Dark text for light body background */
  line-height: 1.6;
  background-color: #FFFFFF; /* Explicitly matching body background for content */
}

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

.page-login__section-title {
  font-size: 32px;
  color: #017439; /* Brand color for titles */
  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); /* Fixed header offset */
  background: linear-gradient(135deg, #017439, #017439cc); /* Brand green gradient */
  color: #FFFFFF; /* White text for dark background */
  overflow: hidden; /* Prevent image overflow */
}

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

.page-login__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden; /* Ensure image fits */
  border-radius: 12px;
}

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

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

.page-login__main-title {
  font-size: 44px;
  margin-bottom: 20px;
  color: #FFFF00; /* Custom color for login/register font */
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons are responsive */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-login__btn-primary {
  background: #C30808; /* Login/Register color */
  color: #FFFF00; /* Login/Register font color */
  border: 2px solid #C30808;
}

.page-login__btn-primary:hover {
  background: #e02020;
  border-color: #e02020;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__btn-secondary {
  background: #FFFFFF;
  color: #017439; /* Brand color */
  border: 2px solid #017439;
}

.page-login__btn-secondary:hover {
  background: #f0f0f0;
  border-color: #017439;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Login Form Section --- */
.page-login__form-section {
  background-color: #f9f9f9; /* Light background for form */
  padding: 60px 0;
}

.page-login__login-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #333333;
  font-size: 16px;
}

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #cccccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
  border-color: #017439;
  outline: none;
  box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-login__remember-me {
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #555555;
}

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: #017439; /* Checkbox color */
}

.page-login__forgot-password {
  color: #017439;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

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

.page-login__submit-button {
  width: 100%;
  padding: 16px;
  background: #C30808; /* Login button color */
  color: #FFFF00; /* Login button font color */
  border: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure button is responsive */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-login__submit-button:hover {
  background: #e02020;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__no-account-text {
  text-align: center;
  margin-top: 30px;
  font-size: 16px;
  color: #555555;
}

.page-login__register-link {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
}

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

/* --- Security Section --- */
.page-login__security-section {
  padding: 60px 0;
  background: #017439; /* Dark background for security section */
  color: #ffffff; /* White text for dark background */
}

.page-login__security-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.page-login__security-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

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

.page-login__security-text {
  flex: 2;
  min-width: 300px;
}

.page-login__security-text p {
  margin-bottom: 20px;
  font-size: 17px;
}

.page-login__security-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-login__security-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: 16px;
}

.page-login__security-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #FFFF00; /* Highlight checkmark */
  font-weight: bold;
}

/* --- FAQ Section --- */
.page-login__faq-section {
  padding: 60px 0;
  background-color: #f0f0f0; /* Light background for FAQ */
}

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

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

/* 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, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  background: #fdfdfd;
  color: #555555;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-item.active .page-login__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.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: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #017439; /* Brand color for toggle */
  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: #C30808; /* Accent color when active */
  transform: rotate(180deg); /* Rotate for minus sign effect */
}

.page-login__support-cta {
  text-align: center;
  margin-top: 40px;
  padding: 30px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__support-cta p {
  font-size: 18px;
  margin-bottom: 25px;
  color: #333333;
}

.page-login__support-image {
    max-width: 150px; /* Smaller image for CTA */
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
    border-radius: 8px;
}

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

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

  .page-login__intro-text {
    font-size: 16px;
  }

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to buttons container */
  }

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__submit-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__container {
    padding: 20px 15px;
  }

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

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

  .page-login__form-input {
    padding: 12px 15px;
  }

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

  .page-login__security-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-login__security-text p {
    font-size: 16px;
  }

  .page-login__security-list li {
    font-size: 15px;
  }

  .page-login__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-login__faq-question h3 {
    font-size: 16px;
    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;
  }

  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure all images adhere to min-size requirements and no filters */
.page-login img {
    filter: none !important; /* Absolutely no CSS filters to change color */
}

/* Contrast Fixes (if needed) */
.page-login__dark-bg {
  color: #ffffff; /* Deep background with light text */
  background: #017439;
}

.page-login__light-bg {
  color: #333333; /* Light background with dark text */
  background: #ffffff;
}

.page-login__medium-bg {
  color: #000000; /* Default dark text for medium backgrounds */
  background: #FFFFFF; /* Example */
}