/* ================================================================
   청춘배낭 프로그램 + 일정
   [달력 | 다가오는 일정] → 프로그램 카드 리스트
   토큰·리셋·버튼은 youth-tokens / youth-main / youth-about 을 그대로 쓴다.
   ================================================================ */

.ccb-program .prg-top {
  padding: 66px 48px 34px;
}

.ccb-program .prg-top h1 {
  margin-top: 4px;
}

.ccb-program .abt-lead {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.8;
}

/* ---- 달력 + 다가오는 일정 ---- */

.ccb-program .prg-cal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 34px;
  padding: 10px 48px 62px;
  scroll-margin-top: 20px;
}

.ccb-program .prg-cal {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  padding: 22px 22px 18px;
}

.ccb-program .prg-cal__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* 달 넘기기 버튼. 달 이름을 가운데 두고 좌우에 붙인다. */
.ccb-program .prg-cal__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ccb-program .prg-cal__arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffdf8;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.ccb-program .prg-cal__arrow:hover:not(:disabled),
.ccb-program .prg-cal__arrow:focus-visible:not(:disabled) {
  border-color: var(--navy);
  background: #eaf0fa;
}

/* 더 갈 달이 없으면 눌러도 소용없다는 걸 보이게 둔다. 숨기면 위치가 흔들린다. */
.ccb-program .prg-cal__arrow:disabled {
  opacity: .3;
  cursor: default;
}

.ccb-program .prg-cal__head strong {
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.ccb-program .prg-cal__head span {
  color: #6b7a8f;
  font-size: 13px;
  font-weight: 600;
}

.ccb-program .prg-cal__dow,
.ccb-program .prg-cal__grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ccb-program .prg-cal__dow {
  gap: 4px;
  margin-bottom: 6px;
}

.ccb-program .prg-cal__dow li {
  padding: 6px 0;
  color: #6b7a8f;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

/* 일요일·토요일만 색을 달리해 주말을 알아보게 한다. */
.ccb-program .prg-cal__dow li:first-child { color: #c0563f; }
.ccb-program .prg-cal__dow li:last-child  { color: #3c6bb5; }

.ccb-program .prg-cal__grid {
  gap: 4px;
}

.ccb-program .prg-cal__cell {
  position: relative;
  min-height: 76px;
  padding: 6px 6px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.ccb-program .prg-cal__cell--empty {
  border-color: transparent;
}

/* 일정이 있는 날만 배경을 준다. 빈 달력이 허전해 보이지 않게. */
.ccb-program .prg-cal__cell--has {
  border-color: var(--line);
  background: var(--program-cream);
}

.ccb-program .prg-cal__cell--today .prg-cal__num {
  color: #fffdf8;
  background: var(--navy);
}

.ccb-program .prg-cal__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #4a5a71;
  font-size: 13px;
  font-weight: 800;
}

.ccb-program .prg-cal__dot {
  display: block;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ccb-program .prg-cal__dot--yellow {
  background: var(--yellow);
  color: #4a3200;
}

/* #dbe7fa 는 크림 배경에서 거의 안 보였다. 시안 파랑(#68a8de)으로 올린다.
   '다가오는 일정' 의 점과 같은 색이어야 어느 프로그램인지 연결된다. */
.ccb-program .prg-cal__dot--blue {
  background: #68a8de;
  color: #08243f;
}

/* ---- 프로그램 색 표시 (달력 범례 · 다가오는 일정 공용) ---- */
.ccb-program .prg-key {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: 1px;
}

.ccb-program .prg-key--yellow { background: var(--yellow); }
.ccb-program .prg-key--blue   { background: #68a8de; }

.ccb-program .prg-cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ccb-program .prg-cal__legend li {
  display: flex;
  align-items: center;
  color: #4a5a71;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ---- 다가오는 일정 ---- */

.ccb-program .prg-upcoming {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--program-cream);
  padding: 22px 20px;
}

.ccb-program .prg-upcoming h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.6px;
}

.ccb-program .prg-up-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ccb-program .prg-up {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.ccb-program .prg-up--closed {
  background: transparent;
  opacity: .6;
}

.ccb-program .prg-up__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.ccb-program .prg-up__date b {
  color: var(--navy);
  font-size: 16px;
  font-weight: 900;
}

.ccb-program .prg-up__date i {
  color: #6b7a8f;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.ccb-program .prg-up__body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ccb-program .prg-up__title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.ccb-program .prg-up__title--yellow { color: #8a6100; }
.ccb-program .prg-up__title--blue   { color: #123a7d; }

.ccb-program .prg-up__meta {
  color: #6b7a8f;
  font-size: 12px;
  font-weight: 700;
}

.ccb-program .prg-up__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fffdf8;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.ccb-program .prg-up__cta--off {
  background: transparent;
  border: 1px solid var(--line);
  color: #8a94a3;
}

.ccb-program .prg-empty {
  margin: 0;
  padding: 18px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: #6b7a8f;
  font-size: 15px;
}

/* ---- 프로그램 카드 ---- */

.ccb-program .prg-list {
  padding: 62px 48px 70px;
  border-top: 1px solid var(--line);
  background: var(--program-cream);
}

.ccb-program .prg-list__head {
  margin-bottom: 34px;
}

.ccb-program .prg-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.ccb-program .prg-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--program-card);
  overflow: hidden;
}

.ccb-program .prg-card__media {
  position: relative;
  display: block;
  aspect-ratio: 510 / 320;
}

.ccb-program .prg-card__img,
.ccb-program .prg-card__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ccb-program .prg-card__img {
  object-fit: cover;
}

.ccb-program .prg-card__frame { z-index: 2; }

.ccb-program .prg-card__tag {
  position: absolute;
  z-index: 3;
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.ccb-program .prg-card__tag--yellow { background: var(--yellow); color: #4a3200; }
.ccb-program .prg-card__tag--blue   { background: #dbe7fa; color: #123a7d; }

.ccb-program .prg-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
}

.ccb-program .prg-card__body h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -1px;
}

.ccb-program .prg-card__lead {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.7;
}

.ccb-program .prg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px dashed var(--line);
}

.ccb-program .prg-meta > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ccb-program .prg-meta dt {
  margin: 0;
  display: flex;
  align-items: center;
}

.ccb-program .prg-meta dt img {
  width: auto;
  height: 20px;
}

.ccb-program .prg-meta dd {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.ccb-program .prg-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
}

.ccb-program .prg-card__next {
  color: #4a5a71;
  font-size: 14px;
  font-weight: 700;
}

.ccb-program .prg-card__next strong {
  color: var(--navy);
}

/* ================================================================
   반응형 — 시안과 같은 분기점
   ================================================================ */

@media (max-width: 1040px) {
  .ccb-program .prg-top {
    padding: 52px 32px 26px;
  }

  /* 달력 아래로 일정이 내려온다. 좁은 폭에서 360px 사이드바는 무리다. */
  .ccb-program .prg-cal-wrap {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 6px 32px 52px;
  }

  .ccb-program .prg-list {
    padding: 52px 32px 58px;
  }

  .ccb-program .prg-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .ccb-program .prg-cal {
    padding: 18px 14px 14px;
  }

  .ccb-program .prg-cal__cell {
    min-height: 62px;
    padding: 4px 3px 6px;
  }

  /* 좁아지면 칸에 프로그램 이름이 안 들어간다. 색 점으로만 표시하고
     자세한 내용은 옆(아래)의 '다가오는 일정'이 담당한다. */
  /* 칸 폭이 46px 정도라 '입영전야'(44px)도 간신히다. 이름은 넣지 않고
     색 막대만 남긴다. 어느 색이 어느 프로그램인지는 위 범례가 알려 준다. */
  .ccb-program .prg-cal__dot {
    height: 10px;
    margin-top: 4px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    text-indent: -9999px;
  }
}

@media (max-width: 620px) {
  /* 안내 문구가 달 이름·화살표와 한 줄에 안 들어가 오른쪽이 잘렸다.
     바로 아래 색 범례가 같은 역할을 하므로 좁은 화면에서는 뺀다. */
  .ccb-program .prg-cal__head > span {
    display: none;
  }

  .ccb-program .prg-top {
    padding: 42px 22px 22px;
  }

  .ccb-program .prg-cal-wrap {
    padding: 6px 22px 44px;
  }

  .ccb-program .prg-list {
    padding: 44px 22px 50px;
  }

  .ccb-program .prg-cal__cell {
    min-height: 52px;
  }

  .ccb-program .prg-card__foot .abt-btn {
    width: 100%;
    justify-content: center;
  }
}
