/* --- Blog Listing Page --- */

.blog-header {
  text-align: center;
  padding: 60px 0;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
}

.blog-header h1 {
  font-size: 3rem;
  color: #2c3e50;
}

.blog-header p {
  font-size: 1.2rem;
  color: #555;
  margin-top: 10px;
}

.search-container {
  margin-top: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

#blog-search {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 25px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#blog-search:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.blog-main-content {
  padding: 60px 0;
}

.blog-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.blog-post-card {
  text-decoration: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.blog-post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-excerpt {
  color: #555;
  margin-top: 15px;
}

.blog-post-content {
  padding: 25px;
  flex-grow: 1;
}

.blog-post-content .post-date {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 10px;
}

.blog-post-content h3 {
  color: #c0392b; /* A reddish color for blog titles */
  margin-bottom: 15px;
}

/* --- Single Post Page --- */
.post-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 2rem;
}

.post-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.post-header h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  color: #2c3e50;
}

.post-meta {
  margin-top: 15px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
  text-align: left;
}

.post-content p {
  margin-bottom: 20px;
}

.post-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 30px 0;
}

.back-link {
  display: inline-block;
  margin-top: 40px;
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination button {
  background-color: #fff;
  border: 1px solid #ddd;
  color: #3498db;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination button:hover:not(:disabled),
.pagination button.active {
  background-color: #3498db;
  color: #fff;
}

.pagination button:disabled {
  color: #ccc;
  cursor: not-allowed;
  background-color: #f9f9f9;
}
