/* style/login.css */
/* body đã padding-top: var(--header-offset) từ shared.css, không thêm vào đây nữa. */

.page-login {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Sử dụng biến màu từ custom palette */
  background-color: var(--background); /* Sử dụng biến màu từ custom palette */
}

.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--card-bg); /* Use a dark background for hero */
  text-align: center;
  overflow: hidden; /* Ensure content doesn't spill */
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__hero-content {
  max-width: 900px;
  z-index: 1;
  padding: 0 20px;
  color: var(--text-main); /* Ensure text is visible on dark background */
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: var(--text-main);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-login__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary); /* Lighter text for description */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-login__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.page-login__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--glow); /* Sử dụng màu Glow cho đường phân cách */
  border-radius: 2px;
}

.page-login__section-intro {
  font-size: 1.05em;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Login Form Section */
.page-login__form-section {
  background-color: var(--background);
  padding: 60px 0;
}

.page-login__login-form {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--card-bg); /* Use Card BG for form background */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border); /* Use border color */
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.1em;
}

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border); /* Use border color */
  border-radius: 8px;
  background-color: #0A1E14; /* Slightly lighter dark for input */
  color: var(--text-main);
  font-size: 1em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.page-login__form-input:focus {
  border-color: var(--glow); /* Glow color on focus */
  box-shadow: 0 0 0 3px rgba(87, 227, 141, 0.3); /* Glow effect */
  outline: none;
}

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

.page-login__remember-me {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
}

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--main-color); /* Use main brand color for checkbox */
}

.page-login__forgot-password {
  color: var(--gold); /* Use Gold for important links */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-login__submit-button {
  width: 100%;
  padding: 15px 25px;
  background: var(--button-gradient); /* Use custom button gradient */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure button responsiveness */
  white-space: normal;
  word-wrap: break-word;
}

.page-login__submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.4);
}

.page-login__register-text {
  text-align: center;
  margin-top: 30px;
  color: var(--text-secondary);
  font-size: 1.05em;
}

.page-login__register-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Benefits Section */
.page-login__benefits-section {
  background-color: var(--card-bg); /* Use Card BG for section background */
  padding: 60px 0;
}

.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: var(--deep-green); /* Use Deep Green for benefit cards */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__benefit-icon {
  width: 100%; /* Ensure image fills card width */
  max-width: 250px; /* Max width for consistency */
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Min image size */
  min-height: 200px;
}

.page-login__benefit-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 15px;
}

.page-login__benefit-description {
  font-size: 1em;
  color: var(--text-secondary);
}

/* Why Choose Nbet Section */
.page-login__why-choose-nbet {
  background-color: var(--background); /* Use Background color for this section */
  padding: 60px 0;
}

.page-login__dark-section {
  background-color: var(--deep-green); /* Use Deep Green for dark section */
  color: var(--text-main);
}

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

.page-login__why-card {
  background-color: var(--card-bg); /* Use Card BG for why cards */
  padding: 35px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-login__why-description {
  font-size: 1.05em;
  color: var(--text-secondary);
}

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

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

.page-login__faq-item {
  background-color: var(--card-bg); /* Use Card BG for FAQ items */
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-login__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.15em;
  color: var(--text-main);
  background-color: var(--deep-green); /* Use Deep Green for summary background */
  transition: background-color 0.3s ease;
}

.page-login__faq-item summary:hover {
  background-color: var(--main-color);
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-login__faq-qtext {
  flex-grow: 1;
}

.page-login__faq-toggle {
  font-size: 1.8em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow);
}

.page-login__faq-item[open] .page-login__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-login__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: var(--text-secondary);
  background-color: var(--card-bg); /* Use Card BG for answer background */
  border-top: 1px solid var(--divider); /* Use Divider for border */
}

.page-login__faq-answer p {
  margin: 0;
  color: var(--text-secondary);
}

/* CTA Section */
.page-login__cta-section {
  background-color: var(--deep-green); /* Use Deep Green for CTA section */
  padding: 80px 0;
  text-align: center;
}

.page-login__cta-description {
  font-size: 1.2em;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 20px auto 40px 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;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-login__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.15em;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-primary {
  background: var(--button-gradient); /* Use custom button gradient */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-login__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(17, 168, 78, 0.5);
}

.page-login__btn-secondary {
  background-color: transparent;
  color: var(--glow); /* Use Glow for secondary button text */
  border: 2px solid var(--glow); /* Use Glow for secondary button border */
}

.page-login__btn-secondary:hover {
  transform: translateY(-3px);
  background-color: rgba(87, 227, 141, 0.1); /* Light glow background on hover */
  box-shadow: 0 8px 25px rgba(87, 227, 141, 0.3);
}

/* Custom Color Variables */
:root {
  --main-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

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

  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__login-form,
  .page-login__benefits-grid,
  .page-login__why-grid,
  .page-login__faq-list,
  .page-login__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

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

  .page-login__main-title {
    font-size: 2.2em; /* Adjust for mobile legibility */
  }

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

  .page-login__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

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

  .page-login__submit-button,
  .page-login__cta-button {
    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; /* Stack buttons vertically on mobile */
    gap: 15px;
  }

  .page-login__benefit-icon {
    min-width: 200px; /* Maintain min size */
    max-width: 250px; /* Will be constrained by max-width */
    width: 100%; 
    height: auto;
  }

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

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