p.posted {
  display: block;
  font-size: 0.8em;
  color: var(--color-posted);
}

:root {
  --color-body-bg: #f8f4f1;
  --color-surface: #ffffff;
  --color-header-bg: #e3dbdb;
  --color-text: #241c1c;
  --color-posted: rgba(89, 89, 89, 0.7);
  --color-link: #705949;
  --color-link-hover-bg: #faebd7;
  --color-link-hover-text: #705949;
  --color-heading: #4a3d35;
  --color-footer-text: #4a3d35;
  --color-nav-text: #ffffff;
  --color-nav-current-bg: #f8f4f1;
  --color-nav-current-link-bg: #ffffff;
  --color-nav-current-text: #4a3d35;
  --color-nav-hover-bg: #4a3d35;
  --color-nav-hover-text: #ffffff;
  --color-overlap: #f8f4f1;
  --color-header-foreground: #4a3d35;
  --color-header-text: #28170b;
  --color-figure-border: #cccccc;
  --color-figcaption: #555555;
  --shadow-nav: 2px -1px 4px rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-body-bg: #1b1612;
    --color-surface: #251f1b;
    --color-header-bg: #3a2d27;
    --color-text: #f3e6dc;
    --color-posted: rgba(243, 230, 218, 0.7);
    --color-link: #e1b98f;
    --color-link-hover-bg: rgba(225, 185, 143, 0.18);
    --color-link-hover-text: #1b1612;
    --color-heading: #f1d2b5;
    --color-footer-text: #f1d2b5;
    --color-nav-text: #f7eadf;
    --color-nav-current-bg: #2d221d;
    --color-nav-current-link-bg: #3a2d27;
    --color-nav-current-text: #f7eadf;
    --color-nav-hover-bg: #8f6f58;
    --color-nav-hover-text: #1b1612;
    --color-overlap: #3a2d27;
    --color-header-foreground: #f7eadf;
    --color-header-text: #f7e6d7;
    --color-figure-border: #3f312b;
    --color-figcaption: rgba(243, 230, 218, 0.7);
    --shadow-nav: 2px -1px 8px rgba(0, 0, 0, 0.55);
  }
}

p.posted::before {
  content: '📅 ';
}

@font-face {
  font-family: "PowerChocolate";
  src: local("Power Chocolate"),
    url("fonts/PowerChocolate.woff2") format("woff2"),
    url("fonts/PowerChocolate.woff") format("woff"),
    url("fonts/PowerChocolate.otf") format("otf"),
    url("fonts/PowerChocolate.ttf") format("ttf");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

a:link,
a:visited {
  color: var(--color-link);
}

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

h2 {
  text-align: center;
  color: var(--color-heading);
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-text);
  background-color: var(--color-body-bg);
}

header {
  text-align: center;
  width: 100%;
  background-color: var(--color-header-bg);
  margin-left: auto;
  margin-right: auto;
  color: var(--color-header-foreground);
}

main div.content {
  padding: 1em;
}

header h1 {
  font-family: PowerChocolate, Arial, sans-serif;
}

small.date {
  display: block;
}

main {
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.5em;
  font-size: 1.1em;
  position: relative;
  background-color: var(--color-surface);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;

}

footer {
  color: var(--color-footer-text);
  text-align: center;
  padding: 1em;
  bottom: 0;
}

nav {
  display: flex;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Display the links inside the navigation bar */
nav div {
  flex: 1;
  text-align: center;
  color: var(--color-nav-text);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

div.update-navigation {
  margin-top: 0.83em;
  display: flex;
}

div.update-navigation>h2 {
  margin: 0;
}

div.update-navigation>div {
  flex: 1;
  text-align: center;
}

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

.updates-list li {
  margin: 0.75em 0;
}

.updates-date {
  display: block;
  font-size: 0.85em;
  color: var(--color-posted);
}

.figure-container {
  display: flex;
  justify-content: space-around;
  /* This will space your images evenly */
  align-items: flex-start;
  /* This will align items to the top */
  margin-bottom: 1em;
}

nav div.current {
  background-color: var(--color-nav-current-bg);
  color: var(--color-nav-current-text);
}

/*#4a3d35*/
nav div.current a {
  text-decoration: none;
  background-color: var(--color-nav-current-link-bg);
  color: var(--color-nav-current-text);
}

div.overlap {
  position: absolute;
  top: 0;
  height: 4px;
  width: 100%;
  background-color: var(--color-overlap);
  /* Replace with your color */
  /* If you need to ensure it's above other elements inside the container */
  z-index: 1;
}

nav div {
  box-shadow: var(--shadow-nav);
}

nav div a {
  padding: 0;
  padding-top: 6px;
  padding-bottom: 6px;
  text-decoration: none;
  display: block;
  width: 100%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

nav div a:hover {
  text-decoration: none;
  background-color: var(--color-nav-hover-bg);
  color: var(--color-nav-hover-text);
}

/* Media query for mobile screens */
@media screen and (max-width: 600px) {
  nav {
    flex: 100%;
    flex-direction: column;
    /* This will stack them vertically */
  }

  nav div a {
    padding: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
  }

  nav div.current a {
    text-decoration: none;
    background-color: var(--color-nav-hover-bg);
    color: var(--color-nav-hover-text);
  }
}

.header-image {
  background-image: image-set(url("header-image.webp") type("image/webp"),
      url("header-image.jpg") type("image/jpeg"));

  background-size: cover;
  background-position: top;
  height: 300px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px;
  box-sizing: border-box;
}

.header-text {
  text-transform: uppercase;
  font-size: 3em;
  margin: 0.25em;
  color: var(--color-header-text);
}

figure {
  /* Optional border */
  border-radius: 4px;
  padding: 10px;
  margin: 0 auto;
  /* Center the figure block */
  max-width: 300px;
  /* Set a max-width to maintain a readable caption width */
  text-align: center;
  /* Center the content */
}

figure img {
  width: 100%;
  /* Make image fill the figure element */
  height: auto;
  /* Maintain aspect ratio */
  display: block;
  /* Remove inline-block spacing */
  margin: 0 auto;
  /* Center the image within the figure */
}

figure video {
  width: 100%;
  /* Make image fill the figure element */
  height: auto;
  /* Maintain aspect ratio */
  display: block;
  /* Remove inline-block spacing */
  margin: 0 auto;
  /* Center the image within the figure */
}

figcaption {
  /* Space out caption from image */
  font-style: italic;
  /* Optional styling */
  color: var(--color-figcaption);
}

img.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.header-image a {
  text-decoration: none;
}

.donate-button {
  background-color: #c4562f;
  color: #ffffff;
  font-weight: bold;
  letter-spacing: 0.03em;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  font-size: 0.9em;
}

a.donate-button:link, a.donate-button:visited {
  color: #ffffff;
}

.donate-button:hover {
  background-color: #a94929;
  color: #ffffff;
}

.locale-links {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.header-image .locale-links a {
  display: flex;
  height: 32px;
  width: 32px;
}

.header-image .locale-links a:hover {
  background-color: initial;
}

.header-image .locale-links img {
  border-radius: 50%;
  width: 32px;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media screen and (max-width: 600px) {
  .header-image {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .locale-links {
    align-self: flex-end;
  }
}

#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: var(--color-link);
  color: var(--color-surface);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  padding-bottom: 6px;
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  background: var(--color-nav-hover-bg);
}
