/**
 * Tenbit Addon - Posts Listing & Field Guide Cards Styles
 * Author: Team Tenbit (https://tenbitsol.com)
 * Version: 1.0.0
 */

.tenbit-posts-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.tenbit-posts-grid {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Columns */
.tenbit-posts-grid.columns-1 { grid-template-columns: 1fr; }
.tenbit-posts-grid.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tenbit-posts-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tenbit-posts-grid.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tenbit-posts-grid.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tenbit-posts-grid.columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Post Article Card */
.tenbit-post-card {
  position: relative;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.tenbit-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Media Area */
.tenbit-post-media {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #141715;
}

.tenbit-post-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.tenbit-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tenbit-post-card:hover .tenbit-post-media img {
  transform: scale(1.06);
}

/* Content Area */
.tenbit-post-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: #ffffff;
  box-sizing: border-box;
}

/* Eyebrow / Category / Field Guide Tag */
.tenbit-post-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ff5500;
  margin-bottom: 8px;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.tenbit-post-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.tenbit-post-eyebrow a:hover {
  color: #e04a00;
}

/* Title */
.tenbit-post-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #191917;
  margin: 0 0 10px 0;
  padding: 0;
  transition: color 0.2s ease;
}

.tenbit-post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tenbit-post-title a:hover {
  color: #ff5500;
}

/* Post Meta (Author, Date) */
.tenbit-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #939185;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tenbit-post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Excerpt */
.tenbit-post-excerpt {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  color: #4a4943;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

/* Read More Link */
.tenbit-post-readmore {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ff5500;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tenbit-post-readmore .readmore-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tenbit-post-readmore:hover {
  color: #e04a00;
}

.tenbit-post-readmore:hover .readmore-arrow {
  transform: translateX(4px);
}

/* Pagination */
.tenbit-posts-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.tenbit-posts-pagination a,
.tenbit-posts-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  background-color: #ffffff;
  color: #191917;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tenbit-posts-pagination a:hover,
.tenbit-posts-pagination span.current {
  background-color: #ff5500;
  border-color: #ff5500;
  color: #ffffff;
}

/* Responsive Adaptations */
@media (max-width: 991px) {
  .tenbit-posts-grid.columns-3,
  .tenbit-posts-grid.columns-4,
  .tenbit-posts-grid.columns-5,
  .tenbit-posts-grid.columns-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .tenbit-posts-grid {
    grid-template-columns: 1fr !important;
  }
  
  .tenbit-post-media {
    height: 200px;
  }
  
  .tenbit-post-content {
    padding: 18px;
  }
  
  .tenbit-post-title {
    font-size: 1.25rem;
  }
}
