/* style/register.css */

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

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

.page-register__section-title {
    font-size: 36px;
    color: var(--primary-color); /* #017439 */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* 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); /* Ensures content is below fixed header */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* From #017439 to #FFFFFF */
}

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

.page-register__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    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;
    /* No filter allowed */
}

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

.page-register__hero-title {
    font-size: 48px;
    color: #FFFFFF; /* White text for contrast on hero background */
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-register__hero-description {
    font-size: 22px;
    color: #F0F0F0; /* Slightly off-white for hero description */
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-register__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Custom color for register button */
    color: #FFFF00; /* Custom font color for register button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}

.page-register__cta-button:hover {
    background: #9c0606; /* Darker shade on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

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

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

.page-register__benefit-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__benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.page-register__benefit-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
    /* No filter allowed */
}

.page-register__benefit-title {
    font-size: 24px;
    color: var(--primary-color); /* #017439 */
    margin-bottom: 15px;
    font-weight: bold;
}

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

/* Steps Section */
.page-register__steps-section {
    padding: 80px 0;
    background-color: var(--primary-color); /* #017439 */
    color: #FFFFFF; /* White text for dark background */
}

.page-register__steps-section .page-register__section-title,
.page-register__steps-section .page-register__section-description {
    color: #FFFFFF;
}

.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);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.page-register__step-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-register__step-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
    /* No filter allowed */
}

.page-register__step-title {
    font-size: 24px;
    color: #FFFF00; /* Custom font color for titles in dark section */
    margin-bottom: 15px;
    font-weight: bold;
}

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

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

.page-register__btn-primary {
    background: #C30808; /* Custom color for register button */
    color: #FFFF00; /* Custom font color for register button */
    border: none;
}

.page-register__btn-primary:hover {
    background: #9c0606;
}

.page-register__btn-secondary {
    background: var(--secondary-color); /* #FFFFFF */
    color: var(--primary-color); /* #017439 */
    border: 2px solid var(--primary-color);
}

.page-register__btn-secondary:hover {
    background: #f0f0f0;
    color: #005f2e;
}

/* Security Section */
.page-register__security-section {
    padding: 80px 0;
    background-color: var(--secondary-color); /* #FFFFFF */
}

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

.page-register__security-text {
    flex: 1;
}

.page-register__security-subtitle {
    font-size: 28px;
    color: var(--primary-color); /* #017439 */
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-register__security-text-detail {
    font-size: 17px;
    color: #555555;
    margin-bottom: 25px;
}

.page-register__security-image {
    flex: 1;
    text-align: center;
}

.page-register__security-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
    /* No filter allowed */
}

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

.page-register__faq-list {
    max-width: 800px;
    margin: 50px auto 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: #f1f1f1; /* Slightly darker than section bg */
  color: #444444;
}

/* FAQ展开状态 - 🚨 Sử dụng!important và max-height đủ lớn để đả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 !important;
  opacity: 1;
  background: #f1f1f1;
  border-radius: 0 0 8px 8px;
}

/* 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: 8px;
  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: #d0d0d0;
    background-color: #f5f5f5;
}

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

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

/* 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: var(--primary-color); /* #017439 */
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
}

/* Biểu tượng chuyển đổi */
.page-register__faq-toggle {
  font-size: 28px; /* Larger icon */
  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: 32px; /* Larger toggle area */
  height: 32px;
}

.page-register__faq-item.active .page-register__faq-toggle {
  color: var(--primary-color); /* #017439 */
  transform: rotate(45deg); /* Dấu cộng xoay thành X */
}

/* Bottom CTA Section */
.page-register__cta-bottom-section {
    padding: 80px 0;
    background-color: var(--primary-color); /* #017439 */
    color: #FFFFFF;
    text-align: center;
}

.page-register__cta-bottom-section .page-register__section-title,
.page-register__cta-bottom-section .page-register__section-description {
    color: #FFFFFF;
}

.page-register__cta-bottom-section .page-register__cta-button {
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-register__hero-title {
        font-size: 40px;
    }
    .page-register__hero-description {
        font-size: 20px;
    }
    .page-register__section-title {
        font-size: 30px;
    }
    .page-register__security-content {
        flex-direction: column;
    }
    .page-register__security-image {
        order: -1; /* Image above text on smaller screens */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-register__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-register__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-register__hero-description {
        font-size: 18px;
        margin-bottom: 30px;
    }
    .page-register__cta-button {
        padding: 12px 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: 28px;
    }
    .page-register__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-register__benefits-section,
    .page-register__steps-section,
    .page-register__security-section,
    .page-register__faq-section,
    .page-register__cta-bottom-section {
        padding: 50px 0;
    }

    .page-register__container {
        padding: 0 15px;
    }

    .page-register__benefit-item,
    .page-register__step-item {
        padding: 20px;
    }
    .page-register__benefit-title,
    .page-register__step-title {
        font-size: 20px;
    }
    .page-register__security-subtitle {
        font-size: 24px;
    }
    
    /* Image responsiveness */
    .page-register img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-register__hero-image,
    .page-register__benefit-item,
    .page-register__step-item,
    .page-register__security-image,
    .page-register__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }
    .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;
    }

    .page-register__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-register__cta-buttons .page-register__cta-button {
        width: 100%;
    }
}