/* 학원 상세 페이지 — LearnSpot (styles.css 변수 재사용) */

.detail-page .detail-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px 10px 0px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* 상단 툴바 한 줄: 본문과 동일 최대 너비·가운데 정렬 */
.detail-page .detail-topbar > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  min-width: 0;
}

.detail-page .detail-back,
.detail-page .detail-share {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.detail-page .detail-topbar-icon {
  display: block;
  pointer-events: none;
}

.detail-page .detail-topbar-icon-share {
  width: 20px;
  height: auto;
  max-height: 22px;
}

.detail-page .detail-back:hover,
.detail-page .detail-share:hover {
  color: var(--primary);
}

.detail-page .detail-back:hover .detail-topbar-icon,
.detail-page .detail-share:hover .detail-topbar-icon {
  opacity: 0.85;
}

.detail-topbar-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight:800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.detail-topbar-end {
  display: flex;
  align-items: center;

  flex-shrink: 0;
}

.detail-container {
  padding-bottom: 32px;
}

.detail-state {
  margin-top: 8px;
}

.detail-main {
  margin-top: 0;
}

.detail-hero {
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 16 / 7;
  max-height: 220px;
  margin-bottom: 16px;
}

.detail-hero--banner {
  aspect-ratio: unset;
  max-height: none;
  background: none;
  overflow: visible;
}

@media (max-width: 719px) {
  .detail-hero--banner {
    zoom: 0.62;
  }
}

@media (max-width: 479px) {
  .detail-hero--banner {
    zoom: 0.48;
  }
}

.detail-hero--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}

/* 상세 히어로 플레이스홀더: 인덱스 카드와 동일 클래스명, 학원명 줄 */
.detail-hero--placeholder .learnspot-card-placeholder-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  text-align: center;
  padding: 4px 8px;
  max-width: min(100%, 280px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.02em;

  border-radius: 6px;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero-ph {
  font-size: 13px;
  color: #c7c7c7;
  line-height: 1.4;
  max-width: 280px;
}

.detail-sheet {
  padding: 20px;
}

.detail-category {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.detail-name {
  margin: 0 0 5px;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.detail-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-badges-row:empty {
  display: none;
}

.center-detail-class-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.center-detail-summary-table td.center-detail-summary-chips {
  white-space: normal;
  text-align: left;
  vertical-align: middle;
}

.badge.class-mode-online {
  background: #dcfce7;
  color: #008729;
}

.badge.class-mode-offline {
  background: #e7efff;
  color: #334155;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.detail-action-icon {
  flex-shrink: 0;
  display: block;
}

/* 주요(파란) 버튼 위의 회색/다색 SVG를 흰색 톤으로 */
.detail-action-btn:not(.detail-action-secondary) .detail-action-icon {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.detail-action-btn:hover {
  background: #1d4ed8;
  text-decoration: none !important;
}

/* 전화번호 없음: 전화 버튼 비활성 표시 */
.detail-action-btn.detail-action-btn--disabled,
.detail-action-btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: #94a3b8;
}

.detail-action-btn.detail-action-btn--disabled:hover,
.detail-action-btn[aria-disabled='true']:hover {
  background: #94a3b8;
}

.detail-action-secondary {
  background: #fff;
  color: var(--primary) !important;
  border: 1px solid var(--border);
}

.detail-action-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* dt 좌측 라벨 · dd 우측 내용 (한 행에 나란히) */
.detail-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 0;
  align-items: start;
}

.detail-dl dt {
  margin: 0;
  padding: 10px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
}

.detail-dl dd {
  margin: 0;
  padding: 10px 0 10px;
  font-size: 13px;
  min-width: 0;
  word-break: break-word;
}

.detail-dl .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-dl .detail-class-info {
  word-break: break-word;
}

.detail-dl .detail-class-info img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

.detail-dl .preserve {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (min-width: 720px) {
  .detail-container {
    max-width: 980px;
  }

  /* 데스크톱에서 히어로가 너무 낮게 눌리지 않도록 */
  .detail-hero {
    max-height: none;
  }
}

body.detail-page .footer.about-legal {
  margin-top: 8px;
  padding: 20px 16px 24px;
}

body.detail-page .footer.about-legal .center-footer-promote {
  margin-top: 16px;
  margin-bottom: 0;
  color: #6b7280;
}

body.detail-page .footer.about-legal .center-footer-promote strong {
  font-weight: 700;
  color: #4b5563;
}

body.detail-page .footer.about-legal a {
  color: inherit;
  text-decoration: underline;
}

body.detail-page .footer.about-legal a:hover {
  color: #6b7280;
  text-decoration: underline;
}
