/*
 * reberry-theme main.css
 * [2026-07-27] 경량 커스텀 테마 스타일. 반응형 320/768/1024/1440.
 */

/* Pretendard 자체 호스팅 (Variable) */
@font-face {
	font-family: "Pretendard Variable";
	font-weight: 45 920;
	font-style: normal;
	font-display: swap;
	src: url("../fonts/PretendardVariable.woff2") format("woff2-variations");
}

:root {
	--rb-brand: #b08d57;
	--rb-brand-dark: #8a6d3f;
	--rb-brand-soft: #f4ede3;
	--rb-ink: #1c1c1c;
	--rb-body: #3a3a3a;
	--rb-muted: #7a7a7a;
	--rb-line: #e6e2da;
	--rb-surface: #faf8f4;
	--rb-white: #fff;
	--rb-header-h: 76px;
	--rb-radius: 14px;
	--rb-shadow: 0 8px 30px rgba(28,28,28,.08);
	--rb-container: 1200px;
	--rb-content: 760px;
	--rb-font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--rb-font);
	color: var(--rb-body);
	line-height: 1.7;
	background: var(--rb-white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rb-brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--rb-ink); line-height: 1.25; font-weight: 700; }

.container { max-width: var(--rb-content); margin-inline: auto; padding-inline: 20px; }
.container--wide { max-width: var(--rb-container); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; z-index: 999; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 16px; }

/* ---------- 버튼 ---------- */
.btn {
	display: inline-block; padding: .9rem 2rem; border-radius: 999px;
	font-weight: 600; text-align: center; cursor: pointer; border: 1px solid transparent;
	transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--brand { background: var(--rb-brand); color: #fff; }
.btn--brand:hover { background: var(--rb-brand-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--rb-brand); color: var(--rb-brand-dark); }
.btn--ghost:hover { background: var(--rb-brand); color: #fff; }

/* ---------- 헤더 ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px);
	border-bottom: 1px solid var(--rb-line);
	transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--rb-shadow); }
.site-header__inner {
	max-width: var(--rb-container); margin-inline: auto; padding: 0 20px;
	min-height: var(--rb-header-h);
	display: flex; align-items: center; gap: 24px;
}
.site-header__brand { flex: 0 0 auto; }
.site-title { font-size: 1.5rem; font-weight: 800; color: var(--rb-ink); letter-spacing: .01em; }
.custom-logo { max-height: 48px; width: auto; }

.site-nav { margin-left: auto; }
.nav-menu, .nav-menu--fallback {
	list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center;
}
.nav-menu .menu-item { position: relative; }
.nav-menu .menu-item > a {
	display: block; padding: 10px 14px; color: var(--rb-ink); font-weight: 500; border-radius: 8px;
}
.nav-menu .menu-item > a:hover { background: var(--rb-brand-soft); text-decoration: none; }
.nav-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
	min-width: 220px; background: #fff; border: 1px solid var(--rb-line);
	border-radius: var(--rb-radius); box-shadow: var(--rb-shadow);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: all .18s ease; z-index: 10;
}
.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children.is-open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu .sub-menu a { padding: 8px 12px; border-radius: 8px; display: block; }
.submenu-toggle { display: none; background: none; border: 0; cursor: pointer; }

.site-header__actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

/* 언어 스위처 */
.lang-switcher { position: relative; }
.lang-switcher__toggle {
	display: flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--rb-line);
	border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; color: var(--rb-ink);
}
.lang-switcher__list {
	list-style: none; margin: 0; padding: 8px; position: absolute; right: 0; top: calc(100% + 8px);
	min-width: 160px; background: #fff; border: 1px solid var(--rb-line); border-radius: var(--rb-radius);
	box-shadow: var(--rb-shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .18s ease;
}
.lang-switcher.is-open .lang-switcher__list { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switcher__list li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--rb-ink); }
.lang-switcher__list li a:hover { background: var(--rb-brand-soft); text-decoration: none; }
.lang-switcher__list .current-lang a { background: var(--rb-brand-soft); font-weight: 700; }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
	content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--rb-ink); transition: .2s;
}
.nav-toggle__bar { top: 21px; }
.nav-toggle__bar::before { top: -7px; } .nav-toggle__bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: rotate(-45deg); top: 0; }

/* ---------- 페이지 히어로 / 콘텐츠 ---------- */
.site-main { min-height: 50vh; }
.page-hero { padding: 56px 0 28px; background: var(--rb-surface); border-bottom: 1px solid var(--rb-line); text-align: center; }
.page-hero__title { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0; }
.page-hero__desc { color: var(--rb-muted); margin-top: 10px; }

.entry-content { max-width: var(--rb-container); margin: 40px auto; padding: 0 20px; }
.entry-content > * { max-width: var(--rb-content); margin-inline: auto; }
.entry-content > .alignwide { max-width: var(--rb-container); }
.entry-content > .alignfull { max-width: none; }
.entry-content--front { margin-top: 0; }
.entry-content h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-top: 2em; }
.entry-content img { border-radius: var(--rb-radius); }

/* ---------- 카드 그리드 (블로그·허브) ---------- */
.post-grid, .hub-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px; margin: 40px 0;
}
.post-card, .hub-card {
	background: #fff; border: 1px solid var(--rb-line); border-radius: var(--rb-radius);
	overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.hub-card { color: inherit; }
.post-card:hover, .hub-card:hover { transform: translateY(-4px); box-shadow: var(--rb-shadow); text-decoration: none; }
.post-card__thumb img, .hub-card__thumb img { width: 100%; height: 220px; object-fit: cover; }
.post-card__body, .hub-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.post-card__title, .hub-card__title { font-size: 1.25rem; font-weight: 700; color: var(--rb-ink); }
.post-card__excerpt, .hub-card__excerpt { color: var(--rb-muted); font-size: .95rem; }
.post-card__more, .hub-card__more { color: var(--rb-brand-dark); font-weight: 600; margin-top: auto; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--rb-ink); color: #cfcac2; margin-top: 80px; }
.site-footer__inner { max-width: var(--rb-container); margin-inline: auto; padding: 60px 20px 30px; }
.site-footer__widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.site-footer a { color: #e6e2da; }
.footer-widget__title { color: #fff; font-size: 1.05rem; margin: 0 0 14px; }
.footer-note { color: #8a857c; font-size: .85rem; }
.site-footer__nav { margin-top: 32px; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; padding: 0; margin: 0; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; }
.site-footer__copy { font-size: .85rem; color: #8a857c; margin: 0; }

/* ---------- 맨 위로 / WhatsApp ---------- */
.back-to-top {
	position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
	background: var(--rb-brand); color: #fff; border: 0; font-size: 20px; cursor: pointer;
	box-shadow: var(--rb-shadow); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 90;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.rb-whatsapp {
	position: fixed; right: 22px; bottom: 80px; width: 54px; height: 54px; border-radius: 50%;
	background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: var(--rb-shadow); z-index: 90; font-size: 26px;
}
.rb-whatsapp:hover { text-decoration: none; transform: scale(1.05); }

/* ---------- 등장 애니메이션 ---------- */
.rb-reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.rb-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.rb-reveal { opacity: 1; transform: none; transition: none; }
}

.pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--rb-line); border-radius: 8px; color: var(--rb-ink); }
.pagination .current { background: var(--rb-brand); color: #fff; border-color: var(--rb-brand); }
.no-results { text-align: center; color: var(--rb-muted); padding: 60px 0; }

/* =========================================================
 *  블록 패턴 컴포넌트 (patterns/*)
 * ========================================================= */

/* 히어로 */
.rb-hero { position: relative; min-height: 78vh; display: flex; align-items: center; color: #fff; text-align: center; overflow: hidden; }
.rb-hero__bg { position: absolute; inset: 0; z-index: 0; }
.rb-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.rb-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,28,28,.25), rgba(28,28,28,.55)); z-index: 1; }
.rb-hero__inner { position: relative; z-index: 2; max-width: 780px; margin-inline: auto; padding: 40px 20px; }
.rb-hero__title { color: #fff; font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 16px; }
.rb-hero__sub { font-size: 1.2rem; margin-bottom: 28px; }
.rb-hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 시술 카드 그리드 */
.rb-cards { max-width: var(--rb-container); margin: 60px auto; padding: 0 20px; }
.rb-cards__head { text-align: center; margin-bottom: 40px; }
.rb-cards__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.rb-card { background: var(--rb-surface); border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: 28px; text-align: center; transition: .2s; }
.rb-card:hover { transform: translateY(-4px); box-shadow: var(--rb-shadow); }
.rb-card__icon { font-size: 2.2rem; margin-bottom: 12px; }
.rb-card__title { font-size: 1.2rem; margin: 0 0 8px; }

/* 지점 정보 */
.rb-branches { max-width: var(--rb-container); margin: 60px auto; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.rb-branch { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); overflow: hidden; background: #fff; }
.rb-branch__img img { height: 200px; width: 100%; object-fit: cover; }
.rb-branch__body { padding: 24px; }
.rb-branch__name { margin: 0 0 8px; font-size: 1.3rem; }
.rb-branch__meta { color: var(--rb-muted); font-size: .95rem; margin: 4px 0; }

/* FAQ 아코디언 */
.rb-faq { max-width: 820px; margin: 60px auto; padding: 0 20px; }
.rb-faq__item { border-bottom: 1px solid var(--rb-line); }
.rb-faq__item summary { cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 1.1rem; color: var(--rb-ink); list-style: none; display: flex; justify-content: space-between; }
.rb-faq__item summary::-webkit-details-marker { display: none; }
.rb-faq__item summary::after { content: "+"; color: var(--rb-brand); font-size: 1.4rem; }
.rb-faq__item[open] summary::after { content: "–"; }
.rb-faq__answer { padding-bottom: 20px; color: var(--rb-body); }

/* CTA */
.rb-cta { background: var(--rb-brand-soft); text-align: center; padding: 72px 20px; margin: 60px 0; }
.rb-cta__title { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0 0 14px; }
.rb-cta__text { color: var(--rb-body); max-width: 560px; margin: 0 auto 26px; }

/* 숫자 카운터 */
.rb-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; max-width: var(--rb-container); margin: 60px auto; padding: 0 20px; text-align: center; }
.rb-counter__num { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: var(--rb-brand-dark); }
.rb-counter__label { color: var(--rb-muted); }

/* 슬라이더 공통 */
.rb-swiper { max-width: var(--rb-container); margin: 40px auto; padding: 0 20px; }
.rb-swiper .swiper { padding-bottom: 40px; }
.rb-swiper .swiper-slide img { border-radius: var(--rb-radius); }
.swiper-button-next, .swiper-button-prev { color: var(--rb-brand-dark); }
.swiper-pagination-bullet-active { background: var(--rb-brand); }

/* Isotope 필터 갤러리 */
.rb-isotope__filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.rb-isotope__filters button { border: 1px solid var(--rb-line); background: #fff; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.rb-isotope__filters button.is-active { background: var(--rb-brand); color: #fff; border-color: var(--rb-brand); }
.rb-isotope__grid .rb-iso-item { width: 33.333%; padding: 10px; }
.rb-iso-item img { border-radius: var(--rb-radius); width: 100%; }

/* ---------- 폼 (CF7) ---------- */
.rb-form p, .wpcf7 p { margin: 0 0 16px; }
.rb-form label, .wpcf7 label { font-weight: 600; color: var(--rb-ink); display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"],
.wpcf7 select, .wpcf7 textarea {
	width: 100%; padding: 12px 14px; margin-top: 6px; border: 1px solid var(--rb-line);
	border-radius: 10px; font: inherit; background: #fff; color: var(--rb-body);
}
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 2px solid var(--rb-brand); border-color: var(--rb-brand); }
.wpcf7 textarea { min-height: 120px; resize: vertical; }
.wpcf7 .wpcf7-submit {
	background: var(--rb-brand); color: #fff; border: 0; padding: 14px 32px; border-radius: 999px;
	font-weight: 700; cursor: pointer; transition: background .2s;
}
.wpcf7 .wpcf7-submit:hover { background: var(--rb-brand-dark); }
.wpcf7 .wpcf7-acceptance { font-weight: 400; font-size: .9rem; color: var(--rb-muted); }
.wpcf7-response-output { border-radius: 8px; margin: 10px 0 0 !important; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
	.rb-isotope__grid .rb-iso-item { width: 50%; }
}
@media (max-width: 768px) {
	:root { --rb-header-h: 64px; }
	.nav-toggle { display: block; }
	.site-nav {
		position: fixed; inset: var(--rb-header-h) 0 0 auto; width: min(320px, 82vw);
		background: #fff; box-shadow: var(--rb-shadow); padding: 20px; overflow-y: auto;
		transform: translateX(100%); transition: transform .25s ease; margin: 0;
	}
	.site-nav.is-open { transform: translateX(0); }
	.nav-menu, .nav-menu--fallback { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 16px; display: none; }
	.nav-menu .menu-item-has-children.is-open > .sub-menu { display: block; }
	.submenu-toggle { display: inline-block; float: right; }
	.site-header__actions .site-header__cta { display: none; }
	.rb-isotope__grid .rb-iso-item { width: 100%; }
	.entry-content > * { max-width: 100%; }
}
@media (max-width: 480px) {
	.page-hero { padding: 36px 0 20px; }
	.btn { padding: .8rem 1.5rem; }
}
