/* style/login.css */
/* body đã có padding-top: var(--header-offset); nên page-login không cần thêm */
.page-login {
  font-family: 'Arial', sans-serif;
  background-color: #08160F; /* Custom Background */
  color: #F2FFF6; /* Custom Text Main for dark background */
  line-height: 1.6;
  padding-bottom: 40px; /* Add some padding at the bottom before footer */
}

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

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  text-align: center;
  overflow: hidden; /* Ensure no overflow from image */
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for aesthetic */
  overflow: hidden;
  margin-bottom: 30px;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block; /* Remove extra space below image */
  border-radius: 8px;
}

.page-login__hero-content {
  position: relative; /* Stacks below image, not on top */
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.page-login__main-title {
  font-size: clamp(2rem, 5vw, 3.2rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  color: #F2FFF6; /* Custom Text Main */
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #A7D9B8; /* Custom Text Secondary */
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Login Form */
.page-login__login-form-wrapper {
  background-color: #11271B; /* Custom Card BG */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  max-width: 450px;
  margin: 30px auto 0 auto;
  border: 1px solid #2E7A4E; /* Custom Border */
}

.page-login__form-title {
  font-size: 1.8rem;
  color: #F2FFF6; /* Custom Text Main */
  margin-bottom: 30px;
  text-align: center;
  font-weight: 600;
}

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

.page-login__form-label {
  display: block;
  font-size: 1rem;
  color: #A7D9B8; /* Custom Text Secondary */
  margin-bottom: 8px;
  font-weight: 500;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #2E7A4E; /* Custom Border */
  border-radius: 8px;
  background-color: #0A4B2C; /* Custom Deep Green */
  color: #F2FFF6; /* Custom Text Main */
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input::placeholder {
  color: #A7D9B8; /* Custom Text Secondary */
  opacity: 0.7;
}

.page-login__form-input:focus {
  border-color: #57E38D; /* Custom Glow */
  box-shadow: 0 0 0 3px rgba(87, 227, 141, 0.3);
  outline: none;
}

.page-login__form-options {
  text-align: right;
  margin-bottom: 25px;
}

.page-login__forgot-password-link {
  color: #57E38D; /* Custom Glow */
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
  color: #F2C14E; /* Custom Gold */
  text-decoration: underline;
}

.page-login__btn-primary,
.page-login__btn-secondary {
  display: block;
  width: 100%;
  padding: 14px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom Button */
  color: #ffffff;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
  transform: translateY(-2px);
}

.page-login__btn-secondary {
  background-color: transparent;
  color: #57E38D; /* Custom Glow */
  border: 2px solid #57E38D; /* Custom Glow */
  box-shadow: 0 2px 10px rgba(87, 227, 141, 0.2);
}

.page-login__btn-secondary:hover {
  background-color: rgba(87, 227, 141, 0.1);
  color: #F2C14E; /* Custom Gold */
  border-color: #F2C14E; /* Custom Gold */
  box-shadow: 0 4px 15px rgba(87, 227, 141, 0.4);
  transform: translateY(-2px);
}

.page-login__login-button {
  margin-top: 10px;
}

.page-login__register-text {
  color: #A7D9B8; /* Custom Text Secondary */
  font-size: 1rem;
  text-align: center;
  margin-top: 25px;
}

.page-login__register-link {
  color: #F2C14E; /* Custom Gold */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: #57E38D; /* Custom Glow */
  text-decoration: underline;
}

/* General Section Styling */
.page-login__section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #F2FFF6; /* Custom Text Main */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-login__section-description {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  color: #A7D9B8; /* Custom Text Secondary */
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.page-login__dark-bg {
  background-color: #0A4B2C; /* Custom Deep Green */
  padding: 60px 0;
}

/* Benefits Section */
.page-login__benefits-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.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-color: #11271B; /* Custom Card BG */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Custom Border */
}

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

.page-login__benefit-icon {
  width: 100%; /* Ensure image fills card width */
  max-width: 250px; /* Max size for icon-like images */
  height: auto;
  margin: 0 auto 20px auto;
  display: block;
  object-fit: contain;
  border-radius: 8px; /* Apply border-radius to images */
}

.page-login__benefit-title {
  font-size: 1.4rem;
  color: #F2FFF6; /* Custom Text Main */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__benefit-text {
  font-size: 0.95rem;
  color: #A7D9B8; /* Custom Text Secondary */
}

/* Guide Section */
.page-login__guide-section {
  padding: 60px 0;
}

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

.page-login__guide-steps {
  flex: 1;
  min-width: 300px;
}

.page-login__step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.page-login__step-number {
  background-color: #57E38D; /* Custom Glow */
  color: #08160F; /* Contrast with Glow */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 20px;
  flex-shrink: 0;
}

.page-login__step-title {
  font-size: 1.3rem;
  color: #F2FFF6; /* Custom Text Main */
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 600;
}

.page-login__step-text {
  font-size: 0.95rem;
  color: #A7D9B8; /* Custom Text Secondary */
}

.page-login__guide-image-wrapper {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-login__guide-image {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

/* Security Section */
.page-login__security-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-login__security-text-block {
  flex: 1;
  min-width: 300px;
  font-size: 1rem;
  color: #A7D9B8; /* Custom Text Secondary */
}

.page-login__security-text-block p {
  margin-bottom: 15px;
}

.page-login__security-text-block strong {
  color: #F2FFF6; /* Custom Text Main */
}

.page-login__security-image-wrapper {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-login__security-image {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

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

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

.page-login__faq-item {
  background-color: #11271B; /* Custom Card BG */
  border: 1px solid #2E7A4E; /* Custom Border */
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.page-login__faq-item[open] {
  background-color: #0A4B2C; /* Custom Deep Green */
  border-color: #57E38D; /* Custom Glow */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #F2FFF6; /* Custom Text Main */
  cursor: pointer;
  background-color: #11271B; /* Custom Card BG */
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-login__faq-item[open] .page-login__faq-question {
  background-color: #0A4B2C; /* Custom Deep Green */
  color: #57E38D; /* Custom Glow */
}

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

.page-login__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: #57E38D; /* Custom Glow */
  transition: transform 0.3s ease, color 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg);
  color: #F2C14E; /* Custom Gold */
}

.page-login__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #A7D9B8; /* Custom Text Secondary */
  line-height: 1.7;
}

/* Call to Action Section */
.page-login__cta-section {
  padding-top: 60px;
  padding-bottom: 60px;
  text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  }
  .page-login__section-title {
    font-size: clamp(1.6rem, 3.8vw, 2.2rem);
  }
  .page-login__guide-content,
  .page-login__security-content {
    flex-direction: column;
    text-align: center;
  }
  .page-login__guide-image-wrapper,
  .page-login__security-image-wrapper {
    order: -1; /* Image appears above text on smaller screens */
  }
  .page-login__guide-steps {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
  .page-login__guide-image,
  .page-login__security-image {
    max-width: 100%;
  }
  .page-login__step-item {
    justify-content: center;
    align-items: center;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-login__container {
    padding: 0 15px; /* Smaller padding on mobile */
  }
  .page-login__hero-section {
    padding-bottom: 30px;
  }
  .page-login__hero-image-wrapper {
    max-height: 400px; /* Adjust height for mobile */
    margin-bottom: 20px;
  }
  .page-login__login-form-wrapper {
    padding: 30px 20px;
    margin-top: 20px;
  }
  .page-login__form-title {
    font-size: 1.5rem;
  }
  .page-login__btn-primary,
  .page-login__btn-secondary {
    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__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to container of buttons */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-login__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-login__benefit-card {
    padding: 25px;
  }
  .page-login__benefit-icon {
    max-width: 180px;
  }

  .page-login__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  .page-login__section-description {
    font-size: 0.95rem;
  }

  .page-login__guide-content,
  .page-login__security-content {
    gap: 30px;
  }
  .page-login__step-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 25px;
  }
  .page-login__step-number {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .page-login__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-login__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.9rem;
  }

  /* Universal image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  /* Universal container responsiveness for overflow */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__hero-section,
  .page-login__benefits-section,
  .page-login__guide-section,
  .page-login__security-section,
  .page-login__faq-section,
  .page-login__cta-section,
  .page-login__login-form-wrapper,
  .page-login__benefits-grid,
  .page-login__guide-content,
  .page-login__security-content,
  .page-login__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Ensure no horizontal scroll */
  }
  .page-login__hero-image-wrapper {
    max-height: unset !important; /* Allow image to scale freely */
  }
}

/* Color Contrast Enforcement */
/* Assuming body background is dark based on #08160F */
.page-login {
  color: #F2FFF6; /* Main text color */
}

.page-login__card,
.page-login__login-form-wrapper {
  background-color: #11271B; /* Card BG */
  color: #F2FFF6; /* Main text color */
}

.page-login__dark-bg {
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Main text color */
}

/* Specific text elements */
.page-login__subtitle,
.page-login__form-label,
.page-login__form-input::placeholder,
.page-login__register-text,
.page-login__benefit-text,
.page-login__step-text,
.page-login__security-text-block,
.page-login__faq-answer {
  color: #A7D9B8; /* Secondary text color */
}

.page-login__forgot-password-link,
.page-login__register-link,
.page-login__faq-toggle {
  color: #57E38D; /* Glow color for links/interactive elements */
}

.page-login__forgot-password-link:hover,
.page-login__register-link:hover {
  color: #F2C14E; /* Gold color on hover */
}

.page-login__btn-primary {
  color: #ffffff; /* White text on dark gradient button */
}

.page-login__btn-secondary {
  color: #57E38D; /* Glow color for secondary button text */
  border-color: #57E38D; /* Glow color for secondary button border */
}

.page-login__btn-secondary:hover {
  color: #F2C14E; /* Gold color on hover */
  border-color: #F2C14E; /* Gold color on hover */
}

.page-login__step-number {
  color: #08160F; /* Dark background for number, so dark text */
}

.page-login__faq-item[open] .page-login__faq-question {
  color: #57E38D; /* Glow color for open FAQ question */
}
.page-login__faq-item[open] .page-login__faq-toggle {
  color: #F2C14E; /* Gold color for open FAQ toggle */
}