/* style/login.css */

/* Base styles for the login page */
.page-login {
  background-color: #121212; /* Matches shared.css body background */
  color: #ffffff; /* Light text for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: 0; /* Assuming shared.css sets body padding-top: var(--header-offset) */
}

/* General container for sections */
.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section titles */
.page-login__section-title {
  font-size: 32px;
  font-weight: bold;
  color: #FFD700; /* Gold for titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 10px;
}

.page-login__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #0A2463; /* Primary blue for underline */
  border-radius: 2px;
}

.page-login__section-title--light {
  color: #ffffff; /* White for titles on dark sections */
}

.page-login__section-title--light::after {
  background-color: #FFD700; /* Gold underline on dark sections */
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__login-button,
.page-login__register-button,
.page-login__download-button {
  display: inline-block;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-login__btn-primary,
.page-login__login-button,
.page-login__download-button {
  background-color: #FFD700; /* Gold background */
  color: #0A2463; /* Deep blue text */
  border: 2px solid #FFD700;
}

.page-login__btn-primary:hover,
.page-login__login-button:hover,
.page-login__download-button:hover {
  background-color: #e0b800; /* Slightly darker gold */
  border-color: #e0b800;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.page-login__btn-secondary,
.page-login__register-button {
  background-color: transparent;
  color: #FFD700; /* Gold text */
  border: 2px solid #FFD700;
}

.page-login__btn-secondary:hover,
.page-login__register-button:hover {
  background-color: #FFD700; /* Gold background on hover */
  color: #0A2463; /* Deep blue text on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

/* Hero Banner Section */
.page-login__hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 0; /* This section is the first content, so it handles the header offset. If shared.css sets body padding-top, this should be 0. If not, this should be var(--header-offset, 120px) */
}

.page-login__hero-container {
  position: relative;
  width: 100%;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

.page-login__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.page-login__hero-title {
  font-size: 48px;
  color: #FFD700; /* Gold for H1 */
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 900px;
}

.page-login__hero-description {
  font-size: 20px;
  color: #ffffff; /* White text */
  max-width: 800px;
  margin-bottom: 30px;
}

/* Login Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: #1a1a1a; /* Slightly lighter dark background for form contrast */
}

.page-login__form-container {
  max-width: 500px;
  padding: 40px;
  background-color: #2a2a2a; /* Card-like background for the form */
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.page-login__form-label {
  display: block;
  text-align: left;
  margin-bottom: 8px;
  font-weight: bold;
  color: #f0f0f0; /* Light grey for labels */
}

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #0A2463; /* Primary blue border */
  border-radius: 5px;
  background-color: #3a3a3a; /* Dark input background */
  color: #ffffff; /* White text in input */
  font-size: 16px;
  box-sizing: border-box;
}

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

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

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

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

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

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

.page-login__forgot-password-link {
  color: #FFD700; /* Gold link */
  text-decoration: none;
}

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

.page-login__login-button {
  width: 100%;
  margin-bottom: 20px;
}

.page-login__register-prompt {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #cccccc;
}

.page-login__register-prompt p {
  margin-bottom: 15px;
}

.page-login__register-button {
  width: 100%;
}

/* Security Section */
.page-login__security-section {
  padding: 80px 0;
  background-color: #0A2463; /* Primary blue background */
  color: #ffffff; /* White text */
}

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

.page-login__security-image {
  flex-shrink: 0;
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain; /* Ensure image content is fully visible */
}

.page-login__security-content {
  flex-grow: 1;
}

.page-login__security-content p {
  margin-bottom: 20px;
  font-size: 18px;
  color: #f0f0f0;
}

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

.page-login__security-list li {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 16px;
  color: #ffffff;
}

.page-login__security-icon {
  color: #FFD700; /* Gold checkmark */
  font-size: 22px;
  margin-right: 10px;
  line-height: 1;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
  background-color: #1a1a1a; /* Dark background */
}

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

.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #2a2a2a; /* Darker card for FAQ */
  color: #f0f0f0; /* Light text */
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #3a3a3a; /* Slightly lighter background for question */
  border: 1px solid #0A2463; /* Primary blue border */
  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: #4a4a4a;
  border-color: #FFD700; /* Gold border on hover */
}

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

.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 event */
  color: #FFD700; /* Gold for FAQ questions */
}

.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold 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 event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: #ffffff; /* White when active */
  transform: rotate(45deg); /* Change to X or rotate */
}

.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: #cccccc; /* Light grey for answer text */
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to show content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #2a2a2a; /* Matches FAQ item background */
  border-radius: 0 0 5px 5px;
}

/* Download App Section */
.page-login__download-section {
  padding: 80px 0;
  background-color: #0A2463; /* Primary blue background */
  color: #ffffff; /* White text */
}

.page-login__download-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-login__download-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.page-login__download-content p {
  margin-bottom: 30px;
  font-size: 18px;
  color: #f0f0f0;
}

.page-login__download-image {
  flex-shrink: 0;
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__hero-title {
    font-size: 40px;
  }
  .page-login__hero-description {
    font-size: 18px;
  }
  .page-login__security-container {
    flex-direction: column;
    text-align: center;
  }
  .page-login__security-content {
    order: 1; /* Content above image on mobile */
  }
  .page-login__security-image {
    order: 2;
  }
  .page-login__security-list {
    text-align: left; /* Keep list items left-aligned */
  }
  .page-login__download-container {
    flex-direction: column-reverse; /* Image above content on mobile */
  }
  .page-login__download-content {
    order: 2;
    text-align: center;
  }
  .page-login__download-image {
    order: 1;
  }
}

@media (max-width: 768px) {
  /* Global mobile overrides for images and containers */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__container,
  .page-login__form-container,
  .page-login__hero-banner,
  .page-login__hero-container,
  .page-login__security-section,
  .page-login__security-container,
  .page-login__faq-section,
  .page-login__faq-list,
  .page-login__download-section,
  .page-login__download-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-login__hero-title {
    font-size: 28px;
  }
  .page-login__hero-description {
    font-size: 16px;
  }
  .page-login__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .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;
  }
  
  /* Button responsiveness */
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__login-button,
  .page-login__register-button,
  .page-login__download-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 !important;
    padding-right: 15px !important;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-login__forgot-password-link {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .page-login__hero-title {
    font-size: 24px;
  }
  .page-login__hero-description {
    font-size: 14px;
  }
  .page-login__section-title {
    font-size: 20px;
  }
  .page-login__form-container {
    padding: 25px;
  }
}

/* Contrast Fixes (as per instructions) */
.page-login__dark-bg {
  color: #ffffff; /* Deep blue background, white text */
  background: #0A2463;
}

.page-login__light-bg {
  color: #333333; /* White background, dark text */
  background: #ffffff;
}

.page-login__medium-bg {
  color: #000000; /* Gold background, black text */
  background: #FFD700;
}

/* Ensure all images maintain original color (no filter) */
.page-login img {
  filter: none; /* Explicitly remove any potential filter effects */
}