/* Minimal Black & White Theme with New Header */
:root {
  --text: #000;
  --background: #fff;
  --border: #e0e0e0;
  --link: #000;
  --link-hover: #333;
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

#content, #enclosure, #comments, #footer {
  padding: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }

p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== NEW HEADER DESIGN ===== */
.pageheader {
  background: var(--background);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Hide original title and parent links */
.header .parentlinks,
.header .title {
  display: none;
}

.header-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.header-logo {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 600px;
}

/* ===== NAVIGATION ===== */
.sidebar {
  width: 100%;
  padding: 1rem 0;
  text-align: center;
  order: 2;
}

/* Remove all borders and lines */
.sidebar, 
.sidebar ul,
.sidebar li,
.sidebar a {
  border: none !important;
  box-shadow: none !important;
}

.sidebar hr {
  display: none;
}

.sidebar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar li {
  margin: 0;
}

.sidebar li a {
  font-weight: 500;
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

.sidebar img {
  display: none;
}

/* ===== CONTENT AREA ===== */
#pagebody {
  order: 3;
  margin-top: 1rem;
}

#content {
  background: var(--background);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== PAGE STRUCTURE ===== */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pageheader {
  order: 1;
}

.sidebar {
  order: 2;
}

#pagebody {
  order: 3;
  flex: 1;
}

#footer {
  order: 4;
}

/* ===== FOOTER ===== */
#footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.pagecopyright {
  display: block;
  margin-bottom: 0.5rem;
}

.pagelicense {
  display: block;
}

.pagelicense > a:first-child {
  display: none;
}

.pagelicense .toggle,
.pagelicense .toggleable {
  display: inline-block;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  body {
    padding: 0;
  }
  
  .pageheader {
    padding: 1rem;
  }
  
  #content, .sidebar {
    padding: 1rem;
    margin: 0;
  }
  
  .header-title {
    font-size: 1.3rem;
  }
  
  .header-logo {
    width: 200px;
    height: 200px;
  }
  
  .sidebar ul {
    gap: 1rem;
  }
  
  .sidebar li a {
    font-size: 1rem;
  }
  
  /* Footer */
  #footer {
    padding: 1.5rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .header-logo {
    width: 80px;
    height: 80px;
  }
  
  .header-title {
    font-size: 1.1rem;
  }
  
  .sidebar ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .sidebar li {
    width: 100%;
  }
  
  .sidebar li a {
    padding: 0.7rem;
    text-align: center;
  }
  
  #content {
    padding: 1.2rem 0.8rem;
  }

  .centered-heading {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
}
