/* style/login.css */

/* Global styles for the login page */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text color for light background */
  background-color: #ffffff; /* Body background is white */
}

/* 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: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
  background: #f9f9f9; /* Light background for hero section */
  color: #333333;
}

.page-login__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-login__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 500px; /* Limit form width */
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-login__main-title {
  font-size: 32px;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-login__description {
  font-size: 16px;
  color: #555555;
  margin-bottom: 30px;
}

/* Login Form */
.page-login__form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.page-login__form-group {
  text-align: left;
}

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

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

.page-login__input:focus {
  border-color: #017439;
  outline: none;
  box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
}

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

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

.page-login__checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.page-login__label-checkbox {
  color: #555555;
  cursor: pointer;
}

.page-login__forgot-password {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-login__btn-submit {
  background-color: #C30808; /* Custom color for login button */
  color: #FFFFFF; /* Ensures WCAG AA contrast (4.56:1) */
  padding: 15px 25px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.page-login__btn-submit:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-login__no-account {
  margin-top: 20px;
  font-size: 15px;
  color: #555555;
}

.page-login__btn-register {
  display: inline-block;
  margin-top: 10px;
  background-color: #C30808; /* Custom color for register button */
  color: #FFFFFF; /* Ensures WCAG AA contrast */
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-login__btn-register:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

/* General Section Styles */
.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-login__section-title {
  font-size: 28px;
  margin-bottom: 15px;
  text-align: center;
  color: #017439;
}

.page-login__section-description {
  font-size: 16px;
  color: #555555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-login__benefits-section .page-login__section-title {
  color: #ffffff;
}

.page-login__benefits-section .page-login__section-description {
  color: #f0f0f0;
}

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

.page-login__benefit-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-login__benefit-item img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.page-login__benefit-title {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-login__benefit-text {
  font-size: 15px;
  color: #f0f0f0;
}

/* Security Section */
.page-login__security-section {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

.page-login__security-content {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-login__security-text {
  flex: 1;
}

.page-login__security-subtitle {
  font-size: 22px;
  color: #017439;
  margin-top: 25px;
  margin-bottom: 10px;
}

.page-login__security-text p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 15px;
}

.page-login__security-image {
  flex: 1;
  text-align: center;
}

.page-login__security-image img {
  width: 100%;
  height: auto;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.page-login__security-action {
  text-align: center;
  margin-top: 50px;
}

.page-login__security-action p {
  font-size: 18px;
  color: #333333;
  margin-bottom: 20px;
}

.page-login__btn-support {
  display: inline-block;
  background-color: #017439;
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-login__btn-support:hover {
  background-color: #00562e;
  transform: translateY(-2px);
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-login__troubleshooting-section .page-login__section-title {
  color: #ffffff;
}

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

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

.page-login__trouble-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-login__trouble-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-login__trouble-item img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.page-login__trouble-title {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-login__trouble-item p {
  font-size: 15px;
  color: #f0f0f0;
  margin-bottom: 20px;
}

.page-login__trouble-link {
  display: inline-block;
  background-color: #C30808;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-login__trouble-link:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

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

/* FAQ container styles */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ default state - answer hidden */
.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, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough for any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  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;
}

/* Question title styles */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: #333333;
}

/* Toggle icon */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: #333;
}

.page-login__faq-answer p {
  color: #555555;
  margin-bottom: 15px;
}

.page-login__faq-register-btn {
  display: inline-block;
  background-color: #C30808;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-login__faq-register-btn:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-login__faq-image-container {
  text-align: center;
  margin-top: 50px;
}

.page-login__faq-image-container img {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-login__main-title {
    font-size: 28px;
  }
  .page-login__benefits-grid,
  .page-login__troubleshooting-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-login__security-content {
    flex-direction: column;
  }
  .page-login__security-image {
    order: -1; /* Image above text on smaller screens */
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__hero-image img {
    border-radius: 4px;
  }
  .page-login__hero-content {
    padding: 25px;
  }
  .page-login__main-title {
    font-size: 24px;
    margin-bottom: 15px;
  }
  .page-login__description {
    font-size: 15px;
    margin-bottom: 25px;
  }
  .page-login__btn-submit,
  .page-login__btn-register,
  .page-login__btn-support,
  .page-login__trouble-link,
  .page-login__faq-register-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__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-login__container {
    padding: 30px 15px;
  }
  .page-login__section-title {
    font-size: 24px;
    margin-bottom: 10px;
  }
  .page-login__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-login__benefit-item img,
  .page-login__security-image img,
  .page-login__trouble-item img,
  .page-login__faq-image-container img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-login__security-subtitle {
    font-size: 20px;
  }
  .page-login__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-login__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-login__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-login__faq-answer {
    padding: 0 15px;
  }
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px !important;
  }
}