:root {
  --primary-color: #007bff;
  --text-color: #333;
  --light-gray: #f8f9fa;
  --border-color: #e2e8f0;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f8fafc;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.blog-hero {
  background-size: cover;
  background-position: center;
  color: white;
  padding: 4rem 0;
  text-align: center;
  background-repeat: no-repeat;
}

.blog-hero h1 {
  font-size: 3rem;
  margin: 0 0 1rem;
}

.blog-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 3rem;
}

.search-section {
  max-width: 600px;
  margin: 2rem auto 0;
}

.search-container {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 4px;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-icon {
  font-size: 1.2rem;
  padding: 0 0.75rem;
  color: white;
}

#searchInput {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem;
  font-size: 1rem;
  color: white;
  outline: none;
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.clear-search {
  background: transparent;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.clear-search:hover {
  opacity: 1;
}

.blog-posts-section {
  padding: 4rem 0;
  background: #f8fafc;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 350px;
  margin: 0 auto;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
  position: relative;
  padding-top: 56.25%;
}

.blog-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card-date {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  text-align: center;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-card-date .day {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.blog-card-date .month {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.blog-card-content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: #e2e8f0;
  color: #475569;
  border-radius: 15px;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  line-height: 1.4;
  color: #1a1a1a;
}

.blog-card-excerpt {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-card-timestamp {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.read-more-link {
  font-size: 0.9rem;
  color: #007bff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.3s ease;
}

.read-more-link:hover {
  gap: 0.75rem;
}

.no-results {
  text-align: center;
  padding: 4rem 0;
  color: #64748b;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 3rem 0;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .search-container {
    margin: 0 1rem;
  }

  .blog-posts-section {
    padding: 2rem 0;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .search-container {
    margin: 0 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0 1rem;
  }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }
}
