/* IMGIA Blog Shell 2.1.1 — card degli articoli correlati Astra.
 * Il riassunto Astra ha anch'esso class="entry-content": non deve ereditare
 * la griglia a due colonne del testo principale e della colonna Risorse utili.
 * Quantità, colonne, ordine, categorie/tag, date e riassunti restano di Astra.
 */
body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 24px !important;
  align-items: stretch;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper > .ast-related-post {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  float: none !important;
  width: auto !important;
  max-width: 100%;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--imgia-line);
  border-radius: 0 !important;
  background: #fff;
  box-shadow: none;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-posts-inner-section,
body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-content {
  box-sizing: border-box;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-featured-section {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 16px !important;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .post-thumb-img-content {
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .post-thumb-img-content > a {
  display: block;
  width: 100%;
  border-radius: 12px;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .post-thumb-img-content img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 12px !important;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .related-entry-header {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 12px !important;
  padding: 0 !important;
  text-align: left;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-title {
  width: 100%;
  max-width: 100%;
  margin: 0 0 10px !important;
  color: var(--imgia-ink) !important;
  font-family: "Manrope", sans-serif !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -.035em !important;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-title a {
  color: var(--imgia-ink) !important;
  text-decoration: none;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
  color: var(--imgia-muted);
  font: 500 12px/1.5 "DM Sans", sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .entry-meta a {
  color: var(--imgia-muted) !important;
}

/* Reset di TUTTE le entry-content nella card, incluso il paragrafo riassunto.
 * Non modificare .entry-content del testo dell'articolo, esterno al wrapper.
 */
body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .entry-content {
  box-sizing: border-box;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #55575e;
  font: 400 15px/1.6 "DM Sans", sans-serif !important;
  text-align: left;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-content > .entry-content {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-cta {
  display: block;
  min-width: 0;
  margin: auto 0 0 !important;
  padding: 16px 0 0 !important;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-link.ast-button {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0 !important;
  padding: 12px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(105deg, var(--imgia-yellow), var(--imgia-orange)) !important;
  color: var(--imgia-ink) !important;
  box-shadow: none !important;
  font: 800 13px/1.35 "DM Sans", sans-serif !important;
  letter-spacing: 0 !important;
  text-align: center;
  text-decoration: none !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
  cursor: pointer;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-link.ast-button:hover {
  background: linear-gradient(105deg, #ffc629, #ff8436) !important;
  color: var(--imgia-ink) !important;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper a:focus-visible {
  outline: 2px solid var(--imgia-ink);
  outline-offset: 3px;
}

body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-link.ast-button:active {
  transform: scale(.98);
}

@media (prefers-reduced-motion: no-preference) {
  body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-link.ast-button {
    transition: transform .16s cubic-bezier(.23, 1, .32, 1);
  }
}

@media (max-width: 544px) {
  body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper {
    gap: 20px !important;
  }
}

/* Astra può allineare il paragrafo CTA a inizio riga: occupa invece la card. */
body.imgia-blog-shell-active.single-post .ast-related-posts-wrapper .ast-related-post-cta {
  box-sizing: border-box;
  width: 100% !important;
  align-self: stretch;
}
