/* style/login.css */

/* --- Base Styles --- */
.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color for dark background */
  background-color: var(--bg-color); /* Deep Green: #08160F */
  line-height: 1.6;
}

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

.page-login__section-title {
  font-size: 2.5em;
  color: var(--gold); /* Gold for titles on dark background */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

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

/* --- Hero Section --- */
.page-login__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Force image above content for accessibility and layout */
  align-items: center;
  justify-content: center;
  min-height: 700px; /* Ensure hero section has a minimum height */
  padding-top: 10px; /* Small top padding, body handles header offset */
  box-sizing: border-box;
}

.page-login__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-login__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.3; /* Darken the image to ensure text contrast */
}

.page-login__hero-content-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1; /* Allow content to grow and center vertically */
}

.page-login__login-card {
  background: var(--card-bg); /* #11271B */
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border); /* #2E7A4E */
  width: 100%;
  box-sizing: border-box;
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Responsive H1 font size */
  color: var(--gold); /* Gold for H1 */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-login__intro-text {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 30px;
  font-size: 1em;
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.page-login__form-input:focus {
  outline: none;
  border-color: var(--glow);
  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: 25px;
  font-size: 0.9em;
}

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

.page-login__checkbox {
  margin-right: 8px;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
}

.page-login__checkbox:checked {
  background-color: var(--main-color); /* #11A84E */
  border-color: var(--main-color);
}

.page-login__checkbox:checked::before {
  content: '✔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
}

.page-login__checkbox-label {
  color: var(--text-secondary);
  cursor: pointer;
}

.page-login__forgot-password {
  color: var(--glow); /* #57E38D */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-login__btn-primary {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

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

.page-login__register-link {
  text-align: center;
  margin-top: 25px;
  color: var(--text-secondary);
  font-size: 0.95em;
}

.page-login__register-text-link {
  color: var(--glow); /* #57E38D */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

/* --- Benefits Section --- */
.page-login__benefits-section {
  padding: 80px 0;
  background-color: var(--bg-color); /* #08160F */
}

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

.page-login__benefit-item {
  background: var(--card-bg); /* #11271B */
  padding: 30px;
  border-radius: 15px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.page-login__benefit-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  display: block; /* Ensure it respects max-width/height */
}

.page-login__benefit-title {
  font-size: 1.5em;
  color: var(--gold); /* Gold for titles */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__benefit-text {
  font-size: 1em;
  color: var(--text-secondary);
  flex-grow: 1; /* Allow text to take up available space */
}

/* --- Troubleshooting Section --- */
.page-login__troubleshooting-section {
  padding: 80px 0;
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333; /* Dark text for light background */
}

.page-login__troubleshooting-section .page-login__section-title {
  color: var(--deep-green); /* Deep Green for titles on light background */
}

.page-login__troubleshooting-section .page-login__section-description {
  color: #555555;
}

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

.page-login__troubleshooting-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__troubleshooting-title {
  font-size: 1.4em;
  color: var(--main-color); /* Main green color for titles */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__troubleshooting-text {
  font-size: 1em;
  color: #555555;
}

.page-login__cta-bottom {
  text-align: center;
  margin-top: 60px;
}

.page-login__cta-text {
  font-size: 1.2em;
  color: #333333;
  margin-bottom: 20px;
}

.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background: #ffffff;
  color: var(--main-color); /* #11A84E */
  border: 2px solid var(--main-color);
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.page-login__btn-secondary:hover {
  background: var(--main-color);
  color: #ffffff;
  transform: translateY(-2px);
}

/* --- Why Choose Us Section --- */
.page-login__why-choose-us {
  padding: 80px 0;
  background-color: var(--deep-green); /* #0A4B2C */
  color: var(--text-main);
}

.page-login__why-choose-us .page-login__section-title {
  color: var(--gold);
}

.page-login__why-choose-us .page-login__section-description {
  color: var(--text-secondary);
}

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

.page-login__feature-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid var(--divider); /* #1E3A2A */
  transition: background 0.3s ease, border-color 0.3s ease;
}

.page-login__feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--main-color);
}

.page-login__feature-title {
  font-size: 1.4em;
  color: var(--glow); /* #57E38D */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__feature-text {
  font-size: 1em;
  color: var(--text-secondary);
}

/* --- FAQ Section --- */
.page-login__faq-section {
  padding: 80px 0;
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333;
}

.page-login__faq-section .page-login__section-title {
  color: var(--deep-green);
}

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

.page-login__faq-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* For details tag */
}

.page-login__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--main-color);
  cursor: pointer;
  outline: none;
  list-style: none; /* Remove default marker */
}

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

.page-login__faq-qtext {
  flex-grow: 1;
  color: #333333; /* Dark text for question */
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--main-color);
  transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg);
}

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

/* --- CTA Download App Section --- */
.page-login__cta-download-app {
  padding: 60px 0;
  background-color: var(--bg-color); /* #08160F */
  text-align: center;
  border-top: 1px solid var(--divider);
}

.page-login__cta-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

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

.page-login__cta-download-app .page-login__section-title {
  color: var(--gold);
  margin-bottom: 15px;
}

.page-login__cta-download-app .page-login__section-description {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%; /* Ensure it takes full width for responsive */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-login__section-title {
    font-size: 2em;
  }
  .page-login__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
  }
  .page-login__login-card {
    padding: 30px;
  }
}

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

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

  .page-login__hero-content-wrapper {
    max-width: 90%;
    padding: 15px;
  }

  .page-login__login-card {
    padding: 25px;
  }

  .page-login__main-title {
    font-size: clamp(1.5em, 6vw, 2.2em);
    margin-bottom: 15px;
  }

  .page-login__intro-text {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

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

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    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,
  .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: 15px;
  }

  .page-login__benefits-section,
  .page-login__troubleshooting-section,
  .page-login__why-choose-us,
  .page-login__faq-section,
  .page-login__cta-download-app {
    padding: 50px 0;
  }

  .page-login__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

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

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

  .page-login__benefit-item,
  .page-login__troubleshooting-item,
  .page-login__feature-item {
    padding: 25px;
  }

  .page-login__benefit-image {
    height: 180px;
  }

  .page-login__benefit-title,
  .page-login__troubleshooting-title,
  .page-login__feature-title {
    font-size: 1.3em;
  }

  .page-login__faq-list {
    margin-top: 30px;
  }

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

  .page-login__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* 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__hero-image-wrapper { /* Added hero image wrapper for full width on mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__hero-image-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  .page-login__hero-content-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  .page-login__login-card {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Color Contrast Fixes (as per instructions) */
.page-login__dark-bg {
  color: var(--text-main); /* Deep Green background, light text */
}

.page-login__light-bg {
  color: #333333; /* Light background, dark text */
}

.page-login__contrast-fix { /* Applied to FAQ and troubleshooting items on light background */
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

/* Ensure no filter is applied to images */
.page-login img {
  filter: none !important;
}