/* Section Editor 기능 블록: 글 목록, 이미지 캐러셀, 아코디언, 탭, 문의 폼, 팝업, 헤더 고정
 * 글꼴 변수와 .se-block 기준은 style.css 에 있다.
 */

/* ---------- 공통 ---------- */
.se-pad {
	padding-top: calc(var(--se-pt, 0) * 100cqw / 1920);
	padding-bottom: calc(var(--se-pb, 0) * 100cqw / 1920);
}

.se-container {
	width: min(1304px, 84cqw);
	margin: 0 auto;
}

.se-container--narrow { width: min(800px, 84cqw); }

.se-heading {
	margin: 0 0 40px;
	padding: 0;
	font-family: var(--se-serif);
	font-size: 40px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0;
	color: inherit;
}

.se-button {
	display: inline-block;
	min-width: 160px;
	margin: 0;
	padding: 14px 32px;
	border: 1px solid #0f0f0f;
	border-radius: 0;
	background: #0f0f0f;
	font-family: var(--se-kr);
	font-size: 16px;
	line-height: 1.5;
	color: #fff;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.se-button:hover,
.se-button:focus {
	background: #fff;
	color: #0f0f0f;
}

/* 편집 화면에서만 보이는 안내 */
.se-empty {
	width: min(800px, 84cqw);
	margin: 0 auto;
	padding: 40px 20px;
	border: 1px dashed #b5b5b5;
	font-family: var(--se-kr);
	font-size: 14px;
	color: #757575;
	text-align: center;
}

@container (max-width: 767px) {
	.se-pad {
		padding-top: calc(var(--se-pt, 0) * 130cqw / 1920);
		padding-bottom: calc(var(--se-pb, 0) * 130cqw / 1920);
	}
	.se-heading {
		margin-bottom: 6cqw;
		font-size: 7cqw;
	}
}

/* ---------- 헤더 고정 ---------- */
.se-header-wrap.is-sticky {
	position: sticky;
	top: 0;
}

/* ---------- 글 목록 ---------- */
.se-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 56px 24px;
}

.se-posts--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.se-posts--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.se-posts__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.se-posts__thumb {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: #d9d9d9;
}

.se-posts__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.se-posts__link:hover .se-posts__thumb img { transform: scale(1.05); }

.se-posts__title {
	margin: 18px 0 0;
	padding: 0;
	font-family: var(--se-kr);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0;
	color: inherit;
}

.se-posts__date {
	display: block;
	margin-top: 6px;
	font-family: var(--se-grotesk);
	font-size: 13px;
	color: #757575;
}

.se-posts__excerpt {
	margin: 10px 0 0;
	font-family: var(--se-kr);
	font-size: 15px;
	line-height: 1.7;
	color: #444;
}

@container (max-width: 1023px) {
	.se-posts,
	.se-posts--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 600px) {
	.se-posts,
	.se-posts--cols-2,
	.se-posts--cols-4 {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}
}

/* ---------- 이미지 캐러셀 ---------- */
.se-carousel {
	--se-gap: 16px;
	position: relative;
}

.se-carousel__track {
	display: flex;
	gap: var(--se-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.se-carousel__track::-webkit-scrollbar { display: none; }

.se-carousel__slide {
	flex: 0 0 calc((100% - var(--se-gap) * (var(--se-per, 3) - 1)) / var(--se-per, 3));
	margin: 0;
	scroll-snap-align: start;
}

.se-carousel__slide img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	max-width: none;
	border-radius: 10px;
	object-fit: cover;
}

.se-carousel__slide figcaption {
	margin-top: 10px;
	font-family: var(--se-kr);
	font-size: 14px;
	line-height: 1.5;
	color: #444;
	text-align: center;
}

.se-carousel__arrow {
	position: absolute;
	top: 40%;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transform: translateY(-50%);
}

.se-carousel__arrow:hover,
.se-carousel__arrow:focus {
	background: #fff;
}

.se-carousel__arrow--prev { left: -22px; }
.se-carousel__arrow--next { right: -22px; }

.se-carousel__arrow svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.se-carousel__arrow polyline {
	fill: none;
	stroke: #0f0f0f;
	stroke-width: 2;
	vector-effect: non-scaling-stroke;
}

@container (max-width: 767px) {
	.se-carousel__slide { flex-basis: 82%; }
	.se-carousel__arrow--prev { left: -12px; }
	.se-carousel__arrow--next { right: -12px; }
}

/* ---------- 아코디언 ---------- */
.se-accordion { border-top: 1px solid #0f0f0f; }

.se-accordion__item { border-bottom: 1px solid #d0d0d0; }

.se-accordion__title {
	position: relative;
	display: block;
	padding: 22px 44px 22px 0;
	font-family: var(--se-kr);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	list-style: none;
	cursor: pointer;
}

.se-accordion__title::-webkit-details-marker { display: none; }

/* 펼침 표시: 닫혔을 때 +, 열렸을 때 − */
.se-accordion__title::before,
.se-accordion__title::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 6px;
	width: 14px;
	height: 1px;
	background: currentColor;
	transition: transform 0.25s ease;
}

.se-accordion__title::after { transform: rotate(90deg); }
.se-accordion__item[open] .se-accordion__title::after { transform: rotate(0deg); }

.se-accordion__body {
	padding: 0 44px 26px 0;
	font-family: var(--se-kr);
	font-size: 16px;
	line-height: 1.8;
	color: #333;
}

/* ---------- 탭 ---------- */
.se-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0 28px;
	border-bottom: 1px solid #d0d0d0;
}

.se-tabs__tab {
	margin: 0 0 -1px;
	padding: 14px 0;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: none;
	font-family: var(--se-kr);
	font-size: 18px;
	line-height: 1.5;
	color: #757575;
	cursor: pointer;
}

.se-tabs__tab:hover,
.se-tabs__tab:focus {
	background: none;
	color: #0f0f0f;
}

.se-tabs__tab[aria-selected="true"] {
	border-bottom-color: #0f0f0f;
	font-weight: 700;
	color: #0f0f0f;
}

.se-tabs__panel {
	padding: 28px 0 0;
	font-family: var(--se-kr);
	font-size: 16px;
	line-height: 1.8;
	color: #333;
}

/* ---------- 문의 폼 ---------- */
.se-form__field { margin: 0 0 22px; }

.se-form__field label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--se-kr);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.se-form__field input,
.se-form__field textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 13px 14px;
	border: 1px solid #b5b5b5;
	border-radius: 0;
	background: #fff;
	font-family: var(--se-kr);
	font-size: 16px;
	line-height: 1.5;
	color: #0f0f0f;
}

.se-form__field input:focus,
.se-form__field textarea:focus {
	border-color: #0f0f0f;
	outline: 1px solid #0f0f0f;
}

.se-form__field textarea { resize: vertical; }

/* 자동 프로그램을 걸러내는 칸: 사람에게는 보이지 않는다 */
.se-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.se-form__message {
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 1px solid #b00020;
	font-family: var(--se-kr);
	font-size: 15px;
	line-height: 1.5;
	color: #b00020;
}

.se-form__message--sent {
	border-color: #1b6e3c;
	color: #1b6e3c;
}

/* ---------- 팝업 ---------- */
.se-popup { text-align: center; }
.se-popup--left { text-align: left; }
.se-popup--right { text-align: right; }

.se-popup__dialog {
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 44px 32px 32px;
	border: 0;
	background: #fff;
	color: #0f0f0f;
	text-align: left;
	overflow: auto;
}

.se-popup__dialog::backdrop { background: rgba(0, 0, 0, 0.6); }

.se-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: #0f0f0f;
	cursor: pointer;
}

.se-popup__close:hover,
.se-popup__close:focus {
	background: none;
	color: #757575;
}

.se-popup__image {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 24px;
}

.se-popup__heading {
	margin: 0 0 14px;
	padding: 0;
	font-family: var(--se-kr);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0;
	color: inherit;
}

.se-popup__body {
	font-family: var(--se-kr);
	font-size: 16px;
	line-height: 1.8;
	color: #333;
}
