/* style/login.css */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --login-button-bg: #C30808;
  --login-button-text: #FFFF00;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --border-light: #e0e0e0;
  --background-light: #f9f9f9;
}

.page-login {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--secondary-color); /* Matches body background from shared.css */
}

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

.page-login__section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-login__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--login-button-bg);
  border-radius: 2px;
}

.page-login__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: center;
  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;
  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%, #018a47 100%); /* Green gradient */
  color: var(--text-light);
}

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

.page-login__hero-image-wrapper {
  width: 100%;
  margin-bottom: 30px;
  max-width: 800px; /* Constrain image width */
}

.page-login__hero-image-wrapper img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.page-login__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--login-button-text); /* Yellow for main title for impact */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-login__description {
  font-size: 18px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto 30px;
  color: var(--text-light);
}

/* Login Form Section */
.page-login__form-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

.page-login__form-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 50px;
}

.page-login__login-form {
  flex: 1;
  min-width: 350px;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-color);
}

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-dark);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

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

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

.page-login__form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
}

.page-login__btn-login,
.page-login__btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  min-width: 150px; /* Ensure minimum width */
}

.page-login__btn-login {
  background-color: var(--login-button-bg); /* Red */
  color: var(--login-button-text); /* Yellow */
  border: 2px solid var(--login-button-bg);
}

.page-login__btn-login:hover {
  background-color: #a00606;
  border-color: #a00606;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(195, 8, 8, 0.3);
}

.page-login__btn-register {
  background-color: var(--primary-color); /* Green */
  color: var(--text-light); /* White */
  border: 2px solid var(--primary-color);
}

.page-login__btn-register:hover {
  background-color: #005a2e;
  border-color: #005a2e;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(1, 116, 57, 0.3);
}

.page-login__forgot-password {
  text-align: center;
  margin-top: 20px;
  font-size: 15px;
}

.page-login__forgot-password a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

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

.page-login__form-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 300px;
}

.page-login__form-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Min image size */
  min-height: 200px;
}

/* Security Section */
.page-login__security-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-login__security-section .page-login__section-title {
  color: var(--login-button-text); /* Yellow title on dark background */
}

.page-login__security-section .page-login__section-title::after {
  background-color: var(--login-button-text);
}

.page-login__security-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}

.page-login__feature-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  max-width: 300px;
  flex: 1 1 280px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-login__feature-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-login__feature-item img {
  
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
  min-width: 200px; /* Min image size */
  min-height: 200px;
}

.page-login__feature-item h3 {
  font-size: 22px;
  color: var(--login-button-text); /* Yellow for feature titles */
  margin-bottom: 15px;
}

.page-login__feature-item p {
  font-size: 16px;
  color: var(--text-light);
}

.page-login__security-section .page-login__btn-secondary {
  margin-top: 40px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--login-button-text); /* Yellow background */
  color: var(--primary-color); /* Green text */
  border: 2px solid var(--login-button-text);
  padding: 15px 40px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.page-login__security-section .page-login__btn-secondary:hover {
  background-color: #e0e000;
  border-color: #e0e000;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 255, 0, 0.3);
}

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

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

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  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 15px;
  opacity: 0;
  background: var(--secondary-color);
  color: var(--text-dark);
}

/* 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 15px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-light);
  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: var(--background-light);
  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;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--primary-color);
}

/* 切换图标 */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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: var(--login-button-bg);
  transform: rotate(45deg); /* Rotate for minus sign effect */
}

/* General Responsive Styles */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 40px;
  }

  .page-login__description {
    font-size: 17px;
  }

  .page-login__form-wrapper {
    flex-direction: column;
    padding: 40px;
  }

  .page-login__login-form, .page-login__form-image {
    min-width: unset;
    width: 100%;
  }

  .page-login__form-image img {
    max-width: 80%;
  }

  .page-login__security-features {
    gap: 20px;
  }

  .page-login__feature-item {
    max-width: 320px;
    flex: 1 1 300px;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-login__description {
    font-size: 16px;
  }

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

  .page-login__text-block {
    font-size: 16px;
  }

  .page-login__form-section, .page-login__security-section, .page-login__faq-section {
    padding: 50px 0;
  }

  .page-login__form-wrapper {
    padding: 30px;
    gap: 30px;
  }

  .page-login__form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .page-login__btn-login, .page-login__btn-register {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

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

  .page-login__security-features {
    flex-direction: column;
    align-items: center;
  }

  .page-login__feature-item {
    max-width: 90%;
    width: 100%;
    padding: 25px;
  }

  .page-login__feature-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Enforce min size */
    min-height: 200px !important;
  }

  .page-login__feature-item h3 {
    font-size: 20px;
  }

  .page-login__security-section .page-login__btn-secondary {
    width: 100%;
    max-width: 90%;
    padding: 12px 30px;
    font-size: 16px;
  }

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

  /* Image responsiveness for all images in content area */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Enforce min size */
    min-height: 200px !important;
  }
  
  .page-login__section, 
  .page-login__card, 
  .page-login__container, 
  .page-login__form-wrapper, 
  .page-login__security-features, 
  .page-login__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__hero-image-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
}