/*
 * AdMediCal 블로그 커스텀 테마 스킨 — Kadence 위에 얹는 디자인 오버레이.
 * 깔끔 + 예쁨(미용의료 톤): 부드러운 그라데이션·히어로·카드 디테일.
 * (일단 CSS로. 추후 운영자 편집 기능으로 승격 예정.)
 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

:root {
  --am-bg: #f6f9f9;
  --am-card: #ffffff;
  --am-ink: #15202d;
  --am-muted: #6b7688;
  --am-accent: #1f7a70;        /* teal — 신뢰 */
  --am-accent-soft: #e4f2ef;
  --am-rose: #d98a7c;          /* 소프트 로즈 — 미용 온기 */
  --am-rose-soft: #fdece7;
  --am-line: #e9edf2;
  --am-radius: 20px;
  --am-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 30px rgba(16,24,40,.07);
  --am-shadow-hover: 0 10px 22px rgba(16,24,40,.10), 0 28px 56px rgba(16,24,40,.15);
}

/* ── 전역 ── */
/* 스크롤바 유무로 폭이 달라져 헤더 메뉴가 좌우로 밀리는 것 방지(항상 스크롤바 폭 확보) */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }

body.wp-theme-kadence {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--am-ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.004em;
  background:
    radial-gradient(1100px 520px at 15% -8%, #eaf5f2 0%, rgba(234,245,242,0) 60%),
    radial-gradient(900px 480px at 92% 4%, #fbeee9 0%, rgba(251,238,233,0) 55%),
    var(--am-bg);
  background-attachment: fixed;
}
.content-bg.loop-entry, .content-container, .entries, .content-wrap,
.entry-content-wrap, .site-main, .site-container { background: transparent !important; }

/* ── 헤더: 메뉴 제거 + 유리 브랜드 바 ── */
.site-header .main-navigation,
.site-header .header-navigation,
.site-header-item-main-navigation,
.mobile-toggle-open-container,
.header-navigation-layout-stretch-true .mobile-toggle-open-container { display: none !important; }
.site-header {
  background: rgba(255,255,255,.78);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(233,237,242,.9);
}
.site-branding .site-title a, .site-title a, h1.site-title a {
  font-weight: 800; letter-spacing: -0.035em; color: var(--am-ink);
}

/* ── 히어로 배너(홈/아카이브, JS 주입) ── */
.am-hero {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 26px; margin: 10px 0 40px; padding: 66px 40px 62px;
  background: linear-gradient(135deg, #e5f3f0 0%, #edeffb 50%, #fdeee9 100%);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 20px 50px rgba(16,24,40,.06);
}
.am-hero::before, .am-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; pointer-events: none; }
.am-hero::before { width: 300px; height: 300px; background: #bfe3db; top: -100px; left: -70px; }
.am-hero::after  { width: 260px; height: 260px; background: #f6cfc4; bottom: -110px; right: -50px; }
.am-hero-eyebrow { position: relative; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--am-accent); }
.am-hero-title { position: relative; margin: 14px 0 0; font-size: 2.55rem; line-height: 1.22; font-weight: 800; letter-spacing: -0.035em; color: #14202c; }
.am-hero-sub { position: relative; margin: 16px auto 0; max-width: 540px; color: #56616f; font-size: 1.06rem; line-height: 1.72; }
.am-hero-chips { position: relative; margin: 24px 0 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.am-hero-chips span {
  background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.9);
  color: #33424f; font-size: .82rem; font-weight: 600; padding: 7px 15px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16,24,40,.05);
}
@media (max-width: 767px){ .am-hero { padding: 46px 20px 44px; border-radius: 20px; } .am-hero-title { font-size: 1.8rem; } }

/* ── 페이지(소개/오시는 길) 제목 영역 — 홈 히어로 톤으로 ── */
.page-hero-section, .page-hero-section .entry-hero-container-inner { background: transparent !important; min-height: 0 !important; }
.page-hero-section { padding: 8px 0 0 !important; }
.page-hero-section .hero-container {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 26px; margin: 10px auto 8px; padding: 60px 40px 56px;
  background: linear-gradient(135deg, #e5f3f0 0%, #edeffb 50%, #fdeee9 100%) !important;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 20px 50px rgba(16,24,40,.06);
}
.page-hero-section .hero-container::before, .page-hero-section .hero-container::after { content: ""; position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; pointer-events: none; }
.page-hero-section .hero-container::before { width: 300px; height: 300px; background: #bfe3db; top: -100px; left: -70px; }
.page-hero-section .hero-container::after  { width: 260px; height: 260px; background: #f6cfc4; bottom: -110px; right: -50px; }
.page-hero-section .entry-header.page-title { position: relative; border: 0 !important; padding: 0 !important; margin: 0 !important; }
.page-hero-section .entry-title { font-size: 2.4rem; line-height: 1.22; font-weight: 800; letter-spacing: -0.035em; color: #14202c; margin: 0; }
@media (max-width: 767px){ .page-hero-section .hero-container { padding: 44px 20px 42px; border-radius: 20px; } .page-hero-section .entry-title { font-size: 1.7rem; } }

/* ── 아카이브 그리드 ── */
.kadence-posts-list.grid-cols, .grid-cols.post-archive { gap: 30px !important; }
.entry-list-item, .loop-entry { height: 100%; }

/* ── 카드 ── */
.kadence-posts-list .loop-entry, article.loop-entry {
  background: var(--am-card) !important;
  border: 1px solid var(--am-line);
  border-radius: var(--am-radius);
  overflow: hidden;
  box-shadow: var(--am-shadow);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
  display: flex; flex-direction: column;
}
.kadence-posts-list .loop-entry:hover { transform: translateY(-6px); box-shadow: var(--am-shadow-hover); border-color: #dfe8ee; }

.loop-entry .post-thumbnail, .loop-entry a.post-thumbnail {
  position: relative; display: block; overflow: hidden; margin: 0; aspect-ratio: 16 / 10; background: #eef1f5;
}
.loop-entry .post-thumbnail::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(16,24,40,.14) 100%);
  opacity: 0; transition: opacity .3s ease;
}
.loop-entry:hover .post-thumbnail::after { opacity: 1; }
.loop-entry .post-thumbnail img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.loop-entry:hover .post-thumbnail img { transform: scale(1.07); }

.loop-entry .entry-content-wrap { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

/* 카테고리 배지 */
.loop-entry .entry-taxonomies a,
.loop-entry .post-categories a,
.loop-entry .category-style-normal a {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: var(--am-accent); background: var(--am-accent-soft);
  padding: 4px 11px; border-radius: 999px; text-decoration: none; transition: background .2s ease;
}
.loop-entry .entry-taxonomies a:hover { background: #d5ebe6; }

/* 제목 */
.loop-entry .entry-title { font-size: 1.18rem; line-height: 1.42; font-weight: 700; margin: 0; letter-spacing: -0.015em; }
.loop-entry .entry-title a { color: var(--am-ink); background-image: none !important; box-shadow: none !important; transition: color .18s ease; }
.loop-entry .entry-title a:hover { color: var(--am-accent); }

/* 메타 */
.loop-entry .entry-meta, .loop-entry .post-meta { color: var(--am-muted); font-size: .8rem; }
.loop-entry .entry-meta a { color: var(--am-muted); }

/* 요약 */
.loop-entry .entry-summary, .loop-entry .entry-content, .loop-entry .entry-content-wrap > p {
  color: var(--am-muted); font-size: .93rem; line-height: 1.72; margin: 0;
}

/* READ MORE */
.loop-entry .post-readmore, .loop-entry .more-link {
  display: inline-flex; align-items: center; gap: .45em; margin-top: auto; padding-top: 6px;
  font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--am-accent); text-decoration: none; background: none !important; box-shadow: none !important;
  transition: gap .2s ease;
}
.loop-entry .post-readmore:hover, .loop-entry .more-link:hover { gap: .8em; }

/* ── 단일 글 가독성 ── */
.single .entry-content { font-size: 1.06rem; line-height: 1.85; color: #24303f; }
.single .entry-content h2 { letter-spacing: -0.02em; margin-top: 2em; }
.single figure.wp-block-image img { border-radius: 14px; box-shadow: 0 8px 26px rgba(16,24,40,.08); }

/* ── 페이지네이션 ── */
.navigation.pagination .page-numbers {
  border-radius: 12px; border: 1px solid var(--am-line); background: #fff; color: var(--am-ink);
  transition: all .18s ease;
}
.navigation.pagination .page-numbers:hover { border-color: var(--am-accent); color: var(--am-accent); }
.navigation.pagination .page-numbers.current { background: var(--am-accent); border-color: var(--am-accent); color: #fff; }

/* ── 푸터: 브랜드 다크 푸터 ── */
.site-footer { position: relative; background: #0e1a24; color: #b9c6d6; margin-top: 70px; border: 0; }
.site-footer a { color: #9fb6cf; transition: color .18s ease; }
.site-footer a:hover { color: #fff; }
.site-footer .site-container { padding-top: 30px; padding-bottom: 34px; }
.site-bottom-footer-wrap { font-size: .82rem; opacity: .7; }

.am-footer-brand { border-bottom: 1px solid rgba(255,255,255,.08); padding: 44px 0 30px; text-align: center; }
.am-footer-brand .am-fb-name { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.025em; }
.am-footer-brand .am-fb-tag { margin-top: 9px; color: #8ea1b8; font-size: .96rem; }
.am-footer-brand .am-fb-links { margin-top: 20px; display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.am-footer-brand .am-fb-links a { color: #c7d3e2; font-size: .9rem; font-weight: 600; text-decoration: none; }
.am-footer-brand .am-fb-disc { margin: 22px auto 0; max-width: 640px; color: #708197; font-size: .78rem; line-height: 1.7; }

@media (max-width: 767px){ .loop-entry .entry-title { font-size: 1.08rem; } .am-footer-brand { padding: 34px 16px 24px; } }

/* ── 헤더 네비게이션(주입) ── */
.site-header { position: relative; }
.am-nav { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); display: flex; gap: 26px; align-items: center; z-index: 5; }
.am-nav a { color: var(--am-ink); font-size: .93rem; font-weight: 600; text-decoration: none; padding: 4px 1px; border-bottom: 2px solid transparent; transition: color .18s ease, border-color .18s ease; }
.am-nav a:hover, .am-nav a.am-active { color: var(--am-accent); border-bottom-color: var(--am-accent); }
@media (max-width: 640px){ .am-nav { gap: 15px; right: 14px; } .am-nav a { font-size: .82rem; } }

/* 기본 이전/다음 네비 + Kadence 기본 관련글(Similar Posts) 숨김 — 아래 '이어서 읽어보세요' 카드가 대체 */
.single .post-navigation { display: none !important; }
.single .entry-related { display: none !important; }

/* ── 관련 글(이어서 읽어보세요) 카드 섹션 ── */
.am-related { max-width: 1200px; margin: 8px auto 0; padding: 8px 20px 24px; }
.am-related-head { font-size: .78rem; font-weight: 800; letter-spacing: .12em; color: var(--am-rose); text-transform: uppercase; }
.am-related-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 24px; color: var(--am-ink); }
.am-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 900px){ .am-related-grid { grid-template-columns: 1fr; } .am-related-title { font-size: 1.4rem; } }
.am-rcard { background: var(--am-card); border: 1px solid var(--am-line); border-radius: var(--am-radius); overflow: hidden; box-shadow: var(--am-shadow); transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease; display: flex; flex-direction: column; text-decoration: none; }
.am-rcard:hover { transform: translateY(-6px); box-shadow: var(--am-shadow-hover); }
.am-rthumb { aspect-ratio: 16/10; overflow: hidden; background: #eef1f5; }
.am-rthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.am-rcard:hover .am-rthumb img { transform: scale(1.06); }
.am-rbody { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.am-rmeta { display: flex; gap: 10px; align-items: center; }
.am-rcat { font-size: .72rem; font-weight: 700; color: var(--am-accent); background: var(--am-accent-soft); padding: 3px 10px; border-radius: 999px; }
.am-rdate { font-size: .78rem; color: var(--am-muted); letter-spacing: .02em; }
.am-rt { font-size: 1.1rem; font-weight: 700; line-height: 1.42; color: var(--am-ink); letter-spacing: -.01em; }
.am-rex { font-size: .9rem; line-height: 1.68; color: var(--am-muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.am-rmore { margin-top: auto; padding-top: 4px; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--am-rose); display: inline-flex; gap: .4em; align-items: center; }
.am-rcard:hover .am-rmore { gap: .7em; }
