/* style/register.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
}

.page-register {
  color: var(--text-dark);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  padding-top: var(--header-offset, 120px);
}

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

.page-register__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-register__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-dark);
}

/* Hero Section */
.page-register__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), #40c0f0);
  color: var(--text-light);
}

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

.page-register__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

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

.page-register__hero-title {
  font-size: 3em;
  margin-bottom: 20px;
  font-weight: 900;
  color: var(--text-light);
}

.page-register__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-light);
}

/* Buttons */
.page-register__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-register__btn-primary {
  background: var(--login-color);
  color: var(--text-light);
  border: 2px solid var(--login-color);
}

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

.page-register__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-register__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.page-register__benefit-item {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-register__benefit-item img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-register__benefit-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-register__benefit-text {
  font-size: 1em;
  color: var(--text-dark);
}

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

.page-register__form-container {
  max-width: 600px;
  background: rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-register__form-section .page-register__section-title,
.page-register__form-section .page-register__section-description {
  color: var(--text-light);
}

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

.page-register__form-group {
  display: flex;
  flex-direction: column;
}

.page-register__form-label {
  font-size: 1em;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--text-light);
}

.page-register__form-input {
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 1em;
}

.page-register__form-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.page-register__form-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.page-register__verification-input {
  display: flex;
  gap: 10px;
}

.page-register__verification-input .page-register__form-input {
  flex-grow: 1;
}

.page-register__send-code-button {
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  background: var(--secondary-color);
  color: var(--primary-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-register__send-code-button:hover {
  background: #e0e0e0;
}

.page-register__form-agreement {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
  color: var(--text-light);
}

.page-register__form-agreement input[type="checkbox"] {
  min-width: 16px;
  min-height: 16px;
  accent-color: var(--login-color);
}

.page-register__text-link {
  color: var(--login-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-register__text-link:hover {
  color: #c76706;
}

.page-register__submit-button {
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background: var(--login-color);
  color: var(--text-light);
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-register__submit-button:hover {
  background: #c76706;
  transform: translateY(-2px);
}

.page-register__login-prompt {
  text-align: center;
  margin-top: 25px;
  font-size: 1em;
  color: var(--text-light);
}

.page-register__login-link {
  font-weight: bold;
}

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

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

.page-register__promo-card {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-register__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-register__promo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.page-register__promo-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin: 20px 15px 10px;
}

.page-register__promo-text {
  font-size: 0.95em;
  color: var(--text-dark);
  padding: 0 15px 20px;
}

.page-register__promo-button {
  display: inline-block;
  margin-bottom: 20px;
}

.page-register__button-group {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* FAQ Section */
.page-register__faq-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

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

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

/* FAQ默认状态 - 答案隐藏 */
.page-register__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-register__faq-item.active .page-register__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-register__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-register__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-register__faq-question:active {
  background: #eeeeee;
}

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

/* 切换图标 */
.page-register__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-register__faq-item.active .page-register__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Thay đổi dấu + thành X hoặc - */
}

/* Final CTA Section */
.page-register__cta-final-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
}

.page-register__cta-final-section .page-register__section-title,
.page-register__cta-final-section .page-register__section-description {
  color: var(--text-light);
}

/* Global image styles for responsiveness */
.page-register img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-register__hero-title {
    font-size: 2.5em;
  }
  .page-register__hero-description {
    font-size: 1.1em;
  }
  .page-register__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-register {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-register__container {
    padding: 15px;
  }

  .page-register__hero-section {
    padding: 40px 15px;
  }

  .page-register__hero-title {
    font-size: 2em;
  }

  .page-register__hero-description {
    font-size: 1em;
  }

  .page-register__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-register__benefits-section,
  .page-register__form-section,
  .page-register__promotions-section,
  .page-register__faq-section,
  .page-register__cta-final-section {
    padding: 40px 0;
  }

  .page-register__section-title {
    font-size: 1.8em;
  }

  .page-register__section-description {
    font-size: 0.95em;
  }

  .page-register__benefits-grid,
  .page-register__promotions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-register__form-container {
    padding: 30px 20px;
  }

  .page-register__send-code-button {
    padding: 10px 15px;
    font-size: 0.9em;
  }

  .page-register__submit-button {
    font-size: 1.1em;
    padding: 12px 20px;
  }

  .page-register__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-register__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-register__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-register__faq-answer {
    padding: 0 15px;
  }
  
  .page-register__faq-item.active .page-register__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all images and their containers are responsive */
  .page-register img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-register__section,
  .page-register__card,
  .page-register__container,
  .page-register__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-register__button-group {
    flex-direction: column;
    gap: 10px;
  }

  .page-register__hero-image {
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .page-register__hero-title {
    font-size: 1.8em;
  }
  .page-register__section-title {
    font-size: 1.5em;
  }
  .page-register__hero-description {
    font-size: 0.9em;
  }
  .page-register__form-container {
    padding: 25px 15px;
  }
  .page-register__form-agreement {
    flex-direction: column;
    align-items: flex-start;
  }
}