:root {
  --api-atas: #f9a825;
  --api-tengah: #f4511e;
  --api-merah: #e53935;
  --api-ungu: #8e24aa;
  --bg-dark: #02152c;
  --line-blue: #2b7cff;
  --node-blue: #5ad1ff;
  --poly-blue: rgba(40, 120, 210, 0.25);
}

body {
  font-family: "Poppins", sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: #333;
  /* position: relative diperlukan agar pseudo-element bekerja */
  position: relative;
  /* z-index memastikan konten tetap di atas background */
  z-index: 1;
}

/* Styling Ornamen Bergerak */
/* OVERLAY GRADIENT TIPIS BIAR LEBIH DALAM */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 10% 0%,
      rgba(0, 180, 255, 0.35),
      transparent 55%
    ),
    radial-gradient(circle at 90% 100%, rgba(0, 120, 255, 0.4), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.8;
  z-index: 2;
  pointer-events: none;
}

/* LAYER SVG JARINGAN */
.network-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

.parallax-layer {
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.12s ease-out;
}

/* STYLE GARIS & NODES */
.net-line {
  stroke: var(--line-blue);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-opacity: 0.55;
}

.net-line-soft {
  stroke-opacity: 0.28;
}

.net-node {
  fill: var(--node-blue);
  stroke: #ffffff;
  stroke-width: 0.6;
  filter: drop-shadow(0 0 6px rgba(90, 209, 255, 0.9));
  animation: nodePulse 3.2s ease-in-out infinite;
}

.net-node.small {
  r: 3;
  animation-duration: 4.2s;
  animation-delay: -1.2s;
}

.net-node.medium {
  r: 4;
  animation-duration: 3.4s;
  animation-delay: -0.6s;
}

.net-node.large {
  r: 5;
  animation-duration: 2.8s;
}

.net-poly {
  fill: var(--poly-blue);
  stroke: var(--line-blue);
  stroke-width: 0.8;
  stroke-opacity: 0.4;
  opacity: 0.7;
  animation: polyFloat 14s ease-in-out infinite alternate;
}

/* KONTEN DI ATAS (JIKA MAU) */
.hero-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  align-items: center;
  padding-inline: min(6vw, 80px);
  pointer-events: none; /* biar contoh ini nggak ganggu */
}
.hero-inner {
  max-width: 460px;
  background: linear-gradient(
    135deg,
    rgba(2, 16, 40, 0.95),
    rgba(2, 34, 78, 0.9)
  );
  border-radius: 18px;
  border: 1px solid rgba(92, 182, 255, 0.4);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 28px rgba(44, 143, 255, 0.55);
  padding: 26px 28px;
  backdrop-filter: blur(10px);
  pointer-events: auto; /* konten tetap bisa di-klik kalau kamu pakai beneran */
}

.hero-inner h1 {
  font-size: clamp(1.9rem, 2.8vw, 2.3rem);
  margin-bottom: 0.4rem;
}

.hero-inner p {
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.8;
}

/* ANIMASI */
@keyframes nodePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

@keyframes polyFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(8px, -12px, 0);
  }
  100% {
    transform: translate3d(-10px, -22px, 0);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-inner {
    padding: 18px 18px;
    border-radius: 14px;
  }
  .hero-inner h1 {
    font-size: 1.5rem;
  }
  .hero-inner p {
    font-size: 0.9rem;
  }
}

/* End Style Ornamen Bergerak */

.portal-header {
  margin-bottom: 2rem;
  margin-top: 2rem;
  text-align: center;
  transition: all 0.5s ease;
  position: relative;
  z-index: 5;
}

.portal-title {
  font-size: 2rem;
  font-weight: 700;
  color: #131313;
}

.portal-sub-title {
  font-size: 1.5rem;
  color: #3d3d3d;
}

.portal-span {
  background: linear-gradient(
    -45deg,
    var(--api-atas),
    var(--api-tengah),
    var(--api-merah),
    var(--api-ungu)
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nyalaApi 5s ease-in-out infinite;
  font-weight: bold;
  display: inline-block;
}

.text-ungu {
  color: var(--ungu) !important;
}

.border-ungu {
  border: 1px solid #8e24aa !important;
}

.bg-ungu {
  background-color: purple !important;
  color: #fff !important;
}

@keyframes nyalaApi {
  0% {
    background-position: 0% 50%;
    filter: brightness(1);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(1.3);
  }
  100% {
    background-position: 0% 50%;
    filter: brightness(1);
  }
}
/* ==================== DESKTOP MODE ==================== */
.portal {
  position: relative;
  width: 600px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.logo-kemenpora {
  display: block;
  max-width: 80px;
  height: auto;
  margin: 0 auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.portal-logo {
  position: relative;
  z-index: 10;
  cursor: pointer;
  transition: transform 0.4s ease;
  border-radius: 50%;
  margin-top: -15rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  border: 4px solid transparent;
  display: inline-block;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(
        120deg,
        var(--api-atas),
        var(--api-tengah),
        var(--api-merah),
        var(--api-ungu)
      )
      border-box;
  background-size: 200% 200%;
  animation: gradientFlow 6s linear infinite;
  overflow: hidden; /* ⬅ potong semua keluar border */
  padding: 15px;
}

/* Hapus pseudo-element karena mereka bikin putih bocor */
.portal-logo::before,
.portal-logo::after {
  display: none;
}

/* Logo di dalam */
.portal-logo img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.4s ease;
  display: block;
}

/* Efek hover */
.portal:hover .portal-logo img {
  transform: scale(1.08);
}

/* Animasi warna gradasi border */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Animasi aliran warna gradasi */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Efek kelap-kelip silver */
@keyframes shimmer {
  0% {
    opacity: 0.2;
    background-position: -100% 0;
  }
  50% {
    opacity: 1;
    background-position: 100% 0;
  }
  100% {
    opacity: 0.2;
    background-position: -100% 0;
  }
}

.portal-logo img {
  max-width: 150px;
  transition: transform 0.4s ease;
}

.portal:hover .portal-logo img {
  transform: scale(1.08);
}

.menu-item {
  position: absolute;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s ease;
  pointer-events: none;
  z-index: 1000;
}

.portal:hover .menu-item,
.portal.hover-preview .menu-item {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Posisi melingkar */
/* atas */
/* Titik pusat kira-kira (250, 250) */

/* atas */
/* atas */
.item-0 {
  top: -150px;
  left: 250px;
}

/* kanan atas */
.item-1 {
  top: 20px;
  left: 500px;
}

/* kanan bawah */
.item-2 {
  top: 240px;
  left: 400px;
}

/* kiri bawah */
.item-3 {
  top: 240px;
  left: 100px;
}

/* kiri atas */
.item-4 {
  top: 20px;
  left: 0px;
}

.menu-span {
  font-size: 1rem;
}

.menu-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 1rem;
  color: var(--border-color);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.menu-item a:hover {
  box-shadow: 0 0 15px var(--border-color);
  transform: scale(1.08);
}

.menu-item .icon {
  font-size: 2.2rem;
}

.menu-item small {
  font-weight: 600;
  color: #323232;
  font-size: 1.3rem;
  text-wrap: nowrap;
}

footer {
  position: absolute;
  bottom: 20px;
  text-align: center;
  width: 100%;
  color: #6c757d;
  font-size: 0.9rem;
}

.menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 1rem;
  color: var(--border-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.menu-trigger:hover {
  box-shadow: 0 0 15px var(--border-color);
  transform: scale(1.08);
}

.menu-trigger img {
  max-width: 80px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

/* ===== ORNAMEN POJOK ===== */
.ornamen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -9999;
  pointer-events: none;
  animation: ornamenFloat 10s ease-in-out infinite;
}

@keyframes ornamenFloat {
  0% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.ornamen {
  animation: ornamenFloat 10s ease-in-out infinite;
}

/* ===== SUBMENU BULET ===== */
.submenu-box {
  position: absolute;
  top: 0; /* muncul di bawah lingkaran utama */
  left: -8rem;
  transform: translateX(-50%) scale(0.9);
  background: #fff;
  border: 2px solid var(--api-tengah);
  border-radius: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  min-width: 180px;
  z-index: 20;
}

/* Muncul saat hover SITENOR */
.menu-item.item-2:hover .submenu-box {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

/* Isi submenu */
.submenu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.submenu-link i {
  font-size: 1.2rem;
  color: var(--api-tengah);
}

.submenu-link:hover {
  background: var(--api-tengah);
  color: #fff;
}

.submenu-link:hover i {
  color: #fff;
}

/* Modal Sitenor */
.text-title {
  background: linear-gradient(90deg, #f9a825, #f4511e, #e53935);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.service-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.service-item {
  width: 160px;
  height: 140px;
  background: #fff;
  border: 2px solid #f4511e;
  border-radius: 16px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.service-item-bdw {
  border: 2px solid #f9a825;
}

.service-item:hover {
  transform: translateY(-5px);
  border-color: #e53935;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.2);
}

.service-item .icon {
  font-size: 2rem;
  color: #e53935;
  margin-bottom: 8px;
}

.service-item .label {
  font-weight: 600;
  font-size: 1rem;
}

.modal-body {
  background-color: #fff;
  border-radius: 15px;
}

/* Responsif */
@media (max-width: 768px) {
  .ornamen {
    width: 100px;
  }
}

/* ==================== MOBILE MODE ==================== */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 0;
    background-size: 15px 15px;
  }

  .menu-icon {
    width: 30px; /* ukuran icon/gambar */
    height: 30px;
    object-fit: contain;
    margin-right: 10px;
  }

  .portal-header {
    margin-top: 10rem;
    margin-bottom: 1rem;
  }

  .portal-title {
    font-size: 1.8rem;
  }

  .portal-sub-title {
    font-size: 1rem;
  }

  /* Tata letak portal menjadi kolom */
  .portal {
    flex-direction: column;
    width: 100%;
    height: auto;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
  }

  /* Logo utama */
  .portal-logo {
    margin: 0 auto 2rem auto;
    border: 3px solid #f4511e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .portal-logo img {
    max-width: 130px;
  }

  /* Sembunyikan menu-item versi desktop */
  .menu-item {
    display: none !important;
  }

  /* ==== Tampilan menu versi list card ==== */
  .menu-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .menu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.2rem;
    border-left: 6px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
  }

  .menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  }

  .menu-card i {
    font-size: 1.8rem;
    margin-right: 1rem;
    color: var(--border-color);
  }

  .menu-card span {
    font-weight: 600;
    font-size: 1rem;
  }

  /* Ornamen agar tidak menutupi konten */
  .ornamen {
    display: block;

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;

    z-index: -1;
    pointer-events: none; /* Pastikan tidak bisa diklik */
  }
}
