/* style/login.css */

/* Base styles for page-login, ensuring text contrast on the body background */
.page-login {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for the page */
  background-color: var(--background, #08160F); /* Ensure consistency with body background */
}

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

/* 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;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--deep-green, #0A4B2C);
  overflow: hidden;
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for visual balance */
  overflow: hidden;
  margin-bottom: 40px;
}

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

.page-login__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  color: var(--text-main, #F2FFF6);
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-main, #F2FFF6);
}

.page-login__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary, #A7D9B8);
}

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

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-login__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-login__btn-secondary {
  background: transparent;
  color: var(--glow, #57E38D);
  border: 2px solid var(--glow, #57E38D);
}

.page-login__btn-secondary:hover {
  background: var(--glow, #57E38D);
  color: #08160F;
}

/* Section common styles */
.page-login__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-login__section-description {
  font-size: 1.05em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__dark-bg {
  background-color: var(--background, #08160F);
  color: var(--text-main, #F2FFF6);
}

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

.page-login__dark-section {
  background-color: var(--card-b-g, #11271B);
  color: var(--text-main, #F2FFF6);
  padding: 60px 0;
}

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

.page-login__form-section .page-login__section-title,
.page-login__form-section .page-login__section-description {
  color: #333333;
}

.page-login__login-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border, #2E7A4E);
}

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

.page-login__label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333333;
}

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

.page-login__input::placeholder {
  color: #aaa;
}

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

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

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

.page-login__forgot-password {
  color: var(--deep-green, #0A4B2C);
  text-decoration: none;
}

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

.page-login__login-button {
  width: 100%;
  font-size: 1.1em;
  padding: 15px 20px;
}

.page-login__register-text {
  text-align: center;
  margin-top: 25px;
  color: #555;
}

.page-login__register-link {
  color: var(--deep-green, #0A4B2C);
  text-decoration: none;
  font-weight: bold;
}

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

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  text-align: center;
}

.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: var(--background, #08160F);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 450px;
  color: var(--text-main, #F2FFF6);
  border: 1px solid var(--border, #2E7A4E);
}

.page-login__benefit-card .page-login__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-login__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-main, #F2FFF6);
}

.page-login__card-text {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--text-secondary, #A7D9B8);
}

.page-login__card-link {
  display: inline-block;
  margin-top: auto;
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
}

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

/* Security Section */
.page-login__security-section {
  padding: 60px 0;
  text-align: center;
}

.page-login__security-section .page-login__section-title,
.page-login__security-section .page-login__section-description {
  color: #333333;
}

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

.page-login__security-item {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: 1px solid #e0e0e0;
  color: #333333;
}

.page-login__security-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-login__security-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--deep-green, #0A4B2C);
}

.page-login__security-text {
  font-size: 0.95em;
  margin-bottom: 20px;
  color: #555;
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
  padding: 60px 0;
  text-align: center;
}

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

.page-login__troubleshooting-item {
  background-color: var(--background, #08160F);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-main, #F2FFF6);
  border: 1px solid var(--border, #2E7A4E);
}

.page-login__troubleshooting-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-main, #F2FFF6);
}

.page-login__troubleshooting-text {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--text-secondary, #A7D9B8);
}

.page-login__troubleshooting-link {
  display: inline-block;
  margin-top: auto;
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
}

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

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
}

.page-login__faq-section .page-login__section-title,
.page-login__faq-section .page-login__section-description {
  color: #333333;
}

.page-login__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
}

.page-login__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f9f9f9;
  color: var(--deep-green, #0A4B2C);
  user-select: none;
}

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

.page-login__faq-question::marker {
  display: none;
}

.page-login__faq-qtext {
  flex-grow: 1;
  pointer-events: none; /* Prevents text from being selected when clicking the toggle */
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  pointer-events: none; /* Prevents toggle from being selected when clicking the question */
}

.page-login__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555;
  line-height: 1.7;
}

.page-login__faq-answer p {
  margin-top: 10px;
  margin-bottom: 0;
}

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

.page-login__cta-register-section .page-login__section-title,
.page-login__cta-register-section .page-login__section-description {
  color: var(--text-main, #F2FFF6);
}

.page-login__cta-register-section .page-login__btn-primary {
  margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-login__hero-content {
    max-width: 700px;
  }
}

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

  .page-login__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-login__main-title {
    font-size: clamp(2em, 7vw, 2.5em);
  }

  .page-login__hero-description {
    font-size: 1em;
  }

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px !important;
    font-size: 1em !important;
  }

  .page-login__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
  }

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

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

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

  .page-login__benefits-grid,
  .page-login__security-grid,
  .page-login__troubleshooting-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__benefit-card,
  .page-login__troubleshooting-item {
    min-height: auto;
  }

  .page-login__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-login__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95em;
  }

  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-login__hero-image-wrapper,
  .page-login__benefit-card .page-login__card-image,
  .page-login__security-icon {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Ensure all content containers are responsive */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__hero-section,
  .page-login__form-section,
  .page-login__benefits-section,
  .page-login__security-section,
  .page-login__troubleshooting-section,
  .page-login__faq-section,
  .page-login__cta-register-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__login-button {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Ensure min-size for all content images */
.page-login img:not(.page-login__security-icon) {
  min-width: 200px;
  min-height: 200px;
}

.page-login__security-icon {
  min-width: 100px;
  min-height: 100px;
}

/* Color Contrast Fixes for specific elements if needed */
/* Example for light background */
.page-login__light-bg .page-login__section-title,
.page-login__light-bg .page-login__section-description,
.page-login__light-bg .page-login__label,
.page-login__light-bg .page-login__forgot-password,
.page-login__light-bg .page-login__register-text,
.page-login__light-bg .page-login__register-link,
.page-login__light-bg .page-login__security-title,
.page-login__light-bg .page-login__security-text,
.page-login__light-bg .page-login__faq-question,
.page-login__light-bg .page-login__faq-answer {
  color: #333333; /* Ensure dark text on light backgrounds */
}

/* Example for dark background */
.page-login__dark-bg .page-login__main-title,
.page-login__dark-bg .page-login__hero-description,
.page-login__dark-section .page-login__section-title,
.page-login__dark-section .page-login__section-description,
.page-login__dark-section .page-login__card-title,
.page-login__dark-section .page-login__card-text,
.page-login__dark-section .page-login__card-link,
.page-login__dark-section .page-login__troubleshooting-title,
.page-login__dark-section .page-login__troubleshooting-text,
.page-login__dark-section .page-login__troubleshooting-link,
.page-login__dark-section .page-login__cta-register-section .page-login__section-title,
.page-login__dark-section .page-login__cta-register-section .page-login__section-description {
  color: var(--text-main, #F2FFF6); /* Ensure light text on dark backgrounds */
}

/* Specific adjustment for secondary text on dark background */
.page-login__dark-bg .page-login__hero-description,
.page-login__dark-section .page-login__card-text,
.page-login__dark-section .page-login__troubleshooting-text {
  color: var(--text-secondary, #A7D9B8);
}