/* style/login.css */

/* Base styles for the login page */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: transparent; /* Body background handled by shared.css */
}

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

.page-login__dark-bg {
  background-color: #1a1a2e; /* Dark background for sections */
  color: #ffffff;
}

.page-login__light-bg {
  background-color: #2a2a3e; /* Slightly lighter dark background for contrast */
  color: #ffffff;
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0;
  text-align: center;
  overflow: hidden;
}

.page-login__hero-image {
  width: 100%;
  height: 675px; /* Fixed height for desktop to maintain aspect ratio */
  object-fit: cover;
  display: block;
  max-width: 100%;
}

.page-login__hero-content {
  position: relative; /* Ensure content is above image if needed, but not overlapping */
  z-index: 1;
  max-width: 800px;
  padding: 40px 20px;
  margin-top: -100px; /* Pull content up slightly over the image's bottom edge */
  background-color: rgba(26, 26, 46, 0.8); /* Semi-transparent background for readability */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #26A9E0;
  margin-bottom: 20px;
}

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

.page-login__login-form-wrapper {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  margin: 0 auto;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #ffffff;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #26A9E0;
  border-radius: 5px;
  background-color: #1a1a2e;
  color: #ffffff;
  font-size: 1em;
  box-sizing: border-box;
}

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

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

.page-login__btn-primary,
.page-login__btn-secondary {
  display: block;
  width: 100%;
  padding: 14px 25px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.page-login__btn-login {
  background-color: #EA7C07; /* Custom login color */
  color: #ffffff;
  border: none;
}

.page-login__btn-login:hover {
  background-color: #d86c00;
  transform: translateY(-2px);
}

.page-login__btn-register {
  background-color: #26A9E0;
  color: #ffffff;
  border: 1px solid #26A9E0;
}

.page-login__btn-register:hover {
  background-color: #1e87c0;
  transform: translateY(-2px);
}

.page-login__forgot-password-link {
  display: block;
  margin-top: 15px;
  color: #26A9E0;
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
  color: #1e87c0;
  text-decoration: underline;
}

/* General Section Styles */
.page-login__section {
  padding: 80px 0;
  text-align: center;
}

.page-login__section-title {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-login__section-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #cccccc;
}

/* Features Grid (Why Login) */
.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.1); /* Slightly transparent white for card background */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.page-login__feature-card:hover {
  transform: translateY(-5px);
}

.page-login__feature-icon {
  width: 100px;
  height: auto;
  margin: 0 auto 20px auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__feature-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-login__feature-text {
  font-size: 1em;
  color: #cccccc;
  flex-grow: 1;
}

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

.page-login__step-item {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.page-login__step-number {
  width: 50px;
  height: 50px;
  background-color: #26A9E0;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-login__step-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-login__step-text {
  color: #cccccc;
}

.page-login__troubleshooting {
  margin-top: 60px;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 10px;
}

.page-login__troubleshooting-title {
  font-size: 1.6em;
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 20px;
}

.page-login__troubleshooting-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-login__troubleshooting-list li {
  margin-bottom: 10px;
  color: #cccccc;
  padding-left: 25px;
  position: relative;
}

.page-login__troubleshooting-list li::before {
  content: '•';
  color: #26A9E0;
  font-size: 1.2em;
  position: absolute;
  left: 0;
  top: 0;
}

/* Benefits Section */
.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-color: rgba(255, 255, 255, 0.1); /* Card background */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-login__benefit-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-login__benefit-text {
  color: #cccccc;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-login__btn-text-link {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-login__btn-text-link:hover {
  color: #1e87c0;
  text-decoration: underline;
}

/* FAQ Section */
.page-login__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-login__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-login__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-login__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.page-login__faq-qtext {
  flex-grow: 1;
  color: #26A9E0;
}

.page-login__faq-toggle {
  font-size: 1.5em;
  margin-left: 20px;
  color: #ffffff;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  content: '−'; /* Changed by JS */
}

.page-login__faq-answer {
  padding: 15px 25px 20px 25px;
  color: #cccccc;
  line-height: 1.6;
  background-color: rgba(255, 255, 255, 0.03);
}

/* CTA Section */
.page-login__cta-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Brand color background */
  color: #ffffff;
}

.page-login__cta-title {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-login__cta-description {
  font-size: 1.2em;
  max-width: 700px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

.page-login__cta-button {
  background-color: #EA7C07; /* Custom login color */
  color: #ffffff;
  border: none;
  padding: 18px 40px;
  border-radius: 8px;
  font-size: 1.3em;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-login__cta-button:hover {
  background-color: #d86c00;
  transform: translateY(-3px);
}

/* Responsive Design */

/* All images base responsive styles */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* All buttons base responsive styles */
.page-login__cta-button,
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login a[class*="button"],
.page-login a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* Desktop video container width (for flex layouts) */
.page-login__video-container {
  width: 100%; /* Ensure full width on desktop before max-width */
}

@media (max-width: 1024px) {
  .page-login__hero-content {
    margin-top: -80px;
  }
}

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

  .page-login__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__hero-image {
    height: 400px; /* Adjust hero image height for smaller screens */
  }

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

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

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

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

  .page-login__section-description {
    font-size: 0.95em;
  }

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

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

  .page-login__troubleshooting {
    padding: 25px;
  }

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

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

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

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

  .page-login__cta-button {
    padding: 15px 30px;
    font-size: 1.1em;
  }

  /* Mobile responsive images (forced) */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__hero-section,
  .page-login__login-form-wrapper,
  .page-login__login-form,
  .page-login__faq-list,
  .page-login__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile responsive buttons (forced) */
  .page-login__cta-button,
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .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;
  }
  
  .page-login__form-actions {
    flex-direction: column !important;
    gap: 10px !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-login__video-section {
    padding-top: 10px !important; /* body đã承担 --header-offset */
  }

  .page-login__video-container,
  .page-login__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-login__main-title {
    font-size: 1.5em;
  }
  .page-login__cta-title {
    font-size: 1.8em;
  }
  .page-login__hero-image {
    height: 300px;
  }
  .page-login__hero-content {
    margin-top: -40px;
  }
}