/* ============================================================
   navbar.css - Navbar & Submenu Animasi Unik
   CMS SMP Negeri 3 Sragen
   ============================================================ */

/* ============================================================
   NAVBAR UTAMA
   ============================================================ */
.site-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-navbar.scrolled {
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108, 99, 255, 0.15);
  padding: 10px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand / Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6c63ff, #00c9a7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.navbar-brand:hover .navbar-logo {
  transform: rotate(10deg) scale(1.05);
  box-shadow: 0 6px 25px rgba(108, 99, 255, 0.6);
}

.navbar-brand-text {
  line-height: 1.2;
}

.navbar-school-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #6c63ff, #00c9a7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.3px;
}

.navbar-school-sub {
  display: block;
  font-size: 10px;
  color: rgba(200, 200, 232, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

/* Navigation Links */
.navbar-nav-custom {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item-custom {
  position: relative;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  white-space: nowrap;
  letter-spacing: 0.5px;
  z-index: 1;
}

.nav-link-custom i.nav-icon { color: #6c63ff; font-size: 14px; transition: all 0.3s ease; }

.nav-link-custom .dropdown-arrow {
  font-size: 10px;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  color: rgba(255,255,255,0.4);
}

.nav-link-custom::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.8), rgba(0, 201, 167, 0.8));
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-link-custom:hover,
.nav-link-custom.active {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.25);
}

.nav-link-custom:hover::before,
.nav-link-custom.active::before {
  opacity: 1;
  transform: scale(1);
}

.nav-link-custom:hover .nav-icon,
.nav-link-custom.active .nav-icon {
  color: #ffffff;
  transform: scale(1.15) rotate(-8deg);
}

.nav-link-custom:hover .dropdown-arrow,
.nav-link-custom.active .dropdown-arrow {
  color: #ffffff;
}

.nav-item-custom:hover .dropdown-arrow {
  transform: rotate(180deg);
}



/* ============================================================
   SUBMENU BERANDA — Tidak ada submenu
   SUBMENU PROFIL — Desain BUKU TERBUKA
   ============================================================ */

/* Container submenu umum */
.has-submenu { position: relative; }

.submenu-wrapper {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
  pointer-events: none;
}

.has-submenu:hover .submenu-wrapper {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

/* -------- SUBMENU PROFIL: BUKU TERBUKA -------- */
.book-submenu {
  width: 580px;
  background: #0d0d22;
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(108, 99, 255, 0.15);
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Spine tengah buku */
.book-submenu::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #6c63ff, #00c9a7);
  opacity: 0.4;
}

.book-page {
  flex: 1;
  padding: 24px 22px;
  position: relative;
}

.book-page-left {
  background: linear-gradient(135deg, rgba(108,99,255,0.08), transparent);
  border-right: 1px solid rgba(108,99,255,0.1);
}

.book-page-right {
  background: linear-gradient(135deg, transparent, rgba(0,201,167,0.06));
}

.book-page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.book-page-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.book-page-left .book-page-icon {
  background: linear-gradient(135deg, #6c63ff22, #6c63ff44);
  color: #8b85ff;
}

.book-page-right .book-page-icon {
  background: linear-gradient(135deg, #00c9a722, #00c9a744);
  color: #00e8c0;
}

.book-page-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.book-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(200, 200, 232, 0.75);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.book-menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #6c63ff, #00c9a7);
  border-radius: 2px;
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.book-menu-item:hover {
  background: rgba(108, 99, 255, 0.1);
  color: #ffffff;
  padding-left: 16px;
}

.book-menu-item:hover::before {
  transform: scaleY(1);
}

.book-menu-item .item-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(108, 99, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #8b85ff;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.book-menu-item:hover .item-icon {
  background: rgba(108, 99, 255, 0.25);
  transform: scale(1.1);
}

/* Page flip animation on hover */
.book-page-left {
  animation: none;
}

.has-submenu:hover .book-page-left {
  animation: page-flip-left 0.4s ease forwards;
}

@keyframes page-flip-left {
  0% { transform: perspective(600px) rotateY(0deg); }
  50% { transform: perspective(600px) rotateY(-5deg); }
  100% { transform: perspective(600px) rotateY(0deg); }
}

/* -------- SUBMENU AKADEMIK: PETA KONSEP MELINGKAR -------- */
.mindmap-submenu {
  width: 420px;
  background: #0d0d22;
  border: 1px solid rgba(0, 201, 167, 0.2);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 201, 167, 0.1);
  padding: 28px 24px;
  position: relative;
}

.mindmap-center {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.mindmap-core {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #6c63ff, #00c9a7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.5), 0 0 60px rgba(0,201,167,0.2);
  animation: rotate-slow 10s linear infinite;
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mindmap-title {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

/* Orbit layout */
.mindmap-orbit {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mindmap-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  color: rgba(200, 200, 232, 0.75);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mindmap-node::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--node-color, linear-gradient(135deg, #6c63ff22, #00c9a722));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mindmap-node:hover::before { opacity: 1; }

.mindmap-node:hover {
  border-color: var(--node-border, rgba(108,99,255,0.5));
  color: white;
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(108,99,255,0.2);
}

.mindmap-node-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.mindmap-node-text {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

/* -------- SUBMENU GALERI -------- */
.gallery-submenu {
  width: 300px;
  background: #0d0d22;
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-sub-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: rgba(200,200,232,0.7);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.25s ease;
  text-align: center;
  padding: 8px;
}

.gallery-sub-item i {
  font-size: 20px;
  color: #f5a623;
  transition: all 0.25s ease;
}

.gallery-sub-item:hover {
  background: rgba(245, 166, 35, 0.1);
  border-color: rgba(245, 166, 35, 0.4);
  color: white;
  transform: scale(1.05);
}

.gallery-sub-item:hover i { transform: scale(1.2); }

/* -------- SUBMENU KONTAK -------- */
.contact-submenu {
  width: 260px;
  background: #0d0d22;
  border: 1px solid rgba(233, 69, 96, 0.2);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: 20px;
}

.contact-sub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(200,200,232,0.75);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
  margin-bottom: 6px;
}

.contact-sub-item .ci-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.contact-sub-item:hover {
  background: rgba(233, 69, 96, 0.08);
  color: white;
}

/* ============================================================
   NAVBAR CTA BUTTON
   ============================================================ */
.navbar-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.navbar-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6c63ff, #00c9a7);
  color: white !important;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 9px 20px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.navbar-admin-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.4s ease;
}

.navbar-admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,99,255,0.5);
  color: white !important;
}

.navbar-admin-btn:hover::before { left: 100%; }

/* ============================================================
   MOBILE MENU TOGGLE
   ============================================================ */
.navbar-toggler-custom {
  display: none;
  width: 42px; height: 42px;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.navbar-toggler-custom span {
  display: block;
  width: 20px; height: 2px;
  background: #8b85ff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggler-custom.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggler-custom.active span:nth-child(2) { opacity: 0; }

.navbar-toggler-custom.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: 300px;
  height: 100vh;
  background: #0a0a1a;
  border-left: 1px solid rgba(108, 99, 255, 0.2);
  z-index: 999;
  padding: 80px 24px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.visible {
  opacity: 1;
}

.mobile-nav-item {
  margin-bottom: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: rgba(200,200,232,0.8);
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(108,99,255,0.1);
  color: white;
}

.mobile-nav-link i { color: #6c63ff; width: 20px; text-align: center; }

.mobile-submenu {
  padding-left: 16px;
  margin-top: 4px;
  display: none;
}

.mobile-submenu.open { display: block; }

.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(200,200,232,0.65);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.mobile-sub-link:hover {
  background: rgba(108,99,255,0.08);
  color: white;
}

.mobile-sub-link i { color: #00c9a7; font-size: 12px; }

/* ============================================================
   RESPONSIVE — Show mobile menu on small screens
   ============================================================ */
@media (max-width: 1100px) {
  .navbar-nav-custom { display: none; }
  .navbar-toggler-custom { display: flex; }
  .mobile-menu { display: block; }
  .mobile-menu-overlay { display: block; }
}

@media (max-width: 480px) {
  .navbar-brand-text { display: none; }
}
