/* ── Detail Page Styles ── */

/* Hero */
.btk-detail .detail-hero {
  padding: 20px 2rem 40px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(249,115,22,0.08) 0%, transparent 50%), var(--dark-bg);
}
.btk-detail .detail-hero-content {
  max-width: 900px;
  margin: 0 auto;
}
.btk-detail .detail-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary);
}

/* ── Image Gallery ── */
.btk-detail .detail-gallery {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.btk-detail .gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--dark-card);
  aspect-ratio: 4 / 3;
  margin-bottom: 1rem;
}
.btk-detail .main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #111;
}

.btk-detail .gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btk-detail .gallery-nav:hover { background: var(--orange); }
.btk-detail .gallery-prev { left: 12px; }
.btk-detail .gallery-next { right: 12px; }

.btk-detail .gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Thumbnail Strip */
.btk-detail .gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--dark-lighter) transparent;
}
.btk-detail .gallery-thumbs::-webkit-scrollbar { height: 6px; }
.btk-detail .gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.btk-detail .gallery-thumbs::-webkit-scrollbar-thumb { background: var(--dark-lighter); border-radius: 3px; }

.btk-detail .thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s;
  opacity: 0.6;
}
.btk-detail .thumb:hover { opacity: 0.9; }
.btk-detail .thumb.active {
  border-color: var(--orange);
  opacity: 1;
}
.btk-detail .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Body Content ── */
.btk-detail .detail-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 1.05rem;
}

.btk-detail .detail-body .loading-text {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
}

/* Parsed body sections */
.btk-detail .detail-body .body-section {
  margin-bottom: 2.5rem;
}
.btk-detail .detail-body .section-heading {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(249,115,22,0.3);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.btk-detail .detail-body .section-heading-en {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.btk-detail .detail-body .section-subtitle {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.btk-detail .detail-body p {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
}

/* ── Summary Card (above body) ── */
.btk-detail .detail-summary {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Framework Grid (Approach/Scope/Standard/Result) ── */
.btk-detail .detail-summary .framework-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.btk-detail .detail-summary .framework-cell {
  background: var(--dark-card);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.btk-detail .detail-summary .framework-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.5px;
}
.btk-detail .detail-summary .framework-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ── Equipment Heading (numbered badge + name) ── */
.btk-detail .detail-body .equip-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.btk-detail .detail-body .equip-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Numbered Steps (01, 02, ...) ── */
.btk-detail .detail-body .numbered-step {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.btk-detail .detail-body .numbered-step:last-child {
  border-bottom: none;
}
.btk-detail .detail-body .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(249,115,22,0.15);
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.btk-detail .detail-body .step-content {
  flex: 1;
}
.btk-detail .detail-body .step-content p:last-child {
  margin-bottom: 0;
}

/* ── Bullet Items (✅ ▶) ── */
.btk-detail .detail-body .bullet-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
}
.btk-detail .detail-body .bullet-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  margin-top: 0.6rem;
}
.btk-detail .detail-body .bullet-text {
  flex: 1;
}
.btk-detail .detail-body .bullet-text p:last-child {
  margin-bottom: 0;
}

/* ── Spec Table (장비 사양) ── */
.btk-detail .detail-body .spec-table {
  background: var(--dark-card);
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0 1.5rem;
  border: 1px solid rgba(255,255,255,0.05);
}
.btk-detail .detail-body .spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.9rem;
}
.btk-detail .detail-body .spec-row:last-child {
  border-bottom: none;
}
.btk-detail .detail-body .spec-name {
  color: var(--text-primary);
  font-weight: 600;
  flex: 1;
}
.btk-detail .detail-body .spec-dims {
  color: var(--text-muted);
  font-family: 'Pretendard', monospace;
  font-size: 0.85rem;
  text-align: right;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ── Sub Items (작업 범위, 설계 기준, etc.) ── */
.btk-detail .detail-body .sub-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.btk-detail .detail-body .sub-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border-left: 3px solid rgba(249,115,22,0.4);
}
.btk-detail .detail-body .sub-item-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
}
.btk-detail .detail-body .sub-item-value {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Info Card (현장/업종/범위 등) ── */
.btk-detail .detail-summary .info-card {
  background: var(--dark-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.btk-detail .detail-summary .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.btk-detail .detail-summary .info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.btk-detail .detail-summary .info-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Quote Block ── */
.btk-detail .detail-body .quote-block {
  border-left: 3px solid var(--orange);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(249,115,22,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
}

/* ── Bottom CTA ── */
.btk-detail .detail-body .detail-cta {
  text-align: center;
  padding: 2rem 0 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.btk-detail .detail-body .detail-cta-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--orange);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s;
}
.btk-detail .detail-body .detail-cta-btn:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}

/* ── Prev/Next Navigation ── */
.btk-detail .detail-nav-bottom {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
}
.btk-detail .nav-prev-next {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  background: var(--dark-card);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  transition: all 0.3s;
}
.btk-detail .nav-prev-next:hover {
  border-color: rgba(249,115,22,0.3);
  transform: translateY(-2px);
}
.btk-detail .nav-prev-next .nav-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.btk-detail .nav-prev-next .nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btk-detail .nav-next { text-align: right; }

/* ── Interview Q&A (team) ── */
.btk-detail .detail-body .interview-subtitle {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}
.btk-detail .detail-body .interview-qa {
  margin-bottom: 3.5rem;
}
.btk-detail .detail-body .interview-q-img {
  width: 100%;
  max-width: 700px;
  border-radius: 12px;
  margin: 2.5rem auto 1.2rem;
  display: block;
}
.btk-detail .detail-body .interview-qa:first-of-type .interview-q-img {
  margin-top: 0;
}
.btk-detail .detail-body .interview-answer {
  padding-left: 1.25rem;
  border-left: 2px solid rgba(249,115,22,0.25);
}
.btk-detail .detail-body .interview-answer p {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
  opacity: 0.88;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .btk-detail .detail-hero { padding: 16px 1.5rem 24px; }
  .btk-detail .detail-hero h1 { font-size: 1.4rem; }
  .btk-detail .detail-gallery { padding: 0 1rem 1.5rem; }
  .btk-detail .gallery-main { border-radius: 12px; }
  .btk-detail .gallery-nav { width: 36px; height: 36px; font-size: 1.4rem; }
  .btk-detail .gallery-prev { left: 8px; }
  .btk-detail .gallery-next { right: 8px; }
  .btk-detail .thumb { width: 64px; height: 48px; }
  .btk-detail .detail-body { padding: 1.5rem 1.5rem 2rem; font-size: 1rem; }
  .btk-detail .detail-summary .info-card { grid-template-columns: 1fr 1fr; }
  .btk-detail .detail-summary .framework-grid { grid-template-columns: 1fr 1fr; }
  .btk-detail .detail-summary .framework-cell { padding: 1rem; }
  .btk-detail .detail-summary { padding: 0 1rem; }
  .btk-detail .detail-body .spec-row { padding: 0.5rem 1rem; font-size: 0.85rem; }
  .btk-detail .detail-nav-bottom { flex-direction: column; padding: 0 1rem; }
  .btk-detail .nav-next { text-align: left; }
}
@media (max-width: 480px) {
  .btk-detail .detail-summary .info-card { grid-template-columns: 1fr; }
  .btk-detail .detail-summary .framework-grid { grid-template-columns: 1fr; }
  .btk-detail .detail-body .spec-row { flex-direction: column; gap: 0.2rem; }
  .btk-detail .detail-body .spec-dims { text-align: left; margin-left: 0; }
}
