/* ============================================================
   layouts/public.css
   Public Header, Nav & Mobile Menu (FIXED SPACING)
   ============================================================ */

.public-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}

[data-theme="dark"] .public-header {
  background: rgba(17, 24, 39, 0.95);
}

/* Logo area */
.public-header > a {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.public-header > a > div:first-child {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 16px;
}

.public-header > a > div:last-child {
  display: flex;
  flex-direction: column;
}

.public-header > a .company-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.public-header > a .company-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Navigation */
.public-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 16px;
}

.public-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.public-nav a:hover,
.public-nav a.active {
  color: var(--text-brand);
  background: var(--brand-50);
}

.public-nav .btn {
  margin-left: 8px;
  padding: 8px 18px;
}

/* Tombol hamburger - default hidden */
.nav-mobile-toggle {
  display: none;
}

/* Mobile mode */
@media (max-width: 768px) {
  .public-header {
    padding: 0 20px;
    height: 70px;
  }

  .public-header > a {
    gap: 10px;
  }

  .public-header > a > div:first-child {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .public-header > a .company-name {
    font-size: 14px;
  }

  .public-header > a .company-tagline {
    font-size: 10px;
  }

  .nav-mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-primary);
    margin-left: auto;
  }

  .public-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    gap: 0;
  }

  .public-nav.open {
    display: flex !important;
    padding: 16px 20px;
  }

  .public-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin: 0;
  }

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

  .public-nav .btn {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 10px;
    text-align: center;
  }
}