html, body {
  min-height: 100%;
  overflow-x: hidden; /* prevent horizontal scrollbars */
}


/* Layout */
body {
    display: flex;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #344E41;
	background-image: linear-gradient(#344E41, #152219);
    color: #2c2c2c;
    max-width: 1300px;
	min-height: 100vh;
}

@media (max-width: 1060px) {
  body {
    flex-direction: column;
  }
	#right-sidebar {
        display: none;
    }
    .listpage-container {
      flex-direction: column;
    }
	#left-sidebar {
        display: none;
    }
    aside {
        flex: 1 1 auto;
        width: auto; /* remove fixed width */
    }
}

main {
    flex: 1;
    padding: 2rem;
    background-color: #f4f1eb;
}

aside {
    background-color: #f0ead2;
    padding: 1.5rem;
}

aside a{
	color: #344E41;
}
aside a:hover{
	text-decoration: none;
}

#left-sidebar {
	flex: 0 0 200px;
    background-position: center top;
    background-repeat: no-repeat;
	border-right: 1px solid #a68a64;
}

#right-sidebar {
	flex: 0 0 100px;
	background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
	border-left: 1px solid #a68a64;
}


.excerpt {
    border: 1px solid black; 
    padding: 10px; 
    font-family: Kalam, Brush Script MT;
    cursor: help;
	background-color: #fffaf7;
}

.kalam {
    font-family: Kalam, Brush Script MT;
}

/* Typography */
h1, h2, h3 {
    margin-top: 0;
    font-weight: 600;
}

h1, h2 {
    font-family: Kalam, Brush Script MT;
}

hr {
    border: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 0.5em;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    color: #004a99;
    text-decoration: underline;
}

.nav-links {
    display: flex;
    justify-content: center;  /* Center the whole group */
    gap: 4em;                  /* Space between prev and next */
    margin-top: 2em;
    margin-bottom: 2em;
    flex-wrap: wrap;           /* Optional: wrap on small screens */
    text-align: center;
}

.nav-links a {
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap; /* Prevent line breaks in long titles */
}

.current-article {
    font-weight: bold;
	margin-left: -14px;
}
.current-article::before {
    content: "⚲ "
}

.listpage-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.listpage-column {
    flex: 1 1 200px; /* was 300px, now smaller for mobile */
    min-width: 0;    /* allow shrink below intrinsic size */
}

/* Forms & Buttons */
input[type="text"] {
    width: 100%;
    padding: 0.5em;
    margin-top: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    margin-top: 1em;
    padding: 0.4em 1em;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #004a99;
}

/* Misc */
small {
    color: #777;
}


/* Hide mobile top nav by default */
#mobile-top-nav {
  display: none;
  background-color: #f4f1eb;
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 1rem;
}

/* Style the list for horizontal layout */
#mobile-top-nav ul {
  display: flex;
  justify-content: left;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#mobile-top-nav li {
  margin: 0;
}

#mobile-top-nav a {
  color: #0066cc;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}

#mobile-top-nav a:hover {
  text-decoration: underline;
}

/* Show on small screens */
@media (max-width: 1060px) {
  #mobile-top-nav {
    display: block;
	width: 100%;
  }
}



.PrevNextNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  background: #f9f9f9;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  user-select: none;
}

.PrevNextNav .nav-link {
  color: #3366cc;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  min-width: 140px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.PrevNextNav .nav-link:hover,
.PrevNextNav .nav-link:focus {
  background-color: #3366cc;
  color: white;
  outline: none;
}

.PrevNextNav .nav-link.prev {
  justify-content: flex-start;
}

.PrevNextNav .nav-link.next {
  justify-content: flex-end;
}

.PrevNextNav .nav-link.random {
  flex-grow: 1;
  justify-content: center;
  font-weight: 700;
  max-width: 120px;
  min-width: 100px;
  user-select: text;
}

.PrevNextNav .nav-link.random:hover {
  transform: rotate(180deg);
}

.PrevNextNav .nav-label {
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.7;
}

.PrevNextNav .nav-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.PrevNextNav .arrow {
  font-weight: 700;
  font-size: 1.2em;
  user-select: none;
}

/* Optional spacing */
.PrevNextNav .nav-link.prev .arrow {
  margin-right: 0.4em;
}

.PrevNextNav .nav-link.next .arrow {
  margin-left: 0.4em;
}



@media (max-width: 800px) {
  .PrevNextNav {
    max-width: 100%;
    padding: 0.5rem 0.8rem;
    font-size: 1rem;
  }

  .PrevNextNav .nav-link {
    min-width: 120px;    /* more width */
    max-width: 220px;    /* more max width */
    padding: 0.25rem 0.6rem;
    font-size: 1rem;
  }

  .PrevNextNav .nav-label {
    display: none; /* still hide labels */
  }

  .PrevNextNav .nav-title {
    font-size: 1rem;
    white-space: nowrap;
  }

.PrevNextNav .nav-link.random {
  display: inline-block; /* Added */
  flex-grow: 0;
  min-width: auto;
  max-width: 2.3em;
  padding: 0;
  justify-content: center;
  font-weight: 700;
  transition: transform 0.3s ease;
}



  .PrevNextNav .arrow {
    font-size: 1.1em;
  }
}
