/* style/register.css */

/* Base styles for the page content */
.page-register {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Default body background */
}

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

.page-register__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #26A9E0; /* Brand color for titles */
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.page-register__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #EA7C07; /* Accent color for underline */
    border-radius: 2px;
}

/* 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); /* Fixed header offset */
    background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
    overflow: hidden;
}

.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 potential background effects */
}

.page-register__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 800px; /* Limit image width in hero for better composition */
}

.page-register__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

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

.page-register__hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #26A9E0; /* Brand color */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-register__hero-description {
    font-size: 20px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-register__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(38, 169, 224, 0.3);
    border: none;
    cursor: pointer;
}

.page-register__cta-button:hover {
    background: #EA7C07; /* Login/Accent color */
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(234, 124, 7, 0.4);
}

.page-register__cta-button--inverted {
    background: #EA7C07; /* Login/Accent color */
    box-shadow: 0 8px 20px rgba(234, 124, 7, 0.3);
}

.page-register__cta-button--inverted:hover {
    background: #26A9E0; /* Primary brand color */
    box-shadow: 0 12px 25px rgba(38, 169, 224, 0.4);
}

/* Benefits Section */
.page-register__benefits-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Light background */
}

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

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

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

.page-register__benefit-item img {
    width: 100%; /* Ensure images fill their container */
    max-width: 300px; /* Limit max width for consistency */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
    min-width: 200px; /* Ensure minimum size */
}

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

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

/* How to Register Section */
.page-register__how-to-register-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary brand color for dark background */
    color: #ffffff; /* White text for dark background */
}

.page-register__how-to-register-section .page-register__section-title {
    color: #ffffff; /* White title for dark background */
}

.page-register__how-to-register-section .page-register__section-title::after {
    background-color: #ffffff; /* White underline for dark background */
}

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

.page-register__step-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white background */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-register__step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #EA7C07; /* Accent color */
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    border: 3px solid #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-register__step-item img {
    width: 100%;
    max-width: 250px; /* Limit max width for consistency */
    height: auto;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
    min-width: 200px; /* Ensure minimum size */
}

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

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

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

/* Security Section */
.page-register__security-section {
    padding: 80px 0;
    background-color: #ffffff; /* White background */
}

.page-register__security-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.page-register__security-text {
    flex: 1;
    min-width: 300px;
    font-size: 17px;
    color: #555555;
}

.page-register__security-text p {
    margin-bottom: 20px;
}

.page-register__text-link {
    display: block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.page-register__text-link:hover {
    color: #EA7C07;
    text-decoration: underline;
}

.page-register__security-image {
    flex: 1;
    min-width: 400px;
    text-align: center;
}

.page-register__security-image img {
    width: 100%;
    height: auto;
    max-width: 600px; /* Limit max width for visual balance */
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
    min-width: 200px; /* Ensure minimum size */
}

/* Welcome Bonus Section */
.page-register__welcome-bonus-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary brand color for dark background */
    color: #ffffff;
}

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

.page-register__welcome-bonus-section .page-register__section-title::after {
    background-color: #ffffff;
}

.page-register__bonus-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
}

.page-register__bonus-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-register__bonus-image img {
    width: 100%;
    height: auto;
    max-width: 500px; /* Limit max width */
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
    min-width: 200px; /* Ensure minimum size */
}

.page-register__bonus-text {
    flex: 1;
    min-width: 300px;
    font-size: 17px;
    color: #f0f0f0;
}

.page-register__bonus-text p {
    margin-bottom: 20px;
}

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

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

/* FAQ容器样式 */
.page-register__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* 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 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!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 ưu tiên, giá trị đủ lớn để chứa bất kỳ nội dung nào */
  padding: 20px 15px !important;
  opacity: 1;
  background: #ffffff; /* White background for answer */
  border-radius: 0 0 5px 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Vấn đề kiểu */
.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-register__faq-item.active .page-register__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #26A9E0; /* Brand color border when active */
}

.page-register__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* Kiểu tiêu đề câu hỏi */
.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; /* Ngăn thẻ h3 chặn sự kiện nhấp */
}

/* Chuyển đổi biểu tượng */
.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; /* Ngăn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-register__faq-item.active .page-register__faq-toggle {
  color: #26A9E0; /* Brand color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Final CTA Section */
.page-register__cta-final-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary brand color for dark background */
    color: #ffffff;
    text-align: center;
}

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

.page-register__cta-final-section .page-register__section-title::after {
    background-color: #ffffff;
}

.page-register__final-cta-text {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-register__hero-title {
        font-size: 40px;
    }
    .page-register__hero-description {
        font-size: 18px;
    }
    .page-register__section-title {
        font-size: 30px;
    }
    .page-register__security-content,
    .page-register__bonus-content {
        flex-direction: column;
    }
    .page-register__security-image,
    .page-register__bonus-image {
        order: -1; /* Image first on smaller screens */
    }
    .page-register__security-image img,
    .page-register__bonus-image img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .page-register__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        padding-bottom: 40px;
    }
    .page-register__hero-title {
        font-size: 32px;
    }
    .page-register__hero-description {
        font-size: 16px;
    }
    .page-register__cta-button {
        padding: 15px 30px;
        font-size: 18px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-register__section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    .page-register__benefits-grid,
    .page-register__steps-grid {
        grid-template-columns: 1fr;
    }
    .page-register__benefit-item,
    .page-register__step-item {
        padding: 20px;
    }
    .page-register__benefit-title {
        font-size: 20px;
    }
    .page-register__step-title {
        font-size: 18px;
    }
    .page-register__security-text,
    .page-register__bonus-text {
        font-size: 16px;
    }
    .page-register__faq-question h3 {
        font-size: 16px;
    }
    .page-register__faq-item.active .page-register__faq-answer {
        padding: 15px !important;
    }
    .page-register__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }

    /* Mobile image adaptation */
    .page-register img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      min-width: 200px; /* Ensure min size is still respected */
      min-height: 200px;
    }
    
    .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;
    }

    /* Button container for mobile */
    .page-register__cta-bottom,
    .page-register__bonus-text,
    .page-register__security-text,
    .page-register__hero-content {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    .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-wrap: wrap !important;
      gap: 10px;
    }
}

/* Ensure minimum image sizes for content area */
.page-register__benefits-item img,
.page-register__step-item img,
.page-register__security-image img,
.page-register__bonus-image img {
    min-width: 200px;
    min-height: 200px;
}