/* HEADER STICKY STYLING - CRITICAL FIX */

:root {
  font-size: 16px;
  --primary: #123e73;
  --primary-dark: #0a2647;
  --accent: #3fa66b;
  --accent-light: #e6f5ec;
  --bg-light: #edf2f8;
  --white: #ffffff;
  --font-main: 'Roboto', sans-serif;
  --header-height: 80px;
  --container-width: 1200px;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
}

/* Navigation Header - MUST be sticky and visible */
nav.nav-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background-color: rgba(250, 250, 250, 0.95) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5) !important;
  box-shadow: 0 2px 8px rgba(18, 62, 115, 0.08) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* Header Container */
.header-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* Ensure main content respects the header height */
main {
  position: relative !important;
  z-index: 1 !important;
}

/* Navigation Links */
.header-nav {
  font-family: var(--font-main);
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.header-link {
  font-family: var(--font-main);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--accent);
}

.header-link:focus,
.header-link:focus-visible {
  outline: none;
}

/* Header Right Section */
.header-right {
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

/* Header Buttons */
.header-buttons {
  font-family: var(--font-main);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  height: 100%;
}

.btn-header-primary,
.btn-header-secondary {
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  height: auto;
  padding: 0.625rem 1.25rem;
}

.btn-header-primary:focus,
.btn-header-primary:focus-visible,
.btn-header-secondary:focus,
.btn-header-secondary:focus-visible {
  outline: none;
}

/* Header Logo */
.header-logo {
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0;
}

.header-logo:focus,
.header-logo:focus-visible {
  outline: none;
}

.header-logo img {
  max-height: 60px;
  width: auto;
  display: block;
}

/* Language Selector */
.header-lang {
  font-family: var(--font-main);
  display: flex;
  gap: 0;
  align-items: center;
  height: 100%;
}

.lang-btn {
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background-color: transparent;
  border: none;
  border-radius: 0.5rem;
  margin: 0 0.25rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  height: auto;
}

.lang-btn:hover {
  color: var(--accent);
  background-color: rgba(63, 166, 107, 0.1);
}

.lang-btn.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.lang-btn:focus,
.lang-btn:focus-visible {
  outline: none;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  font-family: var(--font-main);
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: 24px;
  height: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-header {
    height: var(--header-height);
  }

  .header-container {
    padding: 0 var(--spacing-sm);
  }

  .header-nav {
    display: none;
  }

  .header-buttons {
    display: none;
  }

  .nav-toggle {
    display: block;
  }
}

/* Print Styles */
@media print {
  .nav-header {
    position: static;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .nav-header,
  .header-link,
  .lang-btn {
    transition: none;
  }
}
