/* style/login.css */

/* Variables - using custom colors */
:root {
  --primary-color: #26A9E0;
  --primary-color-darker: #218CBF; /* Darker shade for hover */
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07; /* Custom color for Login */
  --login-button-color-darker: #C26606; /* Darker shade for hover */
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --background-light: #FFFFFF; /* Custom background */
  --background-dark: #26A9E0; /* Using primary color for dark sections */
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --header-offset: 120px; /* Fallback for header offset */
}

.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light background */
  background: var(--background-light); /* Default page background */
  padding-top: var(--header-offset); /* Fixed header offset from shared.css */
}

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

.page-login__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* 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: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-color-light); /* Text on primary color background */
  overflow: hidden; /* Ensure no overflow */
  padding-top: 0; /* Already handled by .page-login, reset for section */
}

.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;
  max-width: 800px; /* Constrain image width */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

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

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 600px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  margin-top: -80px; /* Overlap with image slightly */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__main-title {
  font-size: 3em;
  margin-bottom: 15px;
  color: var(--text-color-light);
  line-height: 1.2;
}

.page-login__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-color-light);
}

.page-login__login-form-wrapper {
  background: var(--background-light);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 20px var(--shadow-color);
  width: 100%;
  max-width: 450px;
  margin: 30px auto 0;
  text-align: left;
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
}

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

.page-login__form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
}

.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

.page-login__cta-button:hover {
  background: var(--primary-color-darker);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__btn-login {
  background: var(--login-button-color); /* Specific login button color */
}

.page-login__btn-login:hover {
  background: var(--login-button-color-darker);
}

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

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

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

.page-login__register-link {
  color: var(--login-button-color); /* Use login button color for register link */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

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

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

.page-login__benefit-card {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-login__benefit-card img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-login__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__benefit-card p {
  font-size: 1em;
  color: var(--text-color-dark);
}

/* Security Section */
.page-login__security-section {
  padding: 80px 0;
  background: var(--background-dark); /* Using primary color as dark background */
  color: var(--text-color-light);
}

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

.page-login__security-section .page-login__section-description {
  color: var(--text-color-light);
}

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

.page-login__security-item {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__security-item:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
}

.page-login__security-item img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-login__security-item .page-login__card-title {
  color: var(--text-color-light);
}

.page-login__security-item p {
  color: var(--text-color-light);
}

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

.page-login__troubleshooting-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 40px;
}

.page-login__step-item {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  border: 1px solid var(--border-color);
}

.page-login__step-title {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__step-item p {
  font-size: 1em;
  margin-bottom: 20px;
  color: var(--text-color-dark);
}

.page-login__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.page-login__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-login__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--text-color-light);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.page-login__btn-primary:hover {
  background: var(--primary-color-darker);
  border-color: var(--primary-color-darker);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* CTA Register Section */
.page-login__cta-register-section {
  padding: 80px 0;
  background: var(--background-dark);
  color: var(--text-color-light);
  text-align: center;
}

.page-login__cta-register-content {
  max-width: 800px;
  margin: 0 auto;
}

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

.page-login__cta-register-section .page-login__section-description {
  color: var(--text-color-light);
  margin-bottom: 30px;
}

.page-login__btn-register {
  background: var(--login-button-color); /* Use login button color for register CTA */
}

.page-login__btn-register:hover {
  background: var(--login-button-color-darker);
}

.page-login__small-text {
  font-size: 0.9em;
  margin-top: 20px;
  opacity: 0.8;
  color: var(--text-color-light);
}

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

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

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

.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; /* Lighter background for answer */
  color: var(--text-color-dark);
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border-bottom: 1px solid var(--border-color); /* Separator for questions */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-color-dark);
}

.page-login__faq-item.active .page-login__faq-question {
  border-bottom-color: transparent; /* No border when active */
  background: #f5f5f5;
}

.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;
  pointer-events: none;
  color: var(--primary-color);
}

.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(--primary-color-darker);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


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

  .page-login__container {
    padding: 15px;
  }

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

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

  .page-login__hero-section {
    padding: 40px 15px;
  }

  .page-login__hero-image {
    margin-bottom: 20px;
    border-radius: 8px;
  }
  
  .page-login__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-login__hero-content {
    padding: 15px;
    margin-top: -60px;
  }

  .page-login__main-title {
    font-size: 2em;
  }

  .page-login__description {
    font-size: 1em;
  }

  .page-login__login-form-wrapper {
    padding: 20px;
    max-width: 100%;
    margin-top: 20px;
  }

  .page-login__form-input {
    padding: 10px 12px;
    font-size: 0.95em;
  }

  .page-login__form-actions {
    flex-direction: column;
    gap: 10px;
  }
}