/* Base styles for the login page, scoped to .page-login */
.page-login {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #F4F7FB; /* Background color from custom palette */
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.page-login__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #1F2D3D; /* Text Main from custom palette */
  text-align: center;
  margin-bottom: 20px;
}

.page-login__section-intro {
  font-size: 18px;
  line-height: 1.6;
  color: #333333;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  padding-bottom: 60px;
  background: linear-gradient(180deg, #6FA3FF 0%, #2F6BFF 100%); /* Gradient from brand colors */
}

.page-login__hero-image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.page-login__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover for desktop */
  opacity: 0.8;
}

.page-login__hero-content {
  position: relative;
  z-index: 1;
  color: #ffffff;
  max-width: 900px;
  padding: 40px 20px;
  background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
}

.page-login__main-title {
  font-size: clamp(32px, 4.5vw, 56px); /* Clamp for responsive H1 */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.page-login__description {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
  margin-bottom: 30px;
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__submit-btn,
.page-login a[class*="button"],
.page-login a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom button color */
  color: #ffffff;
  border: none;
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-login__btn-secondary {
  background: #ffffff; /* Card BG from custom palette */
  color: #2F6BFF; /* Main brand color */
  border: 2px solid #2F6BFF;
}

.page-login__btn-secondary:hover {
  background: #f0f8ff;
  color: #2F6BFF;
  border-color: #2F6BFF;
}

/* Login Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background color from custom palette */
}

.page-login__login-form {
  background: #FFFFFF; /* Card BG from custom palette */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid #D6E2FF; /* Border color from custom palette */
}

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

.page-login__form-label {
  display: block;
  font-size: 16px;
  color: #1F2D3D; /* Text Main from custom palette */
  margin-bottom: 8px;
  font-weight: 600;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D6E2FF; /* Border color from custom palette */
  border-radius: 5px;
  font-size: 16px;
  color: #333333;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
  border-color: #2F6BFF; /* Main brand color */
  outline: none;
}

.page-login__forgot-password {
  display: block;
  text-align: right;
  font-size: 14px;
  color: #2F6BFF; /* Main brand color */
  text-decoration: none;
  margin-bottom: 25px;
}

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

.page-login__submit-btn {
  width: 100%;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom button color */
  color: #ffffff;
  border: none;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__submit-btn:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

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

.page-login__register-link {
  color: #2F6BFF; /* Main brand color */
  text-decoration: none;
  font-weight: 600;
}

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

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  background-color: #FFFFFF; /* Card BG from custom palette */
}

.page-login__benefits-grid {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-login__benefits-content {
  flex: 1;
}

.page-login__benefits-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 20px;
}

.page-login__benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.page-login__benefit-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
}

.page-login__benefit-item::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 18px;
  line-height: 1.6;
}

.page-login__benefits-image-wrapper {
  flex: 1;
  text-align: center;
}

.page-login__benefits-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Security Section */
.page-login__security-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background color from custom palette */
}

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

.page-login__security-image-wrapper {
  flex: 1;
  text-align: center;
}

.page-login__security-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.page-login__security-text-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 20px;
}

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

.page-login__security-features li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
}

.page-login__security-features li::before {
  content: '🛡️';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 18px;
  line-height: 1.6;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
  background-color: #FFFFFF; /* Card BG from custom palette */
}

details.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #D6E2FF; /* Border color from custom palette */
  overflow: hidden;
  background: #fff;
}

details.page-login__faq-item summary.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-login__faq-item summary.page-login__faq-question::-webkit-details-marker {
  display: none;
}

details.page-login__faq-item summary.page-login__faq-question:hover {
  background: #f5f5f5;
}

.page-login__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D; /* Text Main from custom palette */
}

.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-login__faq-item .page-login__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333;
  font-size: 15px;
  line-height: 1.6;
}

/* CTA Banner Section */
.page-login__cta-banner {
  padding: 80px 0;
  background: linear-gradient(90deg, #2F6BFF 0%, #6FA3FF 100%); /* Brand color gradient */
  color: #ffffff;
  text-align: center;
}

.page-login__cta-title {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-login__cta-description {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-login__btn-large {
  padding: 18px 40px;
  font-size: 20px;
  border-radius: 10px;
}

/* Universal Image Responsiveness */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Mobile Responsiveness (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-login__container {
    padding: 15px;
  }

  .page-login__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

  .page-login__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
  }

  /* HERO Section Mobile */
  .page-login__hero-section {
    padding-top: 10px; /* Consistent small top padding */
    padding-bottom: 40px;
  }

  .page-login__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Allow natural aspect ratio */
    position: relative;
    height: 250px;
    width: auto; /* Allow width to adjust */
    margin: 0 auto;
  }

  .page-login__hero-image-wrapper {
    position: relative; /* Adjust for contain */
    height: 250px; /* Fixed height for image area */
    margin-bottom: 20px;
  }

  .page-login__hero-content {
    padding: 20px 15px;
    max-width: 100%;
    border-radius: 0;
  }

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

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

  .page-login__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__submit-btn,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 16px;
  }

  /* Form Section Mobile */
  .page-login__form-section {
    padding: 40px 0;
  }

  .page-login__login-form {
    padding: 30px 20px;
    box-shadow: none;
    border-radius: 0;
  }

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

  .page-login__form-label {
    font-size: 15px;
  }

  .page-login__form-input {
    padding: 10px 12px;
    font-size: 15px;
  }

  .page-login__forgot-password {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .page-login__submit-btn {
    padding: 12px 15px;
    font-size: 17px;
  }

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

  /* Benefits Section Mobile */
  .page-login__benefits-section {
    padding: 40px 0;
  }

  .page-login__benefits-grid {
    flex-direction: column-reverse; /* Image below text on mobile */
    gap: 30px;
  }

  .page-login__benefits-content p,
  .page-login__benefit-item,
  .page-login__security-text-content p,
  .page-login__security-features li {
    font-size: 15px;
  }

  /* Security Section Mobile */
  .page-login__security-section {
    padding: 40px 0;
  }

  .page-login__security-content {
    flex-direction: column; /* Stack content vertically */
    gap: 30px;
  }

  /* FAQ Section Mobile */
  details.page-login__faq-item summary.page-login__faq-question {
    padding: 15px;
  }

  .page-login__faq-qtext {
    font-size: 15px;
  }

  .page-login__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }

  details.page-login__faq-item .page-login__faq-answer {
    padding: 0 15px 15px;
  }

  /* CTA Banner Mobile */
  .page-login__cta-banner {
    padding: 50px 0;
  }

  .page-login__cta-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .page-login__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-login__btn-large {
    padding: 15px 30px;
    font-size: 18px;
  }

  /* Universal Image/Container Responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-login__hero-image {
    width: auto !important; /* Override for contain */
  }

  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-section .page-login__container,
  .page-login__benefits-section .page-login__container,
  .page-login__security-section .page-login__container,
  .page-login__faq-section .page-login__container,
  .page-login__cta-banner .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-login__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}