/* style/register.css */

/* Base styles for the register page */
.page-register {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: #000000; /* Body background from shared.css */
}

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

.page-register__section-title {
    font-size: 36px;
    color: #F2B807; /* Gold for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

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

/* Hero Section - Register Specific */
.page-register__hero-register {
    background: linear-gradient(135deg, #0A2463, #000000); /* Dark blue to black gradient */
    padding: 80px 0 60px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.page-register__hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 40px;
}

.page-register__hero-content {
    flex: 1;
    max-width: 55%;
    color: #ffffff;
}

.page-register__hero-title {
    font-size: 48px;
    color: #F2B807;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.page-register__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #f0f0f0;
}

.page-register__hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-register__btn-primary,
.page-register__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-register__btn-primary {
    background-color: #F2B807; /* Gold */
    color: #0A2463; /* Dark blue text */
    border: 2px solid #F2B807;
}

.page-register__btn-primary:hover {
    background-color: #e0a700;
    border-color: #e0a700;
    transform: translateY(-2px);
}

.page-register__btn-secondary {
    background-color: transparent;
    color: #F2B807; /* Gold text */
    border: 2px solid #F2B807;
}

.page-register__btn-secondary:hover {
    background-color: #F2B807;
    color: #0A2463;
    transform: translateY(-2px);
}

.page-register__hero-image {
    flex: 1;
    max-width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Registration Form Section */
.page-register__form-section {
    padding: 80px 0;
    background-color: #0d0d0d; /* Slightly lighter dark background */
}

.page-register__registration-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #1a1a1a; /* Darker background for the form */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid #0A2463;
}

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

.page-register__form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #F2B807; /* Gold for labels */
    font-weight: 600;
}

.page-register__form-group input[type="text"],
.page-register__form-group input[type="password"],
.page-register__form-group input[type="tel"],
.page-register__form-group input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #0A2463;
    border-radius: 8px;
    background-color: #0A2463; /* Dark blue input background */
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
}

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

.page-register__form-group input:focus {
    border-color: #F2B807;
    outline: none;
    box-shadow: 0 0 0 3px rgba(242, 184, 7, 0.3);
}

.page-register__form-checkbox {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #f0f0f0;
}

.page-register__form-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #F2B807; /* Gold checkbox */
}

.page-register__form-checkbox a {
    color: #F2B807;
    text-decoration: none;
    font-weight: 600;
}

.page-register__form-checkbox a:hover {
    text-decoration: underline;
}

.page-register__submit-button {
    width: 100%;
    padding: 16px;
    background-color: #F2B807;
    color: #0A2463;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

.page-register__login-prompt a {
    color: #F2B807;
    text-decoration: none;
    font-weight: 600;
}

.page-register__login-prompt a:hover {
    text-decoration: underline;
}

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

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

.page-register__benefit-card {
    background-color: #1a1a1a; /* Darker background for cards */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid #F2B807;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-register__benefit-card img {
    width: 100%;
    height: auto;
     /* Adjust size for benefit icons */
    margin: 0 auto 20px;
    display: block;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

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

.page-register__benefit-text {
    font-size: 16px;
    color: #f0f0f0;
    line-height: 1.6;
}

/* Call to Action Section */
.page-register__cta-section {
    padding: 80px 0;
    background-color: #000000;
    text-align: center;
}

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

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

.page-register__btn--large {
    padding: 18px 40px;
    font-size: 22px;
    border-radius: 10px;
    margin-top: 30px;
}

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

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

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

/* 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 25px;
    opacity: 0;
    color: #f0f0f0;
    font-size: 16px;
    line-height: 1.6;
}

/* 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 mọi nội dung */
    padding: 20px 25px !important;
    opacity: 1;
    background: #0A2463; /* Dark blue background for answer */
    border-radius: 0 0 8px 8px;
}

/* Question styles */
.page-register__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #0A2463; /* Dark blue for question */
    border: 1px solid #F2B807; /* Gold border */
    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: #081e4b; /* Slightly darker blue on hover */
    border-color: #e0a700;
}

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

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

/* Toggle icon */
.page-register__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #F2B807; /* Gold for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 20px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

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


/* --- Responsive Styles --- */

/* Mobile & Tablet */
@media (max-width: 1024px) {
    .page-register__hero-container {
        flex-direction: column;
        text-align: center;
    }

    .page-register__hero-content,
    .page-register__hero-image {
        max-width: 100%;
        flex: none;
    }

    .page-register__hero-title {
        font-size: 38px;
    }

    .page-register__hero-description {
        font-size: 18px;
    }

    .page-register__hero-buttons {
        justify-content: center;
    }

    .page-register__section-title {
        font-size: 32px;
    }

    .page-register__section-description {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .page-register {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-register__hero-register {
        padding: 60px 0 40px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }

    .page-register__hero-container {
        padding: 0 15px;
        gap: 30px;
    }

    .page-register__hero-title {
        font-size: 32px;
    }

    .page-register__hero-description {
        font-size: 16px;
    }

    .page-register__hero-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    /* Mobile button responsiveness */
    .page-register__btn-primary,
    .page-register__btn-secondary,
    .page-register__submit-button,
    .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__hero-buttons,
    .page-register__cta-section .page-register__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__form-section,
    .page-register__benefits-section,
    .page-register__cta-section,
    .page-register__faq-section {
        padding: 40px 0;
    }

    .page-register__registration-form {
        padding: 30px 20px;
    }

    .page-register__form-group label {
        font-size: 15px;
    }

    .page-register__form-group input {
        padding: 12px 15px;
        font-size: 15px;
    }

    .page-register__form-checkbox {
        font-size: 14px;
    }

    .page-register__submit-button {
        font-size: 18px;
        padding: 14px;
    }

    .page-register__benefits-grid {
        grid-template-columns: 1fr;
    }

    .page-register__benefit-card {
        padding: 25px;
    }

    .page-register__benefit-card img {
        
        min-width: 200px; /* Still maintain minimum size */
        min-height: 200px; /* Still maintain minimum size */
    }

    .page-register__benefit-title {
        font-size: 20px;
    }

    .page-register__benefit-text {
        font-size: 15px;
    }

    .page-register__btn--large {
        padding: 16px 30px;
        font-size: 20px;
    }

    .page-register__faq-question {
        padding: 15px 20px;
        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 20px;
    }

    .page-register__faq-item.active .page-register__faq-answer {
        padding: 15px 20px !important;
    }

    /* Image responsive styles */
    .page-register img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-register__hero-image img,
    .page-register__benefit-card img {
        object-fit: contain !important; /* Ensure content is visible */
    }
    
    .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;
    }
}