/* style/register.css */

/* General page styling */
.page-register {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: #ffffff; /* Default body background */
}

.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;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-register__link {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
}

.page-register__link:hover {
    text-decoration: underline;
}

/* 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, #26A9E0, #87CEEB); /* Light blue gradient */
    color: #ffffff;
}

.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;
    max-width: 800px; /* Constrain hero image width */
}

.page-register__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.page-register__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.page-register__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login/Register button color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-register__cta-button:hover {
    background: #D96F00;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Form Section */
.page-register__form-section {
    padding: 60px 0;
    background: #ffffff;
    color: #333333;
}

.page-register__form {
    max-width: 600px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-register__form-group {
    margin-bottom: 25px;
}

.page-register__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333;
    font-size: 16px;
}

.page-register__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-register__form-input:focus {
    border-color: #26A9E0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
}

.page-register__input-with-button {
    display: flex;
    gap: 10px;
}

.page-register__input-with-button .page-register__form-input {
    flex-grow: 1;
}

.page-register__get-code-button {
    padding: 12px 20px;
    background: #26A9E0;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.page-register__get-code-button:hover {
    background: #1e87c0;
}

.page-register__checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.page-register__checkbox {
    margin-top: 4px;
    margin-right: 10px;
    transform: scale(1.2);
}

.page-register__checkbox-label {
    font-size: 15px;
    color: #555555;
}

.page-register__submit-button {
    width: 100%;
    padding: 15px;
    background: #26A9E0;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(38, 169, 224, 0.3);
}

.page-register__submit-button:hover {
    background: #1e87c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(38, 169, 224, 0.4);
}

.page-register__login-prompt {
    text-align: center;
    margin-top: 25px;
    font-size: 16px;
    color: #555555;
}

/* Benefits Section */
.page-register__benefits-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary color as background */
    color: #ffffff; /* White text for contrast */
}

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

.page-register__benefit-item {
    background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for cards */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-register__benefit-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.page-register__benefit-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
    border-radius: 50%; /* Make icons circular if desired */
    background: #ffffff; /* White background for icons */
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-register__benefit-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 700;
}

.page-register__benefit-description {
    font-size: 16px;
    color: #f0f0f0;
}

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

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

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

/* 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;
}

/* 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 ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px !important;
    opacity: 1;
    background: #fcfcfc;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid #e0e0e0;
}

/* 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;
}

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

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

.page-register__faq-item.active .page-register__faq-toggle {
    color: #26A9E0;
    transform: rotate(45deg); /* Thay đổi thành X hoặc xoay cho trạng thái hoạt động */
}

/* CTA Section at bottom */
.page-register__cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #26A9E0, #1e87c0);
    color: #ffffff;
    text-align: center;
}

.page-register__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-register__cta-content .page-register__section-title {
    color: #ffffff;
    margin-bottom: 25px;
}

.page-register__cta-content .page-register__section-description {
    color: #f0f0f0;
    margin-bottom: 30px;
}

.page-register__cta-button--large {
    padding: 18px 50px;
    font-size: 22px;
    background: #EA7C07; /* Login/Register button color */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

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


/* Responsive Design */
@media (max-width: 1024px) {
    .page-register__main-title {
        font-size: 42px;
    }
    .page-register__intro-text {
        font-size: 18px;
    }
    .page-register__section-title {
        font-size: 32px;
    }
    .page-register__section-description {
        font-size: 16px;
    }
    .page-register__form {
        padding: 30px;
    }
    .page-register__benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Fixed header offset for mobile */
    .page-register__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-register__main-title {
        font-size: 32px;
    }
    .page-register__intro-text {
        font-size: 16px;
    }
    .page-register__cta-button {
        padding: 12px 30px;
        font-size: 18px;
        max-width: 100% !important; /* Ensure buttons are responsive */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-register__form-section,
    .page-register__benefits-section,
    .page-register__faq-section,
    .page-register__cta-section {
        padding: 40px 0;
    }
    .page-register__form {
        padding: 20px;
        max-width: 100%;
        margin-left: 15px;
        margin-right: 15px;
    }
    .page-register__form-input,
    .page-register__get-code-button,
    .page-register__submit-button {
        font-size: 15px;
        padding: 10px 12px;
    }
    .page-register__checkbox-label {
        font-size: 14px;
    }
    .page-register__section-title {
        font-size: 28px;
    }
    .page-register__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-register__benefits-grid {
        grid-template-columns: 1fr;
    }
    .page-register__benefit-item {
        padding: 25px;
    }
    .page-register__benefit-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    .page-register__benefit-title {
        font-size: 20px;
    }
    .page-register__benefit-description {
        font-size: 15px;
    }
    .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: 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__cta-button--large {
        padding: 15px 35px;
        font-size: 18px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* All image responsiveness for mobile */
    .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;
    }

    /* Button specific mobile responsiveness */
    .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-wrap: wrap !important;
        gap: 10px;
    }
    
    .page-register__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}

/* Ensure content area images are not too small */
.page-register__benefits-section .page-register__benefit-icon {
    min-width: 60px; /* Smallest acceptable for icon-like elements in content */
    min-height: 60px;
}
.page-register__hero-image img {
    min-width: 200px;
    min-height: 200px;
}