/* Base layout styles - moved from inline styles in baseof.html */

/* Header layout – always applied */
#site-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.site-logo {
  height: 32px;
  width: auto;
  margin-right: 0.4rem;
}

#site-header h1 {
  margin: 0;
  font-size: 1.6rem;
  margin-right: auto;
}

/* Shared container for header and main */
.container {
  max-width: var(--content-width, 960px);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Hamburger menu defaults */
.hamburger {
  display: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
  padding: 0.25rem 0.5rem;
}

#menu-toggle {
  display: none;
}

/* Search toggle */
.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-left: 0.75rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

#search-toggle {
  display: none;
}

.search-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 9999;
  min-width: 300px;
  max-width: 400px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
  padding: 8px;
  border-radius: 4px;
  overflow: visible;
}

#search-toggle:checked + .search-panel {
  display: block;
}

/* Mobile menu behavior */
@media (max-width: 600px) {
  #site-header nav .menu-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--element-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  }
  
  #menu-toggle:checked + .menu-links {
    display: flex;
  }
  
  .hamburger {
    display: inline-block;
  }
  
  #site-header nav .menu-links a {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    text-align: center;
  }
  
  #site-header nav .menu-links a:last-child {
    border-bottom: none;
  }
  
  /* Mobile search: use full width row inside dropdown */
  .search-panel {
    position: static;
    display: none;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: none;
    margin-top: 0.5rem;
  }
  
  #search-toggle:checked + .search-panel {
    display: block;
  }
}
