/* ====================== RESET & BASE ====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background: #fdfafa;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

   /* ====================== HEADER ====================== */
header {
  background: linear-gradient(90deg, #d60ca4, #cd099c);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 12px;
}

.nav a {
  min-width: 140px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.nav a.active {
  background: rgba(255, 255, 255, 0.35);
  font-weight: 900;
}

/* Nút khóa học nổi bật */
.nav-course-btn {
  position: relative;
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
  overflow: hidden;
}

.nav-course-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 25px rgba(255, 20, 147, 0.6);
}

.new-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff0040;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ====================== MOBILE MENU ====================== */
.mobile-menu {
  display: none;
  color: #fff;
  font-size: 2rem;
}

@media (max-width: 768px) {
  .mobile-menu { display: block; }

  .nav {
    position: fixed;
    top: 70px;
    inset-inline: 0;
    background: linear-gradient(90deg, #d60ca4, #cd099c);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav.nav-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    width: 100%;
    height: 60px;
    font-size: 1.2rem;
  }
}


    /* ====================== BANNER ====================== */
    #banner {
      background: linear-gradient(to right, #f472b6, #ec4899);
      color: #fff;
      text-align: center;
      padding: 40px 20px;
    }
    .banner-content h1 {
      font-size: 3.5rem;
      margin-bottom: 15px;
    }
    .banner-content p {
      max-width: 800px;
      margin: 20px auto 30px;
      font-size: 1.1rem;
    }
    .search-bar {
      position: relative;
      max-width: 500px;
      margin: 0 auto 30px;
      display: flex;
    }
    .search-bar input {
      flex: 1;
      max-width: 420px;
      padding: 15px 20px;
      border: none;
      border-radius: 8px 0 0 8px;
      font-size: 1rem;
    }
    .search-bar button {
      padding: 15px 25px;
      background: #000;
      color: #fff;
      border-radius: 0 8px 8px 0;
    }
    .btn-donggop {
      padding: 18px 40px;
      background: #333;
      color: #fff;
      border-radius: 50px;
      font-size: 1.8rem;
      font-weight: bold;
      transition: background 0.3s;
    }
    .btn-donggop:hover { background: #555; }

    /* Gợi ý tìm kiếm */
    .suggestions {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      max-width: 420px;
      background: #000;
      border: 2px solid #333;
      border-top: none;
      border-radius: 0 0 12px 12px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.4);
      max-height: 380px;
      overflow-y: auto;
      z-index: 300;
      display: none;
    }
    .suggestions div {
      padding: 16px 20px;
      color: #fff;
      font-size: 1.4rem;
      border-bottom: 1px solid #333;
      transition: background 0.2s;
    }
    .suggestions div:last-child { border-bottom: none; }
    .suggestions div:hover { background: #1a1a1a; }
    .highlight {
      background: #ff1493;
      color: #fff;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: bold;
    }

    /* ====================== COMMENT SECTION ====================== */
.comment-section {
  max-width: 900px;
  margin: 60px auto 20px;
  padding: 0 20px;
}

.comment-box {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 2px solid #ff69b4;
  position: relative;
}

.comment-box h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: #be185d;
}

.comment-box .note {
  color: #777;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.comment-box textarea {
  width: 100%;
  height: 160px;
  padding: 16px 18px;
  border: 2px solid #ff69b4;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  outline: none;
  transition: all 0.3s;
}

.comment-box textarea:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15);
}

.submit-btn {
  margin-top: 20px;
  padding: 14px 32px;
  background: #1a1a1a;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.submit-btn:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.status-msg {
  margin-top: 15px;
  font-weight: bold;
  color: #ec4899;
}

/* ====================== FOOTER ====================== */
.footer {
  background: #222;
  color: #ddd;
  text-align: center;
  padding: 25px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  border-top: 3px solid #ff69b4;
}

/* ====================== MAIN CONTENT ====================== */
main {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

h1.page-title {
  text-align: center;
  color: #be185d;
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.subject-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.subject-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #333;
}

.subject-button {
  background: #f472b6;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: bold;
  transition: all 0.3s;
}

.subject-button:hover {
  background: #ec4899;
  transform: scale(1.05);
}

/* ====================== CARD HIGHLIGHT ====================== */
@keyframes cardBlink {
  0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  50% { box-shadow: 0 0 25px #ff1493; transform: scale(1.02); }
}

.card-highlight {
  animation: cardBlink 0.8s ease 4;
}
/* Container */
.nav-item {
  position: relative;
}

/* Nút Khóa học */
.nav-course-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  padding: 10px 14px;
}

/* Menu trổ xuống */
.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  width: 220px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  list-style: none;
  padding: 8px 0;

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 999;
}

/* Item */
.dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-menu li a:hover {
  background: #f5f5f5;
  color: #c4161c; /* giống màu đỏ HUST */
}

/* Hover thì hiện */
.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-item.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
