:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-register-color: #C30808;
    --button-login-color: #C30808;
    --button-font-color: #FFFF00;
    --background-color: #FFFFFF; /* Matches body background from shared.css */
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
}

.page-login {
    color: var(--text-dark); /* Default text color for light background */
    padding-top: var(--header-offset, 120px); /* Ensure content is not covered by fixed header */
}

/* Hero Section */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--background-color)); /* Blend brand color with background */
    color: var(--text-light); /* Text color for gradient background */
}

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

.page-login__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
}

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

.page-login__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-login__description {
    font-size: 1.2em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-light);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.page-login__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-login-color);
    color: var(--button-font-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-login__cta-button:hover {
    background: #A30707; /* Darker shade of #C30808 */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Container */
.page-login__container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-login__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-weight: 700;
}

/* Form Section */
.page-login__form-section {
    background: var(--background-color);
    padding: 60px 0;
}

.page-login__form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

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

.page-login__form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05em;
}

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

.page-login__form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
    outline: none;
}

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

.page-login__remember-me {
    display: flex;
    align-items: center;
}

.page-login__checkbox {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color); /* Checkbox color */
}

.page-login__checkbox-label {
    color: var(--text-dark);
}

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

.page-login__forgot-password:hover {
    color: #005c2d; /* Darker shade of #017439 */
    text-decoration: underline;
}

.page-login__submit-button {
    width: 100%;
    padding: 18px;
    background: var(--button-login-color);
    color: var(--button-font-color);
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    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(0, 0, 0, 0.2);
}

.page-login__submit-button:hover {
    background: #A30707; /* Darker shade of #C30808 */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__register-text {
    text-align: center;
    margin-top: 30px;
    font-size: 1em;
    color: var(--text-dark);
}

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

.page-login__register-link:hover {
    color: #005c2d; /* Darker shade of #017439 */
    text-decoration: underline;
}

/* Features Section */
.page-login__features-section {
    background: #f9f9f9;
    padding: 60px 0;
    text-align: center;
}

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

.page-login__feature-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-login__feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__feature-icon {
    width: 100%; /* Ensure image takes full width */
    height: auto;
    max-width: 250px; /* Max width for feature icons */
    margin: 0 auto 20px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__feature-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-login__feature-description {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-dark);
}

/* FAQ Section */
.page-login__faq-section {
    padding: 60px 0;
    background: var(--background-color);
}

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

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 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 20px; /* Adjust padding for better look */
  opacity: 0;
  background: #fdfdfd;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!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 !important; /* Điều chỉnh padding cho giao diện đẹp hơn */
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 8px 8px;
}

/* Vấn đề kiểu dáng */
.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: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-item.active .page-login__faq-question {
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
}

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

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

/* Vấn đề tiêu đề kiểu dáng */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  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(--primary-color);
}

/* Chuyển đổi biểu tượng */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-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(--text-dark);
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' từ '+' */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2.8em;
    }
    .page-login__description {
        font-size: 1.1em;
    }
    .page-login__section-title {
        font-size: 2em;
    }
    .page-login__form {
        padding: 30px;
    }
    .page-login__features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-login {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        font-size: 16px;
        line-height: 1.6;
    }

    /* General containers for mobile */
    .page-login__container,
    .page-login__hero-section,
    .page-login__form-section,
    .page-login__features-section,
    .page-login__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }

    .page-login__hero-image {
        border-radius: 4px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-login__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-login__description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .page-login__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-login__form {
        padding: 25px;
        border-radius: 8px;
        max-width: 100%;
        width: 100%;
    }

    .page-login__form-label {
        font-size: 1em;
    }

    .page-login__form-input {
        padding: 12px;
        font-size: 0.95em;
    }

    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 25px;
    }

    .page-login__forgot-password {
        margin-top: 10px;
    }

    .page-login__submit-button {
        padding: 15px;
        font-size: 1.1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__register-text {
        font-size: 0.95em;
        margin-top: 25px;
    }

    .page-login__features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-login__feature-item {
        padding: 25px;
        border-radius: 8px;
    }

    .page-login__feature-icon {
        max-width: 200px;
    }

    .page-login__feature-title {
        font-size: 1.3em;
    }

    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-login__faq-question h3 {
        font-size: 1em;
        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;
    }

    /* Image responsive styles */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}