@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard-dynamic-subset.css");

/* ==========================================================
   SUNG et Associés — Journal
   Foster + Partners inspired
   Path: /www/css/journal.css
   Loaded by: journal.php, bbs_list.html, bbs_view.html, bbs_form.html
   ========================================================== */

/* ---------- Base tokens ---------- */
:root {
	--j-bg: #ffffff;
	--j-text: #212529;
	--j-muted: #4d4d4d;
	--j-light-muted: #767676;
	--j-line: #e5e5e5;
	--j-hairline: #eeeeee;
	--j-panel: #f5f5f5;
	--j-brand: #3058a8;      /* SUNG et Associés navy */
	--j-hero-h: 65vh;
	--j-col: 653px;          /* Foster narrow reading column */
	--j-col-offset: 120px;   /* asymmetric left offset */
	--j-block-gap: 48px;
	--j-font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* ---------- Wrapper ---------- */
.journal-wrap {
	font-family: var(--j-font);
	color: var(--j-text);
	background: var(--j-bg);
	line-height: 1.6;
	max-width: 100%;
}
.journal-wrap * { box-sizing: border-box; }
.journal-wrap a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
.journal-wrap a:hover { opacity: 0.65; }

/* ---------- Breadcrumb ---------- */
.journal-breadcrumb {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 40px 12px;
	font-size: 13px;
	color: var(--j-muted);
	letter-spacing: 0.02em;
}
.journal-breadcrumb a { color: var(--j-muted); }
.journal-breadcrumb .jbc-sep { margin: 0 8px; color: var(--j-light-muted); }
.journal-breadcrumb .jbc-current { color: var(--j-text); }

/* ==========================================================
   LIST PAGE
   ========================================================== */

.journal-header {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 40px 48px;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-bottom: 1px solid var(--j-line);
}
.journal-cate { font-size: 14px; color: var(--j-muted); }
.journal-total { font-size: 14px; color: var(--j-muted); letter-spacing: 0.05em; }
.journal-total .jt-num { color: var(--j-text); font-weight: 600; }

/* Article list — single column, large cards (Foster style) */
.journal-list {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

.journal-item {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	padding: 60px 0;
	border-bottom: 1px solid var(--j-line);
	align-items: center;
}
.journal-item:last-child { border-bottom: none; }

.ji-thumb-link { display: block; overflow: hidden; }
.ji-thumb {
	overflow: hidden;
	background: var(--j-panel);
	aspect-ratio: 4 / 3;
}
.ji-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}
.ji-thumb-link:hover .ji-thumb img { transform: scale(1.03); }

.ji-body { padding-right: 20px; }
.ji-title {
	font-size: 22px;
	font-weight: 500;
	line-height: 1.35;
	margin: 0 0 16px;
	color: var(--j-text);
	letter-spacing: -0.01em;
}
.ji-meta {
	font-size: 13px;
	color: var(--j-light-muted);
	margin-bottom: 20px;
	letter-spacing: 0.03em;
}
.ji-meta-sep { margin: 0 8px; }
.ji-cate {
	margin-left: 12px;
	padding: 3px 10px;
	background: var(--j-panel);
	color: var(--j-muted);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.ji-cate:empty { display: none; }

.ji-excerpt {
	font-size: 14px;
	line-height: 1.7;
	color: var(--j-muted);
	margin-bottom: 24px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ji-readmore {
	display: inline-block;
	font-size: 13px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--j-text);
	padding-bottom: 4px;
	border-bottom: 1px solid var(--j-text);
}
.ji-readmore:hover { opacity: 0.5; }

.ji-admin { grid-column: 1 / -1; text-align: right; font-size: 12px; color: var(--j-light-muted); }
.ji-admin:empty { display: none; }

/* Pagination */
.journal-pagination {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid var(--j-line);
}
.journal-pagination .jp-nav {
	text-align: center;
	flex: 1;
	font-size: 14px;
}
.journal-pagination .jp-nav a,
.journal-pagination .jp-nav span {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 2px;
	color: var(--j-muted);
}
.journal-pagination .jp-nav a:hover { color: var(--j-text); }
.journal-pagination .jp-nav strong,
.journal-pagination .jp-nav b { color: var(--j-text); font-weight: 600; }

/* Search */
.journal-search {
	max-width: 640px;
	margin: 40px auto 80px;
	padding: 0 40px;
	display: flex;
	gap: 8px;
	align-items: center;
}
.js-select, .js-input {
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--j-line);
	background: var(--j-bg);
	font-size: 14px;
	font-family: inherit;
	color: var(--j-text);
	outline: none;
	transition: border-color 0.2s;
}
.js-select { width: 120px; }
.js-input { flex: 1; }
.js-select:focus, .js-input:focus { border-color: var(--j-text); }
.js-btn {
	height: 44px;
	padding: 0 24px;
	background: var(--j-text);
	color: white;
	border: none;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	font-family: inherit;
	transition: opacity 0.2s;
}
.js-btn:hover { opacity: 0.8; }

/* ==========================================================
   VIEW PAGE (Detail)
   ========================================================== */

/* Hero — 65vh (홈페이지와 어우러지게 크기 조절) */
.journal-hero {
	position: relative;
	width: 100%;
	height: var(--j-hero-h);
	min-height: 480px;
	overflow: hidden;
	margin-bottom: 60px;
}
.jh-image, .jh-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.jh-image { z-index: 1; }
.jh-image img { display: block; }

.jh-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.75) 100%);
	z-index: 2;
	pointer-events: none;
}

.jh-caption {
	position: absolute;
	left: 56px;
	bottom: 48px;
	right: 56px;
	z-index: 3;
	color: white;
	max-width: 700px;
}
.jh-date {
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0 0 14px;
	opacity: 0.9;
}
.jh-title {
	font-size: 28px;
	font-weight: 500;
	line-height: 1.35;
	margin: 0;
	letter-spacing: -0.01em;
	text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}

/* Text-only hero (no images) */
.journal-hero-text {
	height: auto;
	min-height: 0;
	margin-bottom: 60px;
	padding: 80px 0 40px;
	border-bottom: 1px solid var(--j-line);
}
.jh-caption-text {
	position: static;
	color: var(--j-text);
	max-width: var(--j-col);
	margin: 0 auto 0 var(--j-col-offset);
	padding: 0 40px;
}
.jh-caption-text .jh-date { color: var(--j-muted); }
.jh-caption-text .jh-title { text-shadow: none; }

/* Article body */
.journal-article {
	max-width: var(--j-col);
	margin: 0 auto 0 var(--j-col-offset);
	padding: 0 40px 80px;
}

.ja-topmeta {
	font-size: 13px;
	color: var(--j-muted);
	letter-spacing: 0.02em;
	margin-bottom: var(--j-block-gap);
	padding-bottom: 24px;
	border-bottom: 1px solid var(--j-line);
}
.ja-by { color: var(--j-light-muted); }
.ja-author { color: var(--j-text); font-weight: 600; margin-left: 4px; }
.ja-meta-sep { margin: 0 10px; color: var(--j-light-muted); }

/* Content block — CKEditor 산출물 스타일 지정 */
.ja-content {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.85;
	color: var(--j-text);
}
.ja-content > * + * { margin-top: var(--j-block-gap); }
.ja-content p { margin: 0; }
.ja-content h2 {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	margin-top: calc(var(--j-block-gap) * 1.5);
}
.ja-content h3 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	margin-top: var(--j-block-gap);
}
.ja-content a { color: var(--j-brand); border-bottom: 1px solid currentColor; }
.ja-content a:hover { opacity: 0.7; }
.ja-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: var(--j-block-gap) 0;
}
.ja-content blockquote {
	background: var(--j-panel);
	padding: 28px 32px;
	margin: var(--j-block-gap) 0;
	border-left: none;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--j-text);
	font-style: normal;
}
.ja-content blockquote cite,
.ja-content blockquote footer {
	display: block;
	margin-top: 16px;
	font-size: 14px;
	font-weight: 600;
	font-style: normal;
	color: var(--j-muted);
}
.ja-content ul, .ja-content ol {
	padding-left: 24px;
	margin: var(--j-block-gap) 0;
}
.ja-content li + li { margin-top: 8px; }
.ja-content figure {
	margin: var(--j-block-gap) 0;
}
.ja-content figcaption {
	background: var(--j-panel);
	padding: 24px 32px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--j-muted);
}

/* Additional gallery (첫 이미지 이외의 이미지) */
.ja-gallery {
	margin-top: calc(var(--j-block-gap) * 1.5);
}
.ja-fig {
	margin: var(--j-block-gap) 0;
}
.ja-fig img {
	max-width: 100%;
	height: auto;
	display: block;
}
.ja-figcaption {
	background: var(--j-panel);
	padding: 24px 32px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--j-muted);
}

/* Social share */
.ja-share {
	margin-top: calc(var(--j-block-gap) * 1.5);
	padding-top: var(--j-block-gap);
	border-top: 1px solid var(--j-line);
	display: flex;
	align-items: center;
	gap: 12px;
}
.js-label {
	font-size: 12px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--j-muted);
	margin-right: 8px;
}
.ja-share .js-btn {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	background: var(--j-text);
	color: white;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-transform: none;
	letter-spacing: 0;
}
.ja-share .js-btn:hover { opacity: 0.75; }

/* Author block */
.ja-authorblock {
	margin-top: calc(var(--j-block-gap) * 1.5);
	padding-top: var(--j-block-gap);
	border-top: 1px solid var(--j-line);
}
.ja-authorlabel {
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--j-muted);
	margin: 0 0 8px;
	font-weight: 400;
}
.ja-authorname {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	color: var(--j-text);
}

.ja-admin-actions {
	margin-top: 40px;
	text-align: right;
	font-size: 12px;
}
.ja-admin-actions:empty { display: none; }

/* Prev / Next / Back nav */
.ja-nav {
	margin-top: calc(var(--j-block-gap) * 1.5);
	padding-top: var(--j-block-gap);
	border-top: 1px solid var(--j-line);
}
.ja-backlink {
	display: inline-block;
	font-size: 13px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--j-text);
	margin-bottom: 24px;
}
.ja-arrow { display: inline-block; margin-right: 8px; transition: transform 0.2s; }
.ja-backlink:hover .ja-arrow { transform: translateX(-4px); }
.ja-prevnext {
	font-size: 13px;
	color: var(--j-muted);
	line-height: 1.7;
}

/* Comments */
.journal-comments {
	max-width: var(--j-col);
	margin: 0 auto 80px var(--j-col-offset);
	padding: 60px 40px 0;
	border-top: 1px solid var(--j-line);
}
.jc-title { font-size: 20px; font-weight: 600; margin: 0 0 32px; }
.jc-num { color: var(--j-muted); font-weight: 300; }
.jc-form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.jc-input {
	flex: 1;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--j-line);
	font-family: inherit;
	font-size: 14px;
	outline: none;
}
.jc-input:focus { border-color: var(--j-text); }
.jc-textarea {
	width: 100%;
	min-height: 100px;
	padding: 16px;
	border: 1px solid var(--j-line);
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	outline: none;
	margin-bottom: 12px;
}
.jc-textarea:focus { border-color: var(--j-text); }
.jc-submit {
	background: var(--j-text);
	color: white;
	border: none;
	padding: 12px 28px;
	font-size: 12px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	cursor: pointer;
	font-family: inherit;
}
.jc-submit:hover { opacity: 0.8; }

.jc-list { margin-top: 48px; }
.jc-item {
	padding: 24px 0;
	border-bottom: 1px solid var(--j-line);
}
.jc-item-head {
	font-size: 13px;
	color: var(--j-muted);
	margin-bottom: 8px;
}
.jc-name { font-weight: 600; color: var(--j-text); margin-right: 12px; }
.jc-item-content {
	font-size: 15px;
	line-height: 1.7;
}

/* ==========================================================
   FORM PAGE (Write / Edit)
   ========================================================== */

.journal-form-title {
	max-width: var(--j-col);
	margin: 20px auto 40px var(--j-col-offset);
	padding: 0 40px;
	font-size: 28px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.journal-form {
	max-width: var(--j-col);
	margin: 0 auto 80px var(--j-col-offset);
	padding: 0 40px;
}

.jf-row {
	margin-bottom: 32px;
}
.jf-row-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}
.jf-col label { display: block; }
.jf-label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--j-muted);
	margin-bottom: 10px;
	font-weight: 400;
}
.jf-field { display: block; }
.jf-input, .jf-select, .jf-textarea {
	width: 100%;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--j-line);
	background: var(--j-bg);
	font-family: inherit;
	font-size: 15px;
	color: var(--j-text);
	outline: none;
	transition: border-color 0.2s;
}
.jf-input:focus, .jf-select:focus, .jf-textarea:focus { border-color: var(--j-text); }
.jf-input-title { font-size: 18px; font-weight: 300; height: 56px; }
.jf-textarea { height: auto; padding: 16px; line-height: 1.6; resize: vertical; }
.jf-input-email { width: 180px; display: inline-block; }
.jf-select { width: auto; padding: 0 12px; }
.jf-email { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.jf-files { padding: 20px; background: var(--j-panel); }
.jf-hint {
	margin-top: 12px;
	font-size: 12px;
	color: var(--j-muted);
	font-style: italic;
}

.jf-btn-refresh {
	height: 44px;
	padding: 0 16px;
	background: white;
	border: 1px solid var(--j-line);
	font-size: 12px;
	cursor: pointer;
	margin-left: 8px;
}

.jf-actions {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--j-line);
	display: flex;
	gap: 12px;
	justify-content: flex-end;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1024px) {
	.journal-article,
	.journal-comments,
	.journal-form,
	.journal-form-title,
	.jh-caption-text {
		margin-left: auto;
		margin-right: auto;
		max-width: 720px;
	}
}

@media (max-width: 768px) {
	.jh-title { font-size: 22px; }
	.jh-caption { left: 24px; right: 24px; bottom: 32px; max-width: none; }
	.jh-date { font-size: 11px; margin-bottom: 10px; }
	.journal-hero { min-height: 420px; }

	.journal-item {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 40px 0;
	}
	.ji-title { font-size: 20px; }

	.journal-header,
	.journal-list,
	.journal-pagination,
	.journal-search,
	.journal-breadcrumb {
		padding-left: 24px;
		padding-right: 24px;
	}

	.journal-article,
	.journal-comments,
	.journal-form,
	.journal-form-title {
		padding-left: 24px;
		padding-right: 24px;
	}

	.jf-row-split { grid-template-columns: 1fr; }

	.journal-pagination {
		flex-direction: column;
		gap: 20px;
	}
}

/* ==========================================================
   SLIDER (Swiper - 첨부 2~4장)
   ========================================================== */
.ja-slider-wrap {
	margin-top: calc(var(--j-block-gap) * 1.5);
	margin-bottom: var(--j-block-gap);
}
.journal-swiper {
	width: 100%;
	position: relative;
	background: var(--j-panel);
}
.journal-swiper .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--j-panel);
	aspect-ratio: 16 / 10;
	overflow: hidden;
}
.journal-swiper .swiper-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	cursor: zoom-in;
	transition: transform 0.4s ease;
}
.journal-swiper .swiper-slide img:hover { transform: scale(1.02); }

.journal-swiper .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: var(--j-text);
	opacity: 0.3;
}
.journal-swiper .swiper-pagination-bullet-active { opacity: 1; }

.journal-swiper .swiper-button-prev,
.journal-swiper .swiper-button-next {
	width: 48px;
	height: 48px;
	background: rgba(255,255,255,0.9);
	border-radius: 50%;
	color: var(--j-text);
	transition: background 0.2s;
}
.journal-swiper .swiper-button-prev:hover,
.journal-swiper .swiper-button-next:hover {
	background: white;
}
.journal-swiper .swiper-button-prev:after,
.journal-swiper .swiper-button-next:after {
	font-size: 18px;
	font-weight: 600;
}

/* ==========================================================
   LIGHTBOX (Foster+Partners style — 흰색 배경)
   ========================================================== */
.j-lightbox[hidden] { display: none !important; }
.j-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, 0.98);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px;
	animation: jLbFadeIn 0.2s ease;
}
@keyframes jLbFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
.j-lb-stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.j-lb-stage img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	cursor: zoom-out;
}
.j-lb-close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #f5f5f5;
	color: #212529;
	border: none;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
	z-index: 10001;
}
.j-lb-close:hover { background: #e5e5e5; }

.j-lb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #f5f5f5;
	color: #212529;
	border: none;
	font-size: 32px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
	z-index: 10001;
	padding-bottom: 4px;
}
.j-lb-prev { left: 24px; }
.j-lb-next { right: 24px; }
.j-lb-nav:hover { background: #e5e5e5; }
.j-lb-nav[disabled] { opacity: 0.3; cursor: default; pointer-events: none; }

.j-lb-counter {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 13px;
	letter-spacing: 0.1em;
	color: #767676;
	background: rgba(255,255,255,0.9);
	padding: 6px 16px;
	border-radius: 20px;
}

/* 본문 이미지에 확대 아이콘 힌트 표시 */
.ja-content img,
.ja-content [data-lightbox],
.journal-hero .jh-image img[data-lightbox],
.journal-swiper .swiper-slide img[data-lightbox] {
	cursor: zoom-in;
}
.ja-content .ja-zoomable {
	position: relative;
	display: inline-block;
}

/* Foster 스타일 확대 힌트 아이콘 (본문 이미지 hover 시) */
.j-zoom-badge {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,0.9);
	color: #212529;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	opacity: 0;
	transition: opacity 0.2s;
	pointer-events: none;
	z-index: 5;
}
.ja-zoomable:hover .j-zoom-badge { opacity: 1; }

@media (max-width: 768px) {
	.j-lightbox { padding: 20px; }
	.j-lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
	.j-lb-nav { width: 44px; height: 44px; font-size: 24px; }
	.j-lb-prev { left: 8px; }
	.j-lb-next { right: 8px; }
}
