/**
 * Blog, archive, and single post styles.
 */

/* ── Posts Grid ── */
.zt-posts-grid {
  display: grid;
  grid-template-columns: repeat(var(--zt-blog-columns, 2), 1fr);
  gap: 30px;
}

@media (max-width: 1023px) {
  .zt-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .zt-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Card Base ── */
.zt-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--zb-shadow-sm);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.zt-card:hover {
  box-shadow: var(--zb-shadow-md);
}

/* ── Card Style: Card ── */
.zt-card--card .zt-card__image-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.zt-card__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 300ms ease;
}

.zt-card:hover .zt-card__image {
  transform: scale(1.03);
}

.zt-card__category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--zb-primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
  z-index: 1;
}

.zt-card__category:hover {
  background: var(--zb-secondary);
  color: #fff;
}

.zt-card__body {
  padding: 20px;
}

.zt-card__meta {
  color: var(--zb-text-light);
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.zt-card__sep {
  opacity: 0.5;
}

.zt-card__title {
  font-size: 1.125rem;
  line-height: 1.4;
  margin-bottom: var(--zb-space-sm);
}

.zt-card__title a {
  color: var(--zb-heading);
  text-decoration: none;
  transition: color 200ms ease;
}

.zt-card__title a:hover {
  color: var(--zb-primary);
}

.zt-card__excerpt {
  color: var(--zb-text-light);
  font-size: 0.9375rem;
  margin-bottom: var(--zb-space-md);
  line-height: 1.6;
}

.zt-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zb-primary);
}

.zt-card__read-more:hover {
  color: var(--zb-secondary);
}

/* ── Card Style: Minimal ── */
.zt-card--minimal {
  box-shadow: none;
  border-bottom: 1px solid var(--zb-border);
  border-radius: 0;
  padding-bottom: var(--zb-space-lg);
}

.zt-card--minimal:hover {
  box-shadow: none;
}

.zt-card__category--minimal {
  position: static;
  display: inline-block;
  margin-bottom: var(--zb-space-sm);
}

/* ── Card Style: Overlay ── */
.zt-card--overlay {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
}

.zt-card--overlay .zt-card__image-link {
  position: absolute;
  inset: 0;
}

.zt-card--overlay .zt-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zt-card__overlay-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}

.zt-card--overlay .zt-card__category {
  position: static;
  display: inline-block;
  margin-bottom: var(--zb-space-sm);
}

.zt-card--overlay .zt-card__title a {
  color: #fff;
}

.zt-card--overlay .zt-card__title a:hover {
  opacity: 0.85;
}

.zt-card--overlay .zt-card__meta {
  color: rgba(255,255,255,0.8);
}

/* ── Single Post Entry ── */
.zt-article {
  max-width: 720px;
}

.zt-layout-sidebar .zt-article {
  max-width: none;
}

.zt-entry-header {
  margin-bottom: var(--zb-space-lg);
}

.zt-entry-title {
  font-size: 2.5rem;
  line-height: 1.2;
}

.zt-featured-image {
  margin-bottom: var(--zb-space-lg);
  border-radius: 8px;
  overflow: hidden;
}

.zt-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.zt-entry-content {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.zt-entry-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zt-entry-footer {
  margin-top: var(--zb-space-xl);
  padding-top: var(--zb-space-lg);
  border-top: 1px solid var(--zb-border);
}

/* ── Post Tags ── */
.zt-post-tags {
  margin-bottom: var(--zb-space-md);
  font-size: 0.875rem;
}

.zt-tags-label {
  font-weight: 600;
  margin-right: var(--zb-space-xs);
}

.zt-post-tags a {
  color: var(--zb-text-light);
}

.zt-post-tags a:hover {
  color: var(--zb-primary);
}

/* ── Post Meta ── */
.zt-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--zb-space-md);
  font-size: 0.875rem;
  color: var(--zb-text-light);
}

.zt-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.zt-meta__item svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.zt-meta__avatar {
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin-right: 2px;
}

.zt-post-meta a {
  color: var(--zb-text-light);
}

.zt-post-meta a:hover {
  color: var(--zb-primary);
}

/* ── Post Meta Bar (single.php) ── */
.zt-post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--zb-space-md);
  margin-bottom: var(--zb-space-lg);
  padding-bottom: var(--zb-space-md);
  border-bottom: 1px solid var(--zb-border);
}

.zt-reading-time {
  font-size: 0.875rem;
  color: var(--zb-text-light);
}

/* ── Share Buttons ── */
.zt-share {
  display: flex;
  align-items: center;
  gap: var(--zb-space-md);
  margin-bottom: var(--zb-space-md);
}

.zt-share__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zb-text);
}

.zt-share__buttons {
  display: flex;
  gap: var(--zb-space-sm);
}

.zt-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--zb-bg-alt);
  color: var(--zb-text-light);
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.zt-share__btn:hover {
  color: #fff;
}

.zt-share__btn--facebook:hover  { background: #1877F2; }
.zt-share__btn--twitter:hover   { background: #000; }
.zt-share__btn--linkedin:hover  { background: #0A66C2; }
.zt-share__btn--whatsapp:hover  { background: #25D366; }
.zt-share__btn--copy:hover      { background: var(--zb-primary); }

.zt-share__btn--copy.is-copied {
  background: #27ae60;
  color: #fff;
}

/* ── Author Bio ── */
.zt-author-bio {
  display: flex;
  gap: var(--zb-space-lg);
  padding: 24px;
  margin-top: var(--zb-space-xl);
  background: var(--zb-bg-alt);
  border-radius: 8px;
}

.zt-author-avatar img {
  border-radius: 50%;
  width: 64px;
  height: 64px;
}

.zt-author-name {
  font-size: 1.125rem;
  margin-bottom: var(--zb-space-xs);
}

.zt-author-name a {
  color: var(--zb-heading);
}

.zt-author-name a:hover {
  color: var(--zb-primary);
}

.zt-author-description {
  font-size: 0.9375rem;
  color: var(--zb-text-light);
  margin-bottom: var(--zb-space-sm);
}

.zt-author-posts-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zb-primary);
}

@media (max-width: 575px) {
  .zt-author-bio {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ── Related Posts ── */
.zt-related-posts {
  margin-top: var(--zb-space-xl);
  padding-top: var(--zb-space-xl);
  border-top: 1px solid var(--zb-border);
}

.zt-related-posts__title {
  font-size: 1.5rem;
  margin-bottom: var(--zb-space-lg);
}

.zt-related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--zb-space-lg);
}

@media (max-width: 767px) {
  .zt-related-posts__grid {
    grid-template-columns: 1fr;
  }
}

.zt-related-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--zb-border);
  transition: box-shadow 200ms ease;
}

.zt-related-card:hover {
  box-shadow: var(--zb-shadow-sm);
}

.zt-related-card__image {
  display: block;
  overflow: hidden;
}

.zt-related-card__image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 300ms ease;
}

.zt-related-card:hover .zt-related-card__image img {
  transform: scale(1.03);
}

.zt-related-card__body {
  padding: var(--zb-space-md);
}

.zt-related-card__title {
  font-size: 0.9375rem;
  margin-bottom: var(--zb-space-xs);
  line-height: 1.4;
}

.zt-related-card__title a {
  color: var(--zb-heading);
}

.zt-related-card__title a:hover {
  color: var(--zb-primary);
}

.zt-related-card__date {
  font-size: 0.8125rem;
  color: var(--zb-text-light);
}

/* ── Breadcrumbs ── */
.zt-breadcrumbs {
  margin-bottom: var(--zb-space-lg);
  font-size: 0.875rem;
}

.zt-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--zb-space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.zt-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: var(--zb-space-xs);
}

.zt-breadcrumb__link {
  color: var(--zb-text-light);
}

.zt-breadcrumb__link:hover {
  color: var(--zb-primary);
}

.zt-breadcrumb__current {
  color: var(--zb-text);
  font-weight: 500;
}

.zt-breadcrumb__sep {
  color: var(--zb-border);
}

/* ── Pagination ── */
.zt-pagination {
  margin-top: var(--zb-space-xl);
}

.zt-pagination__full .page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--zb-space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.zt-pagination__full .page-numbers li {
  margin: 0;
  padding: 0;
}

.zt-pagination__full .page-numbers a,
.zt-pagination__full .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--zb-space-sm);
  border: 1px solid var(--zb-border);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--zb-text);
  transition: all 200ms ease;
}

.zt-pagination__full .page-numbers a:hover {
  background: var(--zb-bg-alt);
  border-color: var(--zb-primary);
  color: var(--zb-primary);
}

.zt-pagination__full .page-numbers .current {
  background: var(--zb-primary);
  border-color: var(--zb-primary);
  color: #fff;
}

.zt-pagination__full .page-numbers .dots {
  border: none;
  min-width: auto;
}

/* Simple pagination (mobile) */
.zt-pagination__simple {
  display: none;
}

.zt-pagination__prev-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--zb-space-md);
}

.zt-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--zb-space-sm) var(--zb-space-md);
  border: 1px solid var(--zb-border);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--zb-text);
  transition: all 200ms ease;
}

.zt-pagination__btn:hover {
  border-color: var(--zb-primary);
  color: var(--zb-primary);
}

.zt-pagination__indicator {
  font-size: 0.8125rem;
  color: var(--zb-text-light);
}

@media (max-width: 767px) {
  .zt-pagination__full {
    display: none;
  }

  .zt-pagination__simple {
    display: block;
  }
}

/* ── Search Results ── */
.zt-search-results {
  max-width: 800px;
}

.zt-search-item {
  padding: var(--zb-space-lg) 0;
  border-bottom: 1px solid var(--zb-border);
}

.zt-search-item:first-child {
  padding-top: 0;
}

.zt-search-item__type {
  display: inline-block;
  background: var(--zb-bg-alt);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--zb-text-light);
  margin-bottom: var(--zb-space-xs);
}

.zt-search-item__title {
  font-size: 1.25rem;
  margin-bottom: var(--zb-space-xs);
}

.zt-search-item__title a {
  color: var(--zb-heading);
}

.zt-search-item__title a:hover {
  color: var(--zb-primary);
}

.zt-search-item__url {
  font-size: 0.8125rem;
  color: var(--zb-primary);
  margin-bottom: var(--zb-space-sm);
  word-break: break-all;
}

.zt-search-item__excerpt {
  font-size: 0.9375rem;
  color: var(--zb-text-light);
  line-height: 1.6;
  margin-bottom: var(--zb-space-sm);
}

.zt-search-highlight {
  background: rgba(243, 156, 18, 0.2);
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
}

.zt-search-item__meta {
  display: flex;
  gap: var(--zb-space-sm);
  font-size: 0.8125rem;
  color: var(--zb-text-light);
}

/* ── No Results ── */
.zt-no-results {
  text-align: center;
  padding: var(--zb-space-2xl) 0;
}

.zt-no-results__content {
  max-width: 480px;
  margin: 0 auto;
}

.zt-no-results__content p {
  color: var(--zb-text-light);
  margin-bottom: var(--zb-space-lg);
  font-size: 1.0625rem;
}

.zt-no-results__content .zt-search-form {
  margin: 0 auto;
}

/* ── Post Navigation (single) ── */
.post-navigation {
  margin-top: var(--zb-space-xl);
  padding: var(--zb-space-lg) 0;
  border-top: 1px solid var(--zb-border);
  border-bottom: 1px solid var(--zb-border);
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: var(--zb-space-lg);
}

.zt-nav-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--zb-text-light);
  margin-bottom: var(--zb-space-xs);
}

.zt-nav-title {
  font-weight: 600;
}

/* ── Result count ── */
.zt-result-count {
  color: var(--zb-text-light);
  font-size: 0.9375rem;
  margin-top: var(--zb-space-xs);
}

/* ── Page Links ── */
.zt-page-links {
  margin-top: var(--zb-space-lg);
  font-weight: 600;
}

.zt-page-links a {
  display: inline-block;
  padding: var(--zb-space-xs) var(--zb-space-sm);
  background: var(--zb-bg-alt);
  border-radius: 4px;
  margin-left: var(--zb-space-xs);
}
