/* Basic Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #2A2A2A;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 20px auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header {
  background-color: #C6010B;
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.8em;
}

header h1 a {
  color: #fff;
  text-decoration: none;
}

main {
  padding: 20px 0;
}

h2 {
  color: #B92C25;
  border-bottom: 2px solid #FB581F;
  padding-bottom: 5px;
  margin-top: 30px;
}

/* Post Form */
.post-form-section {
  margin-bottom: 30px;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.post-form-toggle {
  background-color: #22A6BF;
  color: #fff;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: bold;
}

.post-form-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.post-form-container.collapsed {
  max-height: 0;
}

.post-form-container:not(.collapsed) {
  max-height: 500px; /* Adjust as needed */
  padding: 15px;
  border-top: 1px solid #eee;
}

.post-form .form-group {
  margin-bottom: 15px;
}

.post-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.post-form input[type="text"],
.post-form textarea {
  width: calc(100% - 22px); /* Account for padding and border */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.post-form textarea {
  resize: vertical;
}

.btn-primary {
  background-color: #C6010B;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #B92C25;
}

.btn-secondary {
  background-color: #22A6BF;
  color: #fff;
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #1a8fa6;
}

/* Post Cards */
.post-card {
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
}

.post-meta {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 10px;
}

.post-content p:last-child {
  margin-bottom: 0;
}

.post-content img {
  max-width: 100%;
}

/* Past Pages/Logs */
.past-pages ul,
.past-logs-nav ul {
  list-style: none;
  padding: 0;
}

.past-pages li,
.past-logs-nav li {
  margin-bottom: 10px;
}

.past-pages li a,
.past-logs-nav li a {
  display: block;
  background-color: #e9e9e9;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  color: #2A2A2A;
  transition: background-color 0.2s ease;
}

.past-pages li a:hover,
.past-logs-nav li a:hover {
  background-color: #ddd;
}

.past-pages li h3 {
  margin-top: 0;
  margin-bottom: 5px;
  color: #C6010B;
}

.past-pages li p {
  margin: 0;
  font-size: 0.9em;
}

.past-pages li .summary {
  font-style: italic;
  color: #555;
  margin-top: 5px;
}

.week-range {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 20px;
}

.week-summary {
  background-color: #eef7f9;
  border-left: 5px solid #22A6BF;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 0 5px 5px 0;
}

.week-summary h3 {
  margin-top: 0;
  color: #22A6BF;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  border-top: 1px solid #eee;
  color: #777;
  font-size: 0.9em;
}

/* Markdown Styling */
.post-content pre,
.week-summary pre {
  background-color: #eee;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
}

.post-content code,
.week-summary code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  background-color: #e0e0e0;
  padding: 2px 4px;
  border-radius: 3px;
}

.post-content pre code,
.week-summary pre code {
  background-color: transparent;
  padding: 0;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .container {
    margin: 10px;
    padding: 15px;
  }

  header h1 {
    font-size: 1.5em;
  }

  .post-form input[type="text"],
  .post-form textarea {
    width: calc(100% - 20px);
  }
}
