/* style/login.css */
.page-login {
  background-color: var(--dark-bg); /* Assuming shared.css defines this as a dark color */
  color: #ffffff; /* Light text for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 80px; /* Add some padding at the bottom */
}

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

/* Hero Section */
.page-login__hero-section {
  position: relative;
  width: 100%;
  min-height: 700px; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0; /* Assuming shared.css handles body padding-top */
  padding-bottom: 80px; /* Add padding for content */
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-login__hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-login__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-login__hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 20px;
}

.page-login__main-title {
  font-size: 48px;
  color: #E5B80B; /* Gold for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-login__intro-text {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-login__login-form-wrapper {
  background: rgba(10, 36, 99, 0.85); /* Dark blue background for form */
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  max-width: 450px;
  margin: 0 auto;
}

.page-login__login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-login__form-group {
  text-align: left;
}

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #0A2463; /* Dark blue border */
  border-radius: 5px;
  background-color: #0A2463; /* Dark blue background */
  color: #ffffff;
  font-size: 16px;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: #cccccc;
  opacity: 0.7;
}

.page-login__form-input:focus {
  border-color: #E5B80B; /* Gold on focus */
  outline: none;
}

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

.page-login__remember-me {
  color: #f0f0f0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-login__remember-me input[type="checkbox"] {
  accent-color: #E5B80B; /* Gold checkbox */
}

.page-login__forgot-password {
  color: #E5B80B; /* Gold link */
  text-decoration: none;
}

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

.page-login__login-button {
  background-color: #E5B80B; /* Gold button */
  color: #0A2463; /* Dark blue text for contrast */
  padding: 15px 25px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none; /* For <a> tag */
  display: block; /* For <a> tag to take full width */
  text-align: center;
}

.page-login__login-button:hover {
  background-color: #d4a70a; /* Slightly darker gold on hover */
  color: #0A2463;
}

.page-login__register-prompt {
  font-size: 16px;
  color: #f0f0f0;
  text-align: center;
  margin-top: 20px;
}

.page-login__register-link {
  color: #E5B80B; /* Gold link */
  text-decoration: none;
  font-weight: bold;
}

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

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

.page-login__dark-section {
  background-color: #0A2463; /* Main dark blue for sections */
  padding: 80px 0;
  color: #ffffff;
}

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

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

.page-login__benefit-item {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards on dark blue */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__benefit-title {
  font-size: 24px;
  color: #E5B80B;
  margin-bottom: 15px;
}

.page-login__benefit-description {
  font-size: 16px;
  color: #f0f0f0;
}

/* Register CTA Section */
.page-login__register-cta-section {
  position: relative;
  width: 100%;
  padding: 100px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--dark-bg); /* Fallback if image not loaded */
}

.page-login__register-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3; /* Make background image subtle */
}

.page-login__register-cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.page-login__register-text .page-login__section-title {
  color: #E5B80B;
}

.page-login__register-text .page-login__intro-text {
  color: #f0f0f0;
  font-size: 18px;
}

.page-login__register-button {
  background-color: #E5B80B;
  color: #0A2463;
  padding: 18px 35px;
  border: none;
  border-radius: 5px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.page-login__register-button:hover {
  background-color: #d4a70a;
  color: #0A2463;
}

/* Security & Support Section */
.page-login__security-support-section {
  padding: 80px 0;
}

.page-login__security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-login__security-item {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards on dark blue */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__security-icon {
  width: 80px; /* Adjust size for icons */
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-login__security-title {
  font-size: 24px;
  color: #E5B80B;
  margin-bottom: 15px;
}

.page-login__security-description {
  font-size: 16px;
  color: #f0f0f0;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background-color: var(--dark-bg); /* Match body background */
}

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

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Lighter background for FAQ items */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 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;
  color: #f0f0f0; /* Light text for answer */
  background: rgba(255, 255, 255, 0.02); /* Even lighter background for open answer */
}

/* FAQ展开状态 - 🚨 Sử dụng !important và max-height đủ lớn để đảm bảo mở rộng */
.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 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08); /* Slightly lighter background for question */
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #ffffff; /* White text for question */
}

.page-login__faq-question:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-login__faq-question:active {
  background: rgba(255, 255, 255, 0.15);
}

/* Question title styles */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
  color: #ffffff; /* White text for h3 */
}

/* Toggle icon */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #E5B80B; /* Gold for toggle icon */
  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: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: #E5B80B; /* Gold remains active */
  transform: rotate(45deg); /* Rotate for minus sign */
}

/* Ensure no filter is used on images */
.page-login img {
  filter: none;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  /* General page content adjustments */
  .page-login {
    padding-bottom: 60px;
    font-size: 16px;
    line-height: 1.6;
  }

  .page-login__container {
    padding: 0 15px;
  }

  /* HERO 主图区域 */
  .page-login__hero-section {
    min-height: 550px;
    padding-bottom: 60px;
    padding-top: 0 !important; /* Assuming shared.css handles body padding-top */
  }

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

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

  .page-login__login-form-wrapper {
    padding: 30px;
    max-width: 100%; /* Ensure form is full width on mobile */
  }

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

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

  /* 按钮与按钮容器 */
  .page-login__login-button,
  .page-login__register-button {
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__register-prompt {
    font-size: 14px;
    margin-top: 15px;
  }

  /* 其他内容模块 - Section Titles */
  .page-login__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  /* 其他内容模块 - Benefits Section */
  .page-login__benefits-section {
    padding: 60px 0;
  }

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

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

  .page-login__benefit-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .page-login__benefit-description {
    font-size: 15px;
  }

  /* 其他内容模块 - Register CTA Section */
  .page-login__register-cta-section {
    padding: 60px 0;
  }

  .page-login__register-cta-content {
    gap: 20px;
  }

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

  /* 其他内容模块 - Security & Support Section */
  .page-login__security-support-section {
    padding: 60px 0;
  }

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

  .page-login__security-item {
    padding: 25px;
  }

  .page-login__security-icon {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    margin-bottom: 15px;
  }

  .page-login__security-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

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

  /* 其他内容模块 - FAQ Section */
  .page-login__faq-section {
    padding: 60px 0;
  }

  .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;
  }

  /* 通用图片与容器 */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Specific override for security icons to maintain small size, already handled above */
  /* .page-login__security-icon { ... } */

  .page-login__container,
  .page-login__hero-content,
  .page-login__login-form-wrapper,
  .page-login__benefits-grid,
  .page-login__benefit-item,
  .page-login__register-cta-content,
  .page-login__security-grid,
  .page-login__security-item,
  .page-login__faq-list,
  .page-login__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
}