/* style/login.css */

/* Base styles for the login page */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

.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;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
  padding-bottom: 40px;
  overflow: hidden;
}

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

.page-login__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
  z-index: -1;
}

.page-login__main-title {
  font-size: 3.5em;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__intro-text {
  font-size: 1.3em;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__login-card {
  background: rgba(0, 0, 0, 0.85); /* Darker background for the form itself */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  max-width: 450px;
  margin: 0 auto;
  border: 1px solid #017439;
}

.page-login__card-title {
  font-size: 2em;
  color: #ffffff;
  margin-bottom: 30px;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: #f0f0f0;
  font-weight: bold;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #017439;
  border-radius: 5px;
  background: #222222;
  color: #ffffff;
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: #aaaaaa;
}

.page-login__login-button {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: block;
  text-align: center;
  margin-top: 30px;
  background-color: #C30808; /* Custom login button color */
  color: #FFFFFF; /* Ensures WCAG AA contrast with #C30808 */
}

.page-login__login-button:hover {
  background-color: #a00606;
}

.page-login__form-links {
  margin-top: 20px;
  font-size: 0.95em;
  color: #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-login__form-links a {
  color: #017439; /* Brand color for links */
  text-decoration: none;
}

.page-login__form-links a:hover {
  text-decoration: underline;
}

/* General Section Styling */
.page-login__section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  text-align: center;
  color: #ffffff; /* Default for dark background sections */
}

.page-login__dark-bg {
  background-color: #1a1a1a; /* Dark background for sections */
  color: #ffffff;
}

.page-login__light-bg {
  background-color: #ffffff; /* Light background for sections */
  color: #333333;
}

.page-login__light-bg .page-login__section-title {
  color: #017439;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 0;
}

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

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

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

.page-login__benefit-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
}

.page-login__benefit-description {
  font-size: 1em;
  color: #555555;
}

/* How to Login Section */
.page-login__how-to-login-section {
  padding: 80px 0;
}

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

.page-login__step-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(1, 116, 57, 0.5);
}

.page-login__step-title {
  font-size: 1.6em;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-login__step-description {
  color: #e0e0e0;
}

.page-login__tips-block {
  background: rgba(1, 116, 57, 0.2);
  padding: 30px;
  border-radius: 10px;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #017439;
}

.page-login__tips-title {
  font-size: 1.8em;
  color: #ffffff;
  margin-bottom: 20px;
  text-align: center;
}

.page-login__tips-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-login__tips-block li {
  color: #e0e0e0;
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page-login__tips-block li::before {
  content: '✔️';
  position: absolute;
  left: 0;
  color: #017439;
}

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

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

.page-login__faq-item {
  background: #f8f8f8;
  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: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background: #ffffff;
  color: #017439;
  transition: background-color 0.3s ease;
}

.page-login__faq-question:hover {
  background-color: #f0f0f0;
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 1000px !important; /* Sufficiently large for content */
  padding: 15px 25px;
}

/* Call to Action Section */
.page-login__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #017439; /* Brand color background */
  color: #ffffff;
}

.page-login__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-login__cta-button {
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
}

.page-login__btn-primary {
  background: #C30808; /* Custom button color */
  color: #FFFFFF; /* Ensures WCAG AA contrast with #C30808 */
  border: 2px solid #C30808;
}

.page-login__btn-primary:hover {
  background: #a00606;
  border-color: #a00606;
}

.page-login__btn-secondary {
  background: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-login__btn-secondary:hover {
  background: #f0f0f0;
  border-color: #017439;
}

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

@media (max-width: 768px) {
  .page-login__hero-section {
    min-height: 80vh;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-login__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-login__intro-text {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-login__login-card {
    padding: 30px 20px;
  }
  .page-login__card-title {
    font-size: 1.8em;
  }
  .page-login__form-links {
    flex-direction: column;
    gap: 10px;
  }
  .page-login__section-title {
    font-size: 1.8em;
  }
  .page-login__benefits-grid, .page-login__steps-grid {
    grid-template-columns: 1fr;
  }
  .page-login__benefit-icon {
    height: 150px;
  }
  .page-login__benefit-title {
    font-size: 1.3em;
  }
  .page-login__tips-block, .page-login__faq-list {
    padding: 0 15px;
  }
  .page-login__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-login__faq-answer {
    padding: 0 20px;
  }
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px 20px;
  }
  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-login__cta-button {
    width: 100%;
    max-width: 100% !important; /* Ensure buttons fill width */
  }

  /* Image responsive adaptations */
  .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-section,
  .page-login__benefits-section,
  .page-login__how-to-login-section,
  .page-login__faq-section,
  .page-login__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-login__login-card {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .page-login__main-title {
    font-size: 1.6em;
  }
  .page-login__section-title {
    font-size: 1.5em;
  }
  .page-login__login-card {
    padding: 25px 15px;
  }
  .page-login__card-title {
    font-size: 1.5em;
  }
  .page-login__form-input {
    padding: 10px;
  }
  .page-login__login-button {
    font-size: 1.1em;
    padding: 12px;
  }
  .page-login__faq-question {
    font-size: 1em;
  }
  .page-login__cta-button {
    font-size: 1em;
    padding: 12px 20px;
  }
}