:root {
  --color-primary: #121212; /* Màu chữ chính*/
  --color-secondary: #1a7ced; /* Màu nhấn chính*/
  --color-text-light: #525252; /* Màu chữ phụ/nhỏ */
  --color-white: #ffffff;
  --color-black: black;
  --color-website-background: #ffffff;
  /* Thiết lập font đặc trưng của edu8i (Poppins/Montserrat Black) */
  --font-hero: "Poppins", sans-serif;
}

/* Thiết lập cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--color-primary);
  background-color: var(--color-white); /* Nền chính màu trắng */
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Container cho header và hero theo edu8i: full width */
.container-edu8i {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3,
h4 {
  color: var(--color-primary);
  font-weight: 700;
}

p {
  color: var(--color-text-light);
}

/* --- Các Nút (Buttons) --- */

.btn-edu8i-main {
  display: inline-block;
  background-color: #1a7ced;
  color: var(--color-white);
  padding: 15px 35px;
  margin-left: 100px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  margin-right: 15px;
  transition: background-color 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(26, 124, 237, 0.4);
}

.btn-edu8i-main:hover {
  background-color: #1669cb;
  transform: translateY(-2px);
}

/* --- I. Thanh Điều Hướng (Navbar) - edu8i Style --- */
.navbar-edu8i {
  background-color: var(--color-white);
  padding: 10px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #eee;
}

.navbar-edu8i .container-edu8i {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-edu8i {
  /* Mô phỏng chữ EDU8I */
  color: var(--color-secondary);
  font-size: 1.5em;
  font-weight: 900;
  text-decoration: none;
  font-family: var(--font-hero);
}

.edu8i-nav {
  display: flex;
  align-items: center;
  flex-grow: 1;
  margin-left: 695px;
}

.main-menu-edu8i {
  list-style: none;
  display: flex;
}

.main-menu-edu8i li {
  margin-left: 20px;
}

.main-menu-edu8i li a {
  color: var(--color-black);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s;
  font-size: 0.95em;
}

/* Chỉ đổi màu khi HOVER (như footer) */
.main-menu-edu8i li a:hover {
  color: var(--color-secondary);
}

/* Giữ nguyên định dạng cho mục ACTIVE */
.main-menu-edu8i li a.active {
  color: var(--color-secondary);
  font-weight: 600;
}
/* Đường kẻ dọc ngăn cách menu và nút */
.menu-separator {
  width: 2px;
  height: 20px;
  background-color: #ddd;
  opacity: 2;
  margin-right: 15px;
}

/* Phần đăng nhập (login)*/
.login-menu {
  color: var(--color-black);
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 400;

  transition: color 0.3s, font-weight 0.3s;
  cursor: pointer;
  margin-right: 15px;
}

.login-menu:hover {
  color: var(--color-secondary);
  opacity: 1;
  background-color: transparent;
}

/* Nút Đăng Ký kiểu box - Màu xanh đậm hơn */
.btn-register-menu {
  display: inline-block;
  background-color: #0d6efd; /* Xanh dương đậm hơn (#1a7ced là nút hero) */
  color: var(--color-white);
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 6px; /* Hơi tròn */
  font-size: 0.95em;
  font-weight: 600;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(13, 110, 253, 0.3); /* Đổ bóng xanh đậm */
}

.btn-register-menu:hover {
  background-color: #0b5ed7;
}

/* --- VI. Chân Trang (Footer) MỚI --- */
:root {
  --color-footer-background: #f8f9fa;
  --color-footer-text: #6c757d; /* Màu chữ xám */
  --color-footer-heading: #343a40; /* Màu tiêu đề đậm */
}

.footer-edu8i {
  background-color: var(--color-footer-background);
  padding: 50px 0 20px;
  color: var(--color-footer-text);
  font-size: 0.95em;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid #dee2e6;
}

.footer-column {
  flex: 1;
  max-width: 25%; /* Giới hạn độ rộng mỗi cột */
}

/* Branding và Logo */
/* Container bao bọc logo và text */
.footer-logo-container {
  display: flex; /* Bật Flexbox */
  align-items: center; /* Căn giữa theo chiều dọc */
  text-decoration: none; /* Đảm bảo không có gạch chân */
  margin-bottom: 15px; /* Giữ khoảng cách với mô tả */
}

/* Định dạng hình ảnh logo */
.footer-logo-img {
  width: 50px; /* Đặt độ rộng cho logo (có thể điều chỉnh) */
  height: 50px; /* Đặt chiều cao cho logo */
  margin-right: 8px; /* Khoảng cách giữa logo và chữ */
  border-radius: 5px;
}

/* Chỉnh lại định dạng cho Text (EDU8I) */
.footer-logo-text {
  color: var(--color-black); /* Giữ màu chữ cho logo */
  font-size: 1.4em;
  font-weight: 900;
  margin-bottom: 0; /* Đã có margin ở thẻ cha */
}

.branding-description {
  margin-bottom: 20px;
  line-height: 1.5;
}

/* facebook, twiter, ig */
.wrapper {
  display: inline-flex;
  list-style: none;
  padding-top: 20px;
  font-family: "Poppins", sans-serif;
  justify-content: flex-start;
  gap: 10px;
}

.wrapper .icon {
  position: relative;
  background: #fff;
  border-radius: 50%;
  margin: 10px;
  width: 50px;
  height: 50px;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .tooltip {
  position: absolute;
  top: 0;
  font-size: 14px;
  background: #fff;
  color: #fff;
  padding: 5px 8px;
  border-radius: 5px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .tooltip::before {
  position: absolute;
  content: "";
  height: 8px;
  width: 8px;
  background: #fff;
  bottom: -3px;
  left: 50%;
  transform: translate(-50%) rotate(45deg);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .icon:hover .tooltip {
  top: -45px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wrapper .icon:hover span,
.wrapper .icon:hover .tooltip {
  text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}

.wrapper .facebook:hover,
.wrapper .facebook:hover .tooltip,
.wrapper .facebook:hover .tooltip::before {
  background: #1877f2;
  color: #fff;
}

.wrapper .twitter:hover,
.wrapper .twitter:hover .tooltip,
.wrapper .twitter:hover .tooltip::before {
  background: #1da1f2;
  color: #fff;
}

.wrapper .instagram:hover,
.wrapper .instagram:hover .tooltip,
.wrapper .instagram:hover .tooltip::before {
  background: #e4405f;
  color: #fff;
}

/* Headings và Links */
.footer-heading {
  color: var(--color-footer-heading);
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links-list {
  list-style: none;
  padding: 0;
}

.footer-links-list a {
  color: var(--color-footer-text);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer-links-list a:hover {
  color: var(--color-secondary);
}

/* Contact Items */
.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.contact-icon {
  font-size: 1.2em;
  margin-right: 10px;
  color: var(--color-secondary);
}

.contact-item p {
  color: var(--color-footer-text);
  margin: 0;
}

/* Newsletter Form */
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 0.9em;
}

.btn-subscribe {
  width: 100%;
  background-color: var(--color-secondary); /* Dùng màu xanh chính */
  color: var(--color-white);
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-subscribe:hover {
  background-color: #1669cb; /* Tối hơn 1 chút */
}

/* Phần dưới cùng */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 0.85em;
  color: #a0a7ae;
}

.footer-meta-links a {
  color: #a0a7ae;
  text-decoration: none;
  margin-left: 20px;
}

.footer-meta-links a:hover {
  color: var(--color-secondary);
}

/* QUAY LẠI ĐẦU TRANG */
.back-to-top {
  width: 140px;
  height: 56px;
  overflow: hidden;
  border: none;
  color: #1a7ced;
  font-weight: 500;
  background: none;
  position: relative;
  padding-bottom: 2em;
  cursor: pointer;

  position: fixed;
  right: 20px; /* Căn lề phải 20px (hoặc tùy chỉnh) */
  bottom: 50px;
  z-index: 10000; /* Đảm bảo nó nằm trên tất cả các phần tử khác */
  opacity: 0; /* **ẨN MẶC ĐỊNH** */
  visibility: hidden; /* **ẨN MẶC ĐỊNH** */
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s; /* Thêm transition cho hiệu ứng mượt mà */
  transform: translateY(20px);
}

.button-show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.back-to-top > div,
.back-to-top > svg {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
}

.back-to-top:before {
  content: "";
  position: absolute;
  height: 2px;
  bottom: 0;
  left: 0;
  width: 100%;
  transform: scaleX(0);
  transform-origin: bottom right;
  background: currentColor;
  transition: transform 0.25s ease-out;
}

.back-to-top:hover:before {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.back-to-top .text-2 > *,
.back-to-top .text-1 > * {
  opacity: 1;
  font-size: 1.3rem;
  transition: 0.2s;
  margin-left: 4px;
}

.back-to-top .text-2 > * {
  transform: translateY(60px);
}

.back-to-top:hover .text-2 > * {
  opacity: 1;
  transform: translateY(0px);
  transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
}

.back-to-top:hover .text-1 > * {
  opacity: 1;
  transform: translateY(-60px);
  transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
}

.back-to-top:hover .text-2 > :nth-child(1) {
  transition-delay: 0.15s;
}

.back-to-top:hover .text-2 > :nth-child(2) {
  transition-delay: 0.2s;
}

.back-to-top:hover .text-2 > :nth-child(3) {
  transition-delay: 0.25s;
}

.back-to-top:hover .text-2 > :nth-child(4) {
  transition-delay: 0.3s;
}
/* icon style and hover */
.back-to-top svg {
  width: 20px;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(-50deg);
  transition: 0.2s ease-out;
}

.back-to-top:hover svg {
  transform: translateY(-50%) rotate(-90deg);
}
