/* style/login.css */
/* body đã padding-top: var(--header-offset) từ shared.css, không được thêm vào đây để tránh trùng lặp */

.page-login {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #F5F7FA; /* Custom background color */
  line-height: 1.6;
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
  background-color: #F5F7FA; /* Match body background or a light color */
}

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

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

.page-login__hero-content {
  max-width: 900px;
  margin-top: 30px; /* Space between image and text */
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  font-weight: 700;
  color: #E53935; /* Brand color for main title */
  margin-bottom: 15px;
  line-height: 1.2;
}

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

.page-login__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center;
  gap: 20px;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure buttons adapt */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text break */
  text-align: center;
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

.page-login__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-login__btn-secondary {
  background-color: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-login__btn-secondary:hover {
  background-color: #E53935;
  color: #ffffff;
}

/* Form Section */
.page-login__form-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #FFFFFF; /* Card BG color */
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.page-login__container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 15px; /* Inner padding for containers */
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: 2.2em;
  color: #E53935;
  margin-bottom: 20px;
}

.page-login__section-description {
  font-size: 1.05em;
  color: #555555;
  margin-bottom: 40px;
}

.page-login__login-form {
  background-color: #F9F9F9; /* Slightly off-white for form background */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  text-align: left;
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #E0E0E0; /* Border color */
  border-radius: 6px;
  font-size: 1em;
  color: #333333;
  box-sizing: border-box;
}

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

.page-login__toggle-password {
  position: absolute;
  right: 15px;
  top: 60%; /* Adjusted to align with input field visually */
  transform: translateY(-50%); /* Vertically center relative to its top position */
  cursor: pointer;
  font-size: 0.9em;
  color: #E53935;
  font-weight: 600;
}

.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;
}

.page-login__checkbox {
  margin-right: 8px;
  accent-color: #E53935; /* Brand color for checkbox */
}

.page-login__checkbox-label {
  color: #555555;
}

.page-login__forgot-password {
  color: #E53935;
  text-decoration: none;
  font-weight: 600;
}

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

.page-login__submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  max-width: 100%; /* Ensure button adapts */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text break */
}

.page-login__submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-login__register-prompt {
  margin-top: 30px;
  color: #555555;
}

.page-login__register-prompt a {
  color: #E53935;
  text-decoration: none;
  font-weight: 600;
}

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

/* Features Section (Dark Background) */
.page-login__features-section {
  background-color: #E53935; /* Brand primary color */
  color: #ffffff; /* White text for dark background */
  padding: 80px 20px;
  text-align: center;
}

.page-login__section-title--white {
  color: #ffffff; /* Explicitly white for this section */
}

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

.page-login__feature-item {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__feature-icon {
  width: 100%; /* Ensure images are responsive */
  height: auto;
  max-width: 200px; /* Max width for icons */
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 5px;
}

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

.page-login__feature-description {
  font-size: 1em;
  color: #f0f0f0;
}

.page-login__cta-bottom {
  margin-top: 50px;
}

/* About by88 Section */
.page-login__about-by88-section {
    padding: 80px 20px;
    background-color: #F5F7FA; /* Light background */
    text-align: left;
}

.page-login__about-by88-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.page-login__about-by88-text {
    flex: 1 1 45%; /* Flex-grow, flex-shrink, basis */
    min-width: 300px;
}

.page-login__about-by88-image {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: center;
}

.page-login__image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
  }
  .page-login__section-title {
    font-size: 1.8em;
  }
}

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

  .page-login__hero-section,
  .page-login__form-section,
  .page-login__features-section,
  .page-login__about-by88-section {
    padding: 40px 15px !important; /* Adjust padding for mobile */
  }

  .page-login__hero-content {
    margin-top: 20px;
  }

  .page-login__main-title {
    font-size: clamp(1.5em, 6vw, 2em);
  }

  .page-login__subtitle {
    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-btn {
    width: 100% !important;
    padding: 12px 15px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-login__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-login__section-title {
    font-size: 1.6em;
    margin-bottom: 15px;
  }

  .page-login__section-description {
    margin-bottom: 25px;
  }

  .page-login__features-grid {
    grid-template-columns: 1fr; /* Single column for features */
    gap: 20px;
    margin-top: 30px;
  }

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

  .page-login__feature-icon {
    max-width: 150px;
  }

  .page-login__about-by88-content {
      flex-direction: column;
  }

  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__hero-image-wrapper,
  .page-login__about-by88-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-login__hero-section {
    padding-top: 10px !important; /* body already handles header offset */
  }
}

@media (max-width: 480px) {
  .page-login__hero-section,
  .page-login__form-section,
  .page-login__features-section,
  .page-login__about-by88-section {
    padding: 30px 10px !important;
  }
  .page-login__login-form {
    padding: 20px 15px;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}