/* ===================================
   PicToPixel Blog Styles
   =================================== */

/* ===================================
   Blog Container
   =================================== */

.blog-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  background:
    /* Radial gradient glow effect at top */
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
    /* Base background */
    linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
}

/* ===================================
   Hero Section
   =================================== */

.blog-hero {
  text-align: center;
  padding: 80px 0 60px;
}

.blog-hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  color: #1F2937;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.blog-hero-description {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: #6B7280;
  max-width: 600px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* ===================================
   Blog Grid
   =================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 80px;
}

/* ===================================
   Blog Card
   =================================== */

.blog-card {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Card Image */

.blog-card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background: #F3F4F6;
}

.blog-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-image {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* Card Content */

.blog-card-content {
  padding: 24px;
}

.blog-card-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: #1F2937;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.blog-card:hover .blog-card-title {
  color: #3B82F6;
}

.blog-card-excerpt {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #6B7280;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Card Meta */

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
  font-weight: 500;
  color: #9CA3AF;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.blog-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .blog-hero-title {
    font-size: 48px;
  }

  .blog-container {
    padding: 0 32px;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-hero {
    padding: 60px 0 40px;
  }

  .blog-hero-title {
    font-size: 36px;
  }

  .blog-hero-description {
    font-size: 18px;
  }

  .blog-container {
    padding: 0 20px;
  }

  .blog-filter-bar {
    gap: 8px;
    margin-bottom: 40px;
  }

  .blog-filter-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  .blog-card-title {
    font-size: 20px;
  }

  .blog-card-excerpt {
    font-size: 15px;
  }
}

/* Large Screen (> 1440px) */
@media (min-width: 1440px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

/* ===================================
   Loading States
   =================================== */

.blog-card-loading {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===================================
   Accessibility
   =================================== */

.blog-card:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

.blog-filter-btn:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* ===================================
   Utility Classes
   =================================== */

.blog-hidden {
  display: none !important;
}

.blog-fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Empty State
   =================================== */

.blog-empty-state {
  text-align: center;
  padding: 80px 0;
  color: #6B7280;
}

.blog-empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.blog-empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 8px;
}

.blog-empty-state-text {
  font-size: 16px;
  color: #9CA3AF;
}

/* ===================================
   END OF BLOG STYLES
   =================================== */
