/* style/login.css */

/* --- Base Styles --- */
.page-login {
  background-color: var(--page-bg, #08160F); /* Fallback to custom background color */
  color: #F2FFF6; /* Main text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-login__main-title,
.page-login__section-title,
.page-login__form-title,
.page-login__feature-title {
  color: #F2FFF6; /* Light text for titles */
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
  line-height: 1.2;
}

.page-login__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
}

.page-login__form-title {
  font-size: clamp(1.5em, 3vw, 2.5em);
}

.page-login__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #A7D9B8; /* Secondary text color */
}

/* --- Hero Section --- */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit height for large screens */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px; /* Space between image and content */
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Minimum size */
}

.page-login__hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 1;
}

/* --- Form Section --- */
.page-login__form-section {
  padding: 60px 0;
  background-color: #08160F; /* Ensure dark background for the form */
}

.page-login__login-form {
  background-color: #11271B; /* Card BG color */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid #2E7A4E; /* Border color */
}

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

.page-login__label {
  display: block;
  margin-bottom: 10px;
  color: #F2FFF6; /* Main text color */
  font-weight: 600;
  font-size: 0.95em;
}

.page-login__input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Main text color */
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__input::placeholder {
  color: #A7D9B8; /* Secondary text color */
  opacity: 0.8;
}

.page-login__input:focus {
  outline: none;
  border-color: #57E38D; /* Glow color on focus */
  box-shadow: 0 0 0 3px rgba(87, 227, 141, 0.3);
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

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

.page-login__checkbox {
  margin-right: 8px;
  accent-color: #13994A; /* Brand color for checkbox */
}

.page-login__checkbox-label {
  color: #A7D9B8; /* Secondary text color */
  font-size: 0.9em;
}

.page-login__forgot-password {
  color: #57E38D; /* Glow color for links */
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: #F2C14E; /* Gold color on hover */
}

.page-login__btn-primary {
  display: block;
  width: 100%;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #ffffff; /* White text for buttons */
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box; /* Crucial for responsiveness */
  max-width: 100%; /* Crucial for responsiveness */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

.page-login__register-text {
  text-align: center;
  margin-top: 30px;
  color: #A7D9B8; /* Secondary text color */
  font-size: 0.95em;
}

.page-login__register-link {
  color: #57E38D; /* Glow color for links */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: #F2C14E; /* Gold color on hover */
}

/* --- Features Section --- */
.page-login__features-section {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green for dark section */
}

.page-login__dark-section {
  background-color: #0A4B2C;
  color: #F2FFF6;
}

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

.page-login__feature-item {
  background-color: #11271B; /* Card BG color */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #2E7A4E; /* Border color */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__feature-icon {
  width: 100%;
  max-width: 150px; /* Example size, ensuring minimum 200x200 for actual image */
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
  object-fit: contain; /* Ensure image fits without cropping */
}

.page-login__feature-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: #F2FFF6; /* Main text color */
}

.page-login__feature-description {
  color: #A7D9B8; /* Secondary text color */
  font-size: 0.95em;
}

/* --- CTA Section --- */
.page-login__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-login__cta-content {
  max-width: 800px;
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow buttons to wrap */
  width: 100%; /* Ensure container takes full width */
  box-sizing: border-box;
  overflow: hidden; /* Prevent overflow */
}

.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border: 2px solid #2AD16F; /* Border color from button gradient start */
  border-radius: 8px;
  background-color: transparent;
  color: #2AD16F; /* Text color matching border */
  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, transform 0.2s ease;
  box-sizing: border-box; /* Crucial for responsiveness */
  max-width: 100%; /* Crucial for responsiveness */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-login__btn-secondary:hover {
  background-color: #2AD16F;
  color: #08160F; /* Dark background color for text on hover */
  transform: translateY(-2px);
}

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

  .page-login__main-title {
    font-size: 2.2em;
  }

  .page-login__section-title {
    font-size: 1.8em;
  }

  .page-login__form-title {
    font-size: 1.6em;
  }

  .page-login__hero-section {
    padding-bottom: 40px;
  }

  .page-login__login-form {
    padding: 30px 20px;
  }

  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .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__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-login__hero-image-wrapper,
  .page-login__form-section,
  .page-login__features-section,
  .page-login__cta-section,
  .page-login__feature-item,
  .page-login__cta-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-login__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}

/* --- Color Contrast Fixes (as per requirements) --- */
.page-login {
  color: #F2FFF6; /* Main text color for dark background */
}

.page-login__dark-bg {
  color: #F2FFF6; /* Deep Green background, light text */
  background: #0A4B2C;
}

.page-login__light-bg {
  /* Not used on this page based on color scheme, but defined for completeness */
  color: #333333;
  background: #ffffff;
}

.page-login__medium-bg {
  /* Not used on this page based on color scheme, but defined for completeness */
  color: #000000;
  background: #22C768;
}

.page-login p,
.page-login li {
  color: #A7D9B8; /* Secondary text color for paragraphs */
}

.page-login__card {
  background: #11271B; /* Card BG */
  color: #F2FFF6;
  border: 1px solid #2E7A4E;
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
}

.page-login__btn-secondary {
  background: transparent;
  color: #2AD16F;
  border: 2px solid #2AD16F;
}