.page-login {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF; /* Explicitly set for consistency */
  line-height: 1.6;
}

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

/* Top Section - H1 and intro text */
.page-login__top-section {
  padding-top: 10px; /* Small top padding as body handles header offset */
  padding-bottom: 40px;
  text-align: center;
  background-color: #FFFFFF; /* Light background */
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #017439; /* Brand green for title */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555555;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-login__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't exceed container width */
}

.page-login__btn-primary {
  background-color: #C30808; /* Login/Register button color */
  color: #FFFF00; /* Login/Register font color */
  border: 2px solid #C30808;
}

.page-login__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-login__btn-secondary {
  background-color: #017439; /* Other button color */
  color: #FFFFFF; /* Other button font color */
  border: 2px solid #017439;
}

.page-login__btn-secondary:hover {
  background-color: #005a2d;
  border-color: #005a2d;
}

/* Login Form Section */
.page-login__login-form-section {
  padding: 60px 0;
  background-color: #017439; /* Dark section background */
  color: #FFFFFF; /* Light text for dark background */
  text-align: center;
}

.page-login__login-form-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 30px;
}

.page-login__login-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.page-login__login-form {
  background-color: #FFFFFF; /* Form background */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  color: #333333; /* Dark text for light form background */
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.page-login__form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.page-login__forgot-password,
.page-login__register-link {
  color: #017439; /* Brand green for links */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover,
.page-login__register-link:hover {
  color: #005a2d;
  text-decoration: underline;
}

.page-login__btn-submit {
  width: 100%;
  background-color: #C30808; /* Login button color */
  color: #FFFF00; /* Login button font color */
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
}

.page-login__btn-submit:hover {
  background-color: #a00606;
}

.page-login__register-text {
  margin-top: 20px;
  text-align: center;
}

/* General Section Styling */
.page-login__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  color: inherit; /* Inherit from parent section */
}

.page-login__section-description {
  font-size: 1.05em;
  margin-bottom: 40px;
  color: inherit;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__image-wrapper {
  margin-bottom: 30px;
}

.page-login__content-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin: 0 auto;
  object-fit: cover;
}

.page-login__image-caption {
  font-style: italic;
  font-size: 0.9em;
  color: #777777;
  margin-top: 10px;
  text-align: center;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  background-color: #F8F8F8; /* Light background */
  text-align: center;
  color: #333333;
}

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

.page-login__benefit-card {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  color: #333333;
  height: 100%; /* Ensure cards have equal height */
  box-sizing: border-box;
}

.page-login__card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #017439;
}

/* Guide Section */
.page-login__guide-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #FFFFFF;
  text-align: center;
}

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

.page-login__step-item {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  color: #333333;
  height: 100%;
  box-sizing: border-box;
}

.page-login__step-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #017439;
}

/* Troubleshooting Section */
.page-login__troubleshoot-section {
  padding: 60px 0;
  background-color: #F8F8F8;
  text-align: center;
  color: #333333;
}

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

.page-login__troubleshoot-item {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  color: #333333;
  height: 100%;
  box-sizing: border-box;
}

.page-login__item-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #017439;
}

/* Security Section */
.page-login__security-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #FFFFFF;
  text-align: center;
}

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

.page-login__tip-card {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  color: #333333;
  height: 100%;
  box-sizing: border-box;
}

/* Register CTA Section */
.page-login__register-cta-section {
  padding: 60px 0;
  text-align: center;
}

.page-login__register-cta-section .page-login__container {
  background-color: #017439; /* Dark background for CTA container */
  color: #FFFFFF;
  padding: 50px 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.page-login__register-cta-section .page-login__section-title {
  color: #FFFFFF;
}

.page-login__register-cta-section .page-login__section-description {
  color: #F0F0F0;
  margin-bottom: 40px;
}

.page-login__btn-large {
  padding: 15px 35px;
  font-size: 1.2em;
}

/* Conclusion Section */
.page-login__conclusion-section {
  padding: 60px 0;
  background-color: #FFFFFF;
  text-align: center;
  color: #333333;
}

/* Common Dark/Light Background Classes for Contrast */
.page-login__dark-bg {
  background-color: #017439;
  color: #FFFFFF;
}

.page-login__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

/* General image and figure styles */
.page-login figure {
  margin: 0;
  padding: 0;
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 1. Top section title + CTA */
  .page-login__top-section {
    padding-top: 10px !important; /* Fixed header offset handled by body */
    padding-bottom: 30px;
  }

  .page-login__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em); /* Adjust H1 for mobile */
    margin-bottom: 10px;
    padding: 0 15px;
  }

  .page-login__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 15px; /* Add padding to text for better readability */
  }

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

  .page-login__btn,
  .page-login__btn-submit,
  .page-login__btn-large {
    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;
  }

  /* 2. Single-column long text container / Section Padding */
  .page-login__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__section-title {
    font-size: clamp(1.5em, 7vw, 2.2em); /* Adjust H2 for mobile */
    margin-bottom: 15px;
    padding: 0 15px;
  }

  .page-login__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-login__login-form-wrapper {
    flex-direction: column; /* Stack image and form vertically */
    gap: 30px;
    padding: 0 15px;
  }

  .page-login__login-form {
    padding: 30px 20px;
    max-width: 100%;
    width: 100%;
  }

  .page-login__benefits-grid,
  .page-login__steps-list,
  .page-login__troubleshoot-list,
  .page-login__security-tips {
    grid-template-columns: 1fr; /* Single column layout for grids */
    gap: 20px;
    padding: 0 15px;
  }

  .page-login__benefit-card,
  .page-login__step-item,
  .page-login__troubleshoot-item,
  .page-login__tip-card {
    padding: 25px;
  }

  .page-login__card-title,
  .page-login__step-title,
  .page-login__item-title {
    font-size: 1.2em;
    margin-bottom: 10px;
  }

  /* 3. General images and figures */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-login__image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px; /* Ensure image wrapper also has padding */
  }

  /* 4. Buttons and button containers - already covered above */
  /* All buttons are covered by .page-login__btn, .page-login__btn-submit, .page-login__btn-large */
  .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: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* If buttons use flex-direction: column, ensure it's explicitly set */
  .page-login__cta-buttons {
    display: flex;
    flex-direction: column; /* Mobile vertical stacking */
  }

  /* 5. Registration tutorial and FAQ blocks - troubleshooting is similar */
  .page-login__troubleshoot-section p,
  .page-login__security-section p,
  .page-login__benefits-section p,
  .page-login__guide-section p,
  .page-login__conclusion-section p {
    padding: 0 15px;
  }

  .page-login__register-cta-section .page-login__container {
    padding: 40px 20px;
    margin: 0 15px;
  }
}