/* style/login.css */

/* Variables */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #1A1A1A; /* Dark Grey/Black */
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-dark: #1A1A1A;
    --form-bg-light: #2c2c2c;
    --input-bg: #3a3a3a;
    --input-border: #555555;
    --button-hover: #e0b000; /* Darker gold */
    --link-color: #FFD700;
}

/* Base styles for the login page */
.page-login {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-dark); /* Ensure consistency with body bg */
    color: var(--text-light); /* Default text color for dark background */
    padding-top: 120px; /* Adjust for fixed header on desktop */
    line-height: 1.6;
}

/* Hero Section */
.page-login__hero-section {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('[GALLERY:hero:1920x600:c7clubs,login_hero,secure_access]') center center / cover no-repeat;
    color: var(--text-light);
    text-align: center;
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.page-login__hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-login__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.page-login__hero-subtitle {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

.page-login__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.page-login__form-card {
    background-color: var(--form-bg-light);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

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

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

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

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

.page-login__form-input::placeholder {
    color: #aaaaaa;
}

.page-login__form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.page-login__form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}

.page-login__forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

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

.page-login__submit-button {
    width: 100%;
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.page-login__submit-button:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.page-login__submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 30px;
    color: #cccccc;
    font-size: 1em;
}

.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: var(--button-hover);
    text-decoration: underline;
}

.page-login__image-promo {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    padding: 20px;
    background-color: var(--form-bg-light);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-login__promo-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__promo-text {
    color: var(--text-light);
    font-size: 1.1em;
}

.page-login__promo-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

/* Features Section */
.page-login__features-section {
    padding: 80px 20px;
    background-color: #111111; /* Slightly different dark background */
    text-align: center;
}

.page-login__features-title {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 60px;
    font-weight: 700;
}

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

.page-login__feature-item {
    background-color: var(--form-bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.page-login__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-login__feature-icon {
    width: 120px; /* Larger icons as per requirements */
    height: 120px;
    object-fit: contain;
    margin-bottom: 25px;
    border-radius: 50%;
    background-color: rgba(255, 215, 0, 0.1);
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-login__feature-heading {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-login__feature-item p {
    color: #cccccc;
    font-size: 1em;
    line-height: 1.7;
}

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

.page-login__faq-main-title {
    font-size: 2.8em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
}

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

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--form-bg-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 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; /* Initial padding for transition */
  opacity: 0;
  color: #cccccc;
  font-size: 1em;
}

/* 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 !important;
  opacity: 1;
  background: #222222; /* Slightly lighter dark background for answer */
  border-radius: 0 0 5px 5px;
}

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

.page-login__faq-question:hover {
  background: #333333;
  border-color: var(--primary-color);
}

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

/* Vấn đề tiêu đề kiểu dáng */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp chuột */
  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 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;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--button-hover);
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
  border-color: var(--button-hover);
}


/* --- Responsive Design --- */

/* Desktop specific padding for fixed header */
@media (min-width: 769px) {
    .page-login {
        padding-top: 120px; /* Adjust for fixed header */
    }
    .page-login__hero-section {
        padding-top: 80px; /* Reset hero padding if main handles top */
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-login {
        padding-top: 100px !important; /* Mobile: Adjust for fixed header */
        font-size: 15px;
    }

    .page-login__hero-section {
        padding: 60px 15px;
        min-height: 250px;
    }

    .page-login__hero-title {
        font-size: 2.2em;
    }

    .page-login__hero-subtitle {
        font-size: 1em;
    }

    .page-login__form-section {
        padding: 40px 15px;
    }

    .page-login__container {
        flex-direction: column;
        gap: 30px;
        padding: 0 15px; /* Ensure container itself has padding */
    }

    .page-login__form-card,
    .page-login__image-promo {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 30px 20px;
    }

    .page-login__form-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

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

    .page-login__submit-button {
        padding: 12px 20px;
        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-prompt {
        margin-top: 25px;
    }

    .page-login__promo-title {
        font-size: 1.5em;
    }

    .page-login__promo-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* General image responsive rule */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-login__features-section {
        padding: 50px 15px;
    }

    .page-login__features-title {
        font-size: 2em;
        margin-bottom: 40px;
    }

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

    .page-login__feature-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .page-login__feature-heading {
        font-size: 1.4em;
    }

    .page-login__faq-section {
        padding: 50px 15px;
    }

    .page-login__faq-main-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-login__faq-list {
        padding: 0 10px;
    }
    
    /* FAQ mobile specific adjustments */
    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-login__faq-question h3 {
        font-size: 1.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;
    }

    /* General container responsive rules for all elements within .page-login */
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-card,
    .page-login__image-promo,
    .page-login__feature-item,
    .page-login__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}