/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.main-header {
  background-color: #333;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-header .logo {
  font-size: 1.5rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.main-nav a:hover {
  text-decoration: underline;
}

/* Hero section */
.hero {
  background: url('https://via.placeholder.com/1200x400') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Layout container to hold main content and sidebar side by side */
.content {
  width: 60%;
  float: left;
  padding: 1rem 2rem;
}

.sidebar {
  width: 30%;
  float: right;
  background-color: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  margin-right: 2rem;
}

/* Blog posts */
.post {
  background-color: #fff;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.post-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-date {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.post-content {
  margin-bottom: 1rem;
}

.read-more {
  color: #0066cc;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* Sidebar */
.sidebar h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.sidebar ul {
  list-style: square inside;
  padding-left: 0; 
}

.sidebar li a {
  color: #333;
  text-decoration: none;
}

.sidebar li a:hover {
  text-decoration: underline;
}

/* Footer */
.main-footer {
  clear: both;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 1rem;
  margin-top: auto; /* ensures footer is at bottom if there's little content */
}

/* Wrap main content and sidebar in a container */
.blog-container {
  display: flex;
  flex-wrap: wrap; /* allows wrapping on small screens */
  margin: 0 auto;  /* center the container */
  max-width: 1200px;
  padding: 1rem;
}

.content {
  flex: 0 0 70%;
  padding: 1rem;
}

.sidebar {
  flex: 0 0 30%;
  padding: 1rem;
  background-color: #fff;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .content, .sidebar {
    flex: 0 0 100%;
  }
}

