/*
Theme Name:  Saemna Theme
Theme URI:   http://sam.local
Description:  Astra 자식 테마 — 셈나 연구소 전용 디자인. 보태니컬 그린 팔레트, Pretendard 한글 폰트, 검색형 히어로, 카드형 글 목록, 커스텀 사이드바/푸터, 자동 페이지 생성 훅 포함. 파일만 복사하면 원본 사이트에 그대로 적용됩니다.
Author:      Saemna Lab
Template:    astra
Version:     1.4.2
Text Domain: saemna-theme
*/

/* =====================================================================
   0. 디자인 토큰 (보태니컬 그린)
   ===================================================================== */
:root {
  --sam-green:        #2F6B4F;   /* 주색 - 딥 보태니컬 그린 */
  --sam-green-dark:   #234f3b;   /* hover / 진한 톤 */
  --sam-green-soft:   #EAF2ED;   /* 아주 옅은 그린 배경 */
  --sam-green-line:   #d6e4db;   /* 옅은 그린 보더 */
  --sam-coral:        #E4674F;   /* 포인트 - 베리 코랄 (CTA/뱃지) */
  --sam-coral-dark:   #cf5138;
  --sam-bg:           #FAF9F5;   /* 웜 오프화이트 배경 */
  --sam-surface:      #ffffff;   /* 카드/표면 */
  --sam-ink:          #2B2B2B;   /* 본문 차콜 */
  --sam-ink-soft:     #5c6660;   /* 보조 텍스트 */
  --sam-ink-faint:    #8a938d;   /* 메타/캡션 */
  --sam-radius:       16px;
  --sam-radius-sm:    10px;
  --sam-shadow:       0 6px 24px rgba(35, 79, 59, 0.08);
  --sam-shadow-hover: 0 14px 36px rgba(35, 79, 59, 0.16);
  --sam-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
              "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
}

/* =====================================================================
   1. 전체 톤 / 타이포그래피
   ===================================================================== */
body,
button, input, select, textarea,
.ast-container,
h1, h2, h3, h4, h5, h6,
.site-title, .site-description,
.main-header-menu,
.entry-title, .widget-title,
.ast-single-post .entry-content {
  font-family: var(--sam-font) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { overflow-x: clip; }
body {
  background-color: var(--sam-bg);
  color: var(--sam-ink);
  line-height: 1.75;
  letter-spacing: -0.01em;
  overflow-x: clip; /* 모바일 가로 스크롤 방지 */
  max-width: 100%;
}

/* 배경 톤 통일 — 콘텐츠 영역의 쿨 그레이를 웜 오프화이트로 */
.site-content,
#content,
.ast-separate-container,
.ast-plain-container { background-color: var(--sam-bg) !important; }

/* SVG 라인 아이콘 공통 */
.sam-ico { display: inline-block; vertical-align: -0.18em; flex: 0 0 auto; }

.ast-container,
.site-content .ast-container { max-width: 1240px; }

h1, h2, h3, h4, h5, h6, .entry-title { color: var(--sam-ink); font-weight: 700; letter-spacing: -0.02em; }
h1 { line-height: 1.28; }
h2 { line-height: 1.34; }

a { color: var(--sam-green); text-decoration: none; transition: color .18s ease; }
a:hover, a:focus { color: var(--sam-green-dark); }

::selection { background: var(--sam-green); color: #fff; }

/* 메타(작성자/날짜) 링크 색 통일 — 기본 파란색 제거 */
.entry-meta, .entry-meta a,
.ast-blog-meta-container a,
.posted-by a, .posted-on a, .posted-on time,
.ast-article-post .post-meta a {
  color: var(--sam-ink-faint) !important;
  font-weight: 500;
}
.entry-meta a:hover, .ast-blog-meta-container a:hover,
.posted-by a:hover, .posted-on a:hover { color: var(--sam-green) !important; }

/* 본문 링크 밑줄 강조 */
.entry-content a:not(.wp-block-button__link):not(.sam-btn) {
  text-decoration: underline;
  text-decoration-color: var(--sam-green-line);
  text-underline-offset: 3px;
}

/* 공용 버튼 (히어로/사이드바/푸터에서 사용) */
.sam-btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .72em 1.35em;
  border-radius: 999px;
  font-weight: 600; font-size: .96rem; line-height: 1;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap; cursor: pointer; border: 0;
}
.sam-btn--coral { background: var(--sam-coral); color: #fff !important; }
.sam-btn--coral:hover { background: var(--sam-coral-dark); color: #fff !important; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(228,103,79,.32); }
.sam-btn--green { background: var(--sam-green); color: #fff !important; }
.sam-btn--green:hover { background: var(--sam-green-dark); color: #fff !important; transform: translateY(-2px); }
.sam-btn--ghost { background: #fff; color: var(--sam-green) !important; border: 1.5px solid var(--sam-green-line); }
.sam-btn--ghost:hover { border-color: var(--sam-green); transform: translateY(-2px); }

/* =====================================================================
   2. 헤더
   ===================================================================== */
.site-header,
header .ast-primary-header-bar .site-primary-header-wrap {
  background: transparent !important;
}
/* sticky + 반투명 블러 헤더 */
.site-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 99; }
.ast-primary-header-bar {
  background: rgba(255, 255, 255, 0.82) !important;
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--sam-green-line) !important;
  box-shadow: 0 2px 14px rgba(35,79,59,.05);
}
/* 관리자 바 표시 시 sticky 위치 보정 */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* 사이트명 + 태그라인 */
.site-title { margin: 0 !important; line-height: 1.1 !important; }
.site-title a {
  color: var(--sam-green) !important;
  font-weight: 800 !important;
  font-size: 1.6rem !important;
  letter-spacing: -0.03em;
}
.site-title a:hover { color: var(--sam-green-dark) !important; }
/* 사이트명 앞 잎사귀 아이콘 (SVG) */
.site-title a::before {
  content: "";
  display: inline-block;
  width: 1.05em; height: 1.05em;
  margin-right: .34em; vertical-align: -0.14em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232F6B4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.5 19 2c1 2 2 4.2 2 8 0 5.5-4.8 10-10 10Z'/%3E%3Cpath d='M2 22c0-3 1.85-5.4 5.08-6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.site-description {
  color: var(--sam-ink-faint) !important;
  font-size: .8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0;
  margin-top: 2px !important;
}

/* 메뉴 */
.main-header-menu .menu-item > a,
.main-header-menu .menu-link {
  color: var(--sam-ink) !important;
  font-weight: 600 !important;
  font-size: .98rem !important;
}
.main-header-menu .menu-item > a:hover,
.main-header-menu .current-menu-item > a {
  color: var(--sam-green) !important;
}
/* 밑줄 hover 강조 색 */
.ast-menu-hover-style-underline .main-header-menu > .menu-item > .menu-link::after {
  background-color: var(--sam-green) !important;
}

/* 헤더 CTA 버튼 — 아웃라인 그린 (흰 배경 + 초록 테두리/글자) */
.main-header-menu .sam-menu-cta { display: flex; align-items: center; }
.main-header-menu .sam-menu-cta > a {
  display: inline-flex; align-items: center; line-height: 1;
  background: #fff;
  color: var(--sam-green) !important;
  border: 1.6px solid var(--sam-green);
  padding: .62em 1.25em !important;
  border-radius: 999px;
  margin-left: .55em;
  font-weight: 600;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.main-header-menu .sam-menu-cta > a:hover {
  background: var(--sam-green);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(47,107,79,.25);
}
.main-header-menu .sam-menu-cta > a::after { display: none !important; }

/* sticky 헤더 여백 보정 시 부드럽게 */
.ast-header-break-point .main-header-bar { box-shadow: 0 2px 14px rgba(35,79,59,.06); }

/* =====================================================================
   3. 히어로 (검색형 연구소 히어로)
   ===================================================================== */
.sam-hero {
  position: relative;
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(47,107,79,.10), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(228,103,79,.08), transparent 55%),
    linear-gradient(180deg, var(--sam-green-soft) 0%, var(--sam-bg) 100%);
  border-bottom: 1px solid var(--sam-green-line);
  overflow: hidden;
}
.sam-hero__inner {
  max-width: 1240px; margin: 0 auto;
  padding: 68px 24px 60px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
/* 그리드 트랙 blowout 방지 (모바일 가로 넘침 해결) */
.sam-hero__inner > * { min-width: 0; }
.sam-hero__main, .sam-hero__aside { min-width: 0; max-width: 100%; }
.sam-hero__lead, .sam-hero__title { max-width: 100%; overflow-wrap: break-word; }
.sam-hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  background: #fff; border: 1px solid var(--sam-green-line);
  color: var(--sam-green); font-weight: 600; font-size: .82rem;
  padding: .4em .9em; border-radius: 999px; margin-bottom: 18px;
}
.sam-hero__title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.25; font-weight: 800; letter-spacing: -0.03em;
  color: var(--sam-ink); margin: 0 0 16px;
}
.sam-hero__title .hl { color: var(--sam-green); position: relative; }
.sam-hero__title .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em;
  background: rgba(228,103,79,.22); z-index: -1; border-radius: 3px;
}
.sam-hero__lead {
  font-size: 1.08rem; color: var(--sam-ink-soft); margin: 0 0 26px; max-width: 46ch;
}
/* 검색바 */
.sam-hero__search { display: flex; gap: 8px; max-width: 480px; width: 100%; margin-bottom: 18px; }
.sam-hero__search input[type="search"] {
  flex: 1; min-width: 0; border: 1.5px solid var(--sam-green-line); background: #fff;
  border-radius: 999px; padding: .85em 1.3em; font-size: 1rem; color: var(--sam-ink);
  box-shadow: var(--sam-shadow);
}
.sam-hero__search input[type="search"]:focus { outline: none; border-color: var(--sam-green); }
.sam-hero__search button {
  background: var(--sam-green); color: #fff; border: 0; border-radius: 999px;
  padding: 0 1.5em; font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background .16s ease;
}
.sam-hero__search button:hover { background: var(--sam-green-dark); }
/* 인기 태그 칩 */
.sam-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sam-hero__chips .label { color: var(--sam-ink-faint); font-size: .85rem; margin-right: 2px; }
.sam-hero__chips a {
  background: #fff; border: 1px solid var(--sam-green-line); color: var(--sam-ink-soft);
  font-size: .85rem; padding: .35em .85em; border-radius: 999px; transition: all .16s ease;
}
.sam-hero__chips a:hover { border-color: var(--sam-green); color: var(--sam-green); background: var(--sam-green-soft); }

/* 히어로 우측: 최신글 프리뷰 카드 */
.sam-hero__aside { display: grid; gap: 14px; }
.sam-hero__card {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--sam-green-line);
  border-radius: var(--sam-radius); padding: 12px; box-shadow: var(--sam-shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.sam-hero__card:hover { transform: translateY(-3px); box-shadow: var(--sam-shadow-hover); }
.sam-hero__card img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; }
.sam-hero__card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sam-hero__card .t { font-weight: 700; color: var(--sam-ink); font-size: .96rem; line-height: 1.45; margin: 0; }
.sam-hero__card .m { font-size: .78rem; color: var(--sam-ink-faint); display: flex; align-items: center; gap: .4em; }
.sam-hero__card .m::before { content: ""; width: 14px; height: 1px; background: var(--sam-green-line); display: inline-block; }

/* 신뢰 스탯 스트립 */
.sam-hero__stats {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 40px; padding-top: 28px; border-top: 1px dashed var(--sam-green-line);
}
.sam-hero__stat { flex: 1 1 150px; }
.sam-hero__stat .n { font-size: 1.7rem; font-weight: 800; color: var(--sam-green); line-height: 1; }
.sam-hero__stat .l { font-size: .85rem; color: var(--sam-ink-soft); margin-top: 6px; }

@media (max-width: 921px) {
  /* 모바일: 그리드 대신 블록 스택으로 (트랙 blowout·가로넘침 방지) */
  .sam-hero__inner { display: block; padding: 48px 20px 40px; }
  .sam-hero__main { margin-bottom: 28px; }
  .sam-hero__aside { display: grid; gap: 14px; }
  .sam-hero__stats { margin-top: 30px; }
}
@media (max-width: 600px) {
  .sam-hero__inner { padding: 36px 18px 32px; }
  .sam-hero__lead { max-width: 100%; }
  .sam-hero__search button { padding: 0 1.1em; }
  .sam-hero__stats { gap: 18px 12px; }
  .sam-hero__stat { flex: 1 1 40%; }
}

/* =====================================================================
   4. 카드형 글 목록 (블로그/아카이브)
   ===================================================================== */
.blog .site-main > .ast-row,
.archive .site-main > .ast-row,
.blog #main > article,
.archive #main > article { }

/* Astra 블로그 루프를 그리드로 */
.blog .site-main,
.archive .site-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
/* Astra가 글을 .ast-row로 감쌀 때, 카드가 site-main 그리드에 직접 참여하도록 */
.blog .site-main > .ast-row,
.archive .site-main > .ast-row { display: contents; }
.blog .site-main > *:not(article):not(.ast-row),
.archive .site-main > *:not(article):not(.ast-row) { grid-column: 1 / -1; } /* 페이지네이션/헤더 풀폭 */

.blog .ast-article-post,
.archive .ast-article-post,
article.ast-article-post {
  background: var(--sam-surface);
  border: 1px solid var(--sam-green-line);
  border-radius: var(--sam-radius);
  overflow: hidden;
  box-shadow: var(--sam-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  margin: 0 !important;
  display: flex; flex-direction: column;
}
/* 그리드 컬럼을 꽉 채우도록 (Astra의 33% 컬럼 폭 제한 해제) */
.blog .site-main .ast-article-post,
.home .site-main .ast-article-post,
.archive .site-main .ast-article-post { width: 100% !important; max-width: 100% !important; }
.blog .ast-article-post:hover,
.archive .ast-article-post:hover { transform: translateY(-5px); box-shadow: var(--sam-shadow-hover); }

/* 카드 레이아웃 뼈대 (썸네일 + .sam-card-body) */
.ast-article-post .ast-article-inner { padding: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.ast-article-post .post-content { display: flex; flex-direction: column; flex: 1 1 auto; height: 100%; }

/* 카드 썸네일 */
.ast-article-post .post-thumb,
.ast-article-post .ast-blog-featured-section,
.ast-article-post .ast-article-image-container { margin: 0 !important; overflow: hidden; }
.ast-article-post .post-thumb img,
.ast-article-post .wp-post-image {
  width: 100%; height: 200px; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.ast-article-post:hover .wp-post-image { transform: scale(1.05); }

/* 카드 본문 (.sam-card-body = 제목·메타·발췌·더보기 래퍼) */
.sam-card-body {
  display: flex; flex-direction: column; flex: 1 1 auto;
  padding: 18px 20px; gap: 9px;
}
.sam-card-body .entry-title { margin: 0 !important; font-size: 1.12rem !important; line-height: 1.42; }
.sam-card-body .entry-title a { color: var(--sam-ink) !important; }
.sam-card-body .entry-title a:hover { color: var(--sam-green) !important; }
.sam-card-body .entry-header,
.sam-card-body .ast-blog-meta-container { margin: 0 !important; padding: 0 !important; min-height: 0; border: 0; }
.sam-card-body .entry-meta { font-size: .82rem; margin: 0; }
.sam-card-body .entry-header a,
.sam-card-body .entry-meta a,
.sam-card-body .entry-meta a time,
.sam-card-body .entry-meta span { color: var(--sam-ink-faint) !important; }
.sam-card-body .entry-header a:hover { color: var(--sam-green) !important; }
.sam-card-body .ast-excerpt-container {
  margin: 0 !important; color: var(--sam-ink-soft); font-size: .94rem; line-height: 1.62;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.sam-card-body .ast-excerpt-container p { margin: 0; }

/* 더 보기 링크 */
.sam-readmore {
  display: inline-flex; align-items: center; gap: .3em;
  margin-top: auto; padding-top: 12px; align-self: flex-start;
  color: var(--sam-green) !important; font-weight: 600; font-size: .9rem;
}
.sam-readmore:hover { color: var(--sam-green-dark) !important; }
.sam-readmore .sam-ico { transition: transform .16s ease; }
.sam-readmore:hover .sam-ico { transform: translateX(3px); }

/* 카테고리 뱃지 */
.sam-cat-badge {
  display: inline-block; background: var(--sam-green-soft); color: var(--sam-green);
  font-size: .72rem; font-weight: 700; padding: .34em .82em; border-radius: 999px;
  letter-spacing: .03em; text-transform: uppercase; line-height: 1.35;
}
.ast-article-post .read-more, .ast-article-post .ast-read-more-container { display: none; }

/* 제목 위 기본 카테고리 링크 숨김 (상단 뱃지로 대체) */
.blog .ast-article-post .ast-taxonomy-container,
.archive .ast-article-post .ast-taxonomy-container { display: none; }

/* 카드 상단 뱃지 (이미지 위) */
.blog .ast-article-post,
.archive .ast-article-post { position: relative; }
.blog .ast-article-post > .sam-cat-badge,
.archive .ast-article-post > .sam-cat-badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  background: rgba(255,255,255,.96); box-shadow: 0 3px 10px rgba(35,79,59,.18);
}

@media (max-width: 921px) { .blog .site-main, .archive .site-main { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .blog .site-main, .archive .site-main { grid-template-columns: minmax(0,1fr); } }

/* ---- 매거진형: 첫 글 = 가로 대형 피처드 카드 ---- */
@media (min-width: 769px) {
  .blog .site-main article.ast-article-post:first-of-type,
  .home .site-main article.ast-article-post:first-of-type,
  .archive .site-main article.ast-article-post:first-of-type {
    grid-column: 1 / -1; width: 100% !important; max-width: none !important; justify-self: stretch;
  }
  .blog .site-main article.ast-article-post:first-of-type .post-content,
  .home .site-main article.ast-article-post:first-of-type .post-content,
  .archive .site-main article.ast-article-post:first-of-type .post-content {
    display: grid; grid-template-columns: minmax(0, 46%) 1fr; align-items: stretch;
  }
  .blog .site-main article.ast-article-post:first-of-type .post-thumb,
  .home .site-main article.ast-article-post:first-of-type .post-thumb,
  .archive .site-main article.ast-article-post:first-of-type .post-thumb {
    grid-column: 1; margin: 0; height: 100%;
  }
  .blog .site-main article.ast-article-post:first-of-type .post-thumb img,
  .home .site-main article.ast-article-post:first-of-type .post-thumb img,
  .archive .site-main article.ast-article-post:first-of-type .post-thumb img {
    height: 100%; width: 100%; object-fit: cover; min-height: 400px;
  }
  .blog .site-main article.ast-article-post:first-of-type .sam-card-body,
  .home .site-main article.ast-article-post:first-of-type .sam-card-body,
  .archive .site-main article.ast-article-post:first-of-type .sam-card-body {
    grid-column: 2; justify-content: center; padding: 34px 40px; gap: 13px;
  }
  .blog .site-main article.ast-article-post:first-of-type .entry-title,
  .home .site-main article.ast-article-post:first-of-type .entry-title,
  .archive .site-main article.ast-article-post:first-of-type .entry-title { font-size: 1.7rem !important; line-height: 1.34; }
  .blog .site-main article.ast-article-post:first-of-type .ast-excerpt-container,
  .home .site-main article.ast-article-post:first-of-type .ast-excerpt-container,
  .archive .site-main article.ast-article-post:first-of-type .ast-excerpt-container {
    -webkit-line-clamp: 7; font-size: 1rem;
  }
  .blog .site-main article.ast-article-post:first-of-type .sam-readmore,
  .home .site-main article.ast-article-post:first-of-type .sam-readmore,
  .archive .site-main article.ast-article-post:first-of-type .sam-readmore { margin-top: 8px; }
  .blog .site-main article.ast-article-post:first-of-type > .sam-cat-badge,
  .home .site-main article.ast-article-post:first-of-type > .sam-cat-badge,
  .archive .site-main article.ast-article-post:first-of-type > .sam-cat-badge { top: 18px; left: 18px; }
}

/* =====================================================================
   5. 사이드바 (커스텀 위젯 - 훅 주입)
   ===================================================================== */
#secondary .widget,
.sam-widget {
  background: var(--sam-surface);
  border: 1px solid var(--sam-green-line);
  border-radius: var(--sam-radius);
  padding: 22px 20px;
  margin-bottom: 22px;
  box-shadow: var(--sam-shadow);
}
#secondary .widget-title,
.sam-widget__title {
  font-size: 1rem !important; font-weight: 700; color: var(--sam-ink);
  margin: 0 0 16px !important; padding-bottom: 12px; border-bottom: 2px solid var(--sam-green-soft);
  display: flex; align-items: center; gap: .5em;
}
.sam-widget__title .ico { color: var(--sam-green); }

/* 검색 위젯 */
.sam-widget--search form { display: flex; gap: 6px; }
.sam-widget--search input[type="search"] {
  flex: 1; min-width: 0; border: 1.5px solid var(--sam-green-line); border-radius: 999px;
  padding: .6em 1em; font-size: .92rem;
}
.sam-widget--search input[type="search"]:focus { outline: none; border-color: var(--sam-green); }
.sam-widget--search button {
  background: var(--sam-green); color: #fff; border: 0; border-radius: 999px;
  padding: 0 .85em; cursor: pointer; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 인기글 (썸네일형) */
.sam-poplist { list-style: none; margin: 0; padding: 0; }
.sam-poplist li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--sam-green-soft); }
.sam-poplist li:last-child { border-bottom: 0; }
.sam-poplist__thumb { flex: 0 0 auto; display: block; }
.sam-poplist img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; display: block; }
.sam-poplist__ph {
  width: 60px; height: 60px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--sam-green-soft); color: var(--sam-green);
}
.sam-poplist__body { min-width: 0; display: flex; flex-direction: column; }
.sam-poplist .t { font-size: .9rem; font-weight: 600; color: var(--sam-ink); line-height: 1.4; }
.sam-poplist .t:hover { color: var(--sam-green); }
.sam-poplist .m { font-size: .76rem; color: var(--sam-ink-faint); margin-top: 3px; }

/* 카테고리 리스트 */
.sam-catlist { list-style: none; margin: 0; padding: 0; }
.sam-catlist li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55em .2em; color: var(--sam-ink-soft); font-weight: 500; font-size: .95rem;
  border-bottom: 1px solid var(--sam-green-soft);
}
.sam-catlist li:last-child a { border-bottom: 0; }
.sam-catlist li a:hover { color: var(--sam-green); }
.sam-catlist .cnt {
  background: var(--sam-green-soft); color: var(--sam-green); font-size: .76rem; font-weight: 700;
  border-radius: 999px; padding: .15em .7em; min-width: 26px; text-align: center;
}

/* 오늘의 건강 팁 하이라이트 박스 */
.sam-widget--tip {
  background: linear-gradient(160deg, var(--sam-green) 0%, var(--sam-green-dark) 100%);
  border: 0; color: #fff;
}
.sam-widget--tip .sam-widget__title { color: #fff; border-bottom-color: rgba(255,255,255,.2); }
.sam-widget--tip p { color: rgba(255,255,255,.92); font-size: .95rem; margin: 0; }
.sam-widget--tip .tip-em { color: #ffe0b2; font-weight: 700; }

/* CTA 박스 */
.sam-widget--cta { text-align: center; background: var(--sam-green-soft); border-color: var(--sam-green-line); }
.sam-widget--cta p { color: var(--sam-ink-soft); font-size: .92rem; margin: 0 0 14px; }
.sam-widget--cta .sam-btn { width: 100%; justify-content: center; }

/* 태그 클라우드 */
.sam-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.sam-tags a {
  background: var(--sam-green-soft); color: var(--sam-green); font-size: .82rem;
  padding: .3em .8em; border-radius: 999px; transition: all .16s ease;
}
.sam-tags a:hover { background: var(--sam-green); color: #fff; }

/* =====================================================================
   6. 단일 글 / 페이지 본문
   ===================================================================== */
.ast-single-post .entry-title,
.single .entry-title, .page .entry-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem) !important; line-height: 1.3; }
.entry-content { font-size: 1.05rem; }
.entry-content h2 {
  margin-top: 2em; padding-left: .7em; border-left: 4px solid var(--sam-green);
  font-size: 1.5rem;
}
.entry-content h3 { margin-top: 1.6em; color: var(--sam-green-dark); }
.entry-content img { border-radius: var(--sam-radius); }
.entry-content blockquote {
  border-left: 4px solid var(--sam-coral);
  background: #fff; border-radius: 0 var(--sam-radius-sm) var(--sam-radius-sm) 0;
  padding: 1em 1.4em; color: var(--sam-ink-soft); box-shadow: var(--sam-shadow);
}
.entry-content ul li::marker { color: var(--sam-green); }

/* 콘텐츠 boxed 스타일 다듬기 */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
  border-radius: var(--sam-radius);
}

/* 페이지 히어로형 제목 (생성 페이지용) */
.sam-page-hero {
  background: linear-gradient(180deg, var(--sam-green-soft), var(--sam-bg));
  border-bottom: 1px solid var(--sam-green-line);
  padding: 46px 24px; text-align: center; margin-bottom: 34px;
}
.sam-page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 10px; }
.sam-page-hero p { color: var(--sam-ink-soft); font-size: 1.05rem; margin: 0; }

/* 생성 페이지 내부 공용 컴포넌트 */
.sam-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 24px 0; }
.sam-card {
  background: #fff; border: 1px solid var(--sam-green-line); border-radius: var(--sam-radius);
  padding: 24px; box-shadow: var(--sam-shadow);
}
.sam-card h3 { margin-top: 0 !important; color: var(--sam-green-dark); }
.sam-faq details {
  background: #fff; border: 1px solid var(--sam-green-line); border-radius: var(--sam-radius-sm);
  padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--sam-shadow);
}
.sam-faq summary {
  cursor: pointer; font-weight: 700; color: var(--sam-ink); padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.sam-faq summary::-webkit-details-marker { display: none; }
.sam-faq summary::after { content: "＋"; color: var(--sam-green); font-size: 1.3em; }
.sam-faq details[open] summary::after { content: "－"; }
.sam-faq details[open] summary { border-bottom: 1px solid var(--sam-green-soft); }
.sam-faq .a { padding: 14px 0; color: var(--sam-ink-soft); }
@media (max-width: 600px) { .sam-grid-2 { grid-template-columns: 1fr; } }

/* =====================================================================
   7. 푸터
   ===================================================================== */
.sam-footer {
  background: var(--sam-green-dark);
  color: rgba(255,255,255,.82);
  padding: 54px 24px 30px;
}
.sam-footer a { color: rgba(255,255,255,.82); }
.sam-footer a:hover { color: #fff; }
.sam-footer__inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
}
.sam-footer__brand .logo { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 12px; }
.sam-footer__brand p { font-size: .92rem; line-height: 1.7; color: rgba(255,255,255,.7); margin: 0; }
.sam-footer h4 {
  color: #fff; font-size: .95rem; font-weight: 700; margin: 0 0 16px;
  letter-spacing: .02em;
}
.sam-footer ul { list-style: none; margin: 0; padding: 0; }
.sam-footer ul li { margin-bottom: 10px; font-size: .92rem; }
.sam-footer__cta .sam-btn { margin-top: 6px; }
.sam-footer__social { display: flex; gap: 10px; margin-top: 14px; }
.sam-footer__social a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
  transition: background .16s ease;
}
.sam-footer__social a:hover { background: var(--sam-coral); }
.sam-footer__bar {
  max-width: 1240px; margin: 40px auto 0; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; color: rgba(255,255,255,.6);
}
@media (max-width: 921px) { .sam-footer__inner { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 600px) { .sam-footer__inner { grid-template-columns: 1fr; } }

/* 기존 Astra 소형 푸터 숨김 (커스텀 푸터로 대체) */
.site-below-footer-wrap[data-section="section-below-footer-builder"] { display: none; }

/* =====================================================================
   8. 기타 / 반응형 마감
   ===================================================================== */
.ast-pagination .page-numbers {
  border-radius: 10px; border: 1px solid var(--sam-green-line); color: var(--sam-green);
  padding: .5em .9em; margin: 0 3px;
}
.ast-pagination .page-numbers.current,
.ast-pagination .page-numbers:hover { background: var(--sam-green); color: #fff; border-color: var(--sam-green); }

.widget-title, .entry-title, .site-title { word-break: keep-all; } /* 한글 줄바꿈 자연스럽게 */
p, li, .sam-hero__lead, .entry-content { word-break: keep-all; }

/* =====================================================================
   9. v1.1 개선 — 아이콘 정렬 / 섹션헤더 / 생성페이지 제목 / 푸터 아이콘
   ===================================================================== */
/* 위젯 타이틀 아이콘 정렬 */
.sam-widget__title .ico { display: inline-flex; align-items: center; color: var(--sam-green); }
.sam-widget--tip .sam-widget__title .ico { color: #ffe0b2; }

/* 섹션 헤더 (블로그/아카이브 카드 그리드 위) */
.sam-section-head {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 28px; padding-bottom: 16px;
  border-bottom: 2px solid var(--sam-green-soft);
}
.sam-section-head__ico {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  background: var(--sam-green-soft); color: var(--sam-green);
  display: flex; align-items: center; justify-content: center;
}
.sam-section-head h2 { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.sam-section-head p { margin: 3px 0 0; color: var(--sam-ink-soft); font-size: .92rem; }

/* 생성 페이지: 기본(Astra) 제목 숨김 → 히어로 제목만 노출 (중복 제거) */
.sam-genpage .entry-title { display: none; }
.sam-genpage .entry-header { margin: 0; padding: 0; min-height: 0; border: 0; }
.sam-genpage .sam-page-hero { margin-top: -8px; }

/* 푸터 아이콘 */
.sam-footer__brand .logo { display: flex; align-items: center; gap: .45em; }
.sam-footer__brand .fico { display: inline-flex; color: #bfe3cf; }
.sam-footer__social a .sam-ico { color: #fff; }

/* CTA 버튼 안의 아이콘(있다면) 정렬 */
.sam-btn .sam-ico { margin-right: -0.15em; }

/* =====================================================================
   10. 문의하기 페이지
   ===================================================================== */
.sam-contact-page .entry-title,
.sam-contact-page .entry-header { display: none; }

.sam-contact-hero { text-align: center; padding: 6px 0 30px; }
.sam-contact-hero__eyebrow {
  display: inline-flex; align-items: center; gap: .4em;
  background: var(--sam-green-soft); color: var(--sam-green);
  font-weight: 600; font-size: .82rem; padding: .4em .9em; border-radius: 999px; margin-bottom: 16px;
}
.sam-contact-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 12px; }
.sam-contact-hero p { color: var(--sam-ink-soft); font-size: 1.05rem; max-width: 54ch; margin: 0 auto; }

.sam-contact-grid { display: grid; grid-template-columns: 0.88fr 1.12fr; gap: 28px; align-items: start; }
@media (max-width: 880px) { .sam-contact-grid { grid-template-columns: 1fr; } }

/* 왼쪽 안내 패널 */
.sam-contact-info {
  background: linear-gradient(160deg, var(--sam-green) 0%, var(--sam-green-dark) 100%);
  color: #fff; border-radius: var(--sam-radius); padding: 30px 28px;
}
.sam-contact-info__title { color: #fff; font-size: 1.22rem; margin: 0 0 22px; }
.sam-contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.sam-contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.sam-contact-list .ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center;
}
.sam-contact-list .txt { display: flex; flex-direction: column; gap: 3px; }
.sam-contact-list .txt b { color: #fff; font-size: .98rem; }
.sam-contact-list .txt span { color: rgba(255,255,255,.82); font-size: .88rem; line-height: 1.5; }
.sam-contact-facts {
  border-top: 1px solid rgba(255,255,255,.18); padding-top: 20px; margin-bottom: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.sam-contact-facts .fact { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.9); font-size: .92rem; }
.sam-contact-facts .fact b { color: #fff; }
.sam-contact-facts .fact a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.sam-contact-facts .ico { color: #ffe0b2; display: inline-flex; }
.sam-contact-info .sam-btn--ghost {
  width: 100%; justify-content: center;
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); color: #fff !important;
}
.sam-contact-info .sam-btn--ghost:hover { background: #fff; color: var(--sam-green) !important; border-color: #fff; }

/* 오른쪽 폼 카드 */
.sam-contact-formwrap {
  background: #fff; border: 1px solid var(--sam-green-line); border-radius: var(--sam-radius);
  padding: 30px 30px 32px; box-shadow: var(--sam-shadow);
}
.sam-contact-formwrap__title { display: flex; align-items: center; gap: .5em; font-size: 1.22rem; margin: 0 0 22px; }
.sam-contact-formwrap__title .sam-ico { color: var(--sam-green); }

/* CF7 폼 필드 */
.sam-contact-formwrap .wpcf7-form p { margin: 0; }
.wpcf7-form label { display: block; font-weight: 600; color: var(--sam-ink); font-size: .92rem; margin-bottom: 18px; }
.wpcf7-form label .req { color: var(--sam-coral); }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea {
  display: block; width: 100%; margin-top: 8px; box-sizing: border-box;
  border: 1.5px solid var(--sam-green-line); border-radius: 12px; padding: .78em 1em;
  font-family: inherit; font-size: 1rem; color: var(--sam-ink); background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus {
  outline: none; border-color: var(--sam-green); box-shadow: 0 0 0 3px rgba(47,107,79,.12);
}
.wpcf7-form textarea { min-height: 150px; resize: vertical; }
.wpcf7-form input::placeholder, .wpcf7-form textarea::placeholder { color: var(--sam-ink-faint); }
.wpcf7-form .wpcf7-submit {
  background: var(--sam-green); color: #fff; border: 0; border-radius: 999px; margin-top: 6px;
  padding: .9em 2.2em; font-family: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.wpcf7-form .wpcf7-submit:hover { background: var(--sam-green-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47,107,79,.28); }
.wpcf7 .wpcf7-not-valid-tip { color: var(--sam-coral); font-size: .82rem; margin-top: 6px; font-weight: 500; }
.wpcf7-form input.wpcf7-not-valid, .wpcf7-form textarea.wpcf7-not-valid { border-color: var(--sam-coral); }
.wpcf7 .wpcf7-response-output {
  border-radius: 12px; border-width: 1.5px; padding: .9em 1.1em; margin: 22px 0 0; font-size: .92rem;
}
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--sam-green); background: var(--sam-green-soft); color: var(--sam-green-dark); }
