/* Dropdown container */
nav ul li.dropdown {
  position: relative;
}

/* Hide dropdown by default */
nav ul li .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 180px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  z-index: 1000;
}

/* Dropdown links */
nav ul li .dropdown-menu li a {
  display: block;
  padding: 10px;
  color: black;
  text-decoration: none;
}

nav ul li .dropdown-menu li a:hover {
  background: #eee;
}

/* Show dropdown on hover */
nav ul li.dropdown:hover .dropdown-menu {
  display: block;
}
h1 {
  text-align: center;
}

h4 {
  text-align: center;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body background */
body {
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.6;
  color: #222;
  background-image: url("images/islandskort-gudbrands-biskups-thorlakssnar-a-holum-1590.jpg");
  background-repeat: repeat-y;   /* repeat vertically */
  background-size: 100% auto;    /* stretch full width, keep proportions */
  background-position: top center;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* Links */
a {
  color: #222;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Paragraphs */
p {
  margin-bottom: 1em;  /* space after each paragraph */
}

/* Header */
header {
  text-align: center;
  padding: 1em;
  background-color: rgba(240, 240, 240, 0.9); /* subtle grey overlay */
}
header img {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5em;
}
nav ul li {
  display: inline;
}
nav a {
  font-weight: bold;
}

/* Main content */
main {
  flex: 1;
  max-width: 700px;
  margin: 0 auto 2em;
  padding: 1em;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
}

/* General images inside main */
main img {
  display: block;
  margin: 1.5em auto;   /* center horizontally */
  height: auto;
  max-width: 100%;
}
/* Paragraph spacing */
main p {
  margin-top: 0;
  margin-bottom: 1em; /* consistent space between paragraphs */
}
/* Post styling */
.post-title {
  font-size: 1.8em;
  margin-bottom: 0; /* no space below */
}
/* Placename under post title */
.placename {
  font-size: 0.8em;
  font-style: italic;
  margin-top: 0;
  margin-bottom: 1em; /* adds space after placename */
}
.post-image {
  max-width: 700px;
  width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
}
figcaption {
  text-align: center;
  font-size: 0.9em;
  color: #555;
  margin-top: 0.5em;     /* space above caption */
  margin-bottom: 1.5em;  /* space below caption */
  font-style: italic;
}

.sources {
  margin: 2em;   /* 2em everywhere */
  font-size: 0.9em;
  color: #444;
}

/* Footer */
footer {
  text-align: center;
  padding: 1em;
  background-color: rgba(240, 240, 240, 0.9);
}

/* Blog style post list */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 25px;         /* space between posts */
  margin-top: 30px;
}

.post-link {
  display: block;
  text-decoration: none;
  color: inherit;    /* use body text color */
}

.post {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: box-shadow 0.2s, background 0.2s;
}

.post:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.post h2 {
  margin: 0;
  font-size: 1.4rem;
  font-family: Georgia, serif;
}

.post .placename {
  font-size: 1rem;
  font-style: italic;
  margin: 0;
}

.post img.thumb {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 15px auto;   /* center thumbnails */
  border-radius: 4px;
}
.post-preview {
  display: flex;
  align-items: flex-start; /* keep image aligned to top of text */
  gap: 15px;               /* space between image and text */
}

.post-preview img.thumb {
  width: 150px;   /* thumbnail size */
  height: auto;
  flex-shrink: 0; /* don’t let the image shrink */
  border-radius: 4px;
}

.post-preview p {
  flex: 1; /* allow text to take remaining space */
}
@media (max-width: 600px) {
  .post-preview {
    flex-direction: column;
  }

  .post-preview img.thumb {
    width: 100%;
    max-width: 300px; /* keep it reasonable */
    margin: 0 auto;   /* center the image */
  }
}
/* Page-specific override for UM */
body.um-page main {
  max-width: 700px;   
  padding: 6em;       /* bigger white margins inside */
}
