/* ===== MEGA KHOA HOC ===== */

.mega-menu {
  display: none;
  position: absolute;
  top: 150px;
  left: 0;
  width: 100%;
  min-height: 520px;
  z-index: 1000;
  padding: 46px 0 70px;
  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.96)),
    url("/png/miraiNihongo.jpg");
  background-size: cover;
  background-position: center;
  border-top: 3px solid #0f1b7a;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
}

.mega-menu.active {
  display: block;
}

.mega-inner {
  width: 78%;
  max-width: 1500px;
  margin: 0 auto;
}

.mega-close {
  position: absolute;
  top: 34px;
  right: 54px;
  border: none;
  background: transparent;
  font-size: 46px;
  line-height: 1;
  color: #0f172a;
  cursor: pointer;
}

.mega-breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 600;
}

.mega-breadcrumb a {
  color: #475569;
  text-decoration: none;
}

.mega-breadcrumb .active {
  color: #2563eb;
}

.mega-breadcrumb span {
  color: #94a3b8;
  font-size: 28px;
}

.mega-title {
  margin: 0;
  font-size: 42px;
  font-weight: 900;
  color: #0f1b7a;
  letter-spacing: 1px;
}

.mega-title::after {
  content: "";
  display: block;
  width: 58px;
  height: 4px;
  background: #2563eb;
  border-radius: 999px;
  margin-top: 18px;
}

.mega-subtitle {
  margin: 18px 0 30px;
  font-size: 16px;
  color: #64748b;
  font-weight: 600;
}

.mega-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 28px;
}

.course-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #dbeafe;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.course-head {
  position: relative;
  min-height: 110px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 30px;
  border-bottom: 1px solid #e5e7eb;
}

.course-blue .course-head {
  background: linear-gradient(90deg, #eff6ff, #ffffff);
}

.course-green .course-head {
  background: linear-gradient(90deg, #ecfdf5, #ffffff);
}

.course-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  flex-shrink: 0;
}

.course-blue .course-icon {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.course-green .course-icon {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.course-head h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.course-blue h3 {
  color: #0f1b7a;
}

.course-green h3 {
  color: #16803a;
}

.course-head p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 600;
}

.course-bg-icon {
  position: absolute;
  right: 34px;
  top: 34px;
  font-size: 64px;
  opacity: 0.13;
}

.course-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 30px;
  min-height: 58px;
  color: #1e293b;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid #eef2f7;
  transition: background 0.2s, color 0.2s;
}

.course-row:last-child {
  border-bottom: none;
}

.course-row::after {
  content: "›";
  margin-left: auto;
  font-size: 36px;
  font-weight: 300;
}

.course-blue .course-row::after {
  color: #2563eb;
}

.course-green .course-row::after {
  color: #16803a;
}

.course-row:hover {
  background: #f8fafc;
}

.course-blue .course-row:hover {
  color: #2563eb;
}

.course-green .course-row:hover {
  color: #16803a;
}

.level {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
}

.level-blue {
  background: #dbeafe;
  color: #2563eb;
}

.level-green {
  background: #dcfce7;
  color: #16803a;
}

@media (max-width: 900px) {
  .mega-menu {
    top: 124px;
    padding: 36px 0 50px;
  }

  .mega-inner {
    width: 92%;
  }

  .mega-title {
    font-size: 40px;
  }

  .mega-content {
    grid-template-columns: 1fr;
  }

  .mega-close {
    right: 24px;
  }
}

/* ===== MEGA TAI LIEU ===== */

.mega-tailieu {
  min-height: 620px;
  padding-bottom: 58px;
}

.material-content {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  gap: 34px;
}

.material-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 28px 34px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.material-title {
  margin: 0 0 26px;
  color: #0f1b7a;
  font-size: 24px;
  font-weight: 900;
}

.material-section-title {
  margin: 24px 0 22px;
  padding-left: 12px;
  border-left: 5px solid #2563eb;
  color: #0f274a;
  font-size: 19px;
  font-weight: 900;
}

.material-level-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.material-level {
  height: 145px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  background: #fff;
  color: #0f274a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.material-level strong {
  font-size: 34px;
  font-weight: 900;
}

.material-level span {
  font-size: 15px;
  font-weight: 700;
}

.material-level b {
  font-size: 22px;
}

.material-level.n5 strong,
.material-level.n5 b {
  color: #16a34a;
}

.material-level.n4 strong,
.material-level.n4 b {
  color: #2563eb;
}

.material-level.n3 strong,
.material-level.n3 b {
  color: #f59e0b;
}

.material-level.n2 strong,
.material-level.n2 b {
  color: #8b5cf6;
}

.material-kaiwa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.material-kaiwa-card {
  height: 118px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #0f274a;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.kaiwa-icon {
  grid-column: 1 / 3;
  text-align: center;
  color: #2563eb;
  font-size: 30px;
  margin-bottom: -22px;
}

.material-kaiwa-card strong {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.material-kaiwa-card span {
  color: #2563eb;
  font-size: 22px;
}

.download-list {
  margin-top: 6px;
}

.download-item {
  display: grid;
  grid-template-columns: 56px 1fr 26px;
  align-items: center;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: #0f274a;
}

.download-item strong {
  font-size: 15px;
  font-weight: 900;
}

.download-item p {
  margin: 5px 0 0;
  color: #64748b;
  font-weight: 600;
}

.download-item b {
  color: #64748b;
  font-size: 22px;
}

.file-icon {
  width: 38px;
  height: 46px;
  border: 2px solid;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon.pdf {
  color: #ef4444;
}

.file-icon.docx {
  color: #2563eb;
}

.file-icon.mp3 {
  color: #16a34a;
}

.download-more {
  display: block;
  text-align: center;
  margin-top: 24px;
  text-decoration: none;
  color: #2563eb;
  font-weight: 900;
}

.material-level:hover,
.material-kaiwa-card:hover,
.download-item:hover {
  background: #f8fafc;
}
.material-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.material-title-icon {
  font-size: 24px;
  color: #2563eb;
}

.download-icon {
  color: #64748b;
  font-size: 20px;
}

.download-item:hover .download-icon {
  color: #2563eb;
}

.kaiwa-icon {
  grid-column: 1 / 3;
  text-align: center;
  color: #2563eb;
  font-size: 28px;
  margin-bottom: -22px;
}