/* style/register.css */

/* --- General Page Styles --- */
.page-register {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--secondary-color, #FFFFFF); /* Assuming body background is light */
}

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

.page-register__section-title {
  font-size: 36px;
  color: #26A9E0; /* Primary color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* --- 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;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Gradient background */
  overflow: hidden; /* Prevent image overflow */
}

.page-register__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any background elements if added */
}

.page-register__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.page-register__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white background for text */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -80px; /* Overlap with image for better visual flow */
}

.page-register__main-title {
  font-size: 48px;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.page-register__intro-text {
  font-size: 20px;
  color: #333333;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-register__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: #EA7C07; /* Login color for CTA */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 22px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-register__cta-button:hover {
  background: #d46f06;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-register__benefit-item {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

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

.page-register__benefit-item img {
  width: 100%;
  max-width: 400px;
  height: 300px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-register__benefit-title {
  font-size: 24px;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: 700;
}

.page-register__benefit-text {
  font-size: 16px;
  color: #555555;
}

/* --- Steps Section --- */
.page-register__steps-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Primary color for dark background */
  color: #ffffff; /* White text for dark background */
}

.page-register__steps-section .page-register__section-title {
  color: #ffffff;
}

.page-register__steps-section .page-register__section-description {
  color: #f0f0f0;
}

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

.page-register__step-item {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for items */
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-register__step-icon {
  width: 60px;
  height: 60px;
  background: #EA7C07; /* Login color for step icon */
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin: 0 auto 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-register__step-title {
  font-size: 26px;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: 700;
}

.page-register__step-text {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
}

.page-register__step-item img {
  width: 100%;
  max-width: 600px;
  height: 400px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-top: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-register__cta-bottom {
  text-align: center;
  margin-top: 60px;
}

/* --- FAQ Section --- */
.page-register__faq-section {
  padding: 80px 0;
  background-color: var(--secondary-color, #FFFFFF);
  color: #333333;
}

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

/* FAQ容器样式 */
.page-register__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px 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, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  background: #f9f9f9;
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-register__faq-item.active .page-register__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo mức độ ưu tiên, giá trị đủ lớn để chứa bất kỳ nội dung nào */
  padding: 20px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  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;
}

/* Question title style */
.page-register__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
}

/* Toggle icon */
.page-register__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #26A9E0; /* Primary color 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: 32px;
  height: 32px;
}

.page-register__faq-item.active .page-register__faq-toggle {
  color: #EA7C07; /* Login color when active */
  transform: rotate(45deg); /* Rotate for minus sign effect */
}

/* --- Call to Action Bottom Section --- */
.page-register__call-to-action {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-register__call-to-action .page-register__section-title {
  color: #ffffff;
}

.page-register__call-to-action .page-register__section-description {
  color: #f0f0f0;
}

.page-register__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-register__btn-primary {
  background: #EA7C07;
  color: #ffffff;
  border: 2px solid transparent;
}

.page-register__btn-primary:hover {
  background: #d46f06;
  border-color: #d46f06;
}

.page-register__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-register__btn-secondary:hover {
  background: #e0e0e0;
  color: #1a83b3;
  border-color: #1a83b3;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-register__main-title {
    font-size: 40px;
  }
  .page-register__intro-text {
    font-size: 18px;
  }
  .page-register__section-title {
    font-size: 32px;
  }
  .page-register__cta-button {
    padding: 15px 35px;
    font-size: 20px;
  }
  .page-register__hero-content {
    margin-top: -60px;
  }
}

@media (max-width: 768px) {
  .page-register__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
    padding-bottom: 40px;
  }
  .page-register__hero-content {
    margin-top: -40px;
    padding: 15px;
  }
  .page-register__main-title {
    font-size: 32px;
  }
  .page-register__intro-text {
    font-size: 16px;
  }
  .page-register__cta-button,
  .page-register__btn-primary,
  .page-register__btn-secondary,
  .page-register a[class*="button"],
  .page-register a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-register__cta-buttons,
  .page-register__button-group,
  .page-register__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
  }
  .page-register__section-title {
    font-size: 28px;
  }
  .page-register__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-register__benefits-section,
  .page-register__steps-section,
  .page-register__faq-section,
  .page-register__call-to-action {
    padding: 50px 0;
  }
  .page-register__benefit-item img,
  .page-register__step-item img {
    height: 250px; /* Adjust height for mobile */
  }

  /* Mobile image responsive */
  .page-register img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-register__section,
  .page-register__card,
  .page-register__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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