/* style/login.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-yellow: #FFFF00;
  --background-color: #FFFFFF;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--background-color);
}

.page-login__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-login__light-bg {
  background-color: var(--background-color);
  color: var(--text-color-dark);
}

.page-login__section {
  padding: 60px 0;
}

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

.page-login__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
}

.page-login__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

/* 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);
  overflow: hidden;
}

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

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

.page-login__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--button-text-yellow);
  text-shadow: 2px 2px 4px var(--shadow-color);
  line-height: 1.2;
}

.page-login__description-text {
  font-size: 20px;
  margin-bottom: 30px;
  color: var(--text-color-light);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-login__btn-login:hover {
  background: #a30707;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.page-login__btn-register {
  background: var(--button-register-bg);
  color: var(--button-text-yellow);
  border: 2px solid var(--button-register-bg);
}

.page-login__btn-register:hover {
  background: #a30707;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* Benefits Section */
.page-login__benefits-section {
  background-color: var(--background-color);
}

.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: 25px;
  border-radius: 8px;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__benefit-item img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 4px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

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

/* Login Guide Section */
.page-login__login-guide {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

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

.page-login__step-item {
  text-align: center;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__step-number {
  font-size: 48px;
  font-weight: bold;
  color: var(--button-text-yellow);
  margin-bottom: 15px;
}

.page-login__step-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-color-light);
}

.page-login__step-item p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
  background-color: var(--background-color);
}

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

.page-login__troubleshooting-item {
  background-color: var(--secondary-color);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  border-left: 5px solid var(--primary-color);
  color: var(--text-color-dark);
}

.page-login__troubleshooting-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

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

/* Register CTA Section */
.page-login__register-cta {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-login__register-content {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-login__register-content img {
  max-width: 45%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: block;
}

.page-login__register-text {
  max-width: 50%;
  text-align: left;
}

.page-login__register-text .page-login__section-title,
.page-login__register-text .page-login__section-description {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

/* FAQ Section */
.page-login__faq-section {
  background-color: var(--background-color);
}

.page-login__faq-list {
  margin-top: 40px;
}

/* 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 mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  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-color);
  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;
}

/* 问题标题样式 */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-color-dark);
}

/* 切换图标 */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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(--primary-color);
  transform: rotate(180deg);
}

/* Global Image Styles */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

  .page-login__description-text {
    font-size: 18px;
  }

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

  .page-login__section-description {
    font-size: 16px;
  }

  .page-login__register-content {
    gap: 30px;
  }

  .page-login__register-content img {
    max-width: 40%;
  }

  .page-login__register-text {
    max-width: 55%;
  }
}

@media (max-width: 768px) {
  .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;
    margin-bottom: 15px;
  }

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

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

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-login__section {
    padding: 40px 0;
  }

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

  .page-login__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

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

  .page-login__benefits-grid,
  .page-login__guide-steps,
  .page-login__troubleshooting-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-login__benefit-title,
  .page-login__step-title,
  .page-login__troubleshooting-title {
    font-size: 20px;
  }

  .page-login__register-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .page-login__register-content img {
    max-width: 100%;
    width: 100%;
  }

  .page-login__register-text {
    max-width: 100%;
    text-align: center;
  }
  
  .page-login__register-text .page-login__section-title,
  .page-login__register-text .page-login__section-description {
    text-align: center;
  }

  /* FAQ Mobile Styles */
  .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;
  }
  
  .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;
  }
}