/* style/register.css */

/* Base styles for the register page */
.page-register {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

/* 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 80px; /* Adjusted padding-top via .page-register */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand color gradient */
    color: #ffffff; /* White text for gradient background */
}

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

.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__main-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-register__intro-text {
    font-size: 18px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #ffffff;
}

.page-register__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for CTA button */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-register__cta-button:hover {
    background: #c76a06;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-register__section {
    padding: 60px 20px;
    background-color: var(--background-color, #ffffff);
}

.page-register__section:nth-of-type(even) {
    background-color: #f9f9f9; /* Light grey for alternating sections */
}

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

.page-register__container--centered {
    text-align: center;
}

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

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

/* Why Join Section */
.page-register__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

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

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

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

.page-register__feature-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #26A9E0;
}

.page-register__feature-text {
    font-size: 16px;
    color: #666666;
}

/* Registration Steps Section */
.page-register__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-register__step-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    position: relative;
    border: 1px solid #e0e0e0;
}

.page-register__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #26A9E0;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(38, 169, 224, 0.3);
}

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

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

.page-register__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-register__btn-primary,
.page-register__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 17px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensure padding/border are included in width */
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-register__btn-primary {
    background: #26A9E0;
    color: #ffffff;
    border-color: #26A9E0;
}

.page-register__btn-primary:hover {
    background: #1e87b7;
    border-color: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(38, 169, 224, 0.4);
}

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

.page-register__btn-secondary:hover {
    background: #f0f8ff;
    color: #1e87b7;
    border-color: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Verification Section */
.page-register__verification-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-register__verification-text {
    flex: 1;
    font-size: 17px;
    line-height: 1.7;
    color: #444444;
}

.page-register__verification-text p {
    margin-bottom: 15px;
}

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

.page-register__verification-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.page-register__text-link {
    color: #26A9E0;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

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


/* FAQ Section */
.page-register__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ容器样式 */
.page-register__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  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.3s ease;
  padding: 0 15px;
  opacity: 0;
}

/* 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; /* ⚠️ Use !important and a large value */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề phong cách */
.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  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;
}

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

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

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

/* Phong cách tiêu đề vấn đề */
.page-register__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: #333333;
}

/* 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; /* Màu thương hiệu cho biểu tượng chuyển đổi hoạt động */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng dấu trừ */
}


/* Final CTA Section */
.page-register__section--cta-final {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
    padding: 80px 20px;
}

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

.page-register__section--cta-final .page-register__section-description {
    color: #f0f0f0;
    margin-bottom: 50px;
}

.page-register__section--cta-final .page-register__cta-button {
    background: #EA7C07; /* Login color for CTA button */
    border-color: #EA7C07;
}

.page-register__section--cta-final .page-register__cta-button:hover {
    background: #c76a06;
    border-color: #c76a06;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-register__main-title {
        font-size: 36px;
    }
    .page-register__intro-text {
        font-size: 17px;
    }
    .page-register__section-title {
        font-size: 30px;
    }
    .page-register__section-description {
        font-size: 17px;
    }
    .page-register__feature-title {
        font-size: 20px;
    }
    .page-register__step-title {
        font-size: 22px;
    }
    .page-register__verification-content {
        flex-direction: column;
        text-align: center;
    }
    .page-register__verification-image {
        order: -1; /* Image above text on smaller screens */
    }
    .page-register__btn-primary,
    .page-register__btn-secondary {
        padding: 12px 25px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .page-register {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        font-size: 16px;
        line-height: 1.6;
    }
    .page-register__hero-section {
        padding: 40px 15px 60px;
    }
    .page-register__hero-image img,
    .page-register__verification-image img {
        border-radius: 4px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-register__main-title {
        font-size: 30px;
        margin-bottom: 15px;
    }
    .page-register__intro-text {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-register__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-register__section {
        padding: 40px 15px;
    }
    .page-register__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-register__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-register__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-register__feature-item,
    .page-register__step-item {
        padding: 25px;
    }
    .page-register__feature-title {
        font-size: 18px;
    }
    .page-register__step-title {
        font-size: 20px;
    }

    .page-register__verification-content {
        flex-direction: column;
        gap: 30px;
    }
    .page-register__verification-text {
        font-size: 16px;
    }

    .page-register__button-group {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }
    .page-register__btn-primary,
    .page-register__btn-secondary {
        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;
    }

    /* FAQ Mobile */
    .page-register__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-register__faq-question h3 {
        font-size: 15px;
        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;
    }

    .page-register__section--cta-final {
        padding: 60px 15px;
    }
    .page-register__section--cta-final .page-register__section-description {
        margin-bottom: 40px;
    }
    .page-register__section--cta-final .page-register__cta-button {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Ensure all images inside page-register are responsive */
    .page-register img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-register__section,
    .page-register__card,
    .page-register__container,
    .page-register__feature-item,
    .page-register__step-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}