/* ========================================
   ULTRA SLIM FLOATING NAVBAR (SG CLEAN)
======================================== */

.navbar {
  position: fixed;
  top: 1.2rem;
  left: 2%;
  right: 2%;
  z-index: 1000;

  padding: 0.3rem 0.25rem !important;

  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);

  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

  transition: all 0.25s ease;
}

.navbar.navbar-scrolled {
  top: 1.2rem;
  padding: 0.3rem 0.35rem !important;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   LOGO
======================================== */

.navbar-brand {
  padding: 0 !important;
  margin: 0 !important;
}

.navbar-brand img {
  height: 75px;
  width: auto;
}

/* ========================================
   NAV LINKS — PREMIUM UNDERLINE
======================================== */

.navbar .nav-link {
  font-weight: 500;
  color: #000 !important;
  position: relative;
  display: inline-flex;
  /* IMPORTANT */
  padding: 0.35rem 0.4rem !important;
  line-height: 1;
  font-size: 0.95rem;
}

/* BOLD CURVED UNDERLINE */
.navbar .navbar-nav>.nav-item>.nav-link::after {
  content: "";
  position: absolute;

  left: 10%;
  bottom: -2px;
  /* inside box → no clipping */

  width: 80%;
  height: 3px;

  background: var(--primary-color);
  border-radius: 50px;

  transform: scaleX(0);
  transform-origin: left center;

  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .navbar-nav>.nav-item>.nav-link:hover::after,
.navbar .navbar-nav>.nav-item>.nav-link.active::after {
  transform: scaleX(1);
}

.navbar .navbar-nav>.nav-item>.nav-link:hover {
  color: var(--primary-color) !important;
}

/* REMOVE UNDERLINE FROM DROPDOWN + CTA */
.dropdown-menu .dropdown-item::after,
.sg-cta-button::after {
  display: none !important;
}

/* ========================================
   CTA BUTTON
======================================== */

.sg-cta-button {
  background: linear-gradient(135deg, #1a1a70 0%, #0d0d38 100%);
  color: var(--white) !important;

  padding: 0.35rem 0.65rem;
  border-radius: 6px;

  font-weight: 600;
  font-size: 0.85rem;

  box-shadow: 0 2px 8px rgba(25, 25, 112, 0.22);
  transition: all 0.25s ease;
  border: none;
}

.sg-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 25, 112, 0.28);
}

/* ========================================
   DROPDOWN GLASS MENU
======================================== */

.dropdown-menu {
  min-width: 220px;

  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: none;

  padding: 0.5rem 0.75rem;
}

.dropdown-menu .dropdown-item {
  padding: 0.45rem 0.75rem;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 5px;
  position: relative;
}

/* LEFT HOVER BAR */
.dropdown-menu .dropdown-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

/* MAIN DROPDOWN LEVEL */
.dropdown-menu>li>.dropdown-item:hover {
  background: linear-gradient(90deg,
      rgba(25, 25, 112, 0.08),
      rgba(25, 25, 112, 0.03));
  color: var(--primary-color);
  padding-left: 1rem;
}

/* SUB DROPDOWN LEVEL */
.dropdown-submenu>.dropdown-menu .dropdown-item:hover {
  background: var(--secondary-light);
  color: #000;
  padding-left: 1rem;
}

.dropdown-menu .dropdown-item:hover::before {
  height: 70%;
}

/* ========================================
   SUBMENU POSITION
======================================== */

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu>.dropdown-menu {
  top: 0;
  left: calc(100% + 0.2rem);

  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);

  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);

  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: 0.2s ease;
}

.dropdown-submenu:hover>.dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ========================================
   HOVER OPEN DROPDOWN (DESKTOP)
======================================== */

@media (min-width: 992px) {
  .navbar .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }

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

  .dropdown-submenu:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
}

/* ========================================
   CLEAN PREMIUM MOBILE NAVBAR (FINAL FIX)
======================================== */

@media (max-width: 991px) {

  /* ---------- NAVBAR ---------- */
  .navbar {
    left: 0.6rem;
    right: 0.6rem;
    top: 0.6rem;
    padding: 0.45rem 0.4rem !important;
  }

  .navbar-brand img {
    height: 55px;
  }

  /* ---------- TOGGLE ---------- */
  .navbar-toggler {
    border: none !important;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 0.4rem 0.5rem;
    box-shadow: none !important;
  }

  .navbar-toggler span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    margin: 4px 0;
    border-radius: 20px;
  }

  /* ---------- MOBILE PANEL ---------- */
  .navbar-collapse {
    position: fixed;
    top: 70px;
    left: 0.6rem;
    right: 0.6rem;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    padding: 0.9rem;

    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);

    max-height: calc(100vh - 100px);
    overflow-y: auto;

    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
  }

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

  /* ---------- FULL ROW HIGHLIGHT ---------- */
  .navbar .nav-item {
    width: 100%;
    border-radius: 10px;
  }

  .navbar .nav-link {
    display: block;
    width: 100%;
    padding: 0.8rem 0.9rem !important;
    border-radius: 10px;
  }

  .navbar .nav-item:hover {
    background: var(--primary-light);
  }

  /* remove underline mobile */
  .navbar .nav-link::after {
    display: none !important;
  }

  /* ---------- MAIN DROPDOWN ---------- */
  .dropdown-menu {
    position: relative !important;
    display: none;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    padding: 0.35rem;
    box-shadow: none;
  }

  .nav-item.dropdown.active>.dropdown-menu {
    display: block;
  }

  /* ---------- SUBMENU MOBILE (FIXED) ---------- */

  .dropdown-submenu>.dropdown-menu {
    position: relative !important;
    left: 0 !important;
    transform: none !important;

    display: none;
    /* IMPORTANT */
    opacity: 1 !important;
    visibility: visible !important;

    margin-left: 0.5rem;
    border-left: 3px solid var(--secondary-light);
  }

  .dropdown-submenu.active>.dropdown-menu {
    display: block;
  }

  .dropdown-submenu.active>.dropdown-menu {
    display: block;
  }

  .dropdown-item {
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
  }

  .dropdown-item:hover {
    background: #fff;
  }

  /* ---------- CTA ---------- */
  .sg-cta-button {
    width: 100%;
    margin-top: 0.9rem;
    padding: 0.7rem;
    border-radius: 10px;
    font-size: 0.95rem;
  }
}