html {
  scroll-behavior: smooth;
}

/* Font dan base */
body {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  overflow-x: hidden;
  overflow-y: scroll;
  background: linear-gradient(
    to bottom,
    rgb(7, 0, 11) 0%,
    rgba(29, 3, 49, 1) 100%
  );
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* === NAVBAR === */
.custom-navbar {
  width: 100%;
  background: rgba(6, 5, 5, 0.35);
  opacity: 70%;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(47, 32, 72, 0.1);
  padding: 12px 25px;
  transition: background 0.3s ease;
}

.custom-navbar.scrolled {
  background: rgba(0, 0, 0, 0.75);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  height: 50px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

/* Chatbot icon */
.chatbot img {
  width: 35px;
  height: 35px;
  cursor: pointer;
}

/* Hamburger */
.hamburger {
  cursor: pointer;
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* side menu */
.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  height: 100vh;
  width: 300px;
  background: linear-gradient(
    180deg,
    rgba(18, 18, 30, 0.98) 0%,
    rgba(10, 10, 18, 0.95) 100%
  );
  backdrop-filter: blur(8px);
  padding: 80px 25px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.3s ease;
  opacity: 0;
  z-index: 1000;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.6);
  font-family: "Baloo 2", sans-serif;
}

.side-menu.active {
  right: 0;
  opacity: 1;
}

/* Link Style */
.side-menu a {
  position: relative;
  color: #ddd;
  text-decoration: none;
  letter-spacing: 0.5px;
  padding: 8px 0;
  transition: color 0.3s ease;
  font-size: 1.2rem;
  font-weight: 600;
}

.side-menu .menu-icon,
.side-menu .menu-icon2,
.side-menu .menu-icon3 {
  margin-right: 0.8rem;
  margin-bottom: 7px;
}

.side-menu .menu-icon {
  width: 1.5rem;
}
.side-menu .menu-icon2 {
  width: 1.3rem;
}
.side-menu .menu-icon3 {
  width: 1.4rem;
}

/* Hover animasi underline glowing */
.side-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #a78bfa, #8b5cf6, #4c1d95);
  box-shadow: 0 0 6px #8b5cf6;
  transition: width 0.3s ease;
}

.side-menu a:hover {
  color: #c4b5fd;
}

.side-menu a:hover::after {
  width: 100%;
}

/* Entrance animation */
.side-menu.active a {
  animation: slideFadeIn 0.4s ease forwards;
}
.side-menu.active a:nth-child(1) {
  animation-delay: 0.1s;
}
.side-menu.active a:nth-child(2) {
  animation-delay: 0.2s;
}
.side-menu.active a:nth-child(3) {
  animation-delay: 0.3s;
}
.side-menu.active a:nth-child(4) {
  animation-delay: 0.4s;
}

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

/* Header */
.portal-header {
  text-align: center;
  padding: 50px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  color: #fff;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: 0 4px 50px rgba(255, 255, 255, 0.308);
}

.portal-header img {
  padding-top: 3rem;
}

.portal-header h1 {
  padding-top: 1rem;
  font-size: 2.5rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
  margin: 0;
}

.portal-header p {
  font-family: "Baloo 2", sans-serif;
  font-weight: 400;
  margin-top: 10px;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Container Card */
.portal-container {
  display: block;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

/* Card */
.portal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  margin: 1rem;
  border-radius: 20px;
  padding: 25px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid white;
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

/* Judul */
.portal-card h2 {
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
  margin: 10px 0;
  font-size: 1.4rem;
  color: #ffffff;
}

/* Deskripsi */
.portal-card p {
  font-family: "Baloo 2", sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: #ffffff;
}

/* Button */
.btn {
  border-radius: 15px;
  border: 2px solid rgba(82, 33, 208, 0.34);
  z-index: 3;
  text-decoration: none;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
  color: white;
  padding-left: 2rem;
  padding-right: 2rem;
}

.btn:hover {
  border: 4px solid rgb(255, 255, 255);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
  color: white;
}

#starsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
}

/* footer */

.footer {
  background: #120a25;
  color: #eee;
  padding: 40px 20px;
  margin-top: 60px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}

.footer-about,
.footer-links,
.footer-contact {
  flex: 1 1 250px;
  margin: 20px;
}

.footer h2,
.footer h3 {
  color: #0ff;
  margin-bottom: 15px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
}

.footer p,
.footer a {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
}

.footer a:hover {
  color: #0ff;
  text-decoration: underline;
}

.footer-links {
  padding-left: 9rem;
}

.footer-contact {
  padding-left: 9rem;
}

/* Quick links list */
.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

/* Copyright */
.footer .copyright {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: #888;
  border-top: 1px solid #333;
  padding-top: 15px;
}

/* Materi Section */

.materi-section {
  position: relative;
  z-index: 3;
}

.materi-box {
  display: flex;
  align-items: center;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  padding: 15px;
  transition: all 0.2s ease;
}

.materi-box:hover {
  transform: translateY(-3px);
  border-color: rgb(255, 255, 255);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.materi-icon {
  width: 50px;
  height: auto;
  margin-right: 15px;
  flex-shrink: 0;
}
.materi-box h4 {
  margin: 0;
  font-weight: 700;
  color: #fff;
}

.materi-box p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.materi-h .judul-materi {
  font-weight: 600;
  font-family: "Baloo 2", sans-serif;
  color: white;
}

/* Responsive Style */

/* Tablet (768px – 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
  .footer-container {
    text-align: center;
  }
  .footer-links,
  .footer-contact {
    padding-left: 0;
    margin: 10px 0;
  }
}

/* Handphone (≤ 767px) */
@media (max-width: 767px) {
  /* Navbar */
  .custom-navbar {
    padding: 10px 15px;
  }
  .logo img {
    height: 40px;
  }
  .chatbot img {
    width: 28px;
    height: 28px;
  }

  /* Materi */
  .materi-h {
    padding-left: 1rem;
  }
  .materi-box {
    flex-direction: column;
    text-align: center;
    padding: 12px;
  }
  .materi-icon {
    margin: 0 0 10px 0;
  }

  .footer-container {
    text-align: center;
  }
  .footer-links,
  .footer-contact {
    padding-left: 0;
    margin: 10px 0;
  }
}
