@charset "utf-8";

/* ======================================================
   BLOG DETAIL PAGE ONLY
   body.page-blog-detail
====================================================== */

.page-blog-detail{
  background:#fff;
}

/* ======================================================
   HERO (매거진형 상단 비주얼 + 큰 제목)
====================================================== */

.page-blog-detail .detail-hero{
  margin-top: 80px;               /* fixed header 보정 */
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;              /* PC에서 과하게 커지는 것 방지 */
  overflow: hidden;

  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

@media (max-width:768px){
  .page-blog-detail .detail-hero{
    margin-top: 50px;
    max-height: none;
    aspect-ratio: 16 / 9;
  }
}

.page-blog-detail .detail-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.45);
}

/* 제목을 “이미지 위”에 크게 */
.page-blog-detail .hero-inner{
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;

  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
}

/* ✅ 변경: hero-title을 본문(.detail-wrap)과 같은 라인/폭으로 정렬 */
.page-blog-detail .hero-title{
  width: 100%;
  max-width: 900px;       /* .detail-wrap과 동일 */
  margin: 0 auto;         /* 가운데 정렬 */
  padding: 0 20px;        /* .detail-wrap과 동일 */
}

/* ✅ 변경: 기존 hero-title padding은 h1로 이동(라인 맞춤 컨트롤) */
.page-blog-detail .hero-title h1{
  color:#fff;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.6px;
  max-width: 980px;

  margin: 0;
  padding: 60px 0 18px;   /* 상/하 여백 (원하시면 수치만 조절) */
}

@media (max-width:1024px){
  .page-blog-detail .hero-title h1{
    font-size: 34px;
  }
}

@media (max-width:768px){
  .page-blog-detail .hero-title h1{
    font-size: 24px;
    padding: 40px 0 14px;
  }
}

/* ======================================================
   WRAP
====================================================== */

.page-blog-detail .detail-wrap{
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px 40px; /* 하단 패딩을 줄여 유틸리티 바를 푸터 바로 위로 밀착 */
}

@media (max-width:768px){
  .page-blog-detail .detail-wrap{
    padding: 40px 20px 30px; /* 모바일 하단 패딩 조정 */
  }
}

/* ======================================================
   META BAR + SHARE
====================================================== */

.page-blog-detail .detail-meta-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 18px 0 22px;
  border-bottom: 1px solid #eee;
  margin-bottom: 28px;
}

.page-blog-detail .meta-left{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.page-blog-detail .author{
  display:flex;
  align-items:center;
  gap: 10px;
}

.page-blog-detail .avatar{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e9e9e9;
}

.page-blog-detail .author .name{
  font-size: 14px;
  font-weight: 800;
  color:#222;
}

.page-blog-detail .meta{
  font-size: 13px;
  color:#9a9a9a;
}

.page-blog-detail .btn-share{
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background:#fff;
  font-size: 13px;
  font-weight: 700;
  color:#222;
  cursor:pointer;
  transition: all .25s ease;
}

.page-blog-detail .btn-share:hover{
  border-color:#bbb;
  transform: translateY(-1px);
}

.page-blog-detail .btn-kakao{
  border-color: rgba(207,0,11,0.25);
}

.page-blog-detail .btn-kakao:hover{
  border-color: var(--red);
}

/* 모바일에서 버튼 줄바꿈 */
@media (max-width:520px){
  .page-blog-detail .detail-meta-bar{
    align-items:flex-start;
    flex-direction: column;
  }
  .page-blog-detail .meta-right{
    width:100%;
    justify-content:flex-end;
  }
}

/* ======================================================
   CONTENT
====================================================== */

.page-blog-detail .detail-content{
  font-size: 17px;
  line-height: 1.95;
  color:#333;
}

/* 강조 */
.page-blog-detail .detail-content strong{
  font-weight: 900;
}

/* 대표 이미지 */
.page-blog-detail .detail-figure{
  margin: 34px 0 26px;
}

.page-blog-detail .detail-figure img{
  width: 100%;
  border-radius: 12px;
  display:block;
}

/* ✅ 출처 위 이미지(조금 더 여백/정렬 고급스럽게) */
.page-blog-detail .detail-figure.detail-figure-source{
  margin-top: 60px;
  margin-bottom: 14px;
}

.page-blog-detail .detail-figure.detail-figure-source img{
  border-radius: 12px;
}

/* 소제목(좌측 바 스타일) */
.page-blog-detail .bar-title{
  margin: 44px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--red);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
  color:#222;
}

@media (max-width:768px){
  .page-blog-detail .detail-content{
    font-size: 15px;
  }
  .page-blog-detail .bar-title{
    font-size: 18px;
  }
}

/* 출처 */
.page-blog-detail .detail-source{
  margin-top: 0;
  padding-top: 12px; /* 선이 제거되어 패딩을 약간 조율 */
  margin-bottom: 200px; /* 출처 아래쪽 여백 추가 */
  font-size: 13px;
  color:#8c8c8c;
}

.page-blog-detail .detail-source a{
  color:#8c8c8c;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* ======================================================
   RELATED
====================================================== */

.page-blog-detail .related-wrap{
  margin-top: 90px;
}

.page-blog-detail .related-title{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 22px;
  color:#222;
}

.page-blog-detail .related-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.page-blog-detail .related-card{
  text-decoration:none;
  color:#262626;
  display:block;
  transition: transform .25s ease;
}

.page-blog-detail .related-card .thumb{
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 비율 */
  height: 0;
  border-radius: 12px;
  overflow:hidden;
  background:#eee;
}

.page-blog-detail .related-card .thumb img{
  position: absolute;
  top: 0;
  left: 0;
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transition: transform .35s ease;
}

.page-blog-detail .related-card .title{
  margin-top: 10px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (hover:hover){
  .page-blog-detail .related-card:hover{
    transform: translateY(-5px);
  }
  .page-blog-detail .related-card:hover .thumb img{
    transform: scale(1.05);
  }
}

@media (max-width:1024px){
  .page-blog-detail .related-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:768px){
  .page-blog-detail .related-grid{
    grid-template-columns: 1fr;
  }
}

/* ======================================================
   하단 공유/유틸리티 바 및 목록/복사 링크 (조화로운 텍스트 & 아이콘 톤)
====================================================== */
.page-blog-detail .detail-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 100px; /* 백투리스트 위쪽 여백 대폭 확대 */
  padding-top: 30px; /* 선과 텍스트 사이 여백 */
  border-top: 1px solid #cbd5e1; /* 구분선 */
}

.page-blog-detail .btn-back-list {
  font-size: 16px;
  font-weight: 500;
  color: #333333; /* 글씨 색상 더 진하게 */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.page-blog-detail .btn-back-list svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.75;
  position: relative;
  top: 1px; /* 한글 광학적 중앙 정렬 보정 */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-blog-detail .btn-back-list:hover svg {
  opacity: 1.0;
  transform: translateX(-2px);
}

.page-blog-detail .btn-back-list:hover {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-blog-detail .btn-copy {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  height: 36px;
  padding: 0 14px; /* 좌우 패딩을 주어 캡슐(Pill) 스타일로 구성 */
  border-radius: 18px; /* 완벽한 둥근 모서리 */
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* 아이콘과 텍스트 사이 간격 */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.page-blog-detail .btn-copy img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.page-blog-detail .btn-copy span {
  font-size: 13px;
  font-weight: 500;
  color: #475569; /* 차분한 그레이블루 텍스트 색상 */
  transition: color 0.2s ease;
}

.page-blog-detail .btn-copy:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.page-blog-detail .btn-copy:hover img {
  opacity: 0.85;
}

.page-blog-detail .btn-copy:hover span {
  color: #0f172a; /* 호버 시 텍스트 색상 진하게 */
}

.page-blog-detail .btn-copy:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}