:root{
  --header: #334155;
  --related-post: #a8adb4;
}

/* astra-custom: 기본 본문 폰트/크기/행간 */
html, body{
  font-family: "Pretendard", "Noto Sans KR", Apple SD Gothic Neo, "Malgun Gothic", sans-serif;
  font-size: 1em;   /* 사이트 전역 기본 크기 */
}

/* 아스트라 본문 영역 보정: 상속값(1.12em)을 유지 */
.entry-content,
.ast-single-post .entry-content,
.ast-page-builder-template .entry-content{
  font-size: 1em;
  line-height: 1.7;
}

/* 제목 대비(선택) */
.entry-content h1{ font-size: 2em; line-height: 1.2; }
.entry-content h2{ font-size: 1.6em; line-height: 1.3; }
.entry-content h3{ font-size: 1.3em; line-height: 1.35; }

/* 에디터(블록) 미리보기 폰트/크기 동기화 */
.editor-styles-wrapper{
  font-family: "Pretendard", "Noto Sans KR", Apple SD Gothic Neo, "Malgun Gothic", sans-serif;
  font-size: 1.12em;
  line-height: 1.6;
}


.ast-separate-container.ast-right-sidebar #primary {
    margin: 2em 0;
}
.ast-right-sidebar #secondary {
    padding-left: 2em;
}
#secondary {
    margin: 2em 0 2.5em;
}
#secondary h2 {
    font-size: 0.8rem;
}

.wp-block-group {
  border-radius: 5px;
}

#secondary .wp-block-group h2 {
    margin-bottom: 0;
    background: var(--header); color:#fff;;
    padding: 10px;
    border-radius: 5px 5px 0 0;
}

.wp-block-group {
    background: white;
}

.wp-block-latest-posts.wp-block-latest-posts__list, .wp-block-categories {
    padding: 10px;
}

.ast-separate-container #primary {
    padding: 0;
}

@media (max-width: 921px) {
    .ast-separate-container.ast-right-sidebar #secondary {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 922px) {
    .ast-separate-container.ast-two-container.ast-right-sidebar #secondary{
        padding-left: 2em;
    }
}

.ast-separate-container.ast-two-container #secondary .widget {
    padding: 0;
    background: none;
    background-color: none;
    margin-bottom: 1.25em;
}

/* 카테고리 칩 스타일 적용 */
.blog .ast-taxonomy-container.cat-links a,
.archive .ast-taxonomy-container.cat-links a{
  display:inline-block; padding:2px 8px; border-radius:999px;
  background:#eef2f7; color:#2563eb; font-weight:600; text-decoration:none;
}

.entry-title {
    margin-bottom: 0.2em;
}

.single .entry-header {
    margin-bottom: 1em;
}

header.entry-header:not(.related-entry-header) > *:not(:last-child) {
    margin-bottom: 10px;
}

.ast-separate-container .ast-article-single:not(.ast-related-post) {
    border-radius: 5px;
}

/* 1) 작성자 요소 숨김(여러 변형 커버) */
.single header.entry-header .entry-meta .posted-by,
.single header.entry-header .entry-meta .byline,
.single header.entry-header .entry-meta .author,
.single header.entry-header .entry-meta [rel="author"],
.single header.entry-header .entry-meta [itemprop="author"]{
  display: none !important;
}

/* 2) 컨테이너의 텍스트(글쓴이, 슬래시 등) 보이지 않게 → 날짜만 살리기 */
.single header.entry-header .entry-meta{
  font-size: 0 !important; /* 텍스트 노드까지 0으로 */
  line-height: 1.45;
}

/* 3) 날짜만 정상 크기로 복원 */
.single header.entry-header .entry-meta .posted-on{
  font-size: 13px !important;
  color: var(--muted, #6b7280);
  font-weight: 500;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* 4) 만약 테마가 구분자/아이콘을 의사요소로 넣었다면 제거 */
.single header.entry-header .entry-meta .posted-on::before{
  content: none !important;
}

.rank-math-breadcrumb > p {
    margin-bottom: 0;
}

/* Rank Math 브레드크럼: 맨 뒤 제목(span.last) 숨김 */
.rank-math-breadcrumb .last{ display:none !important; }

/* 직전에 붙은 구분자( - )도 함께 숨김: p의 끝에서 두 번째 자식이 separator */
.rank-math-breadcrumb p > span.separator:nth-last-child(2){ display:none !important; }

/* 전체 크기는 작고 은은하게 유지 */
.site-breadcrumbs{
  font-size:12px; color:var(--muted, #64748b);
  display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:4px 0 10px;
}

.ast-archive-description {
    padding: 20px !important;
}

body.archive .ast-archive-description .ast-archive-title {
    font-size: 1rem;
}

body.archive .ast-archive-description, .search .ast-container section.ast-archive-description, .ast-separate-container .ast-article-post {
    border-radius: 5px;
}

/* 마지막 항목(현재 글/검색어) 숨김 + 직전 구분자도 숨김 */
.rank-math-breadcrumb .last{ display:none !important; }
.rank-math-breadcrumb p > span.separator:nth-last-child(2){ display:none !important; }




/* A. 기본 상단 박스(테마의 page-title + 브레드크럼 섹션) 통째로 숨김 */
.search section.ast-archive-description{
  display: none !important;
}

/* B. 혹시 다른 버전/스킨에서 쓰는 브레드크럼 래퍼도 함께 차단(안전망) */
.search .ast-breadcrumbs-wrapper,
.search nav.rank-math-breadcrumb,
.search .rank-math-breadcrumb,
.search #breadcrumbs{
  display: none !important;
}

/* C. 우리가 넣은 헤더(entry-header 안의 H1)는 반드시 보이게 */
.search header.entry-header.ast-archive-header h1.entry-title.ast-archive-title{
  display: block !important;
  visibility: visible !important;
}

/* D. 상단 여백 살짝(원하시면 조절) */
.search header.entry-header.ast-archive-header{
  margin-bottom: 14px;
}

.search-h1 {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
}

.ast-pagination .page-numbers.current, #ast-scroll-top {
  background: var(--header);
  border-radius: 5px;
}



/* 관련게시물 */
.site .ast-single-related-posts-container {
  padding: 2.5em 0 0;
}

.ast-related-posts-title-section {
  margin-bottom: 10px;
  padding-bottom: 0;
  padding-left: 10px;
  border-left: 10px var(--header) solid;
}

.ast-related-posts-inner-section {
  border: 1px solid var(--related-post);
  border-radius: 5px;
}

.ast-related-post-content, .ast-related-post-content-thumb > .ast-related-text-wrap {
  padding: 20px;
}

.ast-related-posts-title {
  font-size: 1.2rem;
}

.ast-related-post {
  margin-bottom: 20px;
}

.ast-related-post-title.entry-title {
  margin-top: 0;
  font-size: 1.0rem !important;
}

.ast-single-post .entry-content a {
  text-decoration: none;
}

.entry-content p {
  margin-bottom: 1.3em;
}

/* 썸네일이 있는 관련 게시물 카드: 좌(썸네일) | 우(내용) */
.ast-related-post-content-thumb {
  display: flex;
  align-items: flex-start;
}

/* 좌측: 썸네일 영역 크기 */
.ast-related-post-content-thumb .ast-related-post-featured-section.post-has-thumb{
  flex: 0 0 40%;
}
.ast-related-post-content-thumb .ast-related-post-featured-section.post-has-thumb img{
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 3px 0 0 3px;
}

/* 우측: 텍스트 스택(헤더 + 본문) */
.ast-related-post-content-thumb .ast-related-text-wrap{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 제목/본문 기본 보정 */
.ast-related-post-content .related-entry-header{ margin: 0; }
.ast-related-post-content .related-entry-header .entry-title{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}
.entry-content.clear{
  margin: 0;
  color: var(--muted, #374251);
  font-size: 1rem;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 썸네일이 없는 카드는 기본 블록 흐름(세로) 유지 */
.ast-related-post-content:not(:has(.ast-related-post-featured-section.post-has-thumb)){
  display: block !important;
}

/* 모바일 폴백 */
@media (max-width: 640px){
  .ast-related-post-content-thumb {
    flex-direction: column;
  }
  .ast-related-post-content-thumb .ast-related-post-featured-section.post-has-thumb{
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
  }
  .ast-related-post-content-thumb .ast-related-post-featured-section.post-has-thumb img{
    border-radius: 3px 3px 0 0;
  }  
}

/* 카드 썸네일을 컨테이너 가로폭 100%로 */
.ast-related-post-content .ast-related-post-featured-section{
  width: 100%;
}
.ast-related-post-content .ast-related-post-featured-section img{
  display: block;
  width: 100%;
  height: auto;       /* 원본 비율 유지 */
  object-fit: cover;  /* 잘림 최소화(높이 지정 시 적용) */
  border-radius: 3px; /* 본문과 동일 라운드 값 맞추세요 */
}

.ast-pagination .page-numbers {
  height: inherit;
}

/* 부모: .nav-links (한 줄 유지, 수직 중앙) */
.navigation.pagination .nav-links{
  display: flex;
  align-items: center;
  justify-content: center;  /* 숫자 중앙 기준 */
  gap: 8px;
  flex-wrap: nowrap;       /* 줄바꿈 방지 */
}


/* 현재 페이지 배경 가로폭 확장 */
.navigation.pagination .nav-links > .page-numbers.current{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;           /* 버튼 높이 */
  padding: 0 14px;        /* 좌우 여백(가로폭 넓히는 핵심) */
  line-height: 1;
}

/* 혹시 이전/다음에 자동 마진이 있었다면 제거 */
.navigation.pagination .nav-links > .prev.page-numbers,
.navigation.pagination .nav-links > .next.page-numbers{
  padding: 0 !important;
}

/* 좌우 공간 확보용 가상요소(이전/다음이 없을 때도 균형 유지) */
.navigation.pagination .nav-links::before,
.navigation.pagination .nav-links::after{
  content: "";
  flex: 1 1 0;              /* 숫자 좌우에 동일한 가짜 공간 */
}
@media (max-width: 420px) {
  .ast-pagination .prev.page-numbers, .ast-pagination .next.page-numbers {
    width: 16% !important;
  }
}
.ast-right-arrow, .ast-left-arrow {
  display: none;
}