* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Mulish', sans-serif;
  display: flex;
  flex-direction: column;
  background-color: #ffdead;
  color: #1f1f1f;
  font-size: 1rem;
  margin: 0 auto;
  min-height: 100vh;
}

header {
  margin-left: 220px;
  display: flex;
  text-align: center;
  justify-content: center;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 30px;
  color: #3b2f2f;
}

h2,
h3 {
  font-family: 'Playfair Display', serif;
  text-align: center;
  font-weight: 400;
  color: #3b2f2f;
}

.main-content {
  padding: 30px;
  z-index: 1;
}

.content-section {
  padding: 30px;
  margin-bottom: 50px;
  margin-left: 20px;
  border-radius: 20px;
  background-color: #e4c9a1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  scroll-margin-top: 50px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s ease-out;
}

.content-section.visible {
  opacity: 1;
  transform: translateY(0);
}

#sidebarToggleOpen,
#sidebarToggleClose {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  font-size: medium;
  background-color: #e4c9a1;
  color: #3b2f2f;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

#sidebarToggleClose {
  box-shadow: none;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100%;
  background-color: #e4c9a1;
  color: #3b2f2f;
  padding-top: 100px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 0 20px 20px 0;
  font-weight: 500;
  transform: translateX(0);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar ul {
  list-style-type: none;
  padding: 0;
}

.sidebar ul li {
  padding: 10px;
  text-align: center;
}

.sidebar ul li a {
  text-decoration: none;
  color: #3b2f2f;
  display: block;
  padding: 10px;
}

.sidebar ul li a.active {
  background-color: #deb887;
  border-radius: 8px;
  font-weight: bold;
}

.sidebar ul li a:hover {
  font-weight: bold;
}

a {
  color: #352208;
  text-underline-offset: 2px;
}

a:hover {
  color: #a0522d;
}

.content-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto;
  margin-bottom: 10px;
  border-radius: 4px;
}

figcaption {
  display: flex;
  text-align: center;
  justify-content: center;
}

small {
  display: flex;
  text-align: center;
  justify-content: center;
  font-size: 0.8rem;
  padding-bottom: 10px;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  transition: opacity 0.3s ease;
}

#imageModal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  flex-direction: column;
}

#imageModal.show {
  opacity: 1;
  pointer-events: auto;
}

#imageModal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
  margin: 0 auto;
  padding: 0;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#imageModal.show img {
  transform: scale(1);
}

footer {
  font-family: 'Mulish', sans-serif;
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
  align-items: center;
  font-size: 0.8rem;
  margin-left: 220px;
}

@media (max-width: 768px) {
  body {
    font-size: medium;
  }

  header {
    margin-left: 0;
  }

  h1 {
    font-size: 25px;
  }

  .sidebar {
    padding-top: 80px;
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    padding: 20px;
    margin-left: 0;
    max-width: 100vw;
    width: 100%;
  }

  .content-section {
    padding: 15px;
    margin-left: 0;
    width: 100%;
    padding-bottom: 30px;
  }

  .content-img {
    max-width: 100vw;
    margin: 0;
    margin-bottom: 15px;
    width: 100%;
    height: auto;
  }

  #imageModal img {
    max-width: 100vw;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }

  figure {
    margin: 0;
    padding: 0;
  }

  #sidebarToggleOpen,
  #sidebarToggleClose {
    display: block;
  }

  footer {
    margin-left: 0;
  }
}

@media (min-width: 769px) {
  .main-content {
    margin-left: 220px;
    padding: 30px;
    max-width: calc(100% - 240px);
  }

  #sidebarToggleOpen,
  #sidebarToggleClose {
    display: none;
  }
}