/* style/login.css */

/* Variables from shared.css */
/* --primary-color: #26A9E0; */
/* --secondary-color: #FFFFFF; */
/* --text-color-dark: #333333; */
/* --text-color-light: #FFFFFF; */
/* --background-color: #FFFFFF; (Assumed light background for body) */
/* --header-offset: var from shared.css */

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

/* Hero/Login Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Primary color gradient */
  color: var(--text-color-dark, #333333); /* Text color for mixed background */
}

.page-login__hero-container {
  position: relative;
  max-width: 1000px;
  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;
}

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

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -80px; /* Overlap with image for visual appeal */
}

.page-login__main-title {
  font-size: 38px;
  color: var(--primary-color, #26A9E0);
  margin-bottom: 20px;
  font-weight: 700;
}

.page-login__description {
  font-size: 18px;
  color: var(--text-color-dark, #333333);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 20px;
  text-align: left;
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

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

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

.page-login__remember-me {
  display: flex;
  align-items: center;
}

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color, #26A9E0);
}

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

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

.page-login__forgot-password:hover {
  color: #1a7bbd; /* Slightly darker primary color */
  text-decoration: underline;
}

.page-login__submit-button,
.page-login__register-button {
  display: inline-block;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.page-login__btn-primary {
  background: #EA7C07; /* Custom login color */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-login__btn-primary:hover {
  background: #d66f06; /* Slightly darker */
  box-shadow: 0 6px 15px rgba(234, 124, 7, 0.3);
  transform: translateY(-2px);
}

.page-login__register-prompt {
  font-size: 16px;
  color: var(--text-color-dark, #333333);
  margin-top: 20px;
}

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

.page-login__register-link:hover {
  color: #1a7bbd;
  text-decoration: underline;
}

/* General Section Styling */
.page-login__section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  color: var(--primary-color, #26A9E0);
}

.page-login__section-description {
  font-size: 17px;
  line-height: 1.7;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-color-dark, #333333);
}

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

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 0;
  background: var(--background-color, #FFFFFF); /* Light background */
}

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

.page-login__benefit-item {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__benefit-item img {
  width: 100%;
  max-width: 400px; /* Ensure images are not too small */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-login__benefit-title {
  font-size: 24px;
  color: var(--primary-color, #26A9E0);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__benefit-text {
  font-size: 16px;
  color: var(--text-color-dark, #333333);
}

/* Security Section */
.page-login__security-section {
  padding: 80px 0;
  background: var(--primary-color, #26A9E0); /* Dark background */
  color: var(--text-color-light, #FFFFFF);
}

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

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

.page-login__feature-item {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for contrast */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-login__feature-item img {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  object-fit: contain; /* Ensure the image fits without cropping */
}

.page-login__feature-title {
  font-size: 22px;
  color: var(--text-color-light, #FFFFFF);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-login__feature-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.page-login__privacy-link {
  display: inline-block;
  margin-top: 40px;
  color: var(--text-color-light, #FFFFFF);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__privacy-link:hover {
  color: #f0f0f0;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background: var(--background-color, #FFFFFF); /* Light background */
}

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

/* FAQ container style */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.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 25px; /* Adjust padding for better look */
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height to ensure expansion */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important to ensure priority, value large enough to accommodate any content */
  padding: 20px 25px !important; /* Adjust padding for better look */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: var(--text-color-dark, #333333);
}

/* Question style */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px; /* Adjust padding for better look */
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  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;
}

/* Question title style */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
  color: var(--primary-color, #26A9E0);
}

/* Toggle icon */
.page-login__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color, #26A9E0);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Larger toggle area */
  height: 30px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: #d66f06; /* Change color when active */
  transform: rotate(45deg); /* Optional: rotate for 'x' effect if using '+' */
}

/* CTA Register Section */
.page-login__cta-register {
  padding: 80px 0;
  background: var(--primary-color, #26A9E0); /* Dark background */
  color: var(--text-color-light, #FFFFFF);
  text-align: center;
}

.page-login__cta-register .page-login__section-title,
.page-login__cta-register .page-login__section-description {
  color: var(--text-color-light, #FFFFFF);
}

.page-login__cta-content {
  max-width: 800px;
}

.page-login__btn-secondary {
  background: var(--secondary-color, #FFFFFF);
  color: var(--primary-color, #26A9E0);
  border: 2px solid var(--primary-color, #26A9E0);
  margin-top: 30px;
  max-width: 300px; /* Limit button width */
  margin-left: auto;
  margin-right: auto;
}

.page-login__btn-secondary:hover {
  background: #e0e0e0;
  color: #1a7bbd;
  border-color: #1a7bbd;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 32px;
  }
  .page-login__description {
    font-size: 16px;
  }
  .page-login__hero-content {
    padding: 30px;
  }
  .page-login__section-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__hero-image img {
    border-radius: 8px;
  }

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

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

  .page-login__description {
    font-size: 15px;
    margin-bottom: 25px;
  }

  .page-login__form {
    max-width: 100%;
  }

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

  .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,
  .page-login__register-button,
  .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;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 16px;
  }

  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-login__section-title {
    font-size: 24px;
  }

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

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

  .page-login__benefits-grid,
  .page-login__security-features {
    grid-template-columns: 1fr;
  }

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

  .page-login__benefit-title {
    font-size: 20px;
  }

  .page-login__feature-title {
    font-size: 18px;
  }

  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* FAQ mobile specific styles */
  .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;
  }
}