/* ========== Base ========== */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; } /* 필요 없으면 제거 가능 */

/* ========== Post Layout ========== */
.post-wrap{
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.post-nav{ margin-bottom: 14px; }

.post-back{
  text-decoration: none;
  color: #2563eb;
  font-weight: 900;
}
.post-back:hover{ text-decoration: underline; }

.post-card{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
}

/* ========== Meta ========== */
.post-topmeta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.post-chip{
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  color: #334155;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.post-meta{
  font-size: 12px;
  color: #9ca3af;
}

/* ========== Title / Summary ========== */
.post-title{
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.post-summary{
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.7;
  color: #6b7280;
}

/* ========== Thumbnail ========== */
.post-thumb{
  margin: 18px 0;
  overflow: hidden;
  border-radius: 14px;
}
.post-thumb img{
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ========== Content ========== */
.post-content{
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.9;
  color: #111827;
  word-break: break-word;
}

.post-content img{
  max-width: 100%;
  display: block;
  border-radius: 14px;
  margin: 16px 0;
}

.post-content a{
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
}

/* ===== Readability (spacing for editor output) ===== */
.post-content p{ margin: 0 0 1.35em; }

.post-content h2{
  margin: 2.2em 0 0.9em;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 900;
  border-left: 4px solid #2563eb;
  padding-left: 12px;
}

.post-content h3{
  margin: 1.8em 0 0.7em;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
  color: #111827;
}

.post-content h4{
  margin: 1.5em 0 0.6em;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  color: #111827;
}

.post-content ul,
.post-content ol{
  margin: 1.2em 0 1.4em 1.4em;
  padding: 0;
}

.post-content li{ margin: 0.55em 0; }

.post-content blockquote{
  margin: 1.8em 0;
  padding: 14px 16px;
  background: #f8fafc;
  border-left: 4px solid #cbd5e1;
  border-radius: 14px;
  color: #334155;
}

.post-content hr{
  margin: 2.2em 0;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

/* <br> 간격 트릭: 필요하면 유지, 아니면 삭제 추천 */
.post-content br{
  display: block;
  margin: 0.45em 0;
}

/* ========== Contact CTA ========== */
.contact-cta{
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
}

.contact-cta-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.contact-cta-title{
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.contact-cta-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cta-btn{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-height: 80px;
  border-radius: 16px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.cta-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,.06);
  border-color: #d1d5db;
}

.cta-btn:active{
  transform: translateY(0);
  box-shadow: none;
}

.cta-icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
}

.cta-icon i{
  font-size: 18px;
  color: #334155;
}

.cta-subtext{
  display: block;
  font-size: 26px;
  color: #475569;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.cta-call{ background: #eff6ff; border-color: #dbeafe; }
.cta-call .cta-icon{ background: #dbeafe; border-color: #bfdbfe; }
.cta-call .cta-icon i{ color: #2563eb; }

/* ========== Related ========== */
.related-wrap{
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.related-title{
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.related-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.related-item{
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}

.related-item:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,.06);
}

.related-thumb{
  width: 96px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f1f5f9;
}
.related-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-body{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-item-title{
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item-summary{
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item-date{
  margin-top: auto;
  font-size: 12px;
  color: #9ca3af;
}

/* ========== Responsive ========== */
@media (max-width: 768px){
  .cta-subtext{
    white-space: normal;
    word-break: keep-all;
    max-width: 100%;
  }
}

@media (max-width: 640px){
  .post-wrap{ padding: 26px 14px; }
  .post-card{ padding: 18px; }
  .post-title{ font-size: 22px; }

  .contact-cta-actions{ grid-template-columns: 1fr; }
  .cta-subtext{ max-width: 100%; }

  .related-grid{ grid-template-columns: 1fr; }
  .related-thumb{ width: 84px; height: 60px; }
}

/* ============================= */
/* 📱 모바일 하단 스티키 문의바 */
/* ============================= */

.mobile-sticky-cta{
  display: none;
}

@media (max-width: 768px){

  .mobile-sticky-cta{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    z-index: 9999;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
  }

  .mobile-cta-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 10px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
  }

  .mobile-cta-btn i{
    font-size: 16px;
  }

  .mobile-cta-btn.call{
    background: #2563eb;
  }

  .mobile-cta-btn.site{
    background: #0f172a;
  }

  /* 본문 가려짐 방지 */
  body{
    padding-bottom: 72px;
  }
}
