/* style/login.css */

/* --- Base Styles & Variables --- */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-on-dark: #ffffff;
  --text-on-light: #333333;
  --dark-bg-color: #1a1a2e; /* From body background in shared.css */
  --light-bg-color: #f8f9fa;
  --border-color: rgba(255, 255, 255, 0.1);
}

.page-login {
  color: var(--text-on-dark); /* Ensure light text on dark body background */
  background-color: var(--dark-bg-color); /* Explicitly set to match body if needed, but body takes care of it */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 60px; /* Add some padding at the bottom */
}

/* --- Utility Classes --- */
.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Add horizontal padding for smaller screens */
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: 2.5em; /* Using em to allow relative sizing */
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-on-dark); /* Light text for titles on dark background */
  line-height: 1.2;
}

.page-login__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.8); /* Slightly less prominent text */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Hero Section --- */
.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding as body handles --header-offset */
  overflow: hidden; /* Ensure no overflow */
}

.page-login__hero-image-wrapper {
  width: 100%;
  position: relative;
  margin-bottom: 40px; /* Space between image and content */
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  max-width: 1200px; /* Constrain image width */
  margin: 0 auto; /* Center the image */
}

.page-login__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 15px; /* Add padding for smaller screens */
  box-sizing: border-box;
}

.page-login__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
  font-weight: 800;
  color: var(--secondary-color); /* White for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-login__hero-description {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__submit-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

.page-login__btn-primary,
.page-login__submit-button {
  background-color: var(--login-button-color); /* Orange for primary/login */
  color: var(--secondary-color); /* White text */
  border: 2px solid var(--login-button-color);
}

.page-login__btn-primary:hover,
.page-login__submit-button:hover {
  background-color: #e06c00; /* Darken on hover */
  border-color: #e06c00;
}

.page-login__btn-secondary {
  background-color: transparent;
  color: var(--primary-color); /* Blue for secondary */
  border: 2px solid var(--primary-color);
}

.page-login__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* --- Login Form Section --- */
.page-login__form-section {
  padding: 80px 0;
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for the form section */
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-login__login-form {
  max-width: 500px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.1); /* Form background */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--secondary-color);
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.3); /* Darker input background */
  color: var(--secondary-color);
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.page-login__form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.page-login__form-input:focus {
  border-color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.5);
  outline: none;
}

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

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

.page-login__checkbox {
  margin-right: 10px;
  accent-color: var(--primary-color); /* Highlight checkbox with primary color */
}

.page-login__checkbox-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95em;
}

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

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

.page-login__no-account-text {
  text-align: center;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.8);
}

.page-login__register-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

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

/* --- Features Section --- */
.page-login__features-section {
  padding: 80px 0;
}

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

.page-login__feature-card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter card background */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__feature-icon {
  width: 100%; /* Ensure images are responsive within card */
  height: auto;
  max-width: 400px; /* Max width for feature images */
  margin-bottom: 20px;
  border-radius: 8px;
  display: block; /* Ensure block display for proper centering */
  margin-left: auto;
  margin-right: auto;
}

.page-login__feature-title {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-login__feature-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95em;
}

/* --- Promotion CTA Section --- */
.page-login__promotion-cta {
  padding: 80px 0;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.05);
  border-top: 1px solid var(--border-color);
}

.page-login__promo-image {
  width: 100%;
  height: auto;
  max-width: 1000px;
  margin: 0 auto 40px auto;
  border-radius: 10px;
  display: block;
  object-fit: cover;
}

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

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

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

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--secondary-color);
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
  user-select: none;
}

.page-login__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

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

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to a cross */
}

.page-login__faq-answer {
  padding: 0 25px 20px 25px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1em;
  line-height: 1.6;
  max-height: 0; /* For JS-controlled collapse */
  overflow: hidden; /* For JS-controlled collapse */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-login__faq-item[open] .page-login__faq-answer {
  max-height: 500px; /* Sufficient height for content */
  padding-top: 15px;
  transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

/* Fix for details tag default styling */
.page-login__faq-item summary {
  list-style: none;
}
.page-login__faq-item summary::-webkit-details-marker {
  display: none;
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }
}

@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-login__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* body already handles --header-offset */
  }

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

  .page-login__hero-description {
    font-size: 1em;
  }

  .page-login__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__submit-button {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__form-section,
  .page-login__features-section,
  .page-login__promotion-cta,
  .page-login__faq-section {
    padding: 40px 0;
  }

  .page-login__login-form {
    padding: 30px 20px;
  }

  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-login__features-grid {
    grid-template-columns: 1fr; /* Single column for features */
  }

  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile container responsiveness */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__hero-section,
  .page-login__form-section,
  .page-login__features-section,
  .page-login__promotion-cta,
  .page-login__faq-section,
  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container,
  .page-login__video-section,
  .page-login__video-container,
  .page-login__video-wrapper { /* Include video specific classes for robustness */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  /* Special handling for video if any, though not explicitly in HTML for this page */
  .page-login video,
  .page-login__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-login__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Ensure contrast for text on various backgrounds */
.page-login__dark-bg {
  color: var(--text-on-dark);
  background: var(--dark-bg-color);
}

.page-login__light-bg {
  color: var(--text-on-light);
  background: var(--light-bg-color);
}

/* Text contrast fix for general paragraphs and list items */
.page-login p,
.page-login li {
  color: rgba(255, 255, 255, 0.8); /* Default light text on dark background */
}

.page-login__hero-content .page-login__hero-description {
  color: rgba(255, 255, 255, 0.9);
}

.page-login__feature-description {
  color: rgba(255, 255, 255, 0.7);
}

.page-login__faq-answer {
  color: rgba(255, 255, 255, 0.7);
}