body {
    font-family: Arial, sans-serif;
    margin: auto 5%;
    padding: 20px;
    text-align: center;
}

video {
    max-width: 80%;
    display: flex;
    margin: auto;
}

.container {
  display: flex;
  flex-wrap: wrap;
}

.item {
  flex: 1 1 calc(33% - 10px);
  margin: 5px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto 20px;
    padding: 0 10px;
}

.markdown-content {
    max-width: 80%;
    margin: 0 auto;
    padding: 0 10px;
    text-align: left;
}

h1 {
    font-size: 2rem;
    margin: 0;
    text-align: left;
}

h2 {
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

input[type="text"] {
    width: 90%;
    max-width: 300px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #2c3e50;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #4c6075;
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

nav form {
    margin-left: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

nav input[type="text"] {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 200px;
    box-sizing: border-box;
}

nav button {
    padding: 6px 10px;
    border: none;
    background-color: #2c3e50;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

nav button:hover {
    background-color: #4c6075;
}

header h1 a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

a,
a:link,
a:visited {
    color: #2c3e50;
    text-decoration: none;
    transition: color 150ms ease;
}

a:hover,
a:focus {
    color:#4c6075;
    text-decoration: underline;
}

a:active {
    color:#16a085;
}

.content-image,
main img {
  max-width: 100%;
  height: auto;
}

#page-map {
  z-index: 1;
  width: 80%;
  margin: 0 auto 1rem;
}

ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

header h1 a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.site-icon {
    width: 50px;
    height: 50px;
    display: inline-block;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.pub-date {
  color: #666;
  font-size: 0.9rem;
  margin: 0.25rem 0;
  text-align: center;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  padding: 6px 8px;
  cursor: pointer;
}

.tags {
  text-align: center;
}

.toc {
  text-align: center;
}

/* mobile layout: show toggle, hide nav by default */
@media (max-width: 720px) {
  .hamburger {
    display: block;
  }

  .nav-toggle {
    display: block;
    align-items: center;
    justify-content: center;
  }

  /* nav hidden by default on mobile */
  #main-nav {
    z-index: 10;
    position: absolute;
    inset-inline-start: 4px;
    inset-block-start: 80px;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    margin: 8px;
    background: white;
  }

  header > h1 {
    order: 1;
    flex: 1 1 auto;             /* allow title to take remaining space */
    text-align: center;         /* centered between toggle and any right items */
    margin: 0;
  }

  #main-nav.open {
    display: flex;
  }

  /* ensure form and inputs full width on mobile */
  #main-nav form {
    display: flex;
    gap: 6px;
    width: 100%;
  }
  #main-nav input[type="text"] {
    flex: 1 1 auto;
    width: auto;
  }
  .markdown-content {
    max-width: 100%;
}
}