/* style/login.css */

/* Custom CSS Variables */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #8B0000; /* Dark Red */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --border-color: #e0e0e0;
}

/* Base styles for the page-login scope */
.page-login {
    font-family: 'Arial', sans-serif;
    color: var(--text-dark); /* Default dark text for light background */
    background-color: #f0f2f5; /* Light background for the main content area */
    line-height: 1.6;
}

/* Fixed Header Spacing */
.page-login__main-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is below fixed header */
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
}

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

.page-login__section {
    padding: 60px 0;
}

.page-login__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.page-login__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.8;
}

/* Main Login Card Section */
.page-login__login-card {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1000px;
    margin: 40px auto;
    flex-direction: row; /* Default for desktop */
}

.page-login__login-image {
    width: 50%;
    height: auto;
    object-fit: cover;
    display: block;
}

.page-login__login-content {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-login__main-title {
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-login__intro-text {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.page-login__form-group {
    margin-bottom: 20px;
}

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-dark);
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 15px;
}

.page-login__remember-me {
    display: flex;
    align-items: center;
    color: var(--text-dark);
}

.page-login__checkbox {
    margin-right: 8px;
    transform: scale(1.1);
}

.page-login__forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-login__submit-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.page-login__submit-button:hover {
    background-color: #e6c200; /* Slightly darker gold */
    transform: translateY(-2px);
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 25px;
    font-size: 16px;
    color: var(--text-dark);
}

.page-login__register-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Benefits Section */
.page-login__benefits-section {
    background-color: var(--bg-light);
}

.page-login__benefits-section .page-login__section-title {
    color: var(--secondary-color);
}

.page-login__benefits-section .page-login__section-description {
    color: var(--text-dark);
}

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

.page-login__benefit-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    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-login__benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.page-login__benefit-icon {
    width: 100%; /* Ensure images take full width of container */
    max-width: 250px; /* Max width for icons */
    height: auto;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
    display: block; /* Ensure no extra space below image */
    margin-left: auto;
    margin-right: auto;
}

.page-login__benefit-title {
    font-size: 22px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__benefit-text {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.7;
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
    background-color: #ffffff;
}

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

.page-login__troubleshooting-item {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.page-login__troubleshooting-title {
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.page-login__troubleshooting-text {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.7;
}

/* Security Section */
.page-login__security-section {
    background-color: var(--bg-light);
}

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

.page-login__security-image {
    width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

.page-login__security-list {
    width: 50%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-login__security-list li {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    line-height: 1.6;
}

.page-login__security-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 20px;
}

/* Register CTA Section */
.page-login__register-cta {
    background: linear-gradient(90deg, var(--secondary-color), #a30000);
    color: var(--text-light);
    text-align: center;
    padding: 80px 0;
}

.page-login__register-cta .page-login__section-title,
.page-login__register-cta .page-login__section-description {
    color: var(--text-light);
}

.page-login__btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-primary:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
}

/* FAQ Section */
.page-login__faq-section {
    background-color: #ffffff;
}

.page-login__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

/* FAQ默认状态 - 答案隐藏 */
.page-login__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;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-login__faq-item.active .page-login__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 15px !important;
  opacity: 1;
  background: var(--bg-light);
  border-radius: 0 0 5px 5px;
}

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

.page-login__faq-question:hover {
  background: var(--bg-light);
  border-color: #d0d0d0;
}

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

/* Vấn đề tiêu đề kiểu */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
  color: var(--secondary-color);
}

/* Chuyển đổi biểu tượng */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  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 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Thay đổi thành dấu X hoặc biểu tượng khác */
}

/* Support CTA Section */
.page-login__support-cta {
    background-color: #f0f2f5;
    text-align: center;
    padding: 80px 0;
}

.page-login__support-cta .page-login__section-title {
    color: var(--secondary-color);
}

.page-login__support-cta .page-login__section-description {
    color: var(--text-dark);
}

.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-login__login-card {
        flex-direction: column;
    }

    .page-login__login-image,
    .page-login__login-content {
        width: 100%;
    }

    .page-login__main-title {
        font-size: 28px;
    }

    .page-login__security-content {
        flex-direction: column;
    }

    .page-login__security-image,
    .page-login__security-list {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-login__main-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }

    .page-login__section {
        padding: 40px 0;
    }

    .page-login__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-login__section-description {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-login__login-content {
        padding: 30px 20px;
    }

    .page-login__main-title {
        font-size: 24px;
    }

    .page-login__form-input {
        padding: 10px 12px;
        font-size: 15px;
    }

    .page-login__submit-button,
    .page-login__btn-primary,
    .page-login__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 20px;
    }

    .page-login__grid,
    .page-login__troubleshooting-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-login__benefit-item,
    .page-login__troubleshooting-item {
        padding: 20px;
    }

    .page-login__benefit-title,
    .page-login__troubleshooting-title {
        font-size: 18px;
    }

    .page-login__benefit-text,
    .page-login__troubleshooting-text,
    .page-login__security-list li {
        font-size: 14px;
    }

    .page-login__security-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .page-login__security-list {
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-login__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-login__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-login__faq-answer {
        padding: 0 15px;
    }
    
    .page-login__faq-item.active .page-login__faq-answer {
        padding: 15px !important;
    }

    /* Tất cả hình ảnh trong khu vực nội dung */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-login__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__register-cta-content,
    .page-login__support-cta-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}