:root {
	--blue: #1577a9;
	--blue-dark: #0a3f5d;
	--text: #111827;
	--gray: #6b7280;
	--soft: #8a94a6;
	--line: #e3e8f0;
	--danger: #d14343;
	--success: #0b8f61;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	background: #ffffff;
	color: var(--text);
	font-family:
		"Pretendard",
		-apple-system,
		BlinkMacSystemFont,
		system-ui,
		sans-serif;
}

body {
	min-width: 0;
}

body.modal-open {
	overflow: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea {
	font-family: inherit;
}

button {
	cursor: pointer;
}

.container {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ========================================
SUB VISUAL
======================================== */

.sub-visual {
	position: relative;
	width: 100%;
	height: 260px;
	padding-top: 80px;
	overflow: hidden;
	color: #ffffff;
	background: linear-gradient(120deg, #0a3f5d 0%, #1577a9 48%, #08334c 100%);
	background-size: 220% 220%;
	animation: subGradient 16s ease-in-out infinite;
}

.sub-visual::before {
	content: "";
	position: absolute;
	inset: -35%;
	z-index: 1;

	background: radial-gradient(circle at 18% 42%, rgba(69, 188, 232, 0.34), transparent 46%),
		radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.16), transparent 42%),
		linear-gradient(135deg, rgba(7, 17, 32, 0.16), rgba(7, 17, 32, 0.38));

	pointer-events: none;
}

@keyframes subGradient {
	0%,
	100% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}
}

.sub-visual-inner {
	position: relative;
	z-index: 2;
	height: 100%;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	text-align: center;
}

.breadcrumb {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;

	margin-bottom: 18px;

	color: rgba(255, 255, 255, 0.74);

	font-size: 12px;
}

.breadcrumb-divider {
	width: 4px;
	height: 4px;

	border-top: 1px solid rgba(255, 255, 255, 0.58);

	border-right: 1px solid rgba(255, 255, 255, 0.58);

	transform: rotate(45deg);
}

.breadcrumb-current {
	color: #ffffff;
	font-weight: 700;
}

.sub-title {
	margin: 0;

	color: #ffffff;

	font-size: 42px;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.045em;
}

/* ========================================
CONTENT
======================================== */

.inquiry-container {
	width: 100%;
	max-width: 1040px;

	margin: 0 auto;

	padding: 88px 24px 112px;
}

.page-heading {
	margin-bottom: 34px;
}

.page-label {
	display: block;

	margin-bottom: 14px;

	color: var(--blue);

	font-size: 13px;
	font-weight: 800;
}

.page-heading h2 {
	margin: 0;

	color: #111827;

	font-size: 34px;
	line-height: 1.42;
	font-weight: 800;
	letter-spacing: -0.055em;
}

.page-heading p {
	margin: 12px 0 0;

	color: var(--gray);

	font-size: 15px;
	line-height: 1.7;
}

/* ========================================
TOOLBAR
======================================== */

.board-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;

	margin-bottom: 18px;
}

/* ========================================
BUTTON
======================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 44px;

	padding: 0 22px;

	border: 1px solid transparent;

	border-radius: 999px;

	background: transparent;

	font-size: 14px;
	font-weight: 800;
	line-height: 1;

	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-primary {
	border-color: var(--blue);
	background: var(--blue);
	color: #ffffff;
}

.btn-primary:hover {
	border-color: var(--blue-dark);
	background: var(--blue-dark);
}

.btn-dark {
	border-color: #111827;
	background: #111827;
	color: #ffffff;
}

.btn-dark:hover {
	border-color: var(--blue);
	background: var(--blue);
}

.btn-line {
	border-color: #d8dee8;
	background: #ffffff;
	color: #374151;
}

.btn-line:hover {
	border-color: var(--blue);
	color: var(--blue);
}

.btn-danger {
	border-color: #f1caca;
	background: #ffffff;
	color: var(--danger);
}

.btn-danger:hover {
	border-color: var(--danger);
	background: #fff7f7;
}

/* ========================================
BADGE
======================================== */

.badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 26px;

	padding: 0 10px;

	border-radius: 999px;

	font-size: 12px;
	font-weight: 800;

	white-space: nowrap;
}

.badge.done {
	background: #eaf8f2;
	color: var(--success);
}

.badge.wait {
	background: #f1f3f6;
	color: #7a8494;
}

/* ========================================
TABLE
======================================== */

.board-table {
	width: 100%;

	border-collapse: collapse;
	border-top: 1px solid #111827;

	table-layout: fixed;
}

.board-table th {
	padding: 15px 12px;

	border-bottom: 1px solid var(--line);

	color: var(--gray);

	font-size: 13px;
	font-weight: 700;

	text-align: center;
}

.board-table td {
	padding: 21px 12px;

	border-bottom: 1px solid var(--line);

	color: #374151;

	font-size: 14px;
	line-height: 1.6;

	text-align: center;
}

.board-table tbody tr {
	cursor: pointer;

	transition: background-color 0.2s ease;
}

.board-table tbody tr:hover {
	background: #fafcfe;
}

.col-no {
	width: 70px;
}

.col-name {
	width: 105px;
}

.col-status {
	width: 110px;
}

.col-date {
	width: 115px;
}

.title-cell {
	text-align: left !important;
}

.title-button {
	display: block;

	width: 100%;
	max-width: 100%;

	padding: 0;

	overflow: hidden;

	border: 0;

	background: transparent;

	color: #111827;

	font-size: 14px;
	line-height: 1.6;
	font-weight: 600;

	text-align: left;

	text-overflow: ellipsis;
	white-space: nowrap;

	transition: color 0.2s ease;
}

.board-table tbody tr:hover .title-button {
	color: var(--blue);
}

/* ========================================
PAGINATION
======================================== */

.list-bottom {
	display: flex;
	justify-content: center;

	margin-top: 30px;
}

.page-link {
	position: relative;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-width: 24px;
	min-height: 30px;

	color: var(--blue);

	font-size: 14px;
	font-weight: 700;
}

.page-link::after {
	content: "";

	position: absolute;

	left: 50%;
	bottom: 0;

	width: 18px;
	height: 2px;

	border-radius: 999px;

	background: var(--blue);

	transform: translateX(-50%);
}

/* ========================================
MODAL
======================================== */

.modal {
	position: fixed;

	inset: 0;

	z-index: 100000;

	display: none;

	align-items: center;
	justify-content: center;

	padding: 24px;
}

.modal.active {
	display: flex;
}

.modal-backdrop {
	position: absolute;

	inset: 0;

	background: rgba(5, 12, 22, 0.62);

	backdrop-filter: blur(3px);
}

.modal-panel {
	position: relative;

	z-index: 1;

	width: min(780px, 100%);
	max-height: calc(100% - 48px);

	overflow-y: auto;

	border-radius: 16px;

	background: #ffffff;

	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);

	animation: modalIn 0.24s ease both;
}

@keyframes modalIn {
	from {
		opacity: 0;

		transform: translateY(12px) scale(0.985);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.modal-header {
	position: sticky;

	top: 0;

	z-index: 2;

	display: flex;
	align-items: flex-start;
	justify-content: space-between;

	gap: 20px;

	padding: 27px 30px 23px;

	border-bottom: 1px solid var(--line);

	background: rgba(255, 255, 255, 0.97);

	backdrop-filter: blur(10px);
}

.modal-header-text {
	min-width: 0;
}

.modal-label {
	display: block;

	margin-bottom: 8px;

	color: var(--blue);

	font-size: 12px;
	font-weight: 800;
}

.modal-title {
	margin: 0;

	color: #111827;

	font-size: 24px;
	line-height: 1.45;
	font-weight: 800;

	letter-spacing: -0.035em;

	word-break: keep-all;
	overflow-wrap: break-word;
}

.modal-close {
	flex-shrink: 0;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 42px;
	height: 42px;

	padding: 0;

	border: 0;
	border-radius: 50%;

	background: #f4f6f8;

	color: #4b5563;

	font-size: 17px;

	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.modal-close:hover {
	background: #e9edf2;
	color: #111827;
}

.modal-body {
	padding: 28px 30px 32px;
}

/* ========================================
DETAIL
======================================== */

.detail-info {
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	padding-bottom: 18px;

	border-bottom: 1px solid var(--line);

	color: #778090;

	font-size: 13px;
}

.detail-info span + span::before {
	content: "";

	display: inline-block;

	width: 1px;
	height: 11px;

	margin: 0 12px;

	background: #d7dce4;

	vertical-align: -1px;
}

/*
* 중요:
* pre-wrap 사용 시 HTML 소스의 들여쓰기까지
* 그대로 표현될 수 있으므로 pre-line 사용
*/
.detail-content {
	min-height: 190px;

	padding: 30px 0;

	color: #374151;

	font-size: 15px;
	line-height: 1.9;

	white-space: pre-line;

	word-break: keep-all;
	overflow-wrap: break-word;
}

/* ========================================
관리자 답변
======================================== */

.answer-area {
	padding: 24px;

	border-radius: 12px;

	background: #f7fafc;
}

.answer-top {
	display: flex;
	align-items: center;
	justify-content: space-between;

	gap: 16px;

	margin-bottom: 14px;
}

.answer-title {
	display: flex;
	align-items: center;

	gap: 8px;

	margin: 0;

	color: #111827;

	font-size: 15px;
	font-weight: 800;
}

.answer-title i {
	color: var(--blue);
}

.answer-date {
	color: #98a1af;

	font-size: 12px;
}

/*
* 관리자 답변도 동일하게
* 사용자가 입력한 줄바꿈만 유지
*/
.answer-content {
	color: #4b5563;

	font-size: 14px;
	line-height: 1.8;

	white-space: pre-line;

	word-break: keep-all;
	overflow-wrap: break-word;
}

.answer-empty {
	color: #8a94a6;

	font-size: 14px;
	line-height: 1.7;
}

.answer-buttons {
	display: none;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;

	gap: 7px;

	margin-top: 18px;
}
.answer-buttons.active { display: flex; }

.detail-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;

	gap: 8px;

	margin-top: 25px;

	padding-top: 24px;

	border-top: 1px solid var(--line);
}

/* ========================================
FORM
======================================== */

.form-table {
	border-top: 1px solid #111827;
}

.form-row {
	display: grid;

	grid-template-columns:
		140px
		minmax(0, 1fr);

	min-height: 72px;

	border-bottom: 1px solid var(--line);
}

.form-label {
	display: flex;
	align-items: center;

	padding: 18px 20px;

	background: #fafbfc;

	color: #374151;

	font-size: 14px;
	font-weight: 800;
}

.required {
	margin-left: 4px;

	color: var(--blue);
}

.form-control {
	display: flex;
	align-items: center;

	min-width: 0;

	padding: 13px 18px;
}

.text-input,
.textarea-input {
	width: 100%;

	border: 1px solid #dde3ec;

	border-radius: 8px;

	outline: 0;

	background: #ffffff;

	color: #111827;

	font-size: 14px;

	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.text-input {
	height: 40px;

	padding: 0 14px;
}

.textarea-input {
	/*min-height: 200px;*/
	height: 150px;

	padding: 14px;

	line-height: 1.7;

	resize: vertical;
}

.text-input:focus,
.textarea-input:focus {
	border-color: rgba(21, 119, 169, 0.62);

	box-shadow: 0 0 0 4px rgba(21, 119, 169, 0.07);
}

.form-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;

	gap: 8px;

	margin-top: 24px;
}

/* ========================================
MOBILE
======================================== */

@media (max-width: 768px) {
	.sub-visual {
		height: 220px;
		padding-top: 64px;
	}

	.sub-title {
		font-size: 34px;
	}

	.inquiry-container {
		padding: 60px 20px 80px;
	}

	.page-heading h2 {
		font-size: 28px;
	}

	.page-heading p {
		font-size: 14px;
	}

	.board-table th,
	.board-table td {
		padding: 16px 7px;

		font-size: 13px;
	}

	.col-no {
		width: 50px;
	}

	.col-name {
		width: 80px;
	}

	.col-status {
		width: 90px;
	}

	.col-date {
		width: 95px;
	}

	.modal-header {
		padding: 22px 22px 18px;
	}

	.modal-body {
		padding: 22px;
	}

	.modal-title {
		font-size: 21px;
	}
}

@media (max-width: 520px) {
	.container {
		padding: 0 18px;
	}

	.sub-visual {
		height: 200px;
	}

	.sub-title {
		font-size: 30px;
	}

	.breadcrumb {
		margin-bottom: 14px;
	}

	.inquiry-container {
		padding: 48px 16px 70px;
	}

	.page-label {
		margin-bottom: 10px;
	}

	.page-heading h2 {
		font-size: 24px;
	}

	.page-heading p {
		margin-top: 8px;

		font-size: 13px;
	}

	/*
 * 모바일 게시판
 */

	.board-table thead {
		display: none;
	}

	.board-table,
	.board-table tbody,
	.board-table tr,
	.board-table td {
		display: block;

		width: 100%;
	}

	.board-table {
		border-top: 1px solid #111827;
	}

	.board-table tbody tr {
		padding: 17px 8px;

		border-bottom: 1px solid var(--line);
	}

	.board-table td {
		padding: 0;

		border: 0;

		text-align: left;
	}

	.board-table td:first-child {
		display: none;
	}

	.board-table .title-cell {
		margin-bottom: 10px;
	}

	.title-button {
		font-size: 14px;
	}

	.writer-cell,
	.status-cell,
	.date-cell {
		display: inline-block !important;

		width: auto !important;

		margin-right: 10px;

		color: #8a94a6 !important;

		font-size: 12px !important;
	}

	/*
 * 모바일 모달
 */

	.modal {
		align-items: flex-end;

		padding: 14px;
	}

	.modal-panel {
		width: 100%;
		max-height: calc(100% - 28px);

		border-radius: 16px;
	}

	.modal-header {
		padding: 20px 18px 17px;
	}

	.modal-body {
		padding: 20px 18px 24px;
	}

	.modal-title {
		font-size: 19px;
	}

	.detail-content {
		min-height: 160px;

		padding: 24px 0;

		font-size: 14px;
		line-height: 1.8;
	}

	.answer-area {
		padding: 18px;
	}

	.answer-top {
		display: block;
	}

	.answer-date {
		display: block;

		margin-top: 7px;
	}

	/*
 * 모바일 폼
 */

	.form-row {
		display: block;

		min-height: 0;
	}

	.form-label {
		padding: 13px 14px;
	}

	.form-control {
		padding: 12px 0 18px;
	}

	.text-input,
	.textarea-input {
		font-size: 16px;
	}

	.answer-buttons,
	.detail-actions,
	.form-actions {
		justify-content: center;
	}

	.btn {
		min-height: 42px;

		padding: 0 17px;

		font-size: 13px;
	}
}
