/* ARKDIO Promotion — Frontend
 *
 * 버틀러 테마 규격을 따른다(실측 근거는 주석에):
 *   · 본문 폭 1280px / 좌우 24px  → 내용 1232px      (haneul.css .wrap)
 *     ⚠ 설정에서 바꿀 수 있다 — 값은 `--apr-wrap` 으로 들어온다. 여기에 박지 말 것.
 *   · 분기점 1024 / 900 / 768 / 520                   (About 계열 관례)
 *   · 카드 간격 14px, 모서리 직각, 그림자 없음        (.e1-grid / .t1-grid)
 *   · 호버는 이미지 opacity 페이드                    (about-equipment.css)
 *   · 비율은 aspect-ratio 만. padding-top 해킹 금지
 *
 * 비율·칼럼·간격은 --apr-* 변수로 들어온다. 여기서 값을 박지 않는다.
 */

/* 목록 페이지 머리글 — 안쪽 마크업은 페이지가 정한다.
   플러그인은 **자리(여백)만** 잡는다. 그래야 어느 테마에 얹어도 어색하지 않다. */
.apr-page-head {
	max-width: var(--apr-wrap, 1280px);
	margin: 0 auto;
	padding: clamp(56px, 7vw, 104px) 24px clamp(28px, 3.6vw, 48px);
	text-align: center;
}
.apr-page-head > .wrap { padding: 0; }
.apr-page-title { margin: 0; }

.apr-page-head + .apr-grid { margin-top: 0; }

.apr-grid {
	display: grid;
	grid-template-columns: repeat(var(--apr-cols, 4), minmax(0, 1fr));
	/* 좌우와 상하를 따로 잡는다 — 위아래는 이벤트가 서로 섞여 보이지 않게 더 벌린다 */
	column-gap: var(--apr-gap-x, 14px);
	row-gap: var(--apr-gap-y, 42px);
	/* ⚠ 아래 여백은 반드시 이 축약형 안에 있어야 한다.
	   따로 `.apr-grid { margin-bottom: … }` 로 적으면, 뒤에 오는 `margin: 0 auto` 가
	   같은 특이도로 덮어써서 0 이 된다(실제로 그렇게 먹통이었다). */
	margin: var(--apr-top, 0) auto var(--apr-bottom, 160px);
}
.apr-w-wrap { max-width: 100%; }
/* 비율 폭 — PC/모바일 각각 가로폭(%)을 지정한다. 좌우 auto 로 중앙정렬(그리드 margin) */
.apr-w-ratio { width: calc(var(--apr-pc-ratio, 100) * 1vw); margin-left: calc(50% - var(--apr-pc-ratio, 100) * 0.5vw); padding: 0 14px; box-sizing: border-box; }
@media (max-width: 520px) { .apr-w-ratio { width: calc(var(--apr-mobile-ratio, 100) * 1vw); margin-left: calc(50% - var(--apr-mobile-ratio, 100) * 0.5vw); } }
/* 전체너비 — 둘러보기 갤러리(.t1-grid)와 같은 방식으로 wrap 을 빠져나간다 */
.apr-w-full { width: 100vw; margin-left: calc(50% - 50vw); padding: 0 14px; }

/* ── 카드 ─────────────────────────────────────────────────── */
.apr-card {
	display: block;
	text-decoration: none;
	color: inherit;
	position: relative;
}
.apr-media {
	position: relative;
	display: flex;              /* ⚠ 이게 없으면 aspect-ratio 가 죽는다 (wp-bridge.css 실측 기록) */
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: var(--apr-ratio, 3 / 4);
	overflow: hidden;
	background: #ECECEC;
}
.apr-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity .25s ease;
}
.apr-card:hover .apr-img { opacity: .78; }

/* 라벨은 "종료" 하나뿐이다(2026-08-24). 뱃지·준비중 변형은 걷어냈다. */
.apr-ribbon {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 5px 10px;
	font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .02em;
	line-height: 1;
	color: #fff;
	background: rgba(24, 24, 24, .78);
}

/* 종료된 카드 — 지운 게 아니라 지난 것임이 보여야 한다 */
.apr-card.is-ended .apr-img { opacity: .42; filter: grayscale(1); }
.apr-card.is-ended:hover .apr-img { opacity: .55; }
.apr-card.is-ended .apr-name { color: var(--t-muted, #707070); }

/* ── 카드 글 ──────────────────────────────────────────────── */
.apr-meta {
	display: block;
	padding: 0 2px 0;
	text-align: center;
}
.apr-name {
	display: block;
	margin: var(--apr-title-gap-top, 0) 0 var(--apr-title-gap-bottom, 0);
	font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
	font-size: var(--apr-title-size, 16px);
	font-weight: var(--apr-title-weight, 600);
	letter-spacing: -0.01em;
	line-height: 1.2;
	color: #111;
	word-break: keep-all;
	text-wrap: balance;
}
.apr-period {
	display: block;
	margin: var(--apr-date-gap-top, 0) 0 var(--apr-date-gap-bottom, 0);
	line-height: 1.1;
	font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
	font-size: var(--apr-date-size, 12.5px);
	font-weight: 300;
	letter-spacing: -0.01em;
	color: var(--t-muted, #707070);
	font-variant-numeric: tabular-nums;
}

/* ── 분기점 — About 계열과 같은 값 ────────────────────────── */
@media (max-width: 900px) {
	.apr-grid { grid-template-columns: repeat(min(var(--apr-cols, 4), 2), minmax(0, 1fr)); }
}
@media (max-width: 520px) {
	.apr-grid { grid-template-columns: repeat(var(--apr-cols-mobile, 1), minmax(0, 1fr)); }
	.apr-w-full { padding: 0 16px; }
	/* 제목·기간 크기는 이제 관리자 설정값(변수)이 정한다 — 여기서 덮지 않는다 */
}

/* 커서를 전역에서 죽여 둔 사이트다 — 누를 수 있는 것 위에서는 되살린다 */
@media (pointer: fine) {
	.apr-card, .apr-card * { cursor: pointer !important; }
}


/* ══ 상세 ═════════════════════════════════════════════════ */

.apr-single {
	padding-bottom: clamp(72px, 8vw, 120px);
}
.apr-head {
	max-width: var(--apr-wrap, 1280px);
	margin: 0 auto;
	padding: clamp(48px, 6vw, 88px) 24px clamp(24px, 3vw, 38px);
	text-align: center;
}
.apr-title {
	margin: 0;
	font-size: clamp(24px, 3.4vw, 34px);
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.4;
	color: var(--t-head, #181818);
	word-break: keep-all;
	text-wrap: balance;
}
.apr-title strong { font-weight: 700; }
.apr-period-line {
	margin: 12px 0 0;
	font-size: 13.5px;
	letter-spacing: -0.01em;
	color: var(--t-muted, #707070);
	font-variant-numeric: tabular-nums;
}
.apr-ended-note {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(24, 24, 24, .06);
	font-size: 12.5px;
	color: var(--t-muted, #707070);
}

/* 배너·상세 이미지 — 세로로 길다. 사이에 틈이 생기면 이어붙인 티가 난다 */
.apr-banner,
.apr-detail {
	max-width: var(--apr-wrap, 1280px);
	margin: 0 auto;
	padding: 0 24px;
	font-size: 0;              /* 인라인 이미지 사이 공백 제거. PC=지정 폭, 모바일=full width */
}
.apr-banner-img,
.apr-detail-img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}
.apr-detail { margin-top: 0; }

/* ⚠ 이 페이지는 제목·기간·버튼이 모두 가운데 정렬이다.
   본문만 왼쪽에 두면 어느 쪽에도 맞지 않아 어긋나 보인다(실제 지적받았다).

   ⚠ 선택자 앞에 .apr-single 을 붙인 이유:
   본문 요소는 테마의 .wrap-n(max-width:920px; margin:0 auto; padding:0 24px)도 함께 쓴다.
   이 플러그인 CSS 는 테마보다 **먼저** 실려서, 같은 특이도(0,1,0)로는 늘 진다.
   .wrap-n 을 마크업에서 떼면 폭 기본값이 사라지니, 특이도만 한 단계 올린다. */
.apr-single .apr-text {
	max-width: 720px;
	margin: clamp(32px, 4vw, 56px) auto 0;
	padding: 0 24px;
	font-size: 15.5px;
	line-height: 1.9;
	letter-spacing: -0.01em;
	color: var(--t-body, #3D3D3D);
	text-align: center;
	word-break: keep-all;
	text-wrap: pretty;
}
.apr-single .apr-text p { margin: 0 0 12px; }
.apr-single .apr-text p:last-child { margin-bottom: 0; }

.apr-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: clamp(40px, 5vw, 64px);
	padding: 0 24px;
}
.apr-cta,
.apr-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 190px;
	padding: 14px 26px;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 500;
	letter-spacing: -0.01em;
	text-decoration: none;
	transition: opacity .2s ease, background .2s ease;
}
.apr-cta { background: #186133; color: #fff !important; }
.apr-cta:hover { opacity: .88; }
.apr-back {
	background: transparent;
	color: var(--t-body, #3D3D3D) !important;
	border: 1px solid rgba(24, 24, 24, .18);
}
.apr-back:hover { background: rgba(24, 24, 24, .04); }

@media (pointer: fine) {
	.apr-cta, .apr-back { cursor: pointer !important; }
}
@media (max-width: 520px) {
	.apr-head { padding-left: 16px; padding-right: 16px; }
	/* 모바일: 배너·상세 이미지 full width (PC 는 위의 지정 폭) */
	.apr-banner, .apr-detail {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 0;
	}
	.apr-cta, .apr-back { min-width: 0; flex: 1 1 140px; }
}

/* ── 상세 맨 아래: 다른 프로모션 ────────────────────────────
   목록과 같은 카드를 쓴다. 한 단계 작게 보이도록 여백만 손본다. */
/* 섬네일도 배너·상세 이미지와 같은 본문 폭(--apr-wrap) 안에 가둔다(2026-09-13).
   경계선·카드가 이미지 열과 좌우로 딱 맞게 정렬된다. */
.apr-others {
	max-width: var(--apr-wrap, 1280px);
	margin: clamp(56px, 7vw, 96px) auto 0;
	padding: clamp(40px, 5vw, 64px) 24px 0;
	border-top: 1px solid rgba(24, 24, 24, .10);
}
/* 본문 아래라 아래 여백은 푸터 앞 간격이 맡는다 */
.apr-others .apr-grid { margin-bottom: 0; }


/* ── 카드 등장 애니메이션 (관리자에서 선택) ──────────────────
   목록이 처음 뜰 때 카드가 시차를 두고 나타난다. 움직임 최소화 설정은 존중. */
@media (prefers-reduced-motion: no-preference) {
	.apr-grid[class*="apr-anim-"] .apr-card {
		animation-duration: .6s;
		animation-timing-function: cubic-bezier(.2, .7, .2, 1);
		animation-fill-mode: both;
		animation-delay: calc(var(--apr-i, 0) * 70ms);
	}
	.apr-anim-fade .apr-card       { animation-name: apr-a-fade; }
	.apr-anim-slide-up .apr-card   { animation-name: apr-a-up; }
	.apr-anim-zoom .apr-card       { animation-name: apr-a-zoom; }
	.apr-anim-slide-left .apr-card { animation-name: apr-a-left; }
	.apr-anim-blur .apr-card       { animation-name: apr-a-blur; }
}
@keyframes apr-a-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes apr-a-up   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes apr-a-zoom { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes apr-a-left { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes apr-a-blur { from { opacity: 0; filter: blur(12px); } to { opacity: 1; filter: none; } }

/* ── 섬네일 하단 회색 선 제거 ──────────────────────────────
   실선처럼 보이던 것은 border 가 아니라 .apr-media 의 배경(#ECECEC)이
   이미지 아래로 1~2px 비쳐 나온 것이었다. 배경을 투명으로 바꿔 없앤다. */
.apr-card .apr-media,
.apr-card .apr-media.wf-img {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* ── 상세 맨 아래: 문의 버튼 (카카오·네이버·전화) ──────────────
   링크가 있는 버튼만 나간다. PC 는 가로(1~3개), 모바일은 세로로 길게.
   전화는 PC 에서 번호만(정적) 보이고, 모바일에서 눌러 연결한다. */
.apr-contact {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: var(--apr-btn-mgn, 24px) auto;
}
.apr-cbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	padding: 15px 26px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	box-sizing: border-box;
	transition: opacity .15s ease;
}
.apr-cbtn:hover { opacity: .88; }
.apr-cbtn-kakao { background: #FEE500; color: #191600 !important; }
.apr-cbtn-naver { background: #03C75A; color: #fff !important; }
.apr-cbtn-tel   { background: #111;    color: #fff !important; }
/* PC: 번호만 표시 — 모바일용 '전화문의하기' 버튼은 감춘다 */
.apr-cbtn-tel.apr-tel-mo { display: none; }

@media (max-width: 520px) {
	.apr-contact { flex-direction: column; align-items: center; gap: 10px; }
	.apr-cbtn { width: 90%; min-width: 0; }
	/* 모바일: 번호(정적)는 감추고, 눌러서 연결되는 버튼만 */
	.apr-cbtn-tel.apr-tel-pc { display: none; }
	.apr-cbtn-tel.apr-tel-mo { display: inline-flex; }
}

/* ── 상세 이미지 등장 모션 (본문 탭에서 선택, 2026-09-13) ──────
   뷰포트 하단에 앵커된 레이어가 통짜 긴 이미지를 스크롤에 맞춰 "현상"시킨다.
   베일 색은 관리자 상세 배경색(--apr-bg). op(노출량)는 reveal.js가 스크롤로 조절. */
.apr-reveal { position: fixed; inset: 0; z-index: 4; pointer-events: none;
	opacity: var(--apr-reveal-op, 1); transition: opacity .18s linear; }
.apr-reveal .apr-rl { position: absolute; left: 50%; transform: translateX(-50%);
	width: min(100vw, var(--apr-wrap, 1280px)); display: none; }
.apr-reveal[data-motion="veil"] .apr-rl-veil,
.apr-reveal[data-motion="parallax"] .apr-rl-veil { display: block; }
.apr-reveal[data-motion="blur"] .apr-rl-blur { display: block; }
.apr-reveal[data-motion="light"] .apr-rl-dim { display: block; }
.apr-reveal[data-motion="focus"] .apr-rl-btop,
.apr-reveal[data-motion="focus"] .apr-rl-bbot { display: block; }

/* --apr-depth = 그라데이션 "깊이"(길이). --apr-amt = "강도"(효과 세기). 둘 다 관리자 본문 탭. */
.apr-rl-veil { bottom: 0; height: calc(48vh * var(--apr-depth, 1));
	background: linear-gradient(to top,
		color-mix(in srgb, var(--apr-bg, #fff) calc(var(--apr-amt, 1) * 100%), transparent) 0%,
		color-mix(in srgb, var(--apr-bg, #fff) calc(var(--apr-amt, 1) * 52%), transparent) 46%,
		transparent 100%); }
.apr-rl-blur { bottom: 0; height: calc(50vh * var(--apr-depth, 1));
	-webkit-backdrop-filter: blur(calc(22px * var(--apr-amt, 1)));
	backdrop-filter: blur(calc(22px * var(--apr-amt, 1)));
	-webkit-mask-image: linear-gradient(to top, #000 5%, #000 16%, transparent 100%);
	mask-image: linear-gradient(to top, #000 5%, #000 16%, transparent 100%); }
.apr-rl-dim { bottom: 0; height: calc(50vh * var(--apr-depth, 1));
	-webkit-backdrop-filter: brightness(max(.05, calc(1 - .64 * var(--apr-amt, 1)))) saturate(.35);
	backdrop-filter: brightness(max(.05, calc(1 - .64 * var(--apr-amt, 1)))) saturate(.35);
	-webkit-mask-image: linear-gradient(to top, #000 4%, #000 14%, transparent 100%);
	mask-image: linear-gradient(to top, #000 4%, #000 14%, transparent 100%); }
.apr-rl-btop { top: 8vh; height: calc(26vh * var(--apr-depth, 1));
	-webkit-backdrop-filter: blur(calc(11px * var(--apr-amt, 1))) brightness(max(.2, calc(1 - .34 * var(--apr-amt, 1))));
	backdrop-filter: blur(calc(11px * var(--apr-amt, 1))) brightness(max(.2, calc(1 - .34 * var(--apr-amt, 1))));
	-webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 10%, transparent 100%); }
.apr-rl-bbot { bottom: 0; height: calc(38vh * var(--apr-depth, 1));
	-webkit-backdrop-filter: blur(calc(13px * var(--apr-amt, 1))) brightness(max(.2, calc(1 - .34 * var(--apr-amt, 1))));
	backdrop-filter: blur(calc(13px * var(--apr-amt, 1))) brightness(max(.2, calc(1 - .34 * var(--apr-amt, 1))));
	-webkit-mask-image: linear-gradient(to top, #000 8%, transparent 100%);
	mask-image: linear-gradient(to top, #000 8%, transparent 100%); }
.apr-detail { transition: transform .1s linear; }
@media (prefers-reduced-motion: reduce) { .apr-detail { transform: none !important; } }
