/* style/login.css */

/* Variables */
:root {
  --page-login-primary-color: #26A9E0; /* Original brand primary color */
  --page-login-primary-color-dark-bg: #0077B6; /* Darker version for backgrounds with white text (WCAG AA: 4.5:1 contrast with #FFFFFF) */
  --page-login-secondary-color: #FFFFFF;
  --page-login-login-button-color: #EA7C07; /* Original given login button color */
  --page-login-login-button-color-safe: #C76B06; /* Adjusted for contrast with white text (WCAG AA: 4.5:1 contrast with #FFFFFF) */
  --page-login-background-color: #FFFFFF;
  --page-login-dark-text-color: #333333;
  --page-login-light-text-color: #ffffff;
  --page-login-border-color: #e0e0e0;
  --page-login-link-color-safe: #0077B6; /* Adjusted for contrast on light background (WCAG AA: 4.5:1 contrast with #FFFFFF) */
}

.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-login-dark-text-color); /* Default text color for light background */
  background-color: var(--page-login-background-color); /* Assumed light background from body var */
}

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

/* Hero Section */
.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  overflow: hidden;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.page-login__hero-content {
  width: 100%;
  max-width: 900px;
  padding: 40px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  color: var(--page-login-light-text-color);
  box-sizing: border-box;
  margin-top: -100px; /* Adjust as needed to place content below image */
  position: relative;
  z-index: 2;
  border-radius: 8px;
  transform: translateY(-50px);
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--page-login-light-text-color);
}

.page-login__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--page-login-light-text-color);
}

/* Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: var(--page-login-background-color);
  color: var(--page-login-dark-text-color);
}

.page-login__light-bg {
  background-color: var(--page-login-background-color);
  color: var(--page-login-dark-text-color);
}

.page-login__section-title {
  font-size: 2.2em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  color: var(--page-login-dark-text-color);
}

.page-login__login-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 30px;
  background-color: var(--page-login-secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--page-login-border-color);
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
  color: var(--page-login-dark-text-color);
  background-color: var(--page-login-secondary-color);
}

.page-login__password-input-wrapper {
  position: relative;
}

.page-login__toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: var(--page-login-dark-text-color);
}

.page-login__eye-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333333"><path d="M12 4.5C7 4.5 2.73 7.61 0 12c2.73 4.39 7 7.5 12 7.5s9.27-3.11 12-7.5c-2.73-4.39-7-7.5-12-7.5zm0 12c-2.48 0-4.5-2.02-4.5-4.5s2.02-4.5 4.5-4.5 4.5 2.02 4.5 4.5-2.02 4.5-4.5 4.5zm0-7c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;
}

.page-login__toggle-password.active .page-login__eye-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333333"><path d="M12 4.5C7 4.5 2.73 7.61 0 12c2.73 4.39 7 7.5 12 7.5s9.27-3.11 12-7.5c-2.73-4.39-7-7.5-12-7.5zm0 12c-2.48 0-4.5-2.02-4.5-4.5s2.02-4.5 4.5-4.5 4.5 2.02 4.5 4.5-2.02 4.5-4.5 4.5zm0-7c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5zM2 4.27l2.59 2.59C3.61 8.35 2.15 10.02 0 12c2.15 1.98 3.61 3.65 4.59 4.88L2 19.73l1.41 1.41L5.61 19l2.7-2.7c.72.18 1.48.27 2.25.27 2.48 0 4.5-2.02 4.5-4.5 0-.77-.09-1.53-.27-2.25l2.7-2.7 1.41 1.41-2.59 2.59L22 4.27 20.59 2.86 2 4.27z"/></svg>');
}

.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;
}

.page-login__checkbox {
  margin-right: 8px;
}

.page-login__checkbox-label {
  color: var(--page-login-dark-text-color);
}

.page-login__forgot-password {
  color: var(--page-login-link-color-safe);
  text-decoration: none;
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-primary {
  background-color: var(--page-login-login-button-color-safe); /* Using adjusted color for contrast */
  color: var(--page-login-light-text-color);
}

.page-login__btn-primary:hover {
  background-color: #a75205; /* Darker on hover */
}

.page-login__register-text {
  text-align: center;
  margin-top: 30px;
  font-size: 0.95em;
  color: var(--page-login-dark-text-color);
}

.page-login__register-link {
  color: var(--page-login-link-color-safe);
  text-decoration: none;
  font-weight: 600;
}

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

/* Promo Section */
.page-login__promo-section {
  padding: 80px 0;
  background-color: var(--page-login-primary-color-dark-bg); /* Use darker primary for dark background to ensure contrast with white text */
  color: var(--page-login-light-text-color);
}

.page-login__dark-bg {
  background-color: var(--page-login-primary-color-dark-bg);
  color: var(--page-login-light-text-color);
}

.page-login__text-white {
  color: var(--page-login-light-text-color);
}

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

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

.page-login__promo-content .page-login__section-title {
  text-align: left;
  margin-bottom: 20px;
}

.page-login__promo-description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-login__promo-image {
  flex: 1;
  min-width: 300px;
  max-width: 800px;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__btn-secondary {
  background-color: var(--page-login-secondary-color);
  color: var(--page-login-link-color-safe); /* Use darker blue for text on white to ensure contrast */
  border: 2px solid var(--page-login-link-color-safe);
  width: auto;
  padding-left: 30px;
  padding-right: 30px;
  display: inline-block;
}

.page-login__btn-secondary:hover {
  background-color: transparent;
  color: var(--page-login-light-text-color);
  border-color: var(--page-login-light-text-color);
}

/* Security Section */
.page-login__security-section {
  padding: 80px 0;
  background-color: var(--page-login-background-color);
  color: var(--page-login-dark-text-color);
}

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

.page-login__feature-card {
  background-color: var(--page-login-secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-login__feature-icon {
  width: 200px; /* Minimum size requirement */
  height: 200px;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-login__feature-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--page-login-dark-text-color);
}

.page-login__feature-description {
  font-size: 0.95em;
  color: var(--page-login-dark-text-color);
}


/* Responsive styles */
@media (max-width: 1024px) {
  .page-login__hero-content {
    padding: 30px 15px;
  }
  .page-login__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
  }
  .page-login__hero-description {
    font-size: 1em;
  }
  .page-login__flex-center {
    flex-direction: column;
  }
  .page-login__promo-content {
    text-align: center;
    max-width: 100%;
  }
  .page-login__promo-content .page-login__section-title {
    text-align: center;
  }
  .page-login__promo-image {
    max-width: 600px;
  }
  .page-login__btn-secondary {
    margin: 0 auto; /* Center the button when it's the only one */
  }
}

@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-login__hero-section {
    padding-top: 10px !important; /* body handles --header-offset */
  }
  .page-login__hero-content {
    margin-top: -60px;
    transform: translateY(-30px);
  }
  .page-login__main-title {
    font-size: clamp(1.5em, 6vw, 2.2em);
  }
  .page-login__section-title {
    font-size: 1.8em;
  }
  .page-login__login-form {
    padding: 20px;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Images responsive */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-login__hero-image {
    width: 100%; /* Ensure hero image takes full width */
  }
  .page-login__promo-image {
    width: 100%;
  }
  .page-login__feature-icon {
    width: 200px !important; /* Ensure it's not smaller than 200px */
    height: 200px !important;
  }
  
  /* Buttons responsive */
  .page-login__btn-primary,
  .page-login__btn-secondary {
    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;
  }
  .page-login__btn-secondary {
    margin: 10px auto; /* Center with some spacing */
  }

  /* Containers responsive */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-section,
  .page-login__promo-section,
  .page-login__security-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__flex-center {
    flex-direction: column;
    gap: 20px;
  }
  .page-login__promo-content {
    padding: 0;
  }
}

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