/* ===================================================================
   Component: Card Standard
   Medium article card with thumbnail, publisher meta,
   optional type badge, headline, snippet, and footer.
   =================================================================== */

/* Wrapper handles overflow for breakdown */
.standard-card-wrapper {
  margin: 0 var(--feed-padding);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--duration-snappy) var(--ease-snappy);
}

.standard-card-wrapper:hover {
  box-shadow: var(--shadow-card-hover);
}

.standard-card {
  cursor: pointer;
  transition: all var(--duration-snappy) var(--ease-snappy);
  position: relative;
}

.standard-card:hover {
  transform: translateY(-1px);
}

.standard-card:active {
  transform: scale(0.985);
}

.standard-card-inner {
  display: flex;
  padding: var(--space-md);
  gap: var(--space-md);
  align-items: center;
}

/* Left: Text content */
.standard-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Top meta row: publisher + time only */
.standard-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.standard-pub-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: white;
}

.standard-pub-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.standard-meta-dot {
  color: var(--text-tertiary);
  font-size: 10px;
}

.standard-time {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Publisher chevron: inline navigation hint */
.publisher-chevron {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: -2px;
}

/* Badge row: article type badge sits alone on its own row */
.standard-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.standard-headline {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.standard-snippet {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Standalone timestamp row (Apple News pattern) */
.standard-card-time {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.standard-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.standard-author {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-tertiary);
}

.standard-read-time {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Right: Thumbnail — stretches to match content */
.standard-card-thumb {
  width: 105px;
  min-height: 105px;
  align-self: stretch;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.standard-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-smooth) var(--ease-smooth);
}

.standard-card:hover .standard-card-thumb img {
  transform: scale(1.04);
}

/* Score badge: positioned on the thumbnail */
.standard-score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* ═══ Cluster Footer — "Mini-Story Cluster" link ═══ */
/* Shown when article belongs to a story cluster. */

.cluster-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--space-md);
  border-top: 1px solid rgba(122, 158, 135, 0.12);
  background: rgba(212, 228, 217, 0.25);
  cursor: pointer;
  transition: background var(--duration-snappy) var(--ease-snappy);
}

.cluster-footer:hover {
  background: rgba(212, 228, 217, 0.45);
}

.cluster-footer:active {
  background: rgba(212, 228, 217, 0.6);
}

.cluster-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cluster-footer-icon {
  font-size: 13px;
  opacity: 0.7;
}

.cluster-footer-sources {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cluster-footer-dot {
  color: var(--text-tertiary);
  font-size: 10px;
}

.cluster-footer-cta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
}

.cluster-footer-chevron {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  opacity: 0.7;
  transition: transform var(--duration-snappy) var(--ease-snappy);
}

.cluster-footer:hover .cluster-footer-chevron {
  transform: translateX(2px);
}

/* ═══ Narrative Context Strip — Option G1 dual-pathway ═══ */
/* Gradient strip that sits ABOVE the card for mega-cluster entry.  */
/* Shows mega-cluster title + "View the bigger picture" CTA.        */
/* Bottom corners are square (connects flush to card below).        */

.narrative-context-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px var(--space-md);
  cursor: pointer;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  overflow: hidden;
  transition: filter var(--duration-snappy) var(--ease-snappy);
}

.narrative-context-strip:hover {
  filter: brightness(1.08);
}

.narrative-context-strip:active {
  filter: brightness(0.95);
}

/* Gradient background — set via inline style for per-card color */
.narrative-context-strip__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Shine overlay (matches NarrativeArcBar / NarrativeFooterBadge) */
.narrative-context-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.04) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.narrative-context-strip > * {
  position: relative;
  z-index: 2;
}

.narrative-context-strip__icon {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.narrative-context-strip__title {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.narrative-context-strip__dot {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  flex-shrink: 0;
}

.narrative-context-strip__cta {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.narrative-context-strip__spacer {
  flex: 1;
  min-width: 0;
}

.narrative-context-strip__chevron {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  transition: transform var(--duration-snappy) var(--ease-snappy);
}

.narrative-context-strip:hover .narrative-context-strip__chevron {
  transform: translateX(2px);
}

/* Card wrapper variant: square top corners when strip is present */
.standard-card-wrapper.has-context-strip {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
