@charset "utf-8";

/* ================================================================
   공고 상세 (시안 detail — PC 1920 png / MO 393 webp)
   머리(뱃지 · 공고명) → 신청기간 → ─ 사업개요 ─ 소관기관 · 신청방법 ─ 해시태그 → 공고 확인하기
   블록 사이 간격 MO 16 / PC 24, 구분선 1px. 사업개요는 위아래 여백을 한 번 더 준다(MO 16 / PC 24).
   ================================================================ */
.detail {
  --detail-gap: clamp(16px, calc(16px + 8 * var(--fluid)), 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, calc(24px + 26 * var(--fluid)), 50px);
}

.detail__doc {
  display: flex;
  flex-direction: column;
  gap: var(--detail-gap);
}

.detail__head {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, calc(8px + 8 * var(--fluid)), 16px);
}

.detail__head .badge {
  font-size: 14px;   /* 상세는 MO 도 14 (시안) */
}

.detail__title {
  color: var(--text);
  font-size: var(--fs-card-title);
  font-weight: 600;
  line-height: 1.5;
}

.detail__meta,
.detail__info {
  font-size: 14px;
}

/* 구분선 + 블록 */
.detail__block {
  padding-top: var(--detail-gap);
  border-top: 1px solid var(--gray-300);
}

/* ---------- 사업개요 ---------- */
.detail__overview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: calc(var(--detail-gap) * 2);
  padding-bottom: var(--detail-gap);
}

.detail__label {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.detail__summary {
  color: var(--text);
  font-size: var(--fs-body1);
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-line;   /* 원문 줄바꿈 유지 */
}

/* 길면 10줄까지만 보이고 "전체 내용 보기" (JS 가 넘칠 때만 버튼을 보인다) */
.detail__overview.is-collapsed .detail__summary {
  max-height: 15em;   /* line-height 1.5 × 10줄 */
  overflow: hidden;
}

.detail__overview.is-collapsed.is-overflow .detail__summary {
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, #000 75%, transparent);
}

.detail__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 8px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.detail__more img {
  width: 24px;
  height: 24px;
  transition: transform var(--transition);
}

.detail__more[aria-expanded="true"] img {
  transform: rotate(180deg);
}

/* ---------- 소관기관 · 사업 신청방법 (MO 라벨 위 / PC 라벨 옆) ---------- */
.detail__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.4;
}

.detail__info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail__info dd {
  margin: 0;
  white-space: pre-line;   /* 신청방법은 여러 줄인 경우가 있다 */
}

@media (min-width: 768px) {
  .detail__info-row {
    flex-direction: row;
    gap: 8px;
  }

  .detail__info dt {
    flex: none;
  }
}

/* ---------- 공고 확인하기 (MO 45 / PC 60) ---------- */
.detail__btn {
  min-height: clamp(45px, calc(45px + 15 * var(--fluid)), 60px);
  font-size: clamp(14px, calc(14px + 2 * var(--fluid)), 16px);
}
