/*
 * プロフィールカード。 人物・団体を、写真 + 氏名 + 肩書 + 説明 + URL のセットで
 * 紹介する。 デスクトップは横並び (画像列幅は clamp(140px, 33%, 240px) で
 * カード幅に応じて伸縮するが、下限と上限で portrait のサイズを許容範囲内に
 * 収める)、モバイルは縦積み。 説明は classic editor (TinyMCE) 由来の HTML なので
 * 段落・リンク・強調がそのまま生きる。
 *
 * `.entry-body` prefix はテーマ側の `.entry-body a` (下線 + 緑) と
 * `.entry-body figure img` の border-radius を上書きするため。
 *
 * Figma 参照: 785:7280 (profile)
 */
.entry-body .lazyblock-profile-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  padding: var(--space-8);
  background: var(--color-background-light);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-default);

  & .image {
    /* 画像列幅 = clamp(下限 96px, カード幅の 25%, 上限 200px)。
     * カード幅が狭い時に portrait が小さすぎて識別しにくくならないよう 96px を
     * 下限に、広い時は Figma 準拠の 200px を上限にする。 flex 側は伸縮させない。 */
    flex: 0 0 clamp(96px, 25%, 200px);
    min-width: 0;
  }

  & .image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0;
  }

  & .text {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  & .name {
    margin: 0;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
  }

  & .title {
    margin: 0;
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
  }

  & .description {
    font-size: var(--font-size-body-base);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  & .description p {
    margin: 0;
  }

  & .description a {
    color: var(--color-text-brand-primary-green);
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  & .url {
    margin: 0;
    word-break: break-all;
  }

  & .url a {
    color: var(--color-text-brand-primary-green);
    text-decoration: none;
  }

  & .url a:hover,
  & .url a:focus-visible {
    text-decoration: underline;
  }

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-8);

    & .image {
      max-width: 240px;
      margin-inline: auto;
    }
  }
}
