:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f4f4f4; /* From shared.css body */
  --border-color: #e0e0e0;
}

.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light background */
  line-height: 1.6;
  padding-bottom: 60px; /* Add some padding at the bottom for aesthetic */
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* 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: var(--secondary-color); /* Dark red background for hero */
  color: var(--text-light); /* White text on dark red background */
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-login__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2; /* Ensure content is above image if layered */
}

.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;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  filter: none !important;
}

.page-login__hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  width: 100%;
}

.page-login__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--primary-color); /* Gold title on dark red background */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-login__intro-text {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px;
  color: var(--text-light);
}

/* CTA Button */
.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px; /* Pill shape */
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__cta-button:hover {
  background: #e6c200; /* Darken primary color */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-login__section-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  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: var(--primary-color);
  border-radius: 2px;
}

.page-login__section-title--light {
  color: var(--text-light);
}

.page-login__section-title--light::after {
  background: var(--text-light);
}

/* Form Section */
.page-login__form-section {
  padding: 80px 0;
  background: var(--background-light); /* Light background for form */
  color: var(--text-dark);
}

.page-login__login-form {
  background: var(--text-light);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  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(255, 215, 0, 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__remember-me {
  display: flex;
  align-items: center;
}

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color); /* Style checkbox with brand color */
}

.page-login__checkbox-label {
  color: var(--text-dark);
}

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

.page-login__forgot-password:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-login__submit-button {
  width: 100%;
  padding: 16px;
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 8px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__submit-button:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-login__register-prompt {
  text-align: center;
  margin-top: 30px;
  font-size: 1em;
  color: var(--text-dark);
}

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

.page-login__register-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

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

.page-login__feature-item {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark red */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__feature-icon {
  font-size: 3em;
  color: var(--primary-color); /* Gold icon */
  margin-bottom: 20px;
  display: block; /* For image icons */
  max-width: 100%; /* Ensure images are responsive */
  height: auto;
  margin-left: auto;
  margin-right: auto;
  filter: none !important;
}

.page-login__feature-icon--fast,
.page-login__feature-icon--support {
  font-size: 3em; /* For emoji icons */
}

.page-login__feature-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: var(--primary-color); /* Gold title */
  font-weight: 700;
}

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

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

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

.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.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;
  background: #f9f9f9; /* Slightly darker than body background */
  color: var(--text-dark);
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* Ensure enough space for content */
  padding: 20px 15px !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: var(--text-light); /* White background for question */
  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;
  color: var(--text-dark);
  pointer-events: none;
}

.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-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 for 'x' effect */
}

/* CTA Section at bottom */
.page-login__cta-section {
  padding: 80px 0;
  background: var(--primary-color); /* Gold background for final CTA */
  color: var(--text-dark);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-login__cta-content {
  position: relative;
  z-index: 2;
}

.page-login__cta-section .page-login__section-title {
  color: var(--text-dark); /* Dark text on gold */
}

.page-login__cta-section .page-login__section-title::after {
  background: var(--text-dark);
}

.page-login__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-dark);
}

.page-login__btn-secondary {
  background: var(--secondary-color); /* Dark red button on gold background */
  color: var(--text-light);
  border-radius: 50px;
  padding: 15px 40px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-secondary:hover {
  background: #a30000; /* Lighten secondary color */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-login__cta-image {
  position: absolute;
  bottom: 0;
  right: 0;
  opacity: 0.2;
  width: 400px; /* Example size, will be responsive */
  height: auto;
  z-index: 1;
  pointer-events: none;
  filter: none !important;
}


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

@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-image {
    margin-bottom: 20px;
  }
  
  .page-login__hero-image img {
    border-radius: 4px;
  }

  .page-login__hero-content {
    padding: 0 15px;
  }

  .page-login__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

  .page-login__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    width: 100% !important; /* Ensure buttons are full width */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    border-radius: 30px;
  }

  .page-login__form-section,
  .page-login__features-section,
  .page-login__faq-section,
  .page-login__cta-section {
    padding: 50px 0;
  }

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

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

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

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

  .page-login__form-input {
    padding: 12px 15px;
  }

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

  .page-login__forgot-password {
    margin-top: 10px;
  }

  .page-login__submit-button {
    padding: 14px;
    font-size: 1.05em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__register-prompt {
    margin-top: 20px;
  }

  .page-login__features-grid {
    grid-template-columns: 1fr;
  }

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

  .page-login__feature-title {
    font-size: 1.4em;
  }

  .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;
  }

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

  .page-login__btn-secondary {
    padding: 12px 30px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* All images in content area must be responsive and not overflow */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
    filter: none !important;
  }

  .page-login__hero-image img,
  .page-login__feature-icon img,
  .page-login__cta-image {
    max-width: 100% !important;
    height: auto !important;
  }

  .page-login__cta-image {
    position: relative; /* Adjust position for mobile */
    opacity: 0.1;
    margin-top: 30px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Ensure containers do not cause horizontal scroll */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-section,
  .page-login__features-section,
  .page-login__faq-section,
  .page-login__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}