/*
 Theme Name:   Red Moon Child
 Theme URI:    https://redmoon.example/
 Description:  레드문(Red Moon) 전용 GeneratePress 차일드 테마 — 브랜드 컬러·타이포그래피·CTA 커스터마이징
 Author:       Red Moon
 Author URI:   https://redmoon.example/
 Template:     generatepress
 Version:      0.2.0
 Text Domain:  redmoon-child
*/

/* ==========================================================================
   1. Brand Design Tokens (CSS Custom Properties)
   ========================================================================== */
:root {
  /* Brand colors */
  --rm-primary: #C41E3A;          /* 크림슨 레드 — 브랜드 포인트 */
  --rm-primary-dark: #8B0012;     /* hover / active */
  --rm-primary-soft: #FCE8EC;     /* 배지·아주 연한 강조 */

  /* Neutrals */
  --rm-text: #1C1C1C;             /* 본문 */
  --rm-text-muted: #5A5A5A;       /* 보조 문구 */
  --rm-border: #E5E5E5;
  --rm-bg: #FFFFFF;
  --rm-bg-soft: #F7F7F7;          /* 섹션 대비용 */
  --rm-bg-dark: #141414;          /* 푸터 */

  /* KakaoTalk brand (외부 플랫폼 색 유지) */
  --rm-kakao-bg: #FEE500;
  --rm-kakao-text: #191919;

  /* Layout */
  --rm-radius: 10px;
  --rm-radius-lg: 16px;
  --rm-shadow-sm: 0 1px 2px rgba(20, 20, 20, .06);
  --rm-shadow: 0 6px 24px rgba(20, 20, 20, .08);

  /* Typography scale */
  --rm-font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --rm-lh-tight: 1.25;
  --rm-lh-base: 1.7;
}

/* ==========================================================================
   2. Base Typography
   ========================================================================== */
body,
button,
input,
select,
textarea {
  font-family: var(--rm-font-sans);
  color: var(--rm-text);
  letter-spacing: -.01em;
}

html {
  overflow-x: hidden; /* 100vw 히어로 트릭으로 인한 가로 스크롤 전역 차단 */
}

body {
  background-color: var(--rm-bg);
  line-height: var(--rm-lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--rm-font-sans);
  font-weight: 700;
  line-height: var(--rm-lh-tight);
  letter-spacing: -.02em;
  color: var(--rm-text);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

a { color: var(--rm-primary); text-decoration: none; transition: color .15s ease; }
a:hover,
a:focus { color: var(--rm-primary-dark); text-decoration: underline; }

hr { border: 0; border-top: 1px solid var(--rm-border); margin: 2rem 0; }

/* ==========================================================================
   3. Header / Site Navigation
   ========================================================================== */
.site-header {
  border-bottom: 1px solid var(--rm-border);
  background-color: var(--rm-bg);
}

.site-logo img,
.site-branding .main-title {
  color: var(--rm-primary);
  font-weight: 800;
  letter-spacing: -.03em;
}

.main-navigation .main-nav ul li a {
  font-weight: 500;
  color: var(--rm-text);
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
  color: var(--rm-primary);
}

/* ==========================================================================
   4. Buttons & CTAs
   ========================================================================== */
.button,
button,
input[type="submit"],
.wp-block-button__link,
.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: var(--rm-radius);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  background-color: var(--rm-primary);
  color: #fff !important;
  border: 1px solid var(--rm-primary);
  transition: background-color .15s ease, transform .08s ease, box-shadow .15s ease;
  text-decoration: none !important;
  cursor: pointer;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.rm-btn:hover {
  background-color: var(--rm-primary-dark);
  border-color: var(--rm-primary-dark);
  box-shadow: var(--rm-shadow);
  transform: translateY(-1px);
}

/* Secondary (outline) */
.rm-btn--outline {
  background-color: transparent;
  color: var(--rm-primary) !important;
  border-color: var(--rm-primary);
}
.rm-btn--outline:hover {
  background-color: var(--rm-primary);
  color: #fff !important;
}

/* KakaoTalk CTA */
.rm-btn--kakao {
  background-color: var(--rm-kakao-bg);
  color: var(--rm-kakao-text) !important;
  border-color: var(--rm-kakao-bg);
}
.rm-btn--kakao:hover {
  background-color: #f4d700;
  border-color: #f4d700;
  color: var(--rm-kakao-text) !important;
}

/* ==========================================================================
   5. Hero Section (home)
   ========================================================================== */
.rm-hero {
  padding: clamp(3rem, 8vw, 6rem) 1.25rem;
  background: linear-gradient(180deg, var(--rm-bg) 0%, var(--rm-bg-soft) 100%);
  text-align: center;
}
.rm-hero__title {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  margin: 0 0 1rem;
}
.rm-hero__subtitle {
  color: var(--rm-text-muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  max-width: 48rem;
  margin: 0 auto 2rem;
}
.rm-hero__cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}

/* ==========================================================================
   6. Section Blocks (services / cases preview)
   ========================================================================== */
.rm-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.rm-section--soft { background-color: var(--rm-bg-soft); }

.rm-section__heading {
  text-align: center;
  margin-bottom: 2.5rem;
}
.rm-section__heading small {
  display: block;
  font-size: .875rem;
  color: var(--rm-primary);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* Card grid */
.rm-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.rm-card {
  background: var(--rm-bg);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-lg);
  padding: 1.75rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rm-card:hover {
  border-color: var(--rm-primary);
  box-shadow: var(--rm-shadow);
  transform: translateY(-2px);
}
.rm-card__title {
  font-size: 1.15rem;
  margin: 0 0 .5rem;
}
.rm-card__desc {
  color: var(--rm-text-muted);
  font-size: .95rem;
  margin: 0 0 1rem;
}

/* ==========================================================================
   7. Contact Form 7 Styling
   ========================================================================== */
.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form label { font-weight: 500; display: block; margin-bottom: .35rem; }
.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--rm-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wpcf7-form-control:focus {
  outline: none;
  border-color: var(--rm-primary);
  box-shadow: 0 0 0 3px var(--rm-primary-soft);
}
.wpcf7 .wpcf7-submit {
  width: auto;
  min-width: 180px;
}

/* ==========================================================================
   8. Floating KakaoTalk Button (all pages)
   ========================================================================== */
.rm-float-kakao {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.25rem;
  background: var(--rm-kakao-bg);
  color: var(--rm-kakao-text) !important;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rm-float-kakao:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}
.rm-float-kakao::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3C6.48 3 2 6.58 2 11c0 2.84 1.84 5.32 4.6 6.74L5.5 21.5l4.35-2.55c.7.08 1.42.12 2.15.12 5.52 0 10-3.58 10-8S17.52 3 12 3z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3C6.48 3 2 6.58 2 11c0 2.84 1.84 5.32 4.6 6.74L5.5 21.5l4.35-2.55c.7.08 1.42.12 2.15.12 5.52 0 10-3.58 10-8S17.52 3 12 3z'/></svg>") center/contain no-repeat;
}

/* ==========================================================================
   9. Blog / Post Styling
   ========================================================================== */
.entry-title a { color: var(--rm-text); }
.entry-title a:hover { color: var(--rm-primary); text-decoration: none; }

.entry-meta,
.entry-meta a { color: var(--rm-text-muted); font-size: .875rem; }

.post-navigation a { color: var(--rm-primary); }

blockquote {
  border-left: 4px solid var(--rm-primary);
  padding: .5rem 1.25rem;
  background: var(--rm-bg-soft);
  color: var(--rm-text);
  margin: 1.5rem 0;
  border-radius: 0 var(--rm-radius) var(--rm-radius) 0;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */
.site-footer,
.footer-widgets,
.site-info {
  background-color: var(--rm-bg-dark) !important;
  color: #bfbfbf;
}
.site-footer a,
.site-info a { color: #fff; }
.site-footer a:hover { color: var(--rm-primary); }

/* ==========================================================================
   11. Utility
   ========================================================================== */
.rm-text-primary { color: var(--rm-primary) !important; }
.rm-bg-soft { background-color: var(--rm-bg-soft) !important; }
.rm-center { text-align: center; }

/* 모바일 */
@media (max-width: 640px) {
  .rm-float-kakao { padding: .75rem 1rem; font-size: .875rem; }
  .rm-hero { padding: 2.5rem 1rem; }
}

/* ==========================================================================
   12. Container
   ========================================================================== */
.rm-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   13. Modern Palette Extensions
   ========================================================================== */
:root {
  --rm-neutral-50:  #FAFAF9;
  --rm-neutral-100: #F5F4F2;
  --rm-neutral-800: #292524;
  --rm-accent-warm: #C8973A;
}

/* ==========================================================================
   14. Fixed Header (sticky 대신 fixed — overflow-x:hidden 환경에서도 안전)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--rm-bg);
  transition: box-shadow .3s ease, background-color .3s ease;
}
.rm-header--scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.09);
  background-color: rgba(255,255,255,.97) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* 헤더 높이만큼 콘텐츠 밀어내기 (JS가 --rm-header-height 를 실측값으로 갱신) */
body {
  padding-top: var(--rm-header-height, 72px);
}

/* ==========================================================================
   15. Hero — Full-screen Home
   ========================================================================== */
.rm-hero--home {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: none;
  padding: 0;
  overflow: hidden;
}
.rm-hero__bg {
  position: absolute;
  inset: -10% 0;            /* extra height for parallax travel */
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}
.rm-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,20,20,.75) 0%, rgba(196,30,58,.38) 100%);
  z-index: 1;
}
.rm-hero--home .rm-container {
  position: relative;
  z-index: 2;
  padding: 5rem 1.5rem;
}
.rm-hero__content { max-width: 640px; }
.rm-hero__eyebrow {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.rm-hero--home .rm-hero__title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.28);
}
.rm-hero--home .rm-hero__subtitle {
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  max-width: 44rem;
  margin: 0 0 2.5rem;
}
.rm-hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.45);
  font-size: .75rem;
  letter-spacing: .1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  animation: rm-bounce 2.2s ease-in-out infinite;
  z-index: 2;
}
.rm-hero__scroll-hint::after { content: '↓'; font-size: 1.1rem; }
@keyframes rm-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ==========================================================================
   16. Hero — Inner pages (services / about)
   ========================================================================== */
.rm-hero--inner {
  background: linear-gradient(135deg, var(--rm-neutral-800) 0%, var(--rm-primary) 100%) !important;
  /* GP 컨테이너 폭 제약 탈출 → 뷰포트 풀 너비 */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
  text-align: center;
}
.rm-hero--inner .rm-hero__title  { color: #fff !important; }
.rm-hero--inner .rm-hero__subtitle {
  color: rgba(255,255,255,.9) !important;
  margin: .75rem auto 0;
  max-width: 44rem;
}

/* ==========================================================================
   17. Stats / Counter Bar
   ========================================================================== */
.rm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--rm-border);
  border-bottom: 1px solid var(--rm-border);
  background: var(--rm-bg);
}
.rm-stat {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--rm-border);
}
.rm-stat:last-child { border-right: none; }
.rm-stat__number {
  display: block;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  color: var(--rm-primary);
  letter-spacing: -.04em;
  margin-bottom: .5rem;
}
.rm-stat__suffix { font-size: .55em; vertical-align: super; }
.rm-stat__label  { font-size: .875rem; color: var(--rm-text-muted); font-weight: 500; }

/* ==========================================================================
   18. Card enhancements
   ========================================================================== */
.rm-card__icon { width: 48px; height: 48px; margin-bottom: 1rem; }
.rm-card__icon svg { width: 100%; height: 100%; }
.rm-card__meta { color: var(--rm-text-muted); font-size: .8rem; margin-bottom: .4rem; }

/* ==========================================================================
   19. Blog Archive
   ========================================================================== */
.rm-archive-page { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.rm-archive-page > .rm-container { padding: 0 1.5rem; }
.rm-archive__header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rm-border);
}
.rm-archive__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .5rem; }
.rm-archive__count { color: var(--rm-text-muted); font-size: .9rem; }

.rm-posts-list { display: flex; flex-direction: column; gap: 1.75rem; }

.rm-post-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.75rem;
  padding: 1.5rem;
  background: var(--rm-bg);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-lg);
  text-decoration: none !important;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.rm-post-card:hover {
  border-color: var(--rm-primary);
  box-shadow: var(--rm-shadow);
  transform: translateY(-3px);
  text-decoration: none;
}
.rm-post-card__thumb {
  border-radius: var(--rm-radius);
  overflow: hidden;
  background: var(--rm-bg-soft);
  aspect-ratio: 4/3;
}
.rm-post-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.rm-post-card:hover .rm-post-card__thumb img { transform: scale(1.05); }
.rm-post-card__thumb--placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rm-bg-soft), var(--rm-primary-soft));
  color: var(--rm-primary);
  font-size: 2.5rem;
  font-weight: 800;
}
.rm-post-card__body {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  justify-content: center;
}
.rm-post-card__cat {
  font-size: .75rem;
  font-weight: 700;
  color: var(--rm-primary);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rm-post-card__title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--rm-text);
  line-height: 1.4;
  margin: 0;
}
.rm-post-card__title a { color: inherit; text-decoration: none; }
.rm-post-card__title a:hover { color: var(--rm-primary); text-decoration: none; }
.rm-post-card__excerpt {
  color: var(--rm-text-muted);
  font-size: .92rem;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rm-post-card__meta {
  font-size: .78rem;
  color: var(--rm-text-muted);
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--rm-border);
}

/* Pagination */
.rm-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.rm-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .6rem;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  color: var(--rm-text);
  text-decoration: none;
  font-weight: 500;
  font-size: .875rem;
  transition: all .2s ease;
}
.rm-pagination .page-numbers.current,
.rm-pagination .page-numbers:hover {
  background: var(--rm-primary);
  border-color: var(--rm-primary);
  color: #fff;
  text-decoration: none;
}

/* ==========================================================================
   20. Single Post
   ========================================================================== */
.rm-single { padding: clamp(2rem, 5vw, 4rem) 0; }
.rm-post-inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.rm-post-header { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--rm-border); }
.rm-post-header__cat {
  font-size: .75rem; font-weight: 700; color: var(--rm-primary);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem;
}
.rm-post-header__title { font-size: clamp(1.75rem, 4vw, 2.4rem); margin-bottom: 1rem; line-height: 1.3; }
.rm-post-header__meta  { color: var(--rm-text-muted); font-size: .875rem; }
.rm-post-header__thumb { margin-top: 1.5rem; border-radius: var(--rm-radius-lg); overflow: hidden; }
.rm-post-header__thumb img { width: 100%; height: auto; display: block; }

/* Table of Contents */
.rm-toc {
  background: var(--rm-neutral-50);
  border: 1px solid var(--rm-border);
  border-left: 3px solid var(--rm-primary);
  border-radius: var(--rm-radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.rm-toc__title {
  font-size: .8rem; font-weight: 700; color: var(--rm-text-muted);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem;
}
.rm-toc ul { list-style: none; margin: 0; padding: 0; }
.rm-toc ul li { padding: .22rem 0; }
.rm-toc ul li a { color: var(--rm-text); font-size: .9rem; text-decoration: none; transition: color .15s ease; }
.rm-toc ul li a:hover { color: var(--rm-primary); text-decoration: none; }
.rm-toc ul li.rm-toc__sub { padding-left: 1rem; }
.rm-toc ul li.rm-toc__sub a { font-size: .85rem; color: var(--rm-text-muted); }

/* Post body content */
.rm-post-content { line-height: 1.85; font-size: 1.05rem; }
.rm-post-content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rm-border);
}
.rm-post-content h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); margin: 2rem 0 .75rem; }
.rm-post-content p  { margin-bottom: 1.5rem; }
.rm-post-content img { border-radius: var(--rm-radius); max-width: 100%; height: auto; display: block; margin: 1.5em auto; }
.entry-content img { max-width: 100%; height: auto; display: block; margin: 1.5em auto; }

/* Inline CTA block inside post */
.rm-inline-cta {
  background: linear-gradient(135deg, var(--rm-neutral-800) 0%, var(--rm-primary) 100%);
  border-radius: var(--rm-radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 3rem 0;
  color: #fff;
}
.rm-inline-cta h3 { color: #fff; margin-bottom: .75rem; font-size: 1.25rem; }
.rm-inline-cta p  { color: rgba(255,255,255,.8); margin-bottom: 1.5rem; font-size: .95rem; }

/* Related posts */
.rm-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rm-border); }
.rm-related__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.25rem; }
.rm-related__grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.rm-related__item {
  display: block;
  padding: 1.1rem;
  background: var(--rm-bg-soft);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  text-decoration: none !important;
  transition: border-color .2s ease, transform .2s ease;
}
.rm-related__item:hover { border-color: var(--rm-primary); transform: translateY(-2px); text-decoration: none; }
.rm-related__item-title { display: block; font-size: .9rem; font-weight: 600; color: var(--rm-text); margin-bottom: .25rem; }
.rm-related__item-date  { font-size: .75rem; color: var(--rm-text-muted); }

/* ==========================================================================
   21. About — Profile (재설계: flexbox 기반, overflow 안전)
   ========================================================================== */
.rm-about-profile {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem;
  background: var(--rm-bg);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-lg);
  box-shadow: var(--rm-shadow);
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}
.rm-about-profile__photo { flex-shrink: 0; }
.rm-about-profile__img {
  width: 160px; height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--rm-primary-soft);
  display: block;
}
.rm-avatar--initial {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rm-primary), var(--rm-primary-dark));
  color: #fff;
  font-size: 4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rm-about-profile__info { min-width: 0; }
.rm-about-profile__name { font-size: 1.75rem; margin: 0 0 .25rem; }
.rm-about-profile__role { color: var(--rm-primary); font-weight: 600; font-size: 1rem; margin: 0 0 1rem; }
.rm-about-profile__meta { list-style: none; padding: 0; margin: 0; color: var(--rm-text-muted); font-size: .9rem; }
.rm-about-profile__meta li::before { content: '▸ '; color: var(--rm-primary); }

/* 가치 카드 — rm-card 공통 클래스 활용 */
.rm-card--value { text-align: center; }
.rm-card__icon-emoji { font-size: 2.25rem; margin-bottom: 1rem; display: block; }

/* ==========================================================================
   22. CTA Section
   ========================================================================== */
.rm-section--cta {
  background: linear-gradient(135deg, var(--rm-neutral-800) 0%, #180008 100%);
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem;
  margin-bottom: 2.5rem;
}
.rm-section--cta h2    { color: #fff; margin-bottom: 1rem; }
.rm-section__eyebrow {
  display: block; font-size: .8rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--rm-primary); margin-bottom: .75rem;
}
.rm-section__sub { color: rgba(255,255,255,.7); margin-bottom: 2rem; font-size: 1rem; line-height: 1.7; }
.rm-btn--lg      { padding: 1.1rem 2.25rem; font-size: 1.05rem; }

/* ==========================================================================
   23. Animation initial state
   ========================================================================== */
.rm-reveal { opacity: 0; transform: translateY(30px); }

/* ==========================================================================
   24. Responsive additions
   ========================================================================== */
@media (max-width: 768px) {
  .rm-post-card              { grid-template-columns: 1fr; }
  .rm-post-card__thumb       { aspect-ratio: 16/9; }
  .rm-about-profile          { flex-direction: column; text-align: center; padding: 1.75rem 1.25rem; }
  .rm-about-profile__photo   { margin: 0 auto; }
  .rm-about-profile__info    { width: 100%; }
  .rm-hero--home .rm-hero__content { max-width: 100%; }
  .rm-stat                   { border-right: none; border-bottom: 1px solid var(--rm-border); }
  .rm-stat:last-child        { border-bottom: none; }
}
@media (max-width: 640px) {
  .rm-post-inner          { padding: 0 1rem; }
  .rm-single              { padding: 1.5rem 0; }
  .rm-inline-cta          { padding: 2rem 1.25rem; }
}

/* ==========================================================================
   25. Blog sidebar search — horizontal layout (PC)
   ========================================================================== */
.widget_search .search-form,
.widget .search-form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}
.widget_search .search-field,
.widget .search-form .search-field {
  flex: 1;
  min-width: 0;
  border-radius: var(--rm-radius) 0 0 var(--rm-radius);
  border-right: none;
}
.widget_search .search-submit,
.widget .search-form .search-submit {
  flex-shrink: 0;
  border-radius: 0 var(--rm-radius) var(--rm-radius) 0;
  white-space: nowrap;
  padding: .85rem 1.25rem;
}

/* ==========================================================================
   26. Services Page — PC Layout Overrides
   ========================================================================== */

/* 인트로 본문: Gutenberg 블록 기본 max-width 제거, 컨테이너 전체 너비 활용 */
.rm-prose {
  max-width: 48rem;
}

@media (min-width: 769px) {
  .rm-page-services .entry-content,
  .rm-page-services .entry-content > *,
  .rm-page-services .entry-content p,
  .rm-page-services .entry-content h2,
  .rm-page-services .entry-content h3,
  .rm-page-about .entry-content,
  .rm-page-about .entry-content > *,
  .rm-page-about .entry-content p,
  .rm-page-about .entry-content h2,
  .rm-page-about .entry-content h3 {
    max-width: none;
  }

  .rm-prose {
    max-width: none;
  }

  /* 서비스 카드 그리드: PC에서 항상 3열 */
  .rm-page-services .rm-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  /* 서비스/소개 페이지 컨테이너 확장 */
  .rm-page-services .rm-container,
  .rm-page-about .rm-container {
    max-width: 1280px;
  }
}

/* ==========================================================================
   Mobile Hamburger Button — visibility & brand styling (모바일 전용)
   button { color:#fff !important } 전역 규칙 오버라이드.
   display/width 는 GP 기본값 유지 (오버라이드 시 버튼 2개 노출 버그)
   ========================================================================== */
@media (max-width: 768px) {
  button.menu-toggle {
    color: var(--rm-primary) !important;
    background-color: var(--rm-primary-soft) !important; /* 연한 크림슨 배경 */
    border: none !important;
    border-radius: var(--rm-radius) !important;
    transition: background-color .15s ease, color .15s ease !important;
  }

  button.menu-toggle:hover,
  button.menu-toggle:active,
  button.menu-toggle:focus {
    background-color: var(--rm-primary) !important;
    color: #fff !important;
  }
}
