/* style/login.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-color: #C30808;
  --login-button-color: #C30808;
  --background-color: #FFFFFF;
  --register-login-font-color: #FFFF00;
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
}

.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--secondary-color); /* Body background is white */
}

/* Ensure main content is below header */
.page-login__login-section {
  padding-top: var(--header-offset, 120px);
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px; /* Adjust as needed */
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), #004d26); /* Darker green gradient */
  color: var(--text-light);
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.page-login__login-content {
  flex: 1;
  min-width: 300px;
  max-width: 550px;
  text-align: left;
}

.page-login__title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
}

.page-login__description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.page-login__login-form-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-login__login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

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

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

.page-login__form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.page-login__form-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.page-login__checkbox {
  margin-right: 8px;
  accent-color: var(--primary-color);
}

.page-login__checkbox-label {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.8);
}

.page-login__forgot-password {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: var(--register-login-font-color);
}

.page-login__btn-submit {
  padding: 15px 25px;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.page-login__register-text {
  text-align: center;
  margin-top: 20px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

.page-login__register-link {
  color: var(--register-login-font-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

.page-login__image-wrapper {
  flex: 1;
  min-width: 400px;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-login__login-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

/* Features Section */
.page-login__features-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-login__section-heading {
  text-align: center;
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 60px;
  color: var(--primary-color);
}

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

.page-login__feature-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.page-login__card-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-login__card-description {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-dark);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background-color: var(--primary-color); /* Dark background */
  color: var(--text-light);
}

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

.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--text-light); /* White background for FAQ items */
  color: var(--text-dark); /* Dark text for FAQ items */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 20px;
  opacity: 0;
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important;
  padding: 20px 20px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-login__faq-question:active {
  background: #eeeeee;
}

.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color);
}

.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate to form an 'X' or just change to '-' */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__title {
    font-size: 2.8em;
  }
  .page-login__login-content {
    max-width: 100%;
    text-align: center;
  }
  .page-login__image-wrapper {
    min-width: unset;
    max-width: 100%;
  }
  .page-login__container {
    justify-content: center;
  }
  .page-login__login-form-container {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .page-login__login-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    min-height: unset;
  }
  .page-login__container {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
  }
  .page-login__login-content {
    text-align: center;
  }
  .page-login__title {
    font-size: 2.2em;
  }
  .page-login__description {
    font-size: 0.95em;
  }
  .page-login__image-wrapper {
    order: -1; /* Image above form on mobile */
  }
  .page-login__login-image {
    border-radius: 5px;
  }
  .page-login__section-heading {
    font-size: 2em;
    margin-bottom: 40px;
  }
  .page-login__features-section, .page-login__faq-section {
    padding: 60px 0;
  }
  .page-login__feature-card {
    padding: 20px;
  }
  .page-login__feature-image {
    height: 180px;
  }
  .page-login__card-title {
    font-size: 1.3em;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-login__btn-submit,
  .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__faq-question {
    padding: 15px;
  }
  .page-login__faq-question h3 {
    font-size: 1em;
  }
  .page-login__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  .page-login__faq-answer {
    padding: 0 15px;
  }
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px !important;
  }
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-login__section,
  .page-login__card,
  .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__login-form-container {
    padding: 20px;
  }
}