/* style/login.css */

/* Base styles for page-login */
.page-login {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #F5F7FA; /* Body background from shared.css */
  line-height: 1.6;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.page-login__section-title {
  font-size: 2.5em;
  color: #E53935; /* Main brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-login__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
}

/* Hero Section */
.page-login__hero-section {
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding-top: 10px; /* Small top padding, not --header-offset */
  padding-bottom: 40px;
  background-color: #F5F7FA;
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Max width for the image */
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-login__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 15px;
}

.page-login__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: #E53935;
  margin-bottom: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.page-login__description {
  font-size: 1.2em;
  color: #333333;
  margin-bottom: 30px;
}

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

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* For mobile button responsiveness */
  box-sizing: border-box; /* For mobile button responsiveness */
  white-space: normal; /* For mobile button responsiveness */
  word-wrap: break-word; /* For mobile button responsiveness */
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Custom button color */
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
}

.page-login__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935; /* Custom border color */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-login__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.2);
}

/* Login Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: #F5F7FA; /* Background color from custom config */
}

.page-login__form-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff; /* Card BG from custom config */
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

.page-login__login-image-container {
  flex: 1;
  min-width: 300px;
}

.page-login__login-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-login__login-form {
  flex: 1;
  min-width: 300px;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333333; /* Text Main from custom config */
  font-size: 1.1em;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #E0E0E0; /* Border from custom config */
  border-radius: 5px;
  font-size: 1em;
  color: #333333;
  box-sizing: border-box;
}

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

.page-login__form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.page-login__forgot-password {
  color: #E53935;
  text-decoration: none;
  font-size: 0.95em;
}

.page-login__forgot-password:hover {
  text-decoration: underline;
}

.page-login__login-submit {
  width: 100%;
  border: none;
  font-size: 1.2em;
  padding: 15px;
}

.page-login__no-account-text {
  text-align: center;
  margin-top: 20px;
  font-size: 1em;
  color: #333333;
}

.page-login__register-link {
  color: #E53935;
  text-decoration: none;
  font-weight: bold;
}

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

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  background-color: #E53935; /* Dark background */
  color: #ffffff; /* White text for dark background */
}

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

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

.page-login__benefit-card {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark bg */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__benefit-title {
  font-size: 1.4em;
  color: #FF5A4F; /* Auxiliary color for sub-titles */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__benefit-text {
  font-size: 1em;
  color: #f0f0f0;
}

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

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

.page-login__security-image-container {
  flex: 1;
  min-width: 300px;
}

.page-login__security-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-login__security-list {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-login__security-item {
  background: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-login__security-item:last-child {
  margin-bottom: 0;
}

.page-login__security-feature-title {
  font-size: 1.3em;
  color: #E53935;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-login__security-feature-text {
  font-size: 1em;
  color: #333333;
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
  padding: 60px 0;
  background-color: #FF5A4F; /* Medium background */
  color: #ffffff; /* White text for medium background */
}

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

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

.page-login__troubleshooting-card {
  background: rgba(255, 255, 255, 0.95); /* Slightly transparent white on medium bg */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-login__troubleshooting-card .page-login__card-title {
  font-size: 1.4em;
  color: #E53935;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__troubleshooting-card .page-login__card-text {
  font-size: 1em;
  color: #333333;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* CTA Section */
.page-login__cta-section {
  display: flex;
  align-items: center;
  padding: 60px 0;
  background-color: #E53935; /* Dark background */
  color: #ffffff;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.page-login__cta-content {
  flex: 1;
  text-align: left;
  z-index: 1;
}

.page-login__cta-section .page-login__section-title,
.page-login__cta-section .page-login__section-description {
  color: #ffffff;
  text-align: left;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.page-login__cta-buttons-bottom {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-login__cta-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  z-index: 1;
  min-width: 300px;
}

.page-login__cta-image {
  width: 100%;
  max-width: 600px; /* Adjust as needed */
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

.page-login__faq-item {
  background: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-login__faq-item summary {
  display: block; /* For details tag */
  cursor: pointer;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  position: relative;
  list-style: none; /* Hide default marker */
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg); /* Change to X when open */
}

.page-login__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555555;
  line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-login__container {
    padding: 20px 30px;
  }

  .page-login__form-wrapper {
    flex-direction: column;
    padding: 30px;
  }

  .page-login__login-image-container,
  .page-login__login-form {
    min-width: unset;
    width: 100%;
  }

  .page-login__security-content {
    flex-direction: column;
  }

  .page-login__security-image-container {
    width: 100%;
  }

  .page-login__cta-section {
    flex-direction: column;
    text-align: center;
  }

  .page-login__cta-content {
    text-align: center;
  }

  .page-login__cta-section .page-login__section-title,
  .page-login__cta-section .page-login__section-description {
    text-align: center;
  }

  .page-login__cta-buttons-bottom {
    justify-content: center;
  }

  .page-login__cta-image-wrapper {
    justify-content: center;
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .page-login__container {
    padding: 15px;
  }

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

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

  /* Hero Section */
  .page-login__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 20px;
  }

  .page-login__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-login__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    margin-bottom: 10px;
  }

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

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to container */
  }

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

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

  .page-login__form-wrapper {
    padding: 20px;
    gap: 20px;
  }

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

  .page-login__form-label {
    font-size: 1em;
  }

  .page-login__login-submit {
    font-size: 1.1em;
    padding: 12px;
  }

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

  .page-login__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__benefit-card {
    padding: 20px;
  }

  .page-login__benefit-title {
    font-size: 1.2em;
  }

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

  .page-login__security-content {
    gap: 20px;
  }

  .page-login__security-item {
    padding: 20px;
    margin-bottom: 15px;
  }

  .page-login__security-feature-title {
    font-size: 1.1em;
  }

  /* Troubleshooting Section */
  .page-login__troubleshooting-section {
    padding: 40px 0;
  }

  .page-login__troubleshooting-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__troubleshooting-card {
    padding: 20px;
  }

  .page-login__troubleshooting-card .page-login__card-title {
    font-size: 1.2em;
  }

  /* CTA Section */
  .page-login__cta-section {
    padding: 40px 0;
    gap: 20px;
  }

  .page-login__cta-buttons-bottom {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to container */
  }

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

  .page-login__faq-list {
    margin-top: 30px;
  }

  .page-login__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-login__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* General image responsiveness for mobile */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__hero-image,
  .page-login__login-image,
  .page-login__security-image,
  .page-login__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure containers for images and buttons also respect max-width */
  .page-login__hero-section,
  .page-login__form-section,
  .page-login__benefits-section,
  .page-login__security-section,
  .page-login__troubleshooting-section,
  .page-login__cta-section,
  .page-login__faq-section,
  .page-login__container,
  .page-login__form-wrapper,
  .page-login__cta-content,
  .page-login__cta-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Color Contrast Fixes (as per instruction) */
.page-login__dark-bg {
  background: #E53935;
  color: #ffffff;
}

.page-login__light-bg {
  background: #F5F7FA; /* Custom background color */
  color: #333333;
}

.page-login__medium-bg {
  background: #FF5A4F;
  color: #ffffff; /* Default to white for medium bright background */
}

/* Specific text elements for color contrast */
.page-login p,
.page-login li,
.page-login__form-label,
.page-login__no-account-text {
  color: #333333;
}

.page-login__benefits-section p,
.page-login__benefits-section li,
.page-login__troubleshooting-section p,
.page-login__troubleshooting-section li,
.page-login__cta-section p,
.page-login__cta-section li {
  color: #f0f0f0; /* Lighter text on dark/medium backgrounds */
}