:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --page-bg: #F4F7FB;
  --text-main: #1F2D3D;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

/* Base styles for the login page content */
.page-login {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Default text color for light background */
  background-color: var(--page-bg); /* Page background from custom colors */
  line-height: 1.6;
  padding-bottom: 60px; /* Space above footer */
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  /* Fixed header padding handled by body in shared.css, this is a small decorative top padding */
  padding-top: 10px; 
  background-color: var(--page-bg);
  overflow: hidden; /* Ensure no image overflow */
}

.page-login__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure it takes full width within max-width */
}

.page-login__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-login__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  filter: none !important; /* Ensure no filter is used on images */
}

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-login__main-title {
  font-size: clamp(28px, 5vw, 42px); /* Responsive font size */
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__description {
  font-size: 18px;
  color: var(--text-main);
  max-width: 800px;
  margin: 0 auto 30px;
}

/* Form Section */
.page-login__form-section {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  max-width: 1200px;
  margin: 40px auto;
  background-color: var(--card-bg); /* White background for the card */
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.page-login__form-container {
  flex: 1;
  min-width: 300px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--card-bg); /* Explicit white background for contrast */
  color: var(--text-main); /* Dark text for light background */
}

.page-login__form-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color); /* A lighter blue background for the image section */
}

.page-login__form-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: none !important; /* Ensure no filter is used on images */
}

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

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

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

.page-login__form-input {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-main);
  background-color: #fcfdff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.page-login__checkbox-label {
  color: var(--text-main);
  user-select: none;
}

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

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

.page-login__submit-button {
  display: inline-block;
  width: 100%;
  padding: 15px;
  background: var(--button-gradient); /* Custom button gradient */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  text-decoration: none;
}

.page-login__submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

.page-login__register-link {
  text-align: center;
  margin-top: 25px;
  font-size: 16px;
  color: var(--text-main);
}

.page-login__register-cta {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__register-cta:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Benefits Section */
.page-login__benefits-section {
  background-color: var(--primary-color); /* Dark background */
  color: #ffffff; /* Light text for dark background */
  padding: 60px 20px;
  text-align: center;
}

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

.page-login__section-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 40px;
  color: #ffffff; /* Ensure white text on dark background */
}

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

.page-login__benefit-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-login__benefit-item img {
  width: 100%;
   /* Adjust max-width for benefit icons */
  height: auto;
  margin-bottom: 20px;
  object-fit: contain;
  filter: none !important; /* Ensure no filter is used on images */
}

.page-login__benefit-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-login__benefit-description {
  font-size: 15px;
  color: #f0f0f0;
}

/* CTA Section */
.page-login__cta-section {
  padding: 60px 20px;
  text-align: center;
  background-color: var(--page-bg); /* Light background */
  color: var(--text-main); /* Dark text */
}

.page-login__cta-section .page-login__section-title {
  color: var(--text-main); /* Dark text for light background */
}

.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient); /* Custom button gradient */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__hero-image {
    margin-bottom: 20px;
  }
  .page-login__main-title {
    font-size: clamp(24px, 4vw, 38px); /* Adjust clamp for smaller screens */
  }
  .page-login__description {
    font-size: 17px;
  }
  .page-login__form-section {
    margin: 30px auto;
  }
  .page-login__form-container {
    padding: 30px;
  }
  .page-login__form-title {
    font-size: 28px;
  }
  .page-login__section-title {
    font-size: 32px;
  }
  .page-login__benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__hero-image {
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .page-login__main-title {
    font-size: clamp(20px, 6vw, 28px); /* Further adjust clamp for mobile */
    margin-bottom: 15px;
  }

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

  .page-login__form-section {
    flex-direction: column; /* Stack image and form vertically */
    margin: 20px 15px;
    border-radius: 8px;
    padding: 0;
  }

  .page-login__form-container {
    padding: 25px 20px;
    order: 2; /* Form below image */
  }

  .page-login__form-image {
    order: 1; /* Image above form */
    border-radius: 8px 8px 0 0; /* Rounded top corners */
  }
  .page-login__form-image img {
    border-radius: 8px 8px 0 0;
  }

  .page-login__form-title {
    font-size: 24px;
    margin-bottom: 25px;
  }
  
  .page-login__form-input {
    width: calc(100% - 20px) !important;
    padding: 10px !important;
  }

  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .page-login__forgot-password {
    margin-top: 10px;
  }

  .page-login__submit-button,
  .page-login__cta-button {
    padding: 12px 20px !important;
    font-size: 16px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  /* Image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-section,
  .page-login__benefits-section,
  .page-login__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-login__benefits-grid {
    grid-template-columns: 1fr;
  }

  .page-login__benefit-item {
    padding: 25px;
  }
  .page-login__benefit-item img {
    
  }
  .page-login__benefit-title {
    font-size: 20px;
  }
  .page-login__benefit-description {
    font-size: 14px;
  }
}

/* Ensure no filter is used on images */
.page-login img {
  filter: none !important;
}

/* Color contrast enforcement for specific elements */
.page-login__dark-bg {
  background: var(--primary-color);
  color: #ffffff; /* Explicit white text on primary color */
}

.page-login__light-bg {
  background: var(--card-bg);
  color: var(--text-main); /* Explicit dark text on white background */
}