/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header Styles */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #4caf50;
  color: #fff;
  padding: 10px 20px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  overflow-x: clip;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand .logo {
  color: #fff;
  font-size: 1.5em;
  text-decoration: none;
  font-weight: bold;
}

.navbar-nav {
  list-style: none;
  display: flex;
}

.navbar-nav li {
  margin-left: 20px;
}

.navbar-nav .icon {
  margin-right: 8px;
  font-size: 1.2em;
  vertical-align: middle;
}

.navbar-nav li a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  padding: 8px 16px;
  transition: background-color 0.3s ease;
}

.navbar-nav li a:hover {
  background-color: #2e7d32;
  border-radius: 5px;
}

/* Hamburger button — hidden by default, shown on mobile when in editor */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.4em;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.hamburger-btn:hover {
  background-color: #2e7d32;
}

/* Hamburger slide-down menu panel — overlays the canvas */
.hamburger-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #388e3c;
  padding: 12px 20px;
  z-index: 1001;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hamburger-menu.open {
  display: flex;
  gap: 24px;
}

.hamburger-menu-section h4 {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.hamburger-menu-section a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 6px 0;
  font-size: 0.95em;
  transition: opacity 0.2s;
}

.hamburger-menu-section a:hover {
  opacity: 0.8;
}

.hamburger-menu-section a i {
  width: 20px;
  margin-right: 8px;
  text-align: center;
}

/* Editor action buttons in the header */
.header-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-button {
  background-color: #fff;
  color: #4caf50;
  border: none;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.header-button:hover {
  background-color: #e0e0e0;
}

.header-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.header-button i {
  font-size: 1.2rem;
}

.header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
}

/* Editor mode: hide non-pinned nav links, show hamburger for the rest.
   Action buttons are the priority in editor mode. */
.site-header.editor .navbar-nav li:not(.nav-item--pinned) {
  display: none;
}

.site-header.editor .hamburger-btn {
  display: block;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .navbar-brand .logo {
    font-size: 1.15em;
  }

  /* On mobile, only show pinned nav items; the rest live in the hamburger */
  .navbar-nav li:not(.nav-item--pinned) {
    display: none;
  }

  /* In the editor on mobile, hide all nav — action buttons need the space */
  .site-header.editor .navbar-nav {
    display: none;
  }

  /* Show hamburger button */
  .hamburger-btn {
    display: block;
  }

  /* Hide secondary editor buttons on mobile (they're in the hamburger) */
  .header-button--secondary,
  .print-button {
    display: none;
  }

  .header-buttons {
    gap: 8px;
  }

  .header-button {
    padding: 7px 8px;
    font-size: 1rem;
  }

  .header-button i {
    font-size: 1.1rem;
  }

  .header-avatar {
    width: 34px;
    height: 34px;
  }

  .hamburger-menu.open {
    flex-direction: column;
    gap: 12px;
  }
}

/* Desktop: hide hamburger, show nav (content pages only) */
@media (min-width: 769px) {
  .hamburger-btn {
    display: none;
  }

  .site-header:not(.editor) .hamburger-menu {
    display: none !important;
  }
}
