/* Base styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'EB Garamond', serif;
  background-color: #3b3b3b;
  color: #fff2cc;
  background-image: url("https://notesfromthepottingshed.neocities.org/images/background2.png");
  background-repeat: repeat;
  background-size: auto 100vh;
  background-attachment: fixed;
}

/* Header image */
.site-banner {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
  border: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Welcome box */
.welcome-box {
  text-align: center;
  font-size: 1.2em;
  margin: 1em auto;
  color: #fff2cc;
  width: 100%;
  background-color: transparent;
}

/* Navigation styles */
nav {
  background-color: #2b2b2b;
  padding: 10px 0;
  width: 100%;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  max-width: 100%;
}

nav ul li {
  margin: 0 15px;
  position: relative;
  display: inline-block;
}

nav ul li a {
  text-decoration: none;
  color: #fff2cc;
  font-weight: bold;
  white-space: nowrap;
}

/* Dropdown styling */
nav ul li ul {
  display: none;
  position: absolute;
  background-color: #2b2b2b;
  top: 100%;
  left: 0;
  padding: 0;
  z-index: 999;
  min-width: 150px;
}

nav ul li:hover ul {
  display: block;
}

nav ul li ul li {
  margin: 0;
  text-align: left;
  padding: 8px 12px;
}

nav ul li ul li a {
  color: #fff2cc;
  display: block;
}

nav ul li ul li a:hover {
  text-decoration: underline;
}

/* Nested dropdown (FAQ under Keith) */
nav ul li ul li.has-submenu {
  position: relative;
}

nav ul li ul li ul.submenu {
  background-color: #2b2b2b;
  min-width: 150px;
  z-index: 999;
}

nav ul li:hover ul,
nav ul li ul li:hover ul.submenu {
  display: block;
}

/* Footer */
footer {
  background-color: #2b2b2b;
  color: #fff2cc;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9em;
}

footer a {
  color: #fff2cc;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive image fix */
img {
  max-width: 100%;
  height: auto;
}

/* Ramblings page layout: 2-abreast blog post summaries */
.post-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  padding: 2em 1em;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

.post-summary {
  flex: 0 0 calc(50% - 2em);
  max-width: 480px;
  background-color: rgba(59, 59, 59, 0.6);
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  padding: 1em;
  color: #fff2cc;
  text-align: center;
  box-sizing: border-box;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .post-grid {
    flex-direction: column;
    align-items: center;
  }

  .post-summary {
    width: 100%;
    max-width: 100%;
  }
}

.post-summary img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5em;
}

.post-summary h3,
.post-summary p,
.post-summary a {
  color: #fff2cc;
  text-decoration: none;
}

.post-summary a:hover {
  text-decoration: underline;
}

.post-actions {
  margin-top: 0.5em;
}

.post-actions button {
  margin: 0 5px;
  padding: 5px 10px;
  background-color: #4a4a4a;
  color: #fff2cc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.post-actions button:hover {
  background-color: #6a6a6a;
}

/* Blog tool layout */
.blog-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2em auto;
  padding: 1em;
  max-width: 900px;
  flex-wrap: wrap;
  gap: 1em;
}

.category-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 1em 0;
}

.blog-tools label {
  font-weight: bold;
}

.blog-tools select,
.blog-tools button {
  font-size: 1em;
  padding: 0.5em;
  background-color: #4a4a4a;
  color: #fff2cc;
  border: none;
  border-radius: 6px;
}

.blog-tools button:hover {
  background-color: #6a6a6a;
}

/* Calendar box for sidebar */
.calendar-selector {
  text-align: right;
  margin-top: auto;
  padding-top: 2em;
}

.calendar-selector h3 {
  margin-bottom: 0.5em;
  font-size: 1.1em;
  color: #fff2cc;
}

.calendar-selector iframe {
  border: none;
  width: 100%;
  height: 300px;
  background-color: transparent;
}

/* Three-column layout */
.container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.left-column {
  width: 20%;
  padding: 0 10px;
  display: none;
}

.center-column {
  width: 60%;
  padding: 0 10px;
}

.right-column {
  width: 20%;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .post-grid {
    flex-direction: column;
    align-items: center;
  }

  .post-summary {
    width: 100%;
  }

  .container {
    flex-direction: column;
  }

  .left-column,
  .right-column {
    display: none;
  }

  .center-column {
    width: 100%;
  }
}
