/*
 * 옛 「사용자 정의하기 > 추가 CSS」(it-service 테마에 저장돼 있던 것, custom_css 글 11212 — 2026-03-24) 원문.
 * 테마를 바꾸면 사라지는 값이라 파일로 옮겼다. 맨 뒤에 싣는다(inc/enqueue.php).
 * 글 상세 본문(the_content — 글마다 다른 내용)에 걸리는 규칙이라 글 틀(template-parts/single-post.php)에 옛 이름
 * elementor-location-single · elementor-widget-theme-post-content 를 같이 둔다.
 */

/* =========================================================
   Elementor Single Post - Typography + Image Optimization
   Scope: body.single-post .elementor-location-single
========================================================= */

/* ---------- Typography ---------- */
body.single-post .elementor-location-single :is(h2,h3){
  letter-spacing: -0.02em;
}

body.single-post .elementor-location-single h2{
  font-size: 30px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  margin: 54px 0 18px !important;
  padding: 0 0 12px !important;

  /* 구분선(라인) */
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
}

body.single-post .elementor-location-single h3{
  font-size: 22px !important;
  line-height: 1.5 !important;
  font-weight: 800 !important;
  margin: 28px 0 10px !important;
}

/* 본문 문단 가독성 */
body.single-post .elementor-location-single p{
  font-size: 17px !important;
  line-height: 1.85 !important;
  letter-spacing: -0.01em;
  margin: 0 0 18px !important;
  color: #2b2b2b;
}

/* 빈 제목(공백/nbsp만 있는 헤딩) 방지 */
body.single-post .elementor-location-single h2:empty,
body.single-post .elementor-location-single h3:empty{
  display: none !important;
}

/* 포스트 본문(Text Editor / Theme Post Content) 안의 리스트만 불릿 표시 */
body.single-post .elementor-widget-theme-post-content ul,
body.single-post .elementor-widget-text-editor ul {
  list-style: disc !important;
  padding-left: 1.5em !important;
  margin: 0 0 18px !important;
}

body.single-post .elementor-widget-theme-post-content ol,
body.single-post .elementor-widget-text-editor ol {
  list-style: decimal !important;
  padding-left: 1.5em !important;
  margin: 0 0 18px !important;
}

body.single-post .elementor-widget-theme-post-content li,
body.single-post .elementor-widget-text-editor li {
  display: list-item !important;
  margin: 0 0 8px !important;
}

/* =========================================================
   Image Optimization (centered, consistent spacing, mixed aspect)
   - Default: max 720px (prevents vertical images becoming huge)
   - Opt-in portrait: add class "img-vertical" to the figure/wp-block-image
========================================================= */

/* 이미지/figure 공통: 중앙정렬 + 간격 통일 */
body.single-post .elementor-location-single figure,
body.single-post .elementor-location-single .wp-block-image,
body.single-post .elementor-location-single .elementor-widget-image{
  margin: 30px auto !important;
  text-align: center;
}

/* 이미지 자체: 중앙정렬 + 라운드 + 넘침 방지 */
body.single-post .elementor-location-single img{
  display: block;
  margin-left: auto;
  margin-right: auto;

  max-width: 100% !important;
  height: auto !important;

  border-radius: 14px;
}

/* 본문 이미지 기본 크기 제한 (가로/세로 섞여도 과도하게 커지지 않게) */
body.single-post .elementor-location-single figure img,
body.single-post .elementor-location-single .wp-block-image img{
  width: 100%;
  max-width: 720px; /* 핵심: 세로 이미지 과대 확대 방지 */
}

/* 세로 이미지(옵트인): figure/wp-block-image에 img-vertical 클래스 추가 */
body.single-post .elementor-location-single figure.img-vertical img,
body.single-post .elementor-location-single .wp-block-image.img-vertical img{
  max-width: 420px;
}

/* 캡션(figure/블록 캡션) 정리 */
body.single-post .elementor-location-single figcaption,
body.single-post .elementor-location-single .wp-element-caption{
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0,0,0,.55);
  text-align: center;
}

/* 이미지가 링크로 감싸진 경우(클릭 확대 등)에도 중앙정렬 유지 */
body.single-post .elementor-location-single figure a,
body.single-post .elementor-location-single .wp-block-image a{
  display: inline-block;
}


/* ---------- Mobile ---------- */
@media (max-width:768px){
  body.single-post .elementor-location-single h2{
    font-size:24px !important;
    margin:44px 0 14px !important;
  }

  body.single-post .elementor-location-single h3{
    font-size:19px !important;
    margin:22px 0 8px !important;
  }

  body.single-post .elementor-location-single p{
    font-size:16px !important;
    line-height:1.8 !important;
  }

  /* 모바일에서는 이미지 최대폭을 조금 더 키워도 안정적 */
  body.single-post .elementor-location-single figure img,
  body.single-post .elementor-location-single .wp-block-image img{
    max-width: 100%;
  }

  /* 세로 이미지도 모바일에서는 너무 작지 않게 */
  body.single-post .elementor-location-single figure.img-vertical img,
  body.single-post .elementor-location-single .wp-block-image.img-vertical img{
    max-width: 520px;
  }
}
/* =========================================================
   Elementor Pagination (clean + mobile safe)
   - Add class on the Posts wrapper/container: blog-posts-wrap
========================================================= */

/* pagination wrapper */
nav.elementor-pagination{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* buttons (a/span 모두 커버) */
nav.elementor-pagination :is(a.page-numbers, span.page-numbers){
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 38px;
  height: 38px;
  padding: 0 12px;

  border: 1px solid rgba(0,0,0,.14);
  border-radius: 999px;
  background: #fff;

  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  color: rgba(0,0,0,.75);
}

/* hover (링크만) */
nav.elementor-pagination a.page-numbers:hover{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.22);
}

/* current */
nav.elementor-pagination .page-numbers.current{
  background: rgba(0,0,0,.88);
  border-color: rgba(0,0,0,.88);
  color: #fff;
}

/* prev/next */
nav.elementor-pagination :is(.prev, .next){
  min-width: 46px;
  padding: 0 14px;
}

/* dots */
nav.elementor-pagination .dots{
  border: 0;
  background: transparent;
  min-width: auto;
  padding: 0 6px;
  color: rgba(0,0,0,.45);
}

/* disabled (첫/마지막 페이지에서 span 또는 .disabled로 나오는 케이스 대응) */
nav.elementor-pagination :is(span.prev, span.next, .disabled){
  opacity: .35;
  pointer-events: none;
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.10);
}

/* =========================================================
   Mobile: avoid being covered by sticky bottom menu/footer
========================================================= */
@media (max-width: 767px){

  /* 핵심: pagination이 하단 메뉴에 가려지지 않게 wrapper 아래 공간 확보 */
  .blog-posts-wrap{
    margin-bottom: 230px !important; /* 현재 실기기에서 맞춘 값. 180~260 사이 조절 */
  }

  nav.elementor-pagination{
    gap: 4px;
    margin-top: 18px;
  }

  nav.elementor-pagination :is(a.page-numbers, span.page-numbers){
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  nav.elementor-pagination :is(.prev, .next){
    min-width: 40px;
    padding: 0 10px;
  }
}