/* style/login.css */

/* Base styles for the login page */
.page-login {
    color: #f0f0f0; /* Light text for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Inherit from body or shared.css */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-login__hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a); /* Dark gradient background */
    min-height: calc(100vh - var(--header-offset, 120px) - 100px); /* Adjust height for footer */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-login__hero-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.page-login__form-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
}

.page-login__main-title {
    font-size: 42px;
    font-weight: bold;
    color: #FFD700; /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-login__description {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 30px;
}

.page-login__form-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for card background */
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3); /* Light gold border */
}

.page-login__form-title {
    font-size: 28px;
    color: #FFD700;
    margin-bottom: 25px;
    font-weight: bold;
}

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

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    color: #f0f0f0;
    font-size: 15px;
    font-weight: 600;
}

.page-login__form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 215, 0, 0.5); /* Gold border */
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.4); /* Dark input background */
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

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

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

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

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

.page-login__checkbox {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #FFD700; /* Gold checkbox */
}

.page-login__checkbox-label {
    color: #cccccc;
}

.page-login__forgot-password-link {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.page-login__login-button {
    width: 100%;
    padding: 15px 20px;
    background-color: #FFD700; /* Gold button */
    color: #121212; /* Dark text for gold button */
    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;
    white-space: normal;
    word-wrap: break-word;
    display: block; /* Ensure it behaves like a block for full width */
    text-align: center;
    text-decoration: none;
}

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

.page-login__register-prompt {
    margin-top: 25px;
    font-size: 15px;
    color: #cccccc;
}

.page-login__register-link {
    color: #8B0000; /* Dark red for register link */
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: #ff0000; /* Brighter red on hover */
    text-decoration: underline;
}

.page-login__image-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: center;
}

.page-login__image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    max-width: 100%; /* Ensure responsiveness */
    display: block;
}

/* Features Section */
.page-login__features-section {
    padding: 80px 20px;
    background-color: #1a1a1a; /* Dark background */
    text-align: center;
}

.page-login__features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-login__features-title {
    font-size: 36px;
    color: #FFD700;
    margin-bottom: 50px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

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

.page-login__feature-item {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for features */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__feature-icon {
    width: 120px; /* Adjust icon size */
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5)); /* Gold glow */
}

.page-login__feature-heading {
    font-size: 22px;
    color: #FFD700;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__feature-text {
    font-size: 15px;
    color: #cccccc;
}


/* FAQ Section */
.page-login__faq-section {
    padding: 80px 20px;
    background-color: #121212; /* Match body background */
    color: #f0f0f0;
}

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

.page-login__faq-main-title {
    font-size: 36px;
    color: #FFD700;
    margin-bottom: 40px;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-login__faq-list {
    margin-top: 30px;
}

/* FAQ item styles */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.2); /* Light gold border for FAQ items */
}

/* FAQ default state - answer hidden */
.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;
  background-color: rgba(255, 255, 255, 0.03); /* Very subtle light background for answer */
  color: #cccccc;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough for content */
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for question background */
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #f0f0f0;
}

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

.page-login__faq-question:active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Question title style */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: #FFD700; /* Gold for question text */
}

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

.page-login__faq-item.active .page-login__faq-toggle {
  transform: rotate(45deg); /* Rotate for minus sign */
  color: #8B0000; /* Dark red when active */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__hero-container {
        flex-direction: column;
        text-align: center;
    }
    .page-login__form-wrapper,
    .page-login__image-wrapper {
        max-width: 100%;
    }
    .page-login__image-wrapper {
        order: -1; /* Image above form on smaller screens */
        margin-bottom: 30px;
    }
    .page-login__main-title {
        font-size: 38px;
    }
    .page-login__features-title,
    .page-login__faq-main-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .page-login {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-login__hero-section {
        padding: 40px 15px;
    }
    .page-login__main-title {
        font-size: 32px;
    }
    .page-login__description {
        font-size: 16px;
    }
    .page-login__form-card {
        padding: 25px;
    }
    .page-login__form-title {
        font-size: 24px;
    }
    .page-login__form-input {
        padding: 12px 15px;
        font-size: 15px;
    }
    .page-login__login-button {
        padding: 14px 15px;
        font-size: 16px;
    }
    .page-login__features-section,
    .page-login__faq-section {
        padding: 50px 15px;
    }
    .page-login__features-title,
    .page-login__faq-main-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-login__feature-icon {
        width: 100px;
        height: 100px;
    }
    .page-login__feature-heading {
        font-size: 20px;
    }
    .page-login__feature-text {
        font-size: 14px;
    }

    /* FAQ mobile adaptations */
    .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;
    }

    /* Mobile image responsiveness */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-login__hero-section,
    .page-login__features-section,
    .page-login__faq-section,
    .page-login__form-card,
    .page-login__feature-item,
    .page-login__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-login__form-wrapper,
    .page-login__image-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    /* Button responsiveness */
    .page-login__login-button,
    .page-login a[class*="button"],
    .page-login 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;
    }
}