.wp-block-article-card,
.editor-styles-wrapper .wp-block-article-card,
.wp-block-questme-article-card,
.editor-styles-wrapper .wp-block-questme-article-card {
  display: block;
  height: 100%;
}

/* Main Card Container */
.article-card,
.editor-styles-wrapper .article-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--wp--preset--spacing--2-x-large);
  background: var(--wp--preset--color--white);
  border-radius: var(--wp--preset--radius--2-x-large);
  overflow: hidden;
  width: 100%;
  height: 100%;
}

/* Image Section */
.article-card__media,
.editor-styles-wrapper .article-card__media {
  align-self: stretch;
  width: 100%;
}

.article-card__media img,
.editor-styles-wrapper .article-card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--wp--preset--radius--4-x-large);
}

.article-card__content,
.editor-styles-wrapper .article-card__content {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: var(--wp--preset--spacing--medium);
  flex: 1 1 auto; /* fill remaining height so footer button can stick at bottom */
  min-height: 0; /* prevent overflow issues within flex container */
}

.article-card__heading,
.editor-styles-wrapper .article-card__heading {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: var(--wp--preset--spacing--medium);
  flex: 1 1 auto; /* let heading/content area grow */
}

.article-card__badge,
.editor-styles-wrapper .article-card__badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--wp--preset--spacing--x-small);
  padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--small);
  background: var(--wp--preset--color--secondary-80);
  border-radius: var(--wp--preset--radius--large);
  width: fit-content;
}

.article-card__badge-text,
.editor-styles-wrapper .article-card__badge-text {
  color: var(--wp--preset--color--white);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: var(--wp--preset--font-weight--semibold);
  line-height: var(--wp--preset--line-height--medium);
}

.article-card__title,
.editor-styles-wrapper .article-card__title {
  margin: 0;
  font-size: var(--wp--preset--font-size--2-x-large);
  font-weight: var(--wp--preset--font-weight--semibold);
  line-height: var(--wp--preset--line-height--2-x-large);
  color: var(--wp--preset--color--black-100);
}

.article-card__title a { 
  text-decoration: none; 
  color: inherit; 
}
.article-card__title a:hover { 
  color: var(--wp--preset--color--primary); 
}

.article-card__description,
.editor-styles-wrapper .article-card__description {
  margin: 0;
  font-size: var(--wp--preset--font-size--large);
  font-weight: var(--wp--preset--font-weight--regular);
  line-height: var(--wp--preset--line-height--large);
  color: var(--wp--preset--color--black-60);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(3lh);
}

.article-card__short-info,
.editor-styles-wrapper .article-card__short-info {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: var(--wp--preset--spacing--medium);
}

.article-card__author,
.editor-styles-wrapper .article-card__author {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--small);
  flex: 1;
}

.article-card__author-avatar,
.editor-styles-wrapper .article-card__author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 28px;
  object-fit: cover;
}

.article-card__author-name,
.editor-styles-wrapper .article-card__author-name {
  font-size: var(--wp--preset--font-size--medium);
  font-weight: var(--wp--preset--font-weight--semibold);
  line-height: var(--wp--preset--line-height--medium);
  color: var(--wp--preset--color--black-100);
}

.article-card__date,
.editor-styles-wrapper .article-card__date {
  font-size: var(--wp--preset--font-size--medium);
  font-weight: var(--wp--preset--font-weight--regular);
  line-height: var(--wp--preset--line-height--medium);
  color: var(--wp--preset--color--black-60);
}

.article-card__button,
.editor-styles-wrapper .article-card__button {
  display: flex;
  width: fit-content;
  margin-top: auto; /* push button area to bottom */
}

.article-card__read-button,
.editor-styles-wrapper .article-card__read-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--wp--preset--spacing--small);
  padding: 0 var(--wp--preset--spacing--large);
  height: 48px;
  background: var(--wp--preset--color--primary);
  border-radius: var(--wp--preset--radius--2-x-large);
  text-decoration: none;
  box-shadow: 0px 1px 2px 0px rgba(27, 36, 44, 0.12);
  transition: all 200ms ease;
}

.article-card__read-button:hover,
.editor-styles-wrapper .article-card__read-button:hover {
  background: var(--wp--preset--color--primary-80);
  transform: translateY(-1px);
  box-shadow: 0px 2px 4px 0px rgba(27, 36, 44, 0.16);
}

.article-card__button-text,
.editor-styles-wrapper .article-card__button-text {
  font-size: var(--wp--preset--font-size--large);
  font-weight: var(--wp--preset--font-weight--semibold);
  line-height: var(--wp--preset--line-height--large);
  color: var(--wp--preset--color--black-100);
}

.article-card__button-icon,
.editor-styles-wrapper .article-card__button-icon {
  width: 20px;
  height: 20px;
  color: var(--wp--preset--color--black-100);
}

.editor-styles-wrapper .article-card a,
.editor-styles-wrapper .wp-block-article-card a,
.editor-styles-wrapper .wp-block-questme-article-card a {
  pointer-events: none !important;
  cursor: default !important;
}
