
/* Basic Reset & Typography */
body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Roboto', sans-serif;
  color: #2c3e50;
}

a {
  text-decoration: none;
  color: #007bff;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  background-color: #ffffff;
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.header h1 {
  margin: 0;
  font-size: 2.5em;
  color: #007bff; /* Accent color for your brand */
}

.header p {
  margin-top: 5px;
  color: #555;
  font-size: 1.1em;
}

/* Main Content Area */
.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap; /* Allows columns to wrap on smaller screens */
  gap: 30px; /* Space between columns */
}

/* Main Blog List Section */
.blog-list-section {
  flex: 3; /* Takes up more space */
  min-width: 600px; /* Ensures it doesn't get too small */
}

.blog-post-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
  overflow: hidden;
  transition: transform 0.2s ease-in-out;
}

.blog-post-card:hover {
  transform: translateY(-5px);
}

.blog-post-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.blog-post-content {
  padding: 25px;
}

.blog-post-content h2 {
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 10px;
}

.blog-post-content h2 a {
  color: #2c3e50;
}

.blog-post-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
}

.blog-post-meta span:not(:last-child) {
  margin-right: 15px;
}

.blog-post-excerpt {
  margin-bottom: 20px;
  color: #555;
}

.read-more {
  display: inline-block;
  padding: 8px 15px;
  background-color: #007bff;
  color: #ffffff;
  border-radius: 5px;
  font-weight: bold;
}

.read-more:hover {
  background-color: #0056b3;
  text-decoration: none;
}

/* Sidebar */
.sidebar {
  flex: 1; /* Takes up less space */
  min-width: 300px; /* Ensures it doesn't get too small */
}

.sidebar-widget {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 25px;
}

.sidebar-widget h3 {
  margin-top: 0;
  color: #007bff;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget ul li {
  margin-bottom: 10px;
}

.sidebar-widget ul li a {
  color: #555;
}

.sidebar-widget ul li a:hover {
  color: #007bff;
}

/* Search Bar */
.search-bar {
  margin-bottom: 25px;
}

.search-bar input[type='text'] {
  width: calc(100% - 22px); /* Adjust for padding and border */
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

.search-bar button {
  width: 100%;
  padding: 10px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  margin-top: 10px;
}

.search-bar button:hover {
  background-color: #218838;
}

/* Pagination */
.pagination {
  text-align: center;
  margin-top: 30px;
}

.pagination a {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #007bff;
}

.pagination a.active,
.pagination a:hover {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
  text-decoration: none;
}

/* Footer */
.footer {
  background-color: #2c3e50;
  color: #ffffff;
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
  font-size: 0.9em;
}

.footer p {
  margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .blog-list-section,
  .sidebar {
    min-width: unset; /* Remove min-width to allow full flexibility */
    width: 100%; /* Take full width on small screens */
  }
}
