/* style/login.css */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #ffffff; /* Default body background is white */
}

/* Color definitions */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-btn-color: #C30808;
  --login-btn-color: #C30808;
  --text-on-login-register-btn: #FFFF00;
}

/* Fixed Header Offset - desktop and mobile */
.page-login {
  padding-top: var(--header-offset, 120px); /* Use shared variable for header offset */
}

/* 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;
  background: linear-gradient(135deg, var(--primary-color), #004d26); /* Darker green gradient */
  color: var(--secondary-color); /* White text for dark background */
}

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

.page-login__hero-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
  line-height: 1.2;
}

.page-login__hero-description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--secondary-color);
}

.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;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-login__form-wrapper {
  background: rgba(255, 255, 255, 0.95); /* Slightly transparent white background for form */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 100%;
  margin: 20px auto 0;
  box-sizing: border-box;
}

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

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

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

.page-login__form-input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.page-login__submit-button {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: var(--login-btn-color); /* Custom login button color */
  color: var(--text-on-login-register-btn); /* Custom text color for login button */
  text-decoration: none;
  border-radius: 5px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

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

.page-login__links {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.page-login__forgot-password,
.page-login__register-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover,
.page-login__register-link:hover {
  color: #004d26; /* Darker green on hover */
  text-decoration: underline;
}

/* General Section Styles */
.page-login__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #333333;
}

.page-login__section-title--white {
  color: var(--secondary-color);
}

.page-login__section-description {
  font-size: 16px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: #555555;
}

.page-login__section-description--white {
  color: #f0f0f0;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 20px;
  background-color: var(--secondary-color); /* Light background */
}

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

.page-login__benefit-item {
  text-align: center;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.page-login__benefit-item img {
  width: 100%;
  max-width: 400px; /* Example for content image */
  height: auto;
  border-radius: 6px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
}

.page-login__benefit-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-login__benefit-text {
  font-size: 15px;
  color: #555555;
}

/* Security Section */
.page-login__security-section {
  padding: 80px 20px;
  background-color: var(--primary-color); /* Dark background */
  color: var(--secondary-color);
}

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

.page-login__security-item {
  text-align: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white card for dark background */
  border-radius: 8px;
}

.page-login__security-item img {
  width: 250px; /* Adjusted to meet min 200x200px requirement */
  height: 250px;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: none; /* Ensure no filter changes image color */
  object-fit: contain; /* Keep aspect ratio for icons */
}

.page-login__security-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-login__security-text {
  font-size: 15px;
  color: #f0f0f0;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 20px;
  background-color: #f9f9f9; /* Light background */
}

.page-login__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: 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, opacity 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; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa bất kỳ nội dung nào */
  padding: 20px 15px !important;
  opacity: 1;
  background: #e6f7ed; /* Light green background for expanded answer */
  border-radius: 0 0 5px 5px;
  color: #333333; /* Ensure dark text on light background */
}

/* Vấn đề phong cách */
.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;
}

/* Phong cách tiêu đề câu hỏi */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: #333333;
}

/* Biểu tượng chuyển đổi */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Green color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện nhấp */
  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); /* Xoay để tạo hiệu ứng dấu trừ */
}

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