* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #333;
}

.blog-hero {
  text-align: center;
  padding: 60px 20px 30px;
}
.blog-hero h1 {
  font-size: 2.5rem;
  letter-spacing: 2px;
}
.blog-hero h1 span {
  color: #6c5ce7;
}
.blog-hero p {
  max-width: 500px;
  margin: 12px auto 0;
  color: #777;
  font-size: 0.95rem;
}

.search-wrapper {
  position: relative;
  max-width: 420px;
  margin: 30px auto 0;
}
#searchInput {
  width: 100%;
  padding: 14px 45px 14px 18px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
}
#searchInput:focus {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: #6c5ce7;
  margin-bottom: 10px;
}
.card-meta .cat {
  background: #f0edff;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 8px;
}
.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: #222;
}
.card p {
  font-size: 0.9rem;
  color: #777;
  flex: 1;
  line-height: 1.5;
}

.read-more {
  margin-top: 16px;
  align-self: flex-start;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: #6c5ce7;
  position: relative;
}
.read-more::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: #6c5ce7;
  transition: width 0.25s;
}
.read-more:hover::after {
  width: 100%;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 1.1rem;
}
