/* ============================================
   NOTION-INSPIRED CARD SYSTEM
   Modern card-based blog layout
   ============================================ */

/* Post Grid Container */
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
  margin-left: 0;
  margin-right: 0;
}

/* Card Base */
.post-card {
  display: flex;
  flex-direction: column;
  background: #222220;
  border: 1px solid #3a3836;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(197, 100, 28, 0.3);
  border-color: #c5641c;
}

/* Lazy Card Loading States */
.lazy-card {
  opacity: 0;
  transform: translateY(20px);
}

.lazy-card-loaded {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Card Image */
.post-card-image {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: #2a2520;
}

.post-card-image img {
  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);
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

/* Card Content */
.post-card-content {
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex: 1;
}

/* Category Badge */
.category-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  width: fit-content;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.category-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* Sun Nation Category Badge Colors */

/* Events - Bright orange */
.badge-events {
  background: #c5641c;
  color: #fff !important;
}

/* Set List - Lighter orange/amber */
.badge-set-list {
  background: #d4752a;
  color: #fff !important;
}

/* The Lineup - Dark brown with orange accent */
.badge-the-lineup {
  background: #2a2520;
  color: #c5641c !important;
  border: 1px solid #c5641c;
}

/* Default badge - orange theme */
.category-badge:not([class*="badge-"]) {
  background: #c5641c;
  color: #fff !important;
}

/* Ensure badge links are always the badge color, not default link color */
a.category-badge,
a.category-badge:visited,
a.category-badge:hover,
a.category-badge:active {
  color: inherit;
}

/* Post Title */
.post-card-title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
  color: #e8e6e3;
}

.post-card-title a {
  color: #e8e6e3;
  text-decoration: none;
  transition: color 0.2s;
}

.post-card-title a:visited {
  color: #e8e6e3;
}

.post-card:hover .post-card-title a {
  color: #c5641c;
}

/* Post Excerpt */
.post-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #a8a6a3;
  margin: 0 0 16px 0;
  flex: 1;
}

/* Post Meta / Author */
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #3a3836;
}

.post-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #2a2826;
}

.post-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.post-author-name {
  font-size: 14px;
  font-weight: 500;
  color: #e8e6e3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-date-reading {
  font-size: 13px;
  color: #a8a6a3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-icon,
.reading-time-icon {
  flex-shrink: 0;
  color: #c5641c !important;
  font-size: 13px !important;
  width: 13px;
  height: 13px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
  vertical-align: middle;
}

.status-badge.new {
  background: #e3f2fd;
  color: #1565c0;
}

.status-badge.updated {
  background: #fff3e0;
  color: #e65100;
}

/* Featured Post (same size as others, with visual flair) */
.post-card.featured {
  position: relative;
  border: 2px solid #c5641c;
  box-shadow: 0 4px 12px rgba(32, 178, 170, 0.15);
}

.post-card.featured:hover {
  box-shadow: 0 6px 20px rgba(32, 178, 170, 0.25);
  transform: translateY(-2px);
}

/* Featured Badge */
.post-card.featured::before {
  content: "Featured";
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #c5641c 0%, #a0501a 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Legacy Post List Support (for non-grid views) */
.post-list .post-item {
  margin-bottom: 0;
}

/* Responsive Grid */
@media (max-width: 1400px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
}

@media (max-width: 1200px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-left: 0;
    margin-right: 0;
  }

  .home .page-heading {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-left: 0;
    margin-right: 0;
  }

  .post-card-content {
    padding: 18px;
  }

  .home .page-heading {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Tablet and Mobile Landscape specific */
@media (min-width: 601px) and (max-width: 900px) and (orientation: landscape) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-left: 0;
    margin-right: 0;
  }

  .post-card-content {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-left: 0;
    margin-right: 0;
  }

  .post-card.featured {
    grid-column: span 1;
  }

  .post-card-content {
    padding: 20px;
  }

  .post-card-title {
    font-size: 18px;
  }

  .post-card-excerpt {
    font-size: 14px;
  }

  .home .page-heading {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Page Heading */
.page-heading {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  padding: 0;
  color: #e8e6e3;
}

.home .page-heading {
  margin-bottom: 40px;
}

/* Post Count Info */
.post-count-info,
.tag-description,
.category-description {
  font-size: 16px;
  color: #a8a6a3;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Archive/Tag Page Headers */
.category-archive,
.tag-page {
  margin-bottom: 32px;
}

.tag-icon,
.category-icon {
  font-size: 0.9em;
  margin-right: 8px;
  color: #c5641c;
}
