/* === Blog Cards and Listing === */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  padding: 50px 5%;
}

.blog-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 25px rgba(0, 224, 255, 0.4), 0 15px 30px rgba(0, 0, 0, 0.7);
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.blog-card:hover img {
  opacity: 0.85;
}

.blog-card-content {
  padding: 20px;
  text-align: right;
  color: var(--text-color);
}

.blog-card-content h3 {
  color: var(--primary-color);
  margin: 10px 0;
  font-size: 1.3rem;
  text-shadow: 0 0 3px rgba(0, 224, 255, 0.3);
}

.blog-card-content p {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.blog-card-content .read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.blog-card-content .read-more:hover {
  color: white;
}

.loading-state {
  text-align: center;
  padding: 40px 0;
  color: var(--text-color);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 224, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state, .empty-state {
  text-align: center;
  padding: 40px 0;
  color: #ccc;
}

.error-state p {
  color: #ef4444;
}

.cta-button {
  background-color: var(--primary-color);
  color: var(--dark-bg);
  padding: 12px 30px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
}

.blog-hero {
  padding: 100px 5% 60px;
  text-align: center;
  background-color: var(--secondary-color);
}

.blog-hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.blog-hero p {
  color: #9ca3af;
  font-size: 1.2rem;
}
