/**
 * WCRS Post Card Widget Styles
 *
 * Blog post card for Elementor Loop Grid.
 */

/* CSS Variables with defaults */
.wcrs-post-card {
  --wcrs-card-gap-main: 16px;
  --wcrs-card-gap-inner: 12px;
}

/* Card wrapper - flexbox column for equal heights */
.wcrs-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  gap: var(--wcrs-card-gap-main);
}

/* Image container */
.wcrs-post-card-image-link {
  display: block;
  text-decoration: none;
}

.wcrs-post-card-image {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.wcrs-post-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

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

/* Image placeholder for editor preview */
.wcrs-post-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 50%, #e0e0e0 100%);
}

/* Content wrapper */
.wcrs-post-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--wcrs-card-gap-main);
  padding-top: var(--wcrs-card-gap-main);
}

/* Meta wrapper - contains categories and date */
.wcrs-post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

/* When both categories and date are shown */
.wcrs-post-card-meta--both {
  justify-content: space-between;
}

/* When only categories are shown */
.wcrs-post-card-meta--categories-only {
  justify-content: flex-start;
}

/* When only date is shown */
.wcrs-post-card-meta--date-only {
  justify-content: flex-start;
}

/* Categories container */
.wcrs-post-card-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Single category badge */
.wcrs-post-card-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Post date */
.wcrs-post-card-date {
  font-family: "Sofia Pro", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 22px;
  margin: 0;
  padding: 0;
}

/* Text content wrapper - uses inner gap */
.wcrs-post-card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--wcrs-card-gap-inner);
}

/* Title link */
.wcrs-post-card-title-link {
  text-decoration: none;
  color: inherit;
}

.wcrs-post-card-title-link:hover .wcrs-post-card-title {
  opacity: 0.8;
}

/* Title with line clamp support */
.wcrs-post-card-title {
  margin: 0;
  padding: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

/* Excerpt with line clamp and flex grow for equal heights */
.wcrs-post-card-excerpt {
  margin: 0;
  padding: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more link */
.wcrs-post-card-readmore {
  display: inline-block;
  transition: opacity 0.2s ease;
  margin-top: auto;
}

.wcrs-post-card-readmore:hover {
  opacity: 0.8;
}

/* Accessibility - focus states */
.wcrs-post-card-image-link:focus-visible,
.wcrs-post-card-title-link:focus-visible,
.wcrs-post-card-readmore:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
