/* Shared illustration wrapper used by feature.php heroes and home feature stack */

.th-feature-visual {
  align-items: center;
  background: transparent;
  background-image: none;
  border: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  margin: 10px;
  min-height: 430px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: auto;
  max-width: 100%;
}

.th-feature-visual::before,
.th-feature-visual::after {
  content: none;
  display: none;
}

.th-feature-visual > * {
  max-width: 100%;
  min-width: 0;
}

/* Shared mobile/tablet rules for hero illustrations (home + feature.php) */
@media (max-width: 980px) {
  .th-feature-visual {
    height: auto;
    margin: 0;
    max-width: 100%;
    min-height: 0;
    overflow: visible;
    padding: 0.5rem 0.15rem;
    width: 100%;
  }

  .th-feature-hero-card,
  .th-feature-hero-card.th-ai-writing-hero-card,
  .th-feature-hero-card.th-prompt-tracking-hero-card,
  .th-feature-hero-card.th-community-agent-hero-card,
  .th-feature-hero-card.th-cd-hero-card,
  .th-feature-hero-card.th-alm-hero-card {
    box-sizing: border-box;
    max-width: 100% !important;
    width: 100% !important;
  }

  .th-ai-writing-hero,
  .th-prompt-tracking-hero,
  .th-cd-hero,
  .th-alm-hero,
  .th-rc-hero-feed {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .th-ai-writing-flow {
    display: none;
  }

  .th-ai-writing-results {
    gap: 0.62rem;
    grid-template-columns: 1fr;
  }

  .th-ai-writing-result-card {
    min-height: 0;
    min-width: 0;
    width: 100%;
  }

  .th-rc-hero-row,
  .hf-visuals .th-rc-hero-row {
    animation: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    grid-template-columns: none;
    min-height: 0;
    opacity: 1;
    transform: none;
  }

  .th-rc-hero-divider,
  .th-rc-hero-chevron,
  .hf-visuals .th-rc-hero-divider,
  .hf-visuals .th-rc-hero-chevron {
    display: none;
  }

  .th-rc-hero-post,
  .th-rc-hero-suggestion,
  .hf-visuals .th-rc-hero-post,
  .hf-visuals .th-rc-hero-suggestion {
    min-width: 0;
    width: 100%;
  }

  .th-rc-hero-post-title,
  .hf-visuals .th-rc-hero-post-title {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .th-rc-hero-suggestion,
  .hf-visuals .th-rc-hero-suggestion {
    animation: none;
    min-height: 0;
    opacity: 1;
    padding-right: 0;
    transform: none;
  }

  .th-rc-hero-suggestion-text,
  .hf-visuals .th-rc-hero-suggestion-text {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .th-pt-chat {
    max-width: 100%;
    width: 100%;
  }

  .th-pt-chat-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .th-pt-chat-tabs {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .th-pt-chat-tab {
    flex: 0 0 auto;
  }

  .th-alm-hero {
    align-items: center;
    justify-content: center;
  }

  .th-alm-widget {
    max-width: min(340px, 100%);
    min-height: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .th-feature-visual {
    margin: 0;
    padding: 0.25rem 0;
  }

  .th-ai-writing-result-card {
    min-height: 0;
    padding: 0.72rem;
  }

  .th-ai-writing-result-badge {
    margin-top: 0.85rem;
  }

  .th-rc-hero-row {
    padding: 0.75rem 0.7rem;
  }

  .th-rc-hero-post-title {
    font-size: 0.78rem;
  }

  .th-rc-hero-suggestion-text {
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .th-pt-chat-body {
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .th-pt-user-bubble,
  .th-pt-ai-bubble {
    font-size: 0.78rem;
  }

  .th-pt-chat-tab {
    font-size: 0.58rem;
    padding: 0.36rem 0.42rem 0.5rem;
  }

  .th-cd-hero-card {
    padding: 12px;
  }

  .th-alm-widget {
    max-width: min(320px, 100%);
    min-height: 360px;
  }

  .th-alm-widget-body {
    max-height: 240px;
    min-height: 200px;
  }
}
