[data-aos='fade-down'] {
	transform: translate3d(0, -30px, 0);
}
[data-aos='fade-up'] {
	transform: translate3d(0, 30px, 0);
}
[data-aos='zoom-in'] {
	transform: scale(0.95);
}

@font-face {
	font-family: 'The Bold Font';
	font-style: normal;
	font-weight: 700;
	src:
		local('The Bold Font'),
		url('https://fonts.cdnfonts.com/s/15153/theboldfont.woff')
			format('woff');
	font-display: swap;
}

@font-face {
	font-family: 'Pretendard';
	src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2')
		format('woff2');
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: 'Pretendard';
	src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2')
		format('woff2');
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: 'Pretendard';
	src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2')
		format('woff2');
	font-weight: 600;
	font-display: swap;
}

:root {
	--bg-color: #111111;
	--bs-border-color: rgba(122, 122, 122, 0.4);
	--txt-color: rgba(255, 255, 255, 0.87);
	--point-color: #00aeef;
	--bs-primary: #00aeef;
	--bs-secondary-rgb: 200, 200, 200;
}

.text-primary {
	color: var(--point-color) !important;
}
.text-gray {
	color: rgba(122, 122, 122, 1);
}
.btn-primary {
	background-color: var(--point-color);
	border-color: var(--point-color);
}
.btn-outline-black {
	border-color: #000;
	color: #000;
}
.btn-invert {
	background-color: #000;
	color: #fff;
	border-color: #000;
	font-size: 1.125rem;
	padding: 0.7rem 2rem;
	&:hover {
		background-color: #222;
		border-color: #222;
		color: #fff;
	}
}
.btn-secondary {
	background-color: #222;
	border: 0;
	padding: 0.75rem 2rem;
	font-size: 1.125rem;
	&:hover {
		background-color: #1f1f1f;
	}
}
.btn-outline-secondary {
	--bs-btn-color: #adb5bd;
	--bs-btn-border-color: #adb5bd;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #6c757d;
	--bs-btn-hover-border-color: #6c757d;
}
.btn-outline-white {
	border-color: #fff;
	color: #fff;
	&:hover {
		background-color: var(--point-color);
		border-color: transparent;
	}
}

html,
body {
	padding: 0;
	margin: 0;
	overflow-x: hidden;
	width: 100%;
	min-height: 100vh;
	font-family: 'Pretendard', sans-serif;
	background-color: var(--bg-color);
	color: var(--txt-color);
}
.bold {
	text-transform: uppercase;
	font-family: 'The Bold Font', sans-serif;
}
a {
	color: inherit;
	text-decoration: none;
	&:hover {
		color: var(--point-color);
	}
}

/* Header */
#header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	transition:
		background-color 0.6s ease,
		border-bottom 0.6s ease;
}

#header.scrolled-50 {
	background-color: rgba(0, 0, 0, 0.5);
}

#header nav {
	position: relative;
	height: 60px;

	a {
		font-size: 1.25rem;
		font-weight: 700;
		padding: 1rem 0.3rem;
		line-height: 1;
		&.active {
			color: var(--point-color);
		}
		&:hover {
			opacity: 0.85;
			color: inherit;
		}
	}
}

/* --- #logo-art: 독립 absolute --- */
#header #logo-art {
	position: absolute;
	top: 1rem;
	padding: 0;
	left: 2rem;
	transform-origin: center top;
	transition: transform 0.6s ease;
}

/* 최초 로드 시 애니메이션 비활성화 */
#header.no-transition #logo-art,
#header.no-transition #others {
	transition: none !important;
}

#header #logo-art img {
	height: 27px;
	width: auto;
}

/* 기본: 확대 + 중앙 하단 */
#header:not(.scrolled) #logo-art {
	transform: translateX(calc(50vw - 50% - 2rem)) translateY(calc(15px + 5vw))
	scale(var(--logo-scale, 4));
}

/* 스크롤: 원위치 */
#header.scrolled #logo-art {
	transform: translateX(0) translateY(0) scale(1);
}

/* --- #others: 독립 absolute --- */
#header #others {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	white-space: nowrap;
	padding: 0 2rem;
	transition: gap 0.6s ease;
}

#header #others a {
	text-align: center;
}

/* 기본: gap을 넓혀서 균등 배치 */
#header:not(.scrolled) #others {
	gap: var(--others-expanded-gap, 2rem);
}

/* 스크롤: gap 줄여서 오른쪽으로 모임 */
#header.scrolled #others {
	gap: 1.5rem;
}

/* --- 버거 버튼 (모바일 전용) --- */
#burger {
	display: none;
	position: absolute;
	right: 0.75rem;
	margin-top: 8px;
	width: 44px;
	height: 40px;
	padding: 10px;
	border: none;
	background: none;
	cursor: pointer;
	z-index: 1100;
	flex-direction: column;
	justify-content: space-between;
}

#burger span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--txt-color);
	border-radius: 2px;
	transition:
		transform 0.3s ease,
		opacity 0.3s ease;
}

/* 버거 X 변환 */
#header.menu-open #burger span:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
}
#header.menu-open #burger span:nth-child(2) {
	opacity: 0;
}
#header.menu-open #burger span:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
}

/* --- 오버레이 --- */
#nav-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1001;
}

#header.menu-open #nav-overlay {
	display: block;
}

/* --- 모바일 반응형 (< 768px) --- */
@media (max-width: 997px) {
	#burger {
		display: flex;
	}

	/* 모바일에서 로고 위치 조정 */
	#header #logo-art {
		left: 1rem;
	}

	/* 모바일에서 로고는 항상 scrolled 상태처럼 */
	#header:not(.scrolled) #logo-art {
		transform: translateX(0) translateY(0) scale(1);
	}

	/* #others → 사이드바 */
	#header #others {
		position: fixed;
		top: 0;
		right: 0;
		left: auto;
		width: 300px;
		height: 100vh;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		padding: 80px 2rem 2rem;
		background: var(--bg-color);
		transform: translateX(100%);
		transition: transform 0.3s ease;
		gap: 0 !important;
		z-index: 1002;
		white-space: normal;
		overflow-y: auto;
	}

	#header #others a {
		width: 100%;
		text-align: left;
		padding: 1.5rem 0;
		font-size: 1.125rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	/* 사이드바 열림 */
	#header.menu-open #others {
		transform: translateX(0);
	}

	/* gap 애니메이션 비활성 (모바일에선 불필요) */
	#header:not(.scrolled) #others {
		gap: 0 !important;
	}
}

/* 공통: 모달 화면 중앙 정렬 (.show 있을 때만 flex 적용) */
#board-modal.modal.show,
#board-delete-modal.modal.show {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 100vh;
	padding: 1rem 0;
	color: #000;
}

/* 삭제 확인 모달: 다이얼로그 폭 + 확인 버튼 포커스 표시 */
#board-delete-modal .modal-dialog {
	width: 100%;
	max-width: min(420px, 92vw);
	margin: 0 auto;
}

#board-delete-modal #board-delete-confirm-btn:focus {
	box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.5);
}

/* 글 생성/수정 모달: 다이얼로그 크기 */
#board-modal .modal-dialog {
	width: 100%;
	max-width: min(640px, 94vw);
	margin: 0 auto;
}

#board-modal textarea[name='content'] {
	min-height: 200px;
	resize: vertical;
}

@media (min-width: 576px) {
	#board-modal textarea[name='content'] {
		min-height: 400px;
	}
}

@media (min-width: 576px) {
	#board-modal .modal-dialog {
		max-width: min(720px, 90vw);
	}
}

@media (min-width: 768px) {
	#board-modal .modal-dialog {
		max-width: 800px;
	}
}

/* 첨부파일 썸네일 리스트: 가로 스크롤 */
.board-files-thumbnails {
	min-height: 0;
}

.board-files-scroll {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.75rem;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.25rem 0;
	-webkit-overflow-scrolling: touch;
}

.board-file-thumb {
	position: relative;
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bs-secondary-bg, #e9ecef);
	border: 1px solid var(--bs-border-color, #dee2e6);
}

.board-file-thumb:hover .board-file-remove {
	opacity: 1;
}

.board-file-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 24px;
	height: 24px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	color: #fff;
	background: #dc3545;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 2;
}

.board-file-remove:hover {
	background: #c82333;
}

.board-file-preview-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.board-file-preview-ext {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	font-size: 10px;
	font-weight: 600;
	color: var(--bs-secondary-color, #6c757d);
	word-break: break-all;
	overflow: hidden;
	text-align: center;
}

/* FAQ 탭 스크롤 + 오른쪽 그라데이션 */
.nav-tabs-scroll {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}
.nav-tabs-scroll > .nav-tabs {
	padding-right: 50px;
}
.nav-tabs-scroll::after {
	content: '';
	position: absolute;
	right: 0;
	top: 0;
	width: 50px;
	height: 100%;
	pointer-events: none;
	background: linear-gradient(to right, transparent, var(--bg-color));
	z-index: 1;
}

/* BS5 툴팁 폰트 크기 */
.tooltip-inner {
	font-size: 0.9em;
}
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.3;
}

/* Simple Pagination */
.simple-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3rem;
}

.simple-pagination .sp-arrow {
	display: flex;
	align-items: center;
	transition: opacity 0.2s;
}

.simple-pagination .sp-arrow img {
	width: 48px;
	height: 48px;
}

.simple-pagination .sp-disabled {
	opacity: 0.15;
	pointer-events: none;
	cursor: default;
}

.simple-pagination .sp-fraction {
	display: inline-grid;
	grid-template-columns: auto auto auto;
	grid-template-rows: auto auto;
	align-items: end;
	gap: 0 2px;
	line-height: 1;
	font-size: 1.1rem;
	font-weight: 600;
}

.simple-pagination .sp-current {
	grid-column: 1;
	grid-row: 1;
	text-align: right;
	padding-bottom: 2px;
	margin-right: -5px;
	font-size: 1.5rem;
}

.simple-pagination .sp-slash {
	grid-column: 2;
	grid-row: 1 / 3;
	width: 1px;
	height: 2.6em;
	background: rgba(122, 122, 122, 0.35);
	transform: rotate(45deg);
	align-self: center;
	margin: 0 6px;
}

.simple-pagination .sp-total {
	grid-column: 3;
	grid-row: 2;
	text-align: left;
	padding-top: 2px;
	margin-left: -5px;
	font-size: 1.5rem;
	opacity: 0.7;
}

#footer {
	#address-info {
		font-size: 0.9rem;
		opacity: 0.7;
		img {
			opacity: 0.7;
		}
	}
}

label {
	margin-bottom: 0.25rem;
}

/* 폼 컨트롤: --point-color 적용 */
.form-control:focus,
.form-select:focus {
	border-color: var(--point-color);
	box-shadow: 0 0 0 0.25rem
		color-mix(in srgb, var(--point-color) 25%, transparent);
}

.form-check-input:checked {
	background-color: var(--point-color);
	border-color: var(--point-color);
}

.form-check-input:focus {
	border-color: var(--point-color);
	box-shadow: 0 0 0 0.25rem
		color-mix(in srgb, var(--point-color) 25%, transparent);
}

.form-range:focus::-webkit-slider-thumb {
	box-shadow: 0 0 0 0.25rem
		color-mix(in srgb, var(--point-color) 25%, transparent);
}

.form-range::-webkit-slider-thumb {
	background-color: var(--point-color);
}

.form-range::-moz-range-thumb {
	background-color: var(--point-color);
}

.form-switch .form-check-input:checked {
	background-color: var(--point-color);
	border-color: var(--point-color);
}

.mt-10 {
	margin-top: 10rem;
}

.portfolio-item {
	display: block;
	text-decoration: none;
	color: inherit;
	text-align: left;
	transition: all 0.3s ease;
	margin-bottom: 2rem;
	&:hover {
		color: inherit;
		.portfolio-thumb {
			img {
				transform: scale(1.1);
			}
		}
	}
	.portfolio-thumb {
		overflow: hidden;
		img {
			transition: all 0.3s ease;
			object-fit: cover;
		}
	}
	.portfolio-category {
		display: inline-block;
		font-size: 0.9rem;
		border-radius: 2rem;
		background: #fff;
		padding: 0.5rem 1rem;
		color: #444;
		margin-top: 2rem;
		margin-bottom: 0.75rem;
	}
	.portfolio-title {
		font-size: 1.5rem;
		font-weight: 600;
	}
}
