@charset "UTF-8";

/* 농원 원페이지 — 구조용 (디자인은 이후 작업) */
.farm-page-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin: 0 0 2rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid #ddd;
}

.farm-page-nav a {
	color: inherit;
	text-decoration: none;
}

.farm-section {
	padding: 3rem 0;
	scroll-margin-top: 6rem;
}

.farm-section + .farm-section {
	border-top: 1px solid #eee;
}

.farm-section-title {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
}

.farm-section-desc {
	margin: 0 0 1.5rem;
	color: #666;
}

.farm-award-tablist {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.farm-award-tab {
	padding: 0.5rem 1rem;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
}

.farm-award-tab.is-active {
	border-color: #333;
	font-weight: 700;
}

.farm-award-panel {
	display: none;
}

.farm-award-panel.is-active {
	display: block;
}

.farm-award-admin-hint {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: #666;
}

.farm-award-admin-hint a {
	color: #1a5fb4;
	text-decoration: underline;
}

.farm-award-panel-title {
	margin: 0 0 1rem;
	font-size: 1.125rem;
}

.farm-award-empty {
	margin: 0;
	color: #888;
	font-size: 0.95rem;
}

.farm-award-list {
	margin: 0;
	padding-left: 1.25rem;
	list-style: disc;
}

.farm-award-list li {
	margin: 0.4rem 0;
	line-height: 1.6;
	color: #333;
}

.farm-section-head-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.farm-edit-btn {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.85rem;
	border: 1px solid #333;
	background: #fff;
	color: #333;
	font-size: 0.875rem;
	cursor: pointer;
}

.farm-edit-btn--primary {
	background: #222;
	color: #fff;
	border-color: #222;
}

.farm-edit-btn--ghost {
	border-color: #bbb;
	color: #555;
}

.farm-edit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

body.farm-edit-open {
	overflow: hidden;
}

.farm-edit-modal[hidden] {
	display: none !important;
}

.farm-edit-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
}

/* Summernote 링크/이미지 창이 수정 모달(z-index 10050) 뒤에 가리지 않게 */
body.farm-edit-open .note-modal-backdrop,
body.farm-edit-open .modal-backdrop {
	z-index: 10100 !important;
	position: fixed !important;
}

body.farm-edit-open .note-modal,
body.farm-edit-open .note-editor .modal,
body.farm-edit-open > .modal {
	z-index: 10110 !important;
	position: fixed !important;
}

body.farm-edit-open .note-modal .close,
body.farm-edit-open .note-modal-content .close,
body.farm-edit-open .modal-content .close {
	position: relative;
	z-index: 2;
	float: right;
	width: 2rem;
	height: 2rem;
	padding: 0;
	margin: -0.35rem 0 0;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.65;
}

body.farm-edit-open .note-modal .close:hover,
body.farm-edit-open .modal-content .close:hover {
	opacity: 1;
}

.farm-edit-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.farm-edit-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(920px, calc(100% - 2rem));
	max-height: calc(100vh - 2rem);
	margin: 1rem auto;
	background: #fff;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.farm-edit-modal__header,
.farm-edit-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid #eee;
}

.farm-edit-modal__footer {
	border-bottom: 0;
	border-top: 1px solid #eee;
	justify-content: flex-end;
}

.farm-edit-modal__x {
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.farm-edit-modal__body {
	padding: 1rem;
	overflow: auto;
}

.farm-edit-field {
	margin-bottom: 1rem;
}

.farm-edit-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.farm-edit-input,
.farm-edit-textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid #ccc;
	box-sizing: border-box;
}

.farm-edit-hint {
	margin: 0.35rem 0 0;
	font-size: 0.8rem;
	color: #777;
}

.farm-map-frame {
	min-height: 280px;
	background: #f0f0f0;
	margin-bottom: 1.25rem;
	overflow: hidden;
}

.farm-map-frame iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 400px;
	border: 0;
}

.farm-map-info {
	margin: 0;
}

.farm-map-info > div {
	display: grid;
	grid-template-columns: 4rem 1fr;
	gap: 0.5rem 1rem;
	margin-bottom: 0.5rem;
}

.farm-map-info dt {
	font-weight: 700;
}

.farm-map-info dd {
	margin: 0;
}

/* ========================================
	농원안내 페이지 디자인
======================================== */
:root {
	--farm-green: #176b47;
	--farm-green-dark: #0f5638;
	--farm-green-soft: #edf6f0;
	--farm-cream: #f8f7f2;
	--farm-line: #e2e7e3;
	--farm-text: #202622;
	--farm-muted: #68716b;
}

.farm-page-nav,
.farm-page {
	width: min(1180px, calc(100% - 40px));
	margin-right: auto;
	margin-left: auto;
}

.farm-page-nav {
	position: sticky;
	top: 0;
	z-index: 20;
	justify-content: center;
	gap: 0;
	margin-top: 38px;
	margin-bottom: 0;
	padding: 7px;
	border: 1px solid var(--farm-line);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 10px 35px rgba(20, 65, 43, 0.07);
	backdrop-filter: blur(12px);
}

.farm-page-nav a {
	position: relative;
	flex: 1 1 0;
	padding: 14px 24px;
	border-radius: 11px;
	color: #4e5852;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	transition: color 0.2s ease, background 0.2s ease;
}

.farm-page-nav a + a::before {
	position: absolute;
	top: 50%;
	left: 0;
	width: 1px;
	height: 18px;
	background: var(--farm-line);
	content: '';
	transform: translateY(-50%);
}

.farm-page-nav a:hover,
.farm-page-nav a:focus-visible {
	background: var(--farm-green-soft);
	color: var(--farm-green-dark);
	text-decoration: none;
}

.farm-page {
	padding: 0px 0 0px;
}

.farm-section {
	padding: 72px 0;
	scroll-margin-top: 90px;
}

.farm-section + .farm-section {
	border-top-color: var(--farm-line);
}

.farm-section-inner {
	position: relative;
}

.farm-section-head {
	margin-bottom: 32px;
}

.farm-section-head::before {
	display: block;
	margin-bottom: 9px;
	color: var(--farm-green);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.farm-intro .farm-section-head::before {
	content: '자연이 주는 작은 행복';
}

.farm-awards .farm-section-head::before {
	content: '노력이 만들어낸 믿음';
}

.farm-map .farm-section-head::before {
	content: '언제든지 놀러오세요';
}

.farm-section-title {
	margin: 0;
	color: #111713;
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.055em;
}

.farm-section-body {
	color: var(--farm-text);
	font-size: 16px;
	line-height: 1.85;
	word-break: keep-all;
}

.farm-section-body::after {
	display: block;
	clear: both;
	content: '';
}

.farm-section-body p:first-child {
	margin-top: 0;
}

.farm-section-body p:last-child {
	margin-bottom: 0;
}

.farm-section-body img {
	max-width: 100%;
	height: auto;
	border-radius: 18px;
}

/* 농원 소개 본문 */
.farm-intro .farm-section-body {
	min-height: 240px;
	padding: clamp(28px, 5vw, 58px);
	border: 1px solid var(--farm-line);
	border-radius: 24px;
	background:
		linear-gradient(115deg, rgba(237, 246, 240, 0.9), rgba(255, 255, 255, 0.95)),
		#fff;
	box-shadow: 0 20px 55px rgba(22, 75, 48, 0.07);
}

.farm-intro .farm-section-body h2,
.farm-intro .farm-section-body h3 {
	color: var(--farm-green-dark);
	letter-spacing: -0.04em;
}

/* 수상경력 */
.farm-award-admin-hint {
	padding: 12px 16px;
	border-radius: 10px;
	background: #f4f6f4;
	color: var(--farm-muted);
}

.farm-award-admin-hint a {
	color: var(--farm-green-dark);
}

.farm-award-tabs {
	padding: clamp(22px, 3vw, 34px);
	border: 1px solid var(--farm-line);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(22, 75, 48, 0.06);
}

.farm-award-tablist {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 30px;
	padding: 6px;
	border-radius: 14px;
	background: #f2f5f3;
}

.farm-award-tab {
	width: 100%;
	padding: 13px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #647068;
	font-size: 14px;
	font-weight: 700;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.farm-award-tab:hover {
	color: var(--farm-green-dark);
}

.farm-award-tab.is-active {
	border-color: transparent;
	background: var(--farm-green);
	box-shadow: 0 7px 18px rgba(23, 107, 71, 0.2);
	color: #fff;
}

.farm-award-panel-title {
	margin-bottom: 18px;
	color: var(--farm-green-dark);
	font-size: 20px;
	font-weight: 800;
}

.farm-award-list {
	display: grid;
	gap: 10px;
	padding: 0;
	list-style: none;
}

.farm-award-list li {
	position: relative;
	margin: 0;
	padding: 4px 20px 4px 48px;
	border: 1px solid #e7ebe8;
	border-radius: 12px;
	background: #fbfcfb;
	color: #303833;
	line-height: 1.6;
}

.farm-award-list li::before {
	position: absolute;
	top: 18px;
	left: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 0px;
	border-radius: 50%;
	background: var(--farm-green-soft);
	color: var(--farm-green);
	font-size: 11px;
	font-weight: 900;
	content: '✓';
}

.farm-award-empty {
	padding: 55px 20px;
	border: 1px dashed #ccd7d0;
	border-radius: 12px;
	background: #fafcfb;
	text-align: center;
}

/* 약도 */
.farm-page > .farm-map {
	background: #fdfcf9 !important;
}

.farm-map .farm-section-body {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
	gap: 24px;
	align-items: stretch;
}

.farm-map-frame {
	grid-row: 1 / -1;
	min-height: 430px;
	margin: 0;
	border: 1px solid var(--farm-line);
	border-radius: 20px;
	background: #eef2ef;
	box-shadow: 0 15px 40px rgba(22, 75, 48, 0.06);
}

.farm-map-frame iframe {
	height: 100%;
	min-height: 430px;
}

.farm-map-frame--empty {
	position: relative;
}

.farm-map-frame--empty::before {
	position: absolute;
	top: 50%;
	left: 50%;
	color: #7e8b82;
	content: '지도를 등록해주세요.';
	transform: translate(-50%, -50%);
}

.farm-map .farm-section-body > .farm-map-aside {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 18px;
	margin: 0;
	padding: 28px 24px;
	border: 1px solid var(--farm-line);
	border-radius: 16px;
	background: #fff;
}

.farm-map-contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

.farm-map-contact li {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: 10px;
	margin: 0 0 12px;
	color: #3d4740;
	font-size: 15px;
	line-height: 1.5;
}

.farm-map-contact li span {
	color: #176b47;
	font-weight: 800;
}

.farm-map-contact li strong,
.farm-map-contact li a {
	font-weight: 600;
	color: inherit;
	text-decoration: none;
}

.farm-map-body .home-location-actions,
.farm-map-body .farm-map-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 18px;
}

.farm-map-body .home-location-sns,
.farm-map-body .farm-map-sns {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
}

.farm-map-body .home-location-sns a,
.farm-map-body .farm-map-sns a {
	display: flex;
	width: 38px;
	height: 38px;
	overflow: hidden;
	border-radius: 8px;
}

.farm-map-body .home-location-sns img,
.farm-map-body .farm-map-sns img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.farm-map-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0;
}

.farm-map-actions .home-location-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	min-width: 190px;
	height: 44px;
	padding: 0 18px;
	border-radius: 8px;
	background: #176b47;
	border: 1px solid #176b47;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.farm-map-actions .home-location-button:hover {
	color: #fff;
	background: #0f5638;
	text-decoration: none;
}

.farm-map-sns {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
}

.farm-map-sns a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	overflow: hidden;
	border-radius: 8px;
}

.farm-map-sns img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.farm-map-info {
	align-self: end;
	padding: 8px 22px;
	border: 1px solid var(--farm-line);
	border-radius: 16px;
	background: #fff;
}

.farm-map-info > div {
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 16px;
	margin: 0;
	padding: 15px 0;
	border-bottom: 1px solid #edf0ee;
}

.farm-map-info > div:last-child {
	border-bottom: 0;
}

.farm-map-info dt {
	color: var(--farm-green-dark);
	font-size: 13px;
	font-weight: 800;
}

.farm-map-info dd {
	min-width: 0;
	color: #555f59;
	font-size: 14px;
	word-break: break-all;
}

/* 관리자 버튼과 수정창 */
.farm-edit-btn {
	justify-content: center;
	min-height: 38px;
	padding: 8px 16px;
	border-color: #cbd8d0;
	border-radius: 9px;
	color: var(--farm-green-dark);
	font-weight: 700;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.farm-edit-btn:hover {
	border-color: var(--farm-green);
	background: var(--farm-green-soft);
}

.farm-edit-btn--primary {
	border-color: var(--farm-green);
	background: var(--farm-green);
	color: #fff;
}

.farm-edit-btn--primary:hover {
	background: var(--farm-green-dark);
	color: #fff;
}

.farm-edit-modal__dialog {
	border-radius: 18px;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.farm-edit-modal__header,
.farm-edit-modal__footer {
	padding: 16px 20px;
}

.farm-edit-modal__body {
	padding: 22px;
}

.farm-edit-input,
.farm-edit-textarea {
	padding: 11px 13px;
	border-color: #d6ddd8;
	border-radius: 8px;
}

.farm-edit-input:focus,
.farm-edit-textarea:focus {
	border-color: var(--farm-green);
	box-shadow: 0 0 0 3px rgba(23, 107, 71, 0.1);
	outline: none;
}

@media screen and (max-width: 900px) {
	.farm-page-nav,
	.farm-page {
		width: min(calc(100% - 28px), 1180px);
	}

	.farm-section {
		padding: 58px 0;
	}

	.farm-map .farm-section-body {
		grid-template-columns: 1fr;
	}

	.farm-map-frame {
		grid-row: auto;
		min-height: 360px;
	}

	.farm-map-frame iframe {
		min-height: 360px;
	}
}

@media screen and (max-width: 640px) {
	.farm-page-nav {
		position: static;
		margin-top: 22px;
		padding: 5px;
	}

	.farm-page-nav a {
		padding: 12px 8px;
		font-size: 13px;
	}

	.farm-page-nav a + a::before {
		height: 14px;
	}

	.farm-page {
		padding-top: 8px;
		padding-bottom: 45px;
	}

	.farm-section {
		padding: 46px 0;
	}

	.farm-section-head {
		margin-bottom: 24px;
	}

	.farm-section-title {
		font-size: 31px;
	}

	.farm-intro .farm-section-body {
		min-height: 0;
		padding: 24px 20px;
		border-radius: 17px;
		font-size: 15px;
	}

	.farm-award-tabs {
		padding: 16px;
		border-radius: 17px;
	}

	.farm-award-tablist {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-bottom: 24px;
	}

	.farm-award-list li {
		padding: 2px 15px 2px 43px;
		font-size: 14px;
	}

	.farm-award-list li::before {
		top: 16px;
		left: 16px;
	}

	.farm-map-frame,
	.farm-map-frame iframe {
		min-height: 300px;
	}

	.farm-map-info {
		padding: 5px 16px;
	}

	.farm-map-info > div {
		grid-template-columns: 58px minmax(0, 1fr);
		gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.farm-page-nav a,
	.farm-award-tab,
	.farm-edit-btn {
		transition: none;
	}
}

/* DB에서 출력되는 농원안내 콘텐츠 */
.farm-intro .farm-section-body .rows {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

.farm-intro .farm-section-body .rows > [class*="col-"] {
    min-width: 0;
    padding: 0 !important;
    box-sizing: border-box;
}

.farm-intro .farm-section-body .rows > .col-md-8 {
    flex: 2 1 520px;
    width: auto !important;
}

.farm-intro .farm-section-body .rows > .col-md-4 {
    flex: 1 1 260px;
    width: auto !important;
}

.farm-intro .farm-section-body img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

.farm-intro .farm-section-body ol,
.farm-intro .farm-section-body ul {
    margin: 20px 0;
    padding-left: 24px;
}

.farm-intro .farm-section-body * {
    max-width: 100%;
    box-sizing: border-box;
}

@media screen and (max-width: 640px) {
    .farm-intro .farm-section-body .rows {
        display: block;
    }

    .farm-intro .farm-section-body .rows > [class*="col-"] {
        width: 100% !important;
        margin-bottom: 30px;
    }

    .farm-intro .farm-section-body ol li {
        min-width: 0 !important;
        padding: 8px !important;
        font-size: 17px !important;
        line-height: 1.6 !important;
    }
}
