/* style/login.css */

/* --- General Page Styles --- */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color from custom palette */
  background: var(--background, #08160F); /* Default background color from custom palette */
}

/* Ensure headings inherit the main text color or are specifically set for contrast */
.page-login h1,
.page-login h2,
.page-login h3,
.page-login h4,
.page-login h5,
.page-login h6 {
  color: var(--text-main, #F2FFF6);
  line-height: 1.2;
}

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

.page-login__section-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2.5em; /* Adjusted for larger screens, will be responsive */
  font-weight: bold;
}

.page-login__section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 1.1em;
}

/* --- Hero Section --- */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above content */
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px; /* Small top padding, body handles --header-offset */
  background: var(--background, #08160F);
}

.page-login__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensure image covers the area without distortion */
  margin-bottom: 30px; /* Space between image and content */
}

.page-login__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-login__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main, #F2FFF6);
}

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

/* --- CTA Buttons --- */
.page-login__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  text-align: center;
  min-width: 180px; /* Ensure a minimum width for buttons */
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: var(--text-main, #F2FFF6);
  border: none;
}

.page-login__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__btn-secondary {
  background: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border, #2E7A4E); /* Custom border color */
}

.page-login__btn-secondary:hover {
  background: rgba(var(--main-color-rgb, 17, 168, 78), 0.1); /* Slight background on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- Login Form Section --- */
.page-login__form-section {
  padding: 80px 0;
  background: var(--card-bg, #11271B); /* Custom card background */
  color: var(--text-main, #F2FFF6);
}

.page-login__login-form {
  max-width: 500px;
  margin: 40px auto 0;
  padding: 40px;
  background: rgba(0, 0, 0, 0.3); /* Slightly darker background for form */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #2E7A4E);
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5); /* Dark input background */
  color: var(--text-main, #F2FFF6);
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: var(--text-secondary, #A7D9B8);
}

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

.page-login__checkbox-container {
  display: block;
  position: relative;
  padding-left: 25px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--text-secondary, #A7D9B8);
}

.page-login__checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.page-login__checkbox-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 3px;
}

.page-login__checkbox-container input:checked ~ .page-login__checkbox-checkmark {
  background-color: var(--main-color, #11A84E);
  border-color: var(--main-color, #11A84E);
}

.page-login__checkbox-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.page-login__checkbox-container input:checked ~ .page-login__checkbox-checkmark:after {
  display: block;
}

.page-login__checkbox-container .page-login__checkbox-checkmark:after {
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.page-login__forgot-password {
  color: var(--text-secondary, #A7D9B8);
  text-decoration: none;
}

.page-login__forgot-password:hover {
  text-decoration: underline;
  color: var(--glow, #57E38D);
}

.page-login__btn-submit {
  width: 100%;
  padding: 15px;
  font-size: 1.1em;
  margin-top: 20px;
}

.page-login__register-text {
  text-align: center;
  margin-top: 30px;
  color: var(--text-secondary, #A7D9B8);
}

.page-login__register-link {
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
}

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

/* --- Security Section --- */
.page-login__security-section {
  padding: 80px 0;
  background: var(--background, #08160F);
  color: var(--text-main, #F2FFF6);
}

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

.page-login__feature-card {
  background: var(--card-bg, #11271B);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border, #2E7A4E);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

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

.page-login__feature-description {
  color: var(--text-secondary, #A7D9B8);
}

/* --- Benefits Section --- */
.page-login__benefits-section {
  padding: 80px 0;
  background: var(--deep-green, #0A4B2C); /* Custom deep green background */
  color: var(--text-main, #F2FFF6);
}

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

.page-login__benefit-item {
  background: rgba(0, 0, 0, 0.3); /* Slightly transparent background */
  padding: 30px;
  border-radius: 10px;
  border: 1px solid var(--border, #2E7A4E);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-login__benefit-description {
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
}

.page-login__text-link {
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
}

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

/* --- FAQ Section --- */
.page-login__faq-section {
  padding: 80px 0;
  background: var(--background, #08160F);
  color: var(--text-main, #F2FFF6);
}

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

.page-login__faq-item {
  margin-bottom: 15px;
  background: var(--card-bg, #11271B);
  border-radius: 8px;
  border: 1px solid var(--border, #2E7A4E);
  overflow: hidden;
}

.page-login__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-main, #F2FFF6);
  background: var(--card-bg, #11271B);
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-login__faq-question {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.page-login__faq-qtext {
  flex-grow: 1;
}

.page-login__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  line-height: 1;
}

.page-login__faq-answer {
  padding: 0 20px 20px;
  color: var(--text-secondary, #A7D9B8);
}

.page-login__faq-answer p {
  margin: 0;
}

.page-login__faq-answer a {
  color: var(--glow, #57E38D);
  text-decoration: none;
}

.page-login__faq-answer a:hover {
  text-decoration: underline;
}

/* --- Bottom CTA Section --- */
.page-login__cta-bottom-section {
  padding: 80px 0;
  text-align: center;
  background: var(--deep-green, #0A4B2C);
  color: var(--text-main, #F2FFF6);
}

.page-login__cta-bottom-section .page-login__cta-buttons {
  margin-top: 40px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-login__section-title {
    font-size: 2em;
  }
  .page-login__main-title {
    font-size: clamp(2em, 4vw, 3em);
  }
}

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

  .page-login__container {
    padding: 0 15px; /* Add padding for mobile */
  }

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

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

  .page-login__description {
    font-size: 1em;
  }

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

  .page-login__btn-primary,
  .page-login__btn-secondary {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 1em;
  }

  .page-login__form-section,
  .page-login__security-section,
  .page-login__benefits-section,
  .page-login__faq-section,
  .page-login__cta-bottom-section {
    padding: 50px 0;
  }

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

  .page-login__security-features,
  .page-login__benefits-grid {
    grid-template-columns: 1fr; /* Single column layout */
  }

  .page-login__feature-icon {
    width: 80px;
    height: 80px;
  }

  .page-login__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }

  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__login-form,
  .page-login__feature-card,
  .page-login__benefit-item,
  .page-login__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__hero-section,
  .page-login__form-section,
  .page-login__security-section,
  .page-login__benefits-section,
  .page-login__faq-section,
  .page-login__cta-bottom-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .page-login__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Specific rule for video sections, if any were present */
  .page-login__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Video responsiveness (if any video elements were added) */
  .page-login video,
  .page-login__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__video-section,
  .page-login__video-container,
  .page-login__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}