/* 클래스 상세 화면 개편 (오픈/마스터 클래스, 정회원 콘텐츠)
   .class_de_inner.detail_v2 범위에만 적용 */

/* 오른쪽 정보 영역: 강의정보·신청 버튼을 한 카드로 */
.detail_v2 .class_desc .desc_txt {
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .05);
}
.detail_v2 .class_desc .desc_txt .inform {
  background: #f6f7f9;
  border-radius: 10px;
}

/* 커리큘럼: 번호 동그라미 + 간단한 메타 */
.detail_v2 .course_list li {
  border-radius: 12px;
  border-color: #e9ebf0;
  overflow: hidden;
}
.detail_v2 .course_list li .btn-lnb {
  justify-content: flex-start;
  gap: 16px;
  padding: 18px 20px;
}
.detail_v2 .course_list li .btn-lnb .txt {
  flex: 1;
  min-width: 0;
}
.detail_v2 .course_list li .btn-lnb .course_num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: #15161a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.detail_v2 .course_list li .btn-lnb .type_list {
  gap: 6px;
  margin-bottom: 6px;
}
.detail_v2 .course_list li .btn-lnb .type_list span {
  font-size: 13px;
  color: #8b909a;
}
.detail_v2 .course_list li .btn-lnb .type_list span:not(:last-child)::after {
  display: none;
}
.detail_v2 .course_list li .btn-lnb .type_list span + span::before,
.detail_v2 .course_list li .btn-lnb .type_list span + .keyword::before {
  content: "·";
  margin-right: 6px;
  color: #c3c7cf;
}
.detail_v2 .course_list li .btn-lnb .type_list .keyword {
  display: flex;
  align-items: center;
}
.detail_v2 .course_list li .btn-lnb .type_list .keyword p {
  background: none;
  padding: 0;
  height: auto;
  line-height: normal;
  font-size: 13px;
  color: #8b909a;
}

/* 후기 카드: 본문 중심, 작성자·별점은 아래 */
.detail_v2 .rating_area .rating_list li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: none;
  border: 1px solid #e9ebf0;
  background: #fafbfc;
}
.detail_v2 .rating_area .rating_list li .content {
  order: 1;
  margin-top: 0;
  color: #2b2f36;
  font-size: 15px;
}
.detail_v2 .rating_area .rating_list li .content::before {
  content: "\201C";
  display: block;
  font-size: 34px;
  line-height: 1;
  color: #c9ced8;
  font-family: Georgia, serif;
  margin-bottom: 4px;
}
.detail_v2 .rating_area .rating_list li .content:empty {
  display: none;
}
.detail_v2 .rating_area .rating_list li .rating_box {
  order: 2;
  border-top: 1px solid #eceef2;
  padding-top: 12px;
}
/* 본문 없는 후기는 구분선 없이 작성자·별점만 */
.detail_v2 .rating_area .rating_list li:has(.content:empty) .rating_box {
  border-top: none;
  padding-top: 0;
}
.detail_v2 .rating_area .rating_list li .rating_box .rating_id .id::after {
  display: none;
}
.detail_v2 .rating_area .rating_list li .rating_box .rating_id .id::before {
  content: "\2014";
  color: #b0b5bf;
}

@media screen and (max-width: 768px) {
  .detail_v2 .class_desc .desc_txt {
    padding: 20px;
  }
  .detail_v2 .course_list li .btn-lnb .course_num {
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 13px;
  }
}

/* 강의정보: 썸네일 아래 정보 칸 (.class_media = 썸네일 + 강의정보) */
.detail_v2 .class_media {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail_v2 .class_media .img_box {
  width: 100%;
}
.detail_v2 .class_stats {
  padding: 22px 22px 20px;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  background: #fff;
}
.detail_v2 .class_stats h3 {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #15161a;
}
.detail_v2 .class_stats ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
}
.detail_v2 .class_stats li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px 13px;
  border-radius: 10px;
  background: #f5f7fb;
}
.detail_v2 .class_stats .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: #e8eefc;
}
.detail_v2 .class_stats .ico svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #1a3a8f;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail_v2 .class_stats .ico svg .fill {
  fill: #1a3a8f;
  stroke: none;
}
.detail_v2 .class_stats .lb {
  font-size: 12px;
  color: #6b7280;
}
.detail_v2 .class_stats strong {
  font-size: 16px;
  font-weight: 700;
  color: #15161a;
}
@media screen and (max-width: 768px) {
  .detail_v2 .class_stats {
    padding: 18px 16px 16px;
  }
  .detail_v2 .class_stats ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .detail_v2 .class_stats li {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    padding: 11px 12px;
  }
  .detail_v2 .class_stats .ico {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
  }
  .detail_v2 .class_stats .lb {
    flex: 1;
  }
  .detail_v2 .class_stats strong {
    width: 100%;
    padding-left: 36px;
    font-size: 15px;
  }
}

/* ===== 강의 상세 2단 구성 (.rd_layout): 왼쪽 본문 / 오른쪽 따라오는 신청 카드 ===== */
.detail_v2 .rd_layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}
.detail_v2 .rd_main {
  display: flex;
  flex-direction: column;
  gap: 44px;
  min-width: 0;
}
.detail_v2 .rd_side {
  position: sticky;
  top: 24px;
  display: block;
}
.detail_v2 .rd_side.class_desc > .desc_txt {
  width: 100%;
  max-width: none;
  flex: none;
}

/* 섹션 바로가기 탭 (스크롤해도 위에 붙음) */
.detail_v2 .rd_tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 24px;
  margin: -20px 0 -24px;
  padding-top: 14px;
  background: #fff;
  border-bottom: 1px solid #e9ebf0;
}
.detail_v2 .rd_tabs a {
  padding: 0 2px 12px;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
}
.detail_v2 .rd_tabs a.on {
  color: #15161a;
  border-bottom-color: #15161a;
}

/* 본문 섹션 공통 */
.detail_v2 .rd_main .rd_section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  scroll-margin-top: 64px;
}
/* 섹션 사이 구분선: 커리큘럼 | 교수자 소개 | 만족도·후기, 참석 방법 | 교수자 소개 */
.detail_v2 .rd_main .rd_section ~ .rd_section {
  padding-top: 40px;
  border-top: 1px solid #e5e7ec;
}
.detail_v2 .rd_main .sub_box .title,
.detail_v2 .rd_main .rating_area .rating_tit h1 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
}
.detail_v2 .rd_count {
  margin-left: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

/* 커리큘럼: 챕터 설명을 체크 목록으로 */
.detail_v2 .rd_goals {
  display: grid;
  gap: 10px;
  padding: 4px 0;
}
.detail_v2 .course_list .rd_goals li {
  position: relative;
  padding: 0 0 0 28px;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
  color: #2b2f38;
  font-size: 15px;
  line-height: 155%;
}
.detail_v2 .rd_goals li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8eefc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3a8f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* 교수자 소개: 카드 */
.detail_v2 .rd_main .creator_area .instructor {
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  background: #fafbfc;
}
.detail_v2 .rd_main .creator_area .instructor img {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}
.detail_v2 .rd_main .creator_area .instructor .txt .name {
  margin-bottom: 6px;
  font-size: 18px;
}
.detail_v2 .rd_main .creator_area .gray_line {
  margin: 24px 0;
}
/* 교수자 카드 아래 소개 항목이 없으면 구분선도 숨김 (맨 끝 / 연달아 두 줄) */
.detail_v2 .rd_main .creator_area .gray_line:last-child,
.detail_v2 .rd_main .creator_area .gray_line + .gray_line {
  display: none;
}
/* 마지막 소개 항목 설명의 아래 여백(15px)이 다음 구분선 위 간격에 더해지지 않게 */
.detail_v2 .rd_main .creator_area .class_explan:last-child .gray_explan {
  margin-bottom: 0;
}

/* 후기: 2열 카드, 이름 첫 글자 동그라미 */
.detail_v2 .rd_main .rating_area .rating_list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail_v2 .rating_area .rating_list li .rating_box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail_v2 .rating_area .rating_list li .rating_box .rating_id {
  flex: 1;
}
.detail_v2 .rating_area .rating_list li .rating_box .rating_id .id::before {
  content: none;
}
.detail_v2 .rd_avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef2fb;
  color: #1a3a8f;
  font-size: 14px;
  font-weight: 700;
}
.detail_v2 .rd_empty {
  color: #9aa0ab;
  font-size: 13px;
}

/* 모바일 하단 고정 신청 바 (PC 에서는 숨김) */
.rd_bar {
  display: none;
}

@media screen and (max-width: 1023px) {
  /* 한 줄 흐름: 썸네일 → 제목 카드 → 강의정보 → 탭 → 커리큘럼 → 교수자 → 후기 */
  .detail_v2 .rd_layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .detail_v2 .rd_main,
  .detail_v2 .rd_main .class_media {
    display: contents;
  }
  .detail_v2 .rd_main .class_media .img_box { order: 1; }
  .detail_v2 .rd_side { order: 2; position: static; }
  .detail_v2 .rd_main .class_stats { order: 3; }
  .detail_v2 .rd_tabs { order: 4; margin: 0; padding: 12px 4px 0; justify-content: space-between; }
  .detail_v2 .rd_main .rd_section { order: 5; }
  .detail_v2 .rd_main .rd_section ~ .rd_section { padding-top: 28px; }
  .detail_v2 .rd_main .rating_area .rating_list {
    grid-template-columns: 1fr;
  }
  .detail_v2 .rd_main .creator_area .instructor {
    gap: 16px;
    padding: 18px;
  }
  .detail_v2 .rd_main .creator_area .instructor img {
    width: 72px;
    height: 72px;
  }

  .rd_bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -6px 20px rgba(21, 22, 26, .10);
    transform: translateY(110%);
    transition: transform .25s ease;
  }
  .rd_bar.show {
    transform: none;
  }
  .rd_bar .t {
    flex: 1;
    min-width: 0;
  }
  .rd_bar .t b {
    display: block;
    overflow: hidden;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .rd_bar .t span {
    font-size: 12px;
    color: #6b7280;
  }
  .rd_bar .rd_bar_btn {
    flex-shrink: 0;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #0039ff;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  /* 바가 떠 있을 때 페이지 맨 아래 내용이 가려지지 않게 */
  body.rd_bar_on {
    padding-bottom: 72px;
  }
}

/* ===== 정회원 아카데미(라이브) 상세 (.detail_live) ===== */
/* 일시·접수기간은 글이 길어 2열, 장소는 한 줄 전체 */
.detail_v2 .class_stats--live ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail_v2 .class_stats--live li.wide {
  grid-column: 1 / -1;
}
.detail_v2 .class_stats--live strong {
  font-size: 15px;
  line-height: 145%;
  word-break: keep-all;
}
.detail_v2 .rd_main .rd_attend .title {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 140%;
  text-align: left;
}
.detail_v2 .rd_attend_box {
  padding: 20px 22px;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  background: #fafbfc;
  color: #2b2f38;
  font-size: 15px;
  line-height: 165%;
}
.detail_v2 .rd_live_url {
  margin: 0;
  padding: 18px 22px;
  border: 1px solid #c9d6ff;
  border-radius: 14px;
  background: #f3f6ff;
}
.detail_v2 .rd_live_url p {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1a3a8f;
}
.detail_v2 .rd_live_url a {
  color: #0039ff;
  font-weight: 600;
  word-break: break-all;
}
@media screen and (max-width: 1023px) {
  .detail_v2 .rd_main .rd_live_url { order: 5; }
}
@media screen and (max-width: 768px) {
  .detail_v2 .class_stats--live ul {
    grid-template-columns: 1fr;
  }
}

/* ===== 후기 전체 보기 창 (.modal-review.rv2) ===== */
.modal-review.rv2 .modal__inner {
  width: 720px;
  border-radius: 20px;
  overflow: hidden;
}
.modal-review.rv2 .modal__header {
  padding: 26px 28px 18px;
  border-bottom: 1px solid #eef0f3;
}
.modal-review.rv2 .modal__header h1 {
  font-size: 20px;
  font-weight: 700;
}
.modal-review.rv2 .modal__close {
  top: 22px;
}
.modal-review.rv2 .modal__content {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding: 22px 28px 28px;
}
/* 요약: 왼쪽 큰 점수, 오른쪽 점수별 막대 */
.rv2_summary {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px 24px;
  border-radius: 14px;
  background: #f5f7fb;
}
.rv2_score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.rv2_score strong {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: #15161a;
}
.rv2_score p {
  font-size: 13px;
  color: #6b7280;
}
.rv2_score p b {
  color: #15161a;
}
.rv2_stars {
  display: inline-flex;
  gap: 1px;
  letter-spacing: 0;
}
.rv2_stars i {
  font-style: normal;
  color: #d5d9e0;
}
.rv2_stars i.on {
  color: #ffb400;
}
.rv2_score .rv2_stars {
  font-size: 18px;
}
.rv2_dist {
  display: grid;
  gap: 7px;
}
.rv2_dist li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #4b5262;
}
.rv2_dist .bar {
  height: 8px;
  border-radius: 999px;
  background: #e3e7ee;
  overflow: hidden;
}
.rv2_dist .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #ffb400;
}
.rv2_dist .c {
  text-align: right;
  color: #8b909a;
}
/* 정렬 버튼 */
.rv2_sort {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 14px;
}
.rv2_sort button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d9dde5;
  border-radius: 999px;
  background: #fff;
  color: #4b5262;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.rv2_sort button.on {
  border-color: #15161a;
  background: #15161a;
  color: #fff;
}
/* 후기 목록: 한 줄에 하나씩 */
.modal-review.rv2 .rv2_list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.modal-review.rv2 .rv2_item {
  padding: 18px 2px;
  border: 0;
  border-bottom: 1px solid #eef0f3;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.modal-review.rv2 .rv2_item:last-child {
  border-bottom: 0;
}
.rv2_head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rv2_avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2fb;
  color: #1a3a8f;
  font-size: 14px;
  font-weight: 700;
}
.rv2_who {
  flex: 1;
  min-width: 0;
}
.modal-review.rv2 .rv2_who .id {
  font-size: 14px;
  font-weight: 700;
  color: #15161a;
}
.rv2_date {
  font-size: 12px;
  color: #9aa0ab;
}
.rv2_point {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.rv2_point b {
  color: #15161a;
}
.rv2_text {
  margin: 10px 0 0 46px;
  font-size: 15px;
  line-height: 165%;
  color: #2b2f38;
  word-break: keep-all;
}
.rv2_text--empty {
  font-size: 13px;
  color: #9aa0ab;
}
.rv2_empty_list {
  padding: 40px 0;
  text-align: center;
  color: #8b909a;
}
@media screen and (max-width: 768px) {
  /* 모바일 브라우저 주소창에 위가 가려지지 않게: 실제 보이는 화면(바깥 .modal = 100dvh)에 딱 맞춤.
     기본값(100vh + 가운데 정렬)은 주소창이 보일 때 창이 화면보다 길어 위쪽이 밀려남 */
  .modal-review.rv2 .modal__inner {
    top: 0;
    left: 0;
    transform: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 0;
  }
  .modal-review.rv2 .modal__header {
    flex-shrink: 0;
    padding: 0 20px;
  }
  .modal-review.rv2 .modal__content {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 16px 20px 28px;
  }
  .rv2_summary {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }
  .rv2_sort {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .rv2_sort button {
    flex-shrink: 0;
  }
  .rv2_text {
    margin-left: 0;
  }
}
