.eclass-intro {
  display: flex;
  flex-wrap: wrap;
  background: url('/local/home/gioi-thieu/img/bgr-gioi-thieu.jpg') no-repeat center center;
  background-size: cover; /* ✅ phủ kín toàn bộ khung, không bị méo */
  opacity: 85%;
  padding: 4rem 2rem;
  min-height: 520px;
  border-radius: 0 0 12px 12px;
  color: white;
  margin: auto;
  align-items: center;
  gap: 20px;
  width: 100%;          /* ✅ kéo full chiều ngang */
  max-width: unset;     /* ✅ xóa giới hạn chiều ngang nếu có */
}

.left-box {
  flex: 0 0 380px; /* đúng chiều rộng vùng chứa hình cô gái */
  height: 100px;   /* có thể bỏ nếu không cần hiển thị gì */
}

.mid-box {
  flex: 1 1 auto;
  max-width: 100%;
  margin-right: auto;
  color: white;
  text-align: center;
}

.mid-box h1 {
  font-weight: bold;
  font-size: 37px;
  color: #fff212;
  font-family: 'Roboto Slab', serif;
  animation: fadeUp 1s ease-out;
}

.mid-box p {
  font-style: italic;
  font-size: 1.1rem;
  overflow: hidden;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  color: #ffffff;
  position: relative;
  white-space: nowrap;
    display: inline-block;
  transform: translateX(-100%);
  animation: slideOnce 1s ease-out forwards;
  white-space: normal;          /* ✅ Cho phép xuống dòng */
  word-break: break-word;
}

@keyframes slideOnce {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0%);
  }
}

@keyframes fadeUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.right-box {
  flex: 0 0 340px;
  min-width: 340px;
  max-width: 340px;
  width: 100%;
}

/* Khung đăng nhập */
.login-box {
  background: white;
  overflow: hidden; /* ✅ Đảm bảo bo góc chuẩn */
  padding: 0;       /* ✅ Không padding ở box cha */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 100%;
  text-align: center;
  margin: auto;
  animation: zoomIn 1s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(1.05);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.login-box h3 {
  margin-bottom: 1rem;
  color: #0057a3;
  font-size: 20px;
  font-weight: bold;
}

.login-box .form-group {
  margin-bottom: 1rem;
}

.login-box input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.login-box button {
  width: 100%;
  background: #0057a3;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Khung đã đăng nhập */
.user-info-box {
  background: white;
  padding: 1.5rem;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin: auto;
  overflow: hidden;
  word-wrap: break-word;
}

.user-info-box img.userpicture {
  width: 100px;
  height: 100px;
  object-fit: cover;
  animation: zoomIn 1s ease-out;
}

.user-info-box h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  color: #0057a3;
}

.user-actions .btn-action {
  display: block;
  margin: 0.5rem auto;
  padding: 0.75rem;
  background: #0057a3;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

.user-actions .logout {
  background: #f44336;
}

/* Tiêu đề đăng nhập hệ thống */
.login-title {
  background: #1a9d70;
  color: white;
  padding: 1rem;
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  border-radius: 12px 12px 0 0;
  width: 100%; /* ✅ đảm bảo full ngang */
  margin: 0;
}

.login-body {
  padding: 1.5rem;
}

/* Tiêu đề đã đăng nhập */
.user-title {
  background: #ff9800;
  color: white;
  padding: 1rem;
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  border-radius: 12px 12px 0 0;
  width: 100%;
  margin: 0;
}

/* Hiển thị trên mobile */
/* Hiển thị trên mobile */
@media screen and (max-width: 1280px) {
  .left-box {
    display: none !important;
  }

  .mid-box {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
  
  .right-box {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .user-info-box {
    max-width: 100%;
    padding: 1rem;
  }

  .eclass-intro {
    
    align-items: stretch;
   background: url('/local/home/gioi-thieu/img/back-mobile.jpg');
  }
}


@media screen and (max-width: 768px) {
  .left-box {
    display: none !important;
  }

  .mid-box {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .mid-box h1 {
    font-size: 25px;
  }

  .mid-box p {
    font-size: 12px;
  }

  .right-box {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .user-info-box {
    max-width: 100%;
    padding: 1rem;
  }

  .eclass-intro {
    flex-direction: column; /* ✅ xếp theo chiều dọc */
    align-items: stretch;
  }
}
