/* Global reset and box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

a {
  color: #000;
  text-decoration: none;
}

body {
  background-color: #c2d1c9;
  display: flex;
  flex-direction: column;
  min-height: 98vh;
  padding: 0.5em 0;
  font-family: futura-pt, sans-serif;
  font-style: normal;
  font-weight: 300;
}

header {
  width: 250px;
  height: 100vh;
  display: flex; /* Change display to flex for header */
  flex-direction: column; /* Stack header items vertically */
  margin-right: 10px;
  padding: 0;
  position: fixed;
  z-index: 1000;
  text-align: right;
  color: #000;
  text-decoration: none;
  font-size: x-large;
  font-family: nimbus-roman, serif;
  font-style: normal;
  font-weight: 400;
}
header a:visited {
  color: #000;
}
header h1 {
  font-size: large;
}
header nav {
  list-style-type: none;
}
header nav a {
  display: block;
  text-decoration: none;
  font-size: x-large;
}
header .page-nav {
  margin-top: 10px;
  font-size: x-large;
}
header .sub-page-nav a {
  margin: 0px;
  font-size: large;
}
@media (max-width: 768px) {
  header {
    position: relative; /* Remove fixed positioning */
    width: 100%; /* Make the header span the full width */
    height: auto; /* Adjust height to fit content */
    float: none; /* Remove float */
    margin: 0; /* Remove margin */
    padding: 10px 20px; /* Add padding for spacing */
    z-index: 1000;
    text-align: center; /* Center-align header text */
  }
  header .page-nav {
    margin-top: 0;
    display: none; /* Initially hide the navigation menu */
    flex-direction: column; /* Stack menu items vertically */
    background-color: #c2d1c9;
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    width: 100%;
    padding: 10px 0;
  }
  header .page-nav .sub-page-nav {
    justify-content: center;
  }
  header .page-nav a {
    padding: 10px;
    border-bottom: 1px solid #ccc;
  }
  header.open nav {
    display: flex; /* Show the navigation menu when open */
  }
}
header .site-title {
  text-decoration: none;
  color: black;
  font-size: xx-large;
  flex: 0;
}
@media (max-width: 768px) {
  header .site-title {
    margin-right: 0;
    align-items: center;
    justify-content: center;
  }
}
header .hamburger {
  display: none;
}
@media (max-width: 768px) {
  header .hamburger {
    display: block; /* Show the hamburger icon */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    text-decoration: none;
  }
}

main {
  padding: 0.25em 1em;
  margin-left: 250px;
  flex: 1;
}
@media (max-width: 768px) {
  main {
    margin-left: 0;
  }
}
main h3,
main figcaption {
  font-size: large;
  font-variant: small-caps;
  font-weight: normal;
}
main a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
}
main a:hover {
  color: #777;
}
main img,
main object {
  margin-bottom: 15px;
  max-width: 100%;
  height: auto;
}
main section.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 1em auto;
  width: 100%;
  padding: 0 1em;
  max-width: 1000px;
  box-sizing: border-box;
}

.horizontal-gallery {
  margin: 2em 0;
  padding: 0 1em;
}

.horizontal-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 20px 0;
  margin: 0 auto;
  max-width: 100%;
}
.horizontal-scroll-container::-webkit-scrollbar {
  display: none;
}

.horizontal-gallery-item {
  display: inline-block;
  position: relative;
  margin-right: 7px;
  vertical-align: top;
  white-space: normal;
  text-align: center;
}
.horizontal-gallery-item:last-child {
  margin-right: 0;
}
.horizontal-gallery-item img {
  height: 80vh;
  width: auto;
  max-width: none;
  object-fit: cover;
  transition: transform 0.3s ease;
  margin-bottom: 10px;
}
@media (max-width: 768px) {
  .horizontal-gallery-item img {
    height: 30vh;
  }
}

.gallery__img--hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.horizontal-gallery-item.has-hover:hover .gallery__img--hover {
  opacity: 1;
}
.horizontal-gallery-item.has-hover:hover .gallery__img--primary {
  opacity: 0;
}

.horizontal-gallery-item.has-hover.touch-active .gallery__img--hover {
  opacity: 1;
}
.horizontal-gallery-item.has-hover.touch-active .gallery__img--primary {
  opacity: 0;
}

.gallery__img--primary {
  transition: opacity 0.3s ease;
}

footer {
  clear: both;
  padding: 1em 1em;
  bottom: 0;
}

figcaption {
  text-align: center;
  padding: 0;
  margin: 0;
}

figure img {
  display: block;
  margin-bottom: 0;
}

div.letter {
  text-align: center;
}

div.letter img {
  width: 100%;
  max-width: 700px;
  object-fit: cover;
  height: auto;
}