/* ===== HEADER PREMIUM STYLES ===== */
:root {
  --header-bg: rgba(255, 255, 255, 0.96);
  --header-border: rgba(0, 0, 0, 0.05);
  --nav-hover-bg: rgba(0, 0, 0, 0.04);
  --nav-active-color: #1e6f5c;
  --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --header-bg: rgba(18, 25, 32, 0.96);
  --header-border: rgba(255, 255, 255, 0.08);
  --nav-hover-bg: rgba(255, 255, 255, 0.08);
  --nav-active-color: #7fc1b0;
  --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.re-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--shadow-header);
  transition: box-shadow 0.2s ease;
}

.re-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.re-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.re-logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1e6f5c, #155a4a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.re-logo-text {
  line-height: 1.2;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Desktop Navigation */
.re-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.re-nav a {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 2rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.re-nav a:hover {
  background: var(--nav-hover-bg);
  color: var(--text-primary);
}

.re-nav a.active {
  background: rgba(30,111,92,0.1);
  color: var(--nav-active-color);
  font-weight: 600;
}

.re-nav-cta {
  background: var(--c-primary, #1e6f5c);
  color: white !important;
  padding: 0.5rem 1.2rem !important;
  margin-left: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.re-nav-cta:hover {
  background: var(--c-primary-dark, #155a4a);
  transform: translateY(-1px);
}

/* Header Actions */
.re-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Saved Button */
.saved-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 2rem;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.saved-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--c-primary);
}

/* Theme Toggle */
.theme-switch {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-switch:hover {
  background: var(--nav-hover-bg);
}

/* Language Switch */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  background: var(--nav-hover-bg);
  border-radius: 2rem;
  padding: 0.2rem;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.lang-btn.active {
  background: var(--c-primary);
  color: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Admin link (desktop only) */
.admin-link {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.admin-link:hover {
  background: var(--nav-hover-bg);
  border-color: var(--border);
}

/* Hamburger */
.re-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
}

.re-hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Mobile Nav Overlay */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1049;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-backdrop.open {
  display: block;
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .re-nav a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 1100px) {
  .re-header { backdrop-filter: none; }
  .re-header-inner {
    padding: 0.75rem 1rem;
  }

  .re-nav {
    position: fixed;
    top: 0;
    right: -320px;
    bottom: 0;
    width: min(280px, 90vw);
    visibility: hidden;
    overflow-y: auto;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 80px 1rem 1.5rem;
    margin: 0;
    z-index: 1050;
    transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1), visibility 0s linear 0.3s;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
    border-left: 1px solid var(--header-border);
  }

  .re-nav.open {
    visibility: visible;
    transition-delay: 0s;
    right: 0;
  }

  .re-nav a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .re-nav-cta {
    margin: 0.5rem 0 0;
    text-align: center;
  }

  .re-hamburger {
    display: flex;
  }

  .admin-link {
    display: none;
  }

  /* Adjust header actions spacing */
  .re-header-actions {
    gap: 0.25rem;
  }

  .saved-btn, .theme-switch {
    width: 32px;
    height: 32px;
  }

  .lang-switch {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .re-logo-text .tagline {
    display: none;
  }
  .re-logo-mark {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }
  .brand {
    font-size: 1rem;
  }
}
