/* ===========================================
   NAVBAR STYLES - Modern Premium Design
   =========================================== */

/* Main Header */
.main-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1px solid rgba(220, 38, 38, 0.1);
  transition: all 0.3s ease;
}

.main-header.header-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

.header-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (max-width: 639px) {
  .header-container {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }
}

/* Logo Section */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-family-secondary);
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626, #2563eb);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
  display: none;
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
}

/* Search Section - Modern Design */
.search-container {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  border: 2px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  transition: all 0.3s ease;
  outline: none;
}

@media (max-width: 639px) {
  .search-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
    display: none;
    /* Hidden by default on mobile, could be toggled */
  }

  .search-container.active {
    display: block;
  }
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: #dc2626;
  background: white;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1), 0 4px 12px rgba(220, 38, 38, 0.15);
  transform: translateY(-1px);
}

.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.search-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.search-btn svg {
  flex-shrink: 0;
}

/* Login Button - Modern Design */
.login-container {
  flex-shrink: 0;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
}

.login-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.5s ease;
}

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

.login-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.login-text {
  display: none;
}

/* Partner Links */
.partner-links {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-bottom: 1px solid rgba(220, 38, 38, 0.1);
  display: none;
}

.partner-links .container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.partner-links strong {
  color: #dc2626;
  font-weight: 600;
}

.partner-links a {
  color: #2563eb;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.partner-links a:hover {
  color: #dc2626;
  text-decoration: underline;
}

.separator {
  color: var(--text-muted);
}

/* Main Navigation */
.main-nav {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: white;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-nav .container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-direction: column;
}

.nav-menu.active {
  display: flex;
  transform: translateX(0);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1023px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    background: var(--gray-900);
    padding-top: 4rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: var(--z-fixed);
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  /* Overlay when menu is open */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-sticky);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

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

.nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item:last-child {
  border-bottom: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, #dc2626, #2563eb);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::before {
  transform: scaleY(1);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  padding-left: 1.5rem;
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(37, 99, 235, 0.2));
  color: white;
}

.nav-link.active::before {
  transform: scaleY(1);
}

.nav-link svg {
  flex-shrink: 0;
}

/* Announcement Banner */
.announcement-banner {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  text-align: center;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.announcement-banner .container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.announcement-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.banner-link {
  color: white;
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.banner-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(220, 38, 38, 0.1);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 3px;
  background: linear-gradient(135deg, #dc2626, #2563eb);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Tablet Styles */
@media (min-width: 640px) {
  .header-container {
    padding: 1.25rem 2rem;
    gap: 1.5rem;
  }

  .logo-img {
    width: 50px;
    height: 50px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-tagline {
    display: block;
    font-size: 0.8rem;
  }

  .search-input {
    padding: 0.875rem 1.25rem;
    padding-right: 3.5rem;
    font-size: 1rem;
  }

  .search-btn {
    width: 44px;
    height: 44px;
  }

  .login-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .login-text {
    display: inline;
  }

  .partner-links {
    display: block;
  }

  .announcement-banner p {
    font-size: 1rem;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .header-container {
    gap: 2rem;
  }

  .logo-img {
    width: 56px;
    height: 56px;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .nav-item {
    border-bottom: none;
  }

  .nav-link {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 1.25rem;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .nav-link.active {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
  }

  .partner-links .container {
    justify-content: flex-start;
  }
}