﻿/* Completely disable Tailwind inside nav */
.no-tailwind {
  /* Reset the nav container away from Tailwind without impacting children */
  all: revert;
  box-sizing: border-box !important;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif !important;
}

.no-tailwind * {
  box-sizing: border-box !important;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif !important;
}

/* Shared navigation styling across all pages */
.th-nav,
.th-nav-new {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky !important;
  top: 0;
  width: 100%;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  z-index: 5000;
  min-height: 64px; /* keeps logo and burger centered vertically */
}

@media (max-width: 900px) {
  .th-nav,
  .th-nav-new {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  body {
    padding-top: 68px;
  }
}

/* Normalize typography across all navs */
.th-nav,
.th-nav * {
  font-family: "Poppins", "Segoe UI", Arial, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: 0.2px !important;
}

.th-nav .logo img,
.th-nav-new .logo img {
  height: 42px;
  display: block;
}

.logo,
.logo a {
  display: inline-flex;
  align-items: center;
}

.th-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.th-menu a {
  text-decoration: none;
  color: #1f2937;
  font-weight: 400 !important;
  font-size: 1.02rem;
  letter-spacing: 0.2px;
}

.th-menu a:hover {
  color: #7B2FF7;
}

.nav-dropdown {
  position: relative;
}

.nav-link {
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f2937;
  font-weight: 400 !important;
  font-size: 1rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
}

/* Normalize all nav text weights */
.nav-item,
.nav-subitem {
  font-weight: 400 !important;
  letter-spacing: 0.2px !important;
}

.nav-link:hover {
  color: #7B2FF7;
}

.nav-caret {
  display: inline-block;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 0.25s ease;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
  padding: 8px;
  z-index: 2000;
}

.nav-submenu a {
  display: block;
  padding: 10px 14px;
  color: #374151;
  text-decoration: none;
  font-weight: 400;
}

.nav-item,
.nav-subitem {
  color: inherit;
  font: inherit;
}

@media (min-width: 901px) {
  .nav-item {
    font-weight: 450;
    font-size: 1.05rem;
  }
}

.nav-submenu a:hover {
  /* background: rgba(123, 47, 247, 0.06); light purple tint */
  background: #7B2FF7; /* light purple tint */
  color: #ffffff;
  font-weight: 400;
  border-radius: 8px;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 900;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden !important;
}
html.menu-open {
  overflow: hidden !important;
}

.nav-dropdown.open .nav-submenu {
  display: flex;
  flex-direction: column;
}

.nav-dropdown.open .nav-caret {
  transform: rotate(180deg);
}

@media (min-width: 901px) {
  .th-menu a,
  .nav-link {
    font-weight: 500;
  }

  /* Desktop-only: lighten top-level items, keep submenus softer */
@media (min-width: 901px) {
  /* Keep rightmost dropdown from touching viewport edge */
  .th-menu > .nav-dropdown:last-child .nav-submenu {
    right: 0;
    left: auto;
  }

  /* Keep long desktop items on a single line */
  .nav-submenu {
    min-width: max-content;
  }

  .nav-submenu a {
    white-space: nowrap;
  }

  .th-menu a,
  .nav-link {
    line-height: 1;
    padding: 10px 12px;
    font-weight: 400;
  }

  .th-menu > a,
  .th-menu > .nav-dropdown > .nav-link {
    font-weight: 450;
    font-size: 1.05rem;
  }
}


  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: flex;
    flex-direction: column;
  }

  .nav-dropdown:hover .nav-link,
  .nav-dropdown:focus-within .nav-link {
    color: #7B2FF7;
  }

  .nav-dropdown:hover .nav-caret,
  .nav-dropdown:focus-within .nav-caret {
    transform: rotate(180deg);
  }
}


.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s ease;
  align-self: center;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #111827;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.close-menu {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #111827;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 1200;
}

body.menu-open .close-menu {
  display: inline-flex;
}

.hamburger:hover {
  background: #f3f4f6;
}

/* Animate hamburger to X when menu is open */
body.menu-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.menu-open .hamburger span:nth-child(2) {
  opacity: 0;
}
body.menu-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile layout */
@media (max-width: 900px) {
  .th-nav-new {
    padding: 12px 16px;
  }

    .th-nav {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f1f3;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
  }

    /* Logo slightly smaller on phones */
  .th-nav .logo img {
    height: 36px;
  }

  .th-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    flex-direction: column;
    align-items: flex-start;
    transform-origin: top;
    transform: scaleY(0.96);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
    padding: 20px 18px;
    gap: 14px;
    border-radius: 0 0 20px 20px;
  }

  .th-menu.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 10px 12px;
    font-weight: 500;
  }

  .nav-submenu {
    position: static;
    box-shadow: none;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px 0;
    background: linear-gradient(120deg, #7B2FF7, #00C4CC);
  }
  .nav-submenu .nav-subitem {
    color: #ffffff;
    font-weight: 400;
  }

  .nav-submenu a {
    padding: 12px 14px;
  }

  .nav-submenu a + a {
    border-top: 1px solid #e5e7eb;
  }

  .hamburger {
    display: flex;
    padding: 4px 6px;
    border-radius: 10px;
    background: none;
  }

    .hamburger:hover {
    background: #f5f5f8;
  }

    /* Mobile links */
  .th-menu a,
  .nav-link {
    font-size: 1.05rem;
    padding: 10px 6px;
    width: 100%;
  }
}

@media (min-width: 700px) and (max-width: 900px) {
  .th-nav .logo img {
    height: 40px;
  }
   .th-nav {
    padding: 12px 30px;
  }

}

  /* Shrink logo on mobile */
  @media (max-width: 640px) {
    .site-logo {
      max-width: 120px !important;
      height: auto !important;
    }
  }