/* ============================================
   HEADER STYLES - SINGLE NAVBAR
   ============================================ */

.main-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  transition: all 0.3s ease;
}

.main-header.scrolled {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.main-header.scrolled .nav-link,
.main-header.scrolled .logo-brand,
.main-header.scrolled .logo-subtitle {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.main-header.scrolled .mobile-menu-toggle span {
  background: rgba(255, 255, 255, 0.95);
}

.main-header.scrolled .desktop-user-section .nav-link-btn,
.main-header.scrolled .desktop-user-section .client-menu-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Body padding to compensate for fixed header */
body {
  padding-top: 75px;
}

/* Header Container */
.header-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

/* Logo - Left */
.header-logo {
  flex-shrink: 0;
}

.header-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

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

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo img {
  height: 45px;
  max-height: 45px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.logo-brand {
  color: #800000;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: italic;
}

.logo-subtitle {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: italic;
}

/* Desktop Navigation - Center */
.desktop-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.desktop-nav .nav-link {
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.desktop-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #800000 0%, #000000 100%);
  transition: width 0.3s ease;
}

.desktop-nav .nav-link:hover {
  color: #800000;
}

.desktop-nav .nav-link:hover::after {
  width: 100%;
}

/* Desktop User Section - Right */
.desktop-user-section {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.desktop-user-section .client-menu {
  position: relative;
}

.desktop-user-section .client-menu-btn {
  background: linear-gradient(135deg, #800000 0%, #991b1b 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
  font-size: 0.9rem;
}

.desktop-user-section .client-menu-btn:hover {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 0, 0, 0.4);
}

.desktop-user-section .client-menu-btn i.fa-chevron-down {
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.desktop-user-section .client-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.desktop-user-section .client-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: #0f172a;
  text-decoration: none;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.2s;
}

.desktop-user-section .client-dropdown a:hover {
  background: #f8fafc;
}

.desktop-user-section .client-dropdown a i {
  margin-right: 0.5rem;
  color: #000000;
}

.desktop-user-section .client-dropdown form {
  margin: 0;
}

.desktop-user-section .client-dropdown form button {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
  font-family: inherit;
}

.desktop-user-section .client-dropdown form button:hover {
  background: #fef2f2;
}

.desktop-user-section .client-dropdown form button i {
  margin-right: 0.5rem;
}

.desktop-user-section .nav-link-btn {
  background: linear-gradient(135deg, #800000 0%, #991b1b 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
  font-size: 0.9rem;
}

.desktop-user-section .nav-link-btn:hover {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 0, 0, 0.4);
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  z-index: 1002;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #1f2937;
  border-radius: 3px;
  transition: all 0.3s ease;
  display: block;
}

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

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

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

.mobile-menu-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle.active span {
  background: #800000;
}

/* Mobile Slide-in Menu */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 80px 0 2rem 0;
  display: flex;
  flex-direction: column;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(128, 0, 0, 0.05);
  color: #800000;
}

.mobile-nav-link i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.mobile-nav-link-btn {
  margin: 1rem 1.5rem 0.5rem;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, #800000 0%, #991b1b 100%);
  color: white !important;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
  border: none;
  justify-content: center;
}

.mobile-nav-link-btn:hover,
.mobile-nav-link-btn:active {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%) !important;
  transform: scale(0.98);
}

.mobile-nav-link-logout {
  margin: 0.5rem 1.5rem;
  padding: 0.875rem 1.25rem;
  background: transparent !important;
  color: #ef4444 !important;
  border: 2px solid #ef4444 !important;
  border-radius: 10px;
  font-weight: 600;
  justify-content: center;
}

.mobile-nav-link-logout:hover,
.mobile-nav-link-logout:active {
  background: #ef4444 !important;
  color: white !important;
}

.mobile-nav-form {
  margin: 0;
  padding: 0;
}

.mobile-nav-form button {
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and Mobile - Hide Desktop Nav, Show Hamburger */
@media (max-width: 1024px) {
  .desktop-nav,
  .desktop-user-section {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  .header-container {
    padding: 0.9rem 1.5rem;
    gap: 1rem;
  }
  
  body {
    padding-top: 70px;
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  
  .logo-brand {
    font-size: 1.125rem;
  }
  
  .logo-subtitle {
    font-size: 0.65rem;
    display: none;
  }
  
  .header-logo img {
    height: 28px;
    max-height: 28px;
  }
  
  body {
    padding-top: 60px;
  }
  
  .mobile-nav {
    padding-top: 60px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .header-container {
    padding: 0.625rem 0.75rem;
    gap: 0.5rem;
  }
  
  .header-logo {
    max-width: 150px;
  }
  
  .logo-brand {
    font-size: 1rem;
  }
  
  .header-logo img {
    height: 26px;
    max-height: 26px;
  }
  
  body {
    padding-top: 56px;
  }
  
  .mobile-nav {
    padding-top: 56px;
    width: 260px;
  }
  
  .mobile-menu-toggle span {
    width: 22px;
    height: 2.5px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .header-container {
    padding: 0.5rem 0.625rem;
  }
  
  .header-logo {
    max-width: 130px;
  }
  
  .logo-brand {
    font-size: 0.9375rem;
  }
  
  .header-logo img {
    height: 24px;
    max-height: 24px;
  }
  
  body {
    padding-top: 52px;
  }
  
  .mobile-nav {
    padding-top: 52px;
    width: 240px;
  }
  
  .mobile-nav-link {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
  }
}
