/* Blog Grid Styles - Simple & Clean */

.cbg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
  padding: 0;
  max-width: 100%;
}

.cbg-card {
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.cbg-thumb {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.cbg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cbg-thumb-placeholder {
  width: 100%;
  height: 200px;
  background: #dee2e6;
}

.cbg-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.cbg-category {
  font-size: 11px;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 12px;
  display: inline-block;
}

.cbg-title {
  font-size: 20px !important;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.4;
  flex-grow: 1;
}

.cbg-title a {
  color: inherit;
  text-decoration: none;
}

.cbg-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
  margin-top: auto;
  font-size: 13px;
  color: #6c757d;
}

.cbg-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cbg-author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cbg-author span {
  font-weight: 500;
  color: #495057;
}

.cbg-date {
  font-size: 13px;
  color: #6c757d;
  font-weight: 400;
}

.cbg-no-results {
  text-align: center;
  color: #6c757d;
  padding: 60px 20px;
  font-size: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 20px;
}

/* Search wrapper styling */
.my-blog-search-wrapper {
  margin-bottom: 32px;
  position: relative;
  max-width: 600px;
}

#blog-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

#blog-search:focus {
  outline: none;
  border-color: #999;
}

#search-results {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  display: none;
  max-height: 300px;
  overflow: auto;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 4px;
}

#search-results > div {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f5;
}

#search-results > div:last-child {
  border-bottom: none;
}

#search-results > div:hover {
  background-color: #f8f9fa;
}

#search-results a {
  text-decoration: none;
  color: #495057;
  font-weight: 500;
}

/* Category Filter Styling */
.cbg-category-filter {
  margin-bottom: 20px;
}

#category-filter {
  width: 100%;
  max-width: 600px;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  cursor: pointer;
}

#category-filter:focus {
  outline: none;
  border-color: #999;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .cbg-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .cbg-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .cbg-title {
    font-size: 18px;
  }
  
  .cbg-thumb {
    height: 200px;
  }
}