/* Navbar Styles */
.navbar-menu {
    position: relative;
    display: inline-block;
}

.menu-link {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.navbar-menu:hover .arrow {
    transform: rotate(180deg);
}

.navigation-head {
    position: relative;
}

.navigation-ele {
    position: relative;
}

.link {
    position: relative;
}

.submenu {
    position: fixed;
    top: auto;
    left: auto;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 99999;
}

.navbar-menu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    color: #333;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s ease;
    background-color: white;
    text-align: left;
}

.submenu-item:hover {
    background-color: #f5f5f5;
}

/* Mobile Styles */
@media screen and (max-width: 960px) {
    .navbar-menu {
        width: 100%;
        text-align: left;
    }

    .menu-link {
        padding: 15px;
        justify-content: space-between;
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: rgba(255,255,255,0.1);
        display: none;
    }

    .navbar-menu:hover .submenu {
        display: block;
    }

    .submenu-item {
        padding: 12px 25px;
        color: white;
        background-color: transparent;
    }

    .submenu-item:hover {
        background-color: rgba(255,255,255,0.2);
    }

    .link {
        display: none;
    }

    .hamburger {
        display: block;
    }
}

@media screen and (max-width: 768px) {
    .headertop {
        padding: 0;
    }

    .header-content {
        flex-direction: row;
        padding: 10px;
        gap: 10px;
    }

    .portal-direktorat-sekolah {
        font-size: 14px;
        line-height: 1.2;
        text-align: left;
        flex: 1;
    }

    .logo-icon {
        max-width: 120px;
        height: auto;
    }
}

@media screen and (max-width: 420px) {
    .header-content {
        padding: 8px;
    }

    .portal-direktorat-sekolah {
        font-size: 8.5px;
    }

    .logo-icon {
        max-width: 100px;
    }
}

/* Ensure proper z-index stacking */
.header-nav {
    width: 100%;
    position: relative;
    z-index: 100;
    background-color: #fff;
}

.headertop {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    position: relative;
    left: 0;
    right: 0;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navigation-head {
    width: 100%;
    box-sizing: border-box;
}

.navigation-ele {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-menu {
    z-index: 10001;
}

/* Loading overlay styles */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loading-text {
  font-size: 16px;
  color: #333;
  font-family: var(--font-inter);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Make sure the survey1 container has position relative */
.survey1 {
  position: relative;
}


.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
  }

  .drawer-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 300px;
    background-color: white;
    z-index: 51;
  }

  .logo-home-parent {
    padding: 20px;
  }

  .logo-home3 {
    margin-bottom: 30px;
    text-align: center;
  }

  .kem-icon6 {
    height: 40px;
    width: auto;
  }

  .profil3 {
    padding: 12px 0;
    font-size: 15px;
    cursor: pointer;
    position: relative;
  }

  .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .arrow-icon {
    transition: transform 0.3s ease;
  }

  .arrow-icon.rotate-180 {
    transform: rotate(180deg);
  }

  .submenu-mobile {
    position: absolute;
    text-align: left;
    top: 100%;
    left: 0;
    width: 150px;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 52;
  }

  .submenu-mobile.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .submenu-mobile .profil3 {
    padding: 10px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
  }

  .submenu-mobile .profil3:last-child {
    border-bottom: none;
  }

  .submenu-mobile .profil3:hover {
    background-color: #f8f9fa;
  }

  .login-user-icon3, .smk-bisa-icon {
    margin-top: 30px;
    height: 30px;
    width: auto;
  }

  @media (max-width: 768px) {
    .drawer-menu {
      width: 260px;
    }

    .logo-home-parent {
      padding: 15px;
    }

    .logo-home3 {
      margin-bottom: 20px;
    }

    .profil3 {
      padding: 10px 0;
    }

    .submenu-mobile .profil3 {
      padding: 10px 15px;
    }
  }

  @media (max-width: 480px) {
    .drawer-menu {
      width: 240px;
    }

    .logo-home-parent {
      padding: 12px;
    }

    .logo-home3 {
      margin-bottom: 15px;
    }

    .profil3 {
      font-size: 14px;
    }

    .submenu-mobile .profil3 {
      padding: 10px 12px;
      font-size: 13px;
    }
  }