/* ==========================================
   LAYOUT: Navbar, Footer, Mobile Nav
   ========================================== */

/* Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 var(--padding-horizontal);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transition: background-color 0.4s ease;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.scrolled {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo span {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-cream);
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--color-teal);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-teal);
}

.admin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.admin-btn:hover {
  background: rgba(74, 155, 147, 0.2);
  color: var(--color-teal);
}

/* User Menu (Login / Avatar / Dropdown) */
.user-menu {
  position: relative;
  flex-shrink: 0;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.login-btn:hover {
  background: rgba(74, 155, 147, 0.2);
  color: var(--color-teal);
}

.user-avatar-wrap {
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: border-color 0.2s;
}

.user-avatar-wrap:hover {
  border-color: var(--color-teal);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.user-dropdown-header strong {
  display: block;
  color: var(--color-cream);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.user-dropdown-item {
  display: block;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--color-cream);
  transition: background 0.2s;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.user-dropdown-logout:hover {
  background: rgba(210, 70, 40, 0.15);
  color: var(--color-rust);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-cream);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Nav Overlay */
nav.mobile-open {
  display: flex !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(18, 17, 17, 0.97);
  backdrop-filter: blur(10px);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

nav.mobile-open ul {
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

nav.mobile-open a {
  font-size: 1.3rem;
}

.mobile-close-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-cream);
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
}

nav.mobile-open .mobile-close-btn {
  display: block;
}

/* Footer */
footer {
  margin-top: 50px;
  padding: 4rem var(--padding-horizontal) 2rem;
  background-color: #0a0a0a;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-cream);
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-rust);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}
