/* ==========================================================================
   CHRONOTASK STYLE NAVBAR CSS
   ========================================================================== */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
  position: sticky;
  top: 0;
  z-index: 9000;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: all 0.25s ease;
}

.nav-brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-start;
}

.navbar .logo {
  max-height: 42px;
  height: 42px;
  width: auto;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar .logo:hover {
  transform: scale(1.04);
}

.navContent {
  display: contents;
}

.navLinks {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 auto;
}

.navbar nav {
  display: flex;
  align-items: center;
  position: relative;
  gap: 4px;
  padding-bottom: 2px;
}

.navlink {
  color: #475569;
  font-weight: 600;
  font-size: 0.93rem;
  text-decoration: none;
  position: relative;
  padding: 8px 16px;
  border-radius: 9999px;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.navlink:hover {
  color: #1E6FF2;
}

/* Hover-only underline indicator (active page has NO permanent underline) */
.navlink::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 14px;
  right: 14px;
  height: 2.5px;
  background-color: #1E6FF2;
  border-radius: 9999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.navlink:hover::after {
  transform: scaleX(1);
}

/* Selected page has active text color only; line appears ONLY when hovered */
.navlink.active-nav {
  color: #1E6FF2 !important;
  font-weight: 700;
  background: transparent;
}

.navlink.active-nav::after {
  transform: scaleX(0);
}

.navlink.active-nav:hover::after {
  transform: scaleX(1);
}

.nav-slider {
  display: none !important;
}

.nav-right-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.navbar .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-signin-btn {
  color: #475569;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
  padding: 8px 16px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-signin-btn:hover {
  color: #1E6FF2;
}

.buttonPrimary {
  background: #1E6FF2;
  color: #FFFFFF !important;
  padding: 10px 24px;
  border-radius: 9999px;
  border: none;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(30, 111, 242, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.buttonPrimary:hover {
  background: #0F5AE6;
  transform: translateY(-1.5px);
  box-shadow: 0 8px 22px -2px rgba(30, 111, 242, 0.4);
}

.buttonPrimary:active {
  transform: translateY(0);
}

/* Language Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
  z-index: 9999;
}

.dropbtn {
  background-color: #FFFFFF;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #E2E8F0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dropbtn:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.dropbtn img {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  background-color: #FFFFFF;
  min-width: 140px;
  z-index: 10000;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  padding: 6px;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
  background-color: #FFFFFF;
  padding: 8px 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s ease;
  border-radius: 8px;
}

.dropdown-content a img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.dropdown-content a:hover {
  background: #F1F5F9;
  color: #1E6FF2;
}

.dropdown.open .dropdown-content {
  display: block;
}

.hamburger {
  display: none;
  font-size: 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: #0F172A;
  z-index: 100000;
  padding: 0;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.hamburger:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99990;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.mobile-nav-backdrop.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1100px) {
  .navbar {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-brand-container {
    flex: 0 0 auto;
  }

  .hamburger {
    display: inline-flex;
  }

  .navContent {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 310px;
    max-width: 82vw;
    height: 100vh;
    height: 100dvh;
    background: #FFFFFF;
    padding: 72px 20px 32px 20px;
    box-shadow: -10px 0 35px rgba(15, 23, 42, 0.18);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
    z-index: 99995;
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
    overflow-y: auto;
    box-sizing: border-box;
  }

  .navContent.show {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .navLinks {
    margin: 0;
    width: 100%;
  }

  .navbar nav {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 4px;
    padding: 0;
  }

  .navlink {
    width: 100%;
    padding: 11px 16px;
    font-size: 0.96rem;
    font-weight: 600;
    border-radius: 10px;
    box-sizing: border-box;
    display: block;
    background: transparent;
  }

  .navlink:hover, .navlink.active-nav {
    background: #F1F5F9;
  }

  .navlink::after {
    display: none !important;
  }

  .nav-right-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
  }

  .navbar .actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .nav-signin-btn {
    width: 100%;
    text-align: center;
    padding: 11px;
    border-radius: 10px;
    background: #F8FAFC;
    box-sizing: border-box;
  }

  .buttonPrimary {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    box-sizing: border-box;
    justify-content: center;
  }

  .dropdown {
    align-self: center;
  }

  .dropdown-content {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}
