/* style/login.css */

/* Variables for colors */
:root {
    --primary-color: #0A2342; /* Deep Blue */
    --secondary-color: #FFD700; /* Gold */
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-dark: #000000; /* Body background from shared */
    --background-light: #f8f9fa;
    --border-color: #e0e0e0;
}

/* Base styles for the login page */
.page-login {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--background-dark); /* Ensure consistency, though body bg is from shared */
}

/* Hero Section - Login Form Area */
.page-login__hero-section {
    position: relative;
    width: 100%;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Account for fixed header */
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary-color); /* Use primary color as background */
    color: var(--text-light);
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

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

.page-login__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--secondary-color); /* Gold for main title */
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-login__description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.page-login__form-wrapper {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for form background */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    margin: 40px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__form {
    display: flex;
    flex-direction: column;
}

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

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

.page-login__input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.page-login__input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.page-login__input:focus {
    border-color: var(--secondary-color);
    background: rgba(0, 0, 0, 0.5);
    outline: none;
}

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

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

.page-login__checkbox {
    margin-right: 8px;
    accent-color: var(--secondary-color);
}

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

.page-login__forgot-password:hover {
    color: #ffd000; /* Slightly brighter gold on hover */
    text-decoration: underline;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__submit-button,
.page-login__register-button,
.page-login__learn-more-button,
.page-login__faq-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-login__submit-button,
.page-login__btn-primary {
    background: var(--secondary-color); /* Gold button */
    color: var(--primary-color); /* Dark blue text on gold */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.page-login__submit-button:hover,
.page-login__btn-primary:hover {
    background: #e6c200; /* Darker gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.page-login__register-prompt {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-login__register-prompt p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-login__register-button,
.page-login__btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.page-login__register-button:hover,
.page-login__btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Advantages Section */
.page-login__advantages-section {
    padding: 80px 20px;
    background: var(--background-light); /* Light background for contrast */
    color: var(--text-dark); /* Dark text on light background */
    text-align: center;
}

.page-login__section-title {
    font-size: 2.5em;
    margin-bottom: 50px;
    color: var(--primary-color); /* Dark blue for section titles */
    font-weight: bold;
}

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

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

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

.page-login__advantage-icon {
    width: 200px; /* Min size requirement */
    height: 200px; /* Min size requirement */
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%; /* Example: round icons */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.page-login__advantage-description {
    font-size: 1em;
    color: var(--text-dark);
}

/* Security Info Section */
.page-login__security-info {
    padding: 80px 20px;
    background: var(--primary-color); /* Dark blue background */
    color: var(--text-light); /* Light text */
    text-align: center;
}

.page-login__security-info .page-login__section-title {
    color: var(--secondary-color); /* Gold for title */
}

.page-login__text-block {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1em;
    color: var(--text-light);
}

.page-login__security-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    display: block; /* Ensure it behaves as a block element */
    margin-left: auto;
    margin-right: auto;
}

.page-login__learn-more-button {
    margin-top: 20px;
}

/* FAQ Section */
.page-login__faq-section {
    padding: 80px 20px;
    background: var(--background-light); /* Light background */
    color: var(--text-dark); /* Dark text */
    text-align: center;
}

.page-login__faq-section .page-login__section-title {
    color: var(--primary-color);
}

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

/* FAQ container styles */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 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;
  color: var(--text-dark);
}

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

/* Question styles */
.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: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* Question title styles */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--primary-color);
}

/* Toggle icon */
.page-login__faq-toggle {
  font-size: 24px;
  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; /* Prevent icon from blocking click event */
  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); /* Rotate for 'x' effect, or change to '-' */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2.8em;
    }
    .page-login__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-login__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-login__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-login__description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-login__form-wrapper {
        padding: 30px;
        margin-top: 20px;
    }
    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .page-login__remember-me {
        margin-bottom: 10px;
    }

    /* General mobile image, video, button adaptations */
    .page-login img,
    .page-login video {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-login__container,
    .page-login__hero-section,
    .page-login__advantages-section,
    .page-login__security-info,
    .page-login__faq-section,
    .page-login__form-wrapper,
    .page-login__advantages-grid,
    .page-login__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-login__advantage-item {
        padding: 20px;
    }
    .page-login__advantage-icon {
        width: 150px !important;
        height: 150px !important;
    }
    .page-login__advantage-title {
        font-size: 1.3em;
    }
    .page-login__text-block {
        font-size: 1em;
    }
    .page-login__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

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

    /* Buttons mobile adaptation */
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login__submit-button,
    .page-login__register-button,
    .page-login__learn-more-button,
    .page-login__faq-button {
        width: 100% !important;
        padding: 12px 15px;
        font-size: 0.95em;
        margin-bottom: 10px; /* Add some space between stacked buttons */
    }
    .page-login__register-prompt {
        border-top: none; /* Remove border in mobile if it stacks */
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .page-login__main-title {
        font-size: 1.8em;
    }
    .page-login__section-title {
        font-size: 1.5em;
    }
    .page-login__form-wrapper {
        padding: 20px;
    }
    .page-login__input {
        padding: 10px 12px;
    }
}