/* style/login.css */

/* Root variables for consistent colors */
:root {
  --primary-color: #017439; /* Main brand green */
  --secondary-color: #FFFFFF; /* Auxiliary white */
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --button-login-bg: #C30808;
  --button-login-text: #FFFF00;
  --border-color: #e0e0e0;
}

.page-login {
  font-family: Arial, sans-serif;
  color: var(--text-dark); /* Default text color for light backgrounds */
  line-height: 1.6;
}

/* Fixed header spacing - applied to the main content area */
.page-login {
  padding-top: var(--header-offset, 120px);
}

/* 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;
  background-color: var(--primary-color); /* Use primary color as a base for hero */
  color: var(--text-light); /* Light text on dark background */
}

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

.page-login__hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-bottom: 30px;
}

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

.page-login__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__hero-cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-login-bg); /* Use specific login button color */
  color: var(--button-login-text); /* Use specific login button text color */
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for mobile responsiveness */
}

.page-login__hero-cta-button:hover {
  background: #A60707; /* Slightly darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__hero-image {
  width: 100%;
  max-width: 1000px; /* Limit hero image width */
}

.page-login__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* General Container */
.page-login__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section Titles */
.page-login__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-login__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--button-login-bg);
  border-radius: 2px;
}

/* Light Background Sections */
.page-login__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

/* Dark Background Sections */
.page-login__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}
.page-login__dark-bg .page-login__section-title {
  color: var(--text-light);
}
.page-login__dark-bg .page-login__section-title::after {
  background-color: var(--button-login-text); /* Yellow line on dark green */
}


/* Login Form Section */
.page-login__form-section {
  padding: 60px 0;
}

.page-login__login-form {
  background: var(--secondary-color);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
  outline: none;
}

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

.page-login__checkbox-container {
  display: block;
  position: relative;
  padding-left: 30px;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  color: var(--text-dark);
}

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

.page-login__checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.page-login__checkbox-container input:checked ~ .page-login__checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

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

.page-login__forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  text-decoration: underline;
  color: #016532; /* Darker green on hover */
}

.page-login__btn-submit {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--button-login-bg);
  color: var(--button-login-text);
  border: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  text-decoration: none; /* Ensure it looks like a button */
  box-sizing: border-box; /* Crucial for mobile responsiveness */
}

.page-login__btn-submit:hover {
  background: #A60707; /* Darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__register-prompt {
  text-align: center;
  margin-top: 25px;
  color: var(--text-dark);
}

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

.page-login__register-link:hover {
  text-decoration: underline;
  color: #016532; /* Darker green on hover */
}

/* Security Section */
.page-login__security-section {
  padding: 60px 0;
}

.page-login__security-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-login__security-image {
  flex: 1;
  min-width: 300px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.page-login__security-text {
  flex: 2;
  color: var(--text-light);
}

.page-login__security-text p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.page-login__security-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-login__security-text li {
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
  font-size: 1em;
}

.page-login__security-text li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--button-login-text); /* Yellow checkmark */
  font-weight: bold;
}

/* Support Section */
.page-login__support-section {
  padding: 60px 0;
}

.page-login__support-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap-reverse; /* Image on right, text on left for desktop */
}

.page-login__support-image {
  flex: 1;
  min-width: 300px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.page-login__support-text {
  flex: 2;
}

.page-login__support-text p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.page-login__support-text ul {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-login__support-text li {
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
  font-size: 1em;
}

.page-login__support-text li::before {
  content: '📞'; /* Phone emoji or similar for contact */
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.page-login__btn-support {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

.page-login__btn-support:hover {
  background: #016532; /* Darker green on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--secondary-color);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  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;
}

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

.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(--button-login-bg); /* Red for active toggle */
  transform: rotate(45deg); /* Plus to X effect */
}

.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 20px;
  opacity: 0;
  color: var(--text-dark);
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: #f9f9f9; /* Slightly off-white for answers */
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

/* Register Promotion Section */
.page-login__register-promo-section {
  padding: 60px 0;
  text-align: center;
}

.page-login__register-promo-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  color: var(--text-light);
}

.page-login__register-promo-text {
  color: var(--text-light);
}

.page-login__register-promo-text h2 {
  color: var(--text-light);
}
.page-login__register-promo-text p {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-login__register-promo-image {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-login__btn-register {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-login-bg);
  color: var(--button-login-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

.page-login__btn-register:hover {
  background: #A60707; /* Darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__hero-content h1 {
    font-size: 2.8em;
  }
  .page-login__section-title {
    font-size: 2em;
  }
  .page-login__security-content,
  .page-login__support-content {
    flex-direction: column;
    text-align: center;
  }
  .page-login__security-image,
  .page-login__support-image {
    order: -1; /* Image first on mobile */
  }
  .page-login__security-text ul,
  .page-login__support-text ul {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .page-login {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-login__hero-section {
    padding: 40px 15px;
  }
  .page-login__hero-content h1 {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-login__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-login__hero-cta-button,
  .page-login__btn-submit,
  .page-login__btn-register {
    padding: 12px 25px;
    font-size: 1.1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__container {
    padding: 20px 15px;
  }

  .page-login__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-login__section-title::after {
    width: 60px;
    height: 3px;
  }

  .page-login__login-form {
    padding: 25px;
  }
  .page-login__form-group {
    margin-bottom: 20px;
  }
  .page-login__form-label {
    font-size: 1em;
  }
  .page-login__form-input {
    padding: 12px;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 25px;
  }
  .page-login__checkbox-container {
    margin-bottom: 15px;
  }
  .page-login__forgot-password {
    align-self: flex-end;
  }

  .page-login__security-section,
  .page-login__support-section,
  .page-login__faq-section,
  .page-login__register-promo-section {
    padding: 40px 0;
  }

  .page-login__security-content,
  .page-login__support-content,
  .page-login__register-promo-content {
    gap: 20px;
  }
  
  .page-login__security-text,
  .page-login__support-text,
  .page-login__register-promo-text {
    padding: 0 10px; /* Add some horizontal padding to text blocks */
  }

  .page-login__security-image,
  .page-login__support-image,
  .page-login__register-promo-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
  }
  
  /* Ensure all images are responsive */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-login__faq-item {
    margin-bottom: 10px;
  }
  .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-item.active .page-login__faq-answer {
    padding: 15px !important;
  }
  
  /* All containers containing images or buttons */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__hero-container,
  .page-login__security-content,
  .page-login__support-content,
  .page-login__register-promo-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
  
  /* Specific for security/support sections images to ensure they don't cause overflow */
  .page-login__security-content img,
  .page-login__support-content img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Buttons in general */
  .page-login__hero-cta-button,
  .page-login__btn-submit,
  .page-login__btn-support,
  .page-login__btn-register,
  .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;
  }
}