:root {
	--bg: #FAF7F2;
	--surface: #FFFFFF;
	--card: #FFF9F3;
	--brand: #E88A2F;
	--brand-hover: #D07A28;
	--brand-secondary: #F4C15D;
	--success: #4CAF50;
	--error: #E57373;
	--text: #2F2A26;
	--text-secondary: #6B625C;
	--border: #E2DAD2;
	--shadow-sm: rgba(0, 0, 0, 0.08);
	--radius-global: 12px;
	--radius-card: 16px;
	--radius-btn: 8px;
	/* legacy aliases kept for inline usages */
	--panel: #FFFFFF;
	--accent: #E88A2F;
	--accent-hover: #D07A28;
	--muted: #6B625C;
	--danger: #E57373;
	--status-active: #4CAF50;
	--status-pending: #6B625C;
	--brand-dark: #D07A28;
}

body {
	background-color: var(--bg);
	color: var(--text);
	font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	min-height: 100vh;
	font-size: 16px;
	line-height: 1.5;
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

body > header {
	position: sticky;
	top: 0;
	z-index: 1030;
}

.navbar.custom-navbar {
	background: linear-gradient(90deg, #dab64d 0%, #f2d48d 100%);
	border-bottom: 1px solid rgba(180,130,20,0.2);
	box-shadow: 0 2px 6px rgba(180,130,20,0.15);
}

.navbar.custom-navbar .navbar-brand,
.navbar.custom-navbar .nav-link {
	color: #2F2A26 !important;
}

/* Navbar create post button */
.btn-create-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: var(--brand);
	color: #ffffff;
	border: none;
	border-radius: var(--radius-btn);
	padding: 0.38rem 0.9rem;
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
	transition: filter 0.12s ease;
	white-space: nowrap;
}
.btn-create-nav:hover {
	color: #ffffff;
	filter: brightness(0.9);
}

.navbar .navbar-brand {
	font-weight: 800;
	color: var(--text);
	letter-spacing: 0.3px;
}

.navbar .nav-link {
	color: var(--text) !important;
	transition: color 0.12s ease;
}

.navbar .nav-link:hover {
	color: var(--brand) !important;
}

.container main {
	padding-top: 1.25rem;
	padding-bottom: 2rem;
}

/* 1200px content container with padded inner zone */
.page-outer {
	background: rgba(218, 182, 77, 0.1);
	min-height: calc(100vh - 52px);
}
.page-inner {
	max-width: 1200px;
	margin: 0 auto;
	background: var(--bg);
	padding: 0 24px 60px;
	min-height: calc(100vh - 52px);
}
@media (max-width: 768px) {
	.page-inner { padding: 0 16px; }
}

/* All buttons: centered text always */
.btn,
.btn-accent,
.btn-brand,
.btn-brand-secondary,
.btn-wizard-back,
.btn-wizard-next,
.map-fab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-btn);
}

/* Primary — orange fill */
.btn-accent,
.btn-brand {
	background: var(--brand);
	color: #ffffff;
	border: none;
	font-weight: 600;
	min-height: 48px;
	font-size: 16px;
	padding: 0 24px;
	text-decoration: none;
	transition: filter 0.12s ease, transform 0.1s ease;
	gap: 0.4rem;
}

/* Hero CTAs only: enforce minimum width */
.hero-ctas .btn-accent,
.hero-ctas .btn-brand-secondary {
	min-width: 200px;
}

.btn-accent:hover,
.btn-brand:hover {
	color: #ffffff;
	filter: brightness(0.9);
}

.btn-accent:active,
.btn-brand:active {
	transform: scale(0.97);
}

/* Secondary — yellow fill */
.btn-brand-secondary {
	background: var(--brand-secondary);
	color: var(--text);
	border: none;
	font-weight: 600;
	min-height: 48px;
	font-size: 16px;
	padding: 0 24px;
	transition: filter 0.12s ease;
}

.btn-brand-secondary:hover {
	color: var(--text);
	filter: brightness(0.95);
}

/* Navbar create — hidden (removed from layout, kept for safety) */
.navbar .btn-create {
	display: none;
}

/* Poster detail action buttons */
.poster-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(130px, 1fr));
	gap: 0.45rem;
	padding: 0.5rem;
	border-radius: var(--radius-global);
	background: var(--card);
	border: 1px solid var(--border);
}

.poster-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.86rem;
	border-width: 1px;
	border-radius: var(--radius-btn);
	padding: 0.48rem 0.7rem;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--brand);
	border-color: var(--border);
	background: var(--surface);
}

.poster-btn:hover,
.poster-btn:focus {
	color: #ffffff;
	background: var(--brand);
	border-color: var(--brand);
}

@media (max-width: 768px) {
	.poster-actions {
		grid-template-columns: 1fr;
		width: 100%;
	}
	.btn-accent,
	.btn-brand,
	.btn-brand-secondary {
		width: 100%;
		justify-content: center;
	}
}

#form-actions {
	position: relative;
	z-index: 10;
}

/* Cards for index */
.posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin-top: 1rem;
	padding-bottom: 80px;
}

@media (min-width: 768px) {
	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1200px) {
	.posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}


.post-card {
	position: relative;
	display: block;
	background: var(--card);
	border: 1px solid var(--border);
	box-shadow: 0 2px 6px var(--shadow-sm);
	border-radius: var(--radius-card);
	padding: 1rem;
	min-height: 140px;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
	width: 100%;
	max-width: none;
	margin: 0;
}

/* Form mezők legyenek szélesek */
.post-card .form-control,
.post-card .form-select,
.post-card textarea,
.post-card .input-group {
    width: 100%;
    max-width: none;
}

.post-card:hover {
	/* keep a gentle lift via shadow only, no transform to avoid movement */
	box-shadow: 0 8px 18px rgba(41,40,37,0.06);
}

.post-card .meta {
	font-size: .82rem;
	color: #625948;
	margin-bottom: .4rem;
}

.post-card .post-type {
	position: absolute;
	top: 0;
	left: 0;
	transform: none;
	display: inline-block;
	padding: .15rem .55rem;
	border-radius: 0 0 var(--radius-btn) 0;
	font-weight: 700;
	font-size: .75rem;
	letter-spacing: .2px;
	z-index: 5;
	white-space: nowrap;
}

.post-card .post-type.lost {
	background: var(--error);
	color: #ffffff;
	border: none;
	box-shadow: none;
}

.post-card .post-type.found {
	background: var(--success);
	color: #ffffff;
	border: none;
	box-shadow: none;
}

.post-card .created-at {
	display: none;
}

.post-card .card-date-tr {
	position: absolute;
	top: 10px;
	right: 12px;
	font-size: .75rem;
	color: rgba(75,66,52,0.65);
	pointer-events: none;
	z-index: 3;
}

.post-card .flex-grow-1 {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-top: 0.1rem;
	padding-bottom: 8px;
}

.post-card .desc {
	color: #3b3529;
	margin-top: .35rem;
	margin-bottom: .5rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50ch;
}

/* Save / Back button styles for forms inside .post-card */
.post-card .btn-save {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--brand);
	color: #ffffff;
	border: none;
	border-radius: var(--radius-btn);
	padding: 0 1.25rem;
	height: 40px;
	font-weight: 600;
	font-size: 14px;
	transition: filter 0.12s ease;
}

.post-card .btn-save:hover { filter: brightness(0.9); }

.post-card .btn-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--surface);
	color: var(--text-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-btn);
	padding: 0 1.25rem;
	height: 40px;
	font-size: 14px;
	transition: background 0.1s ease;
}

.post-card .btn-back:hover {
	background: var(--card);
	color: var(--text);
}

	.post-card .thumb {
		flex: 0 0 108px;
		width: 108px;
		height: 108px;
		border-radius: 8px;
		overflow: hidden;
		background: linear-gradient(180deg, rgba(217,180,74,0.06), rgba(242,211,136,0.04));
		display: inline-block;
		align-self: flex-start;
		position: relative;
	}

	.post-card .post-thumb {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		pointer-events: none; /* ensure image doesn't respond to clicks */
	}

/* Badges for post type */
.badge-lost {
	background: linear-gradient(180deg, var(--brand-dark) 0%, #8a6914 100%);
	color: #fffdf6;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.badge-found {
	background: linear-gradient(180deg, #2a6a3a 0%, #1d4a28 100%);
	color: #f4fff7;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.validation-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	border: none;
}

.validation-badge-pending {
	background: var(--status-pending);
	color: #ffffff;
}

.validation-badge-active {
	background: var(--success);
	color: #ffffff;
}

/* footer: fixed, compact */
.footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 100;
	border-top: 2px solid rgba(200, 160, 32, 0.22);
	background: rgba(200, 160, 32, 0.07);
	color: var(--muted);
	padding: 0.3rem 0;
	margin-top: 0;
}

/* small helpers */
.kv {
	font-weight: 600;
	color: #4b4234;
}

/* Tighter, smaller action buttons for post cards so they fit without reflow */
.post-card .d-flex.gap-2 {
  gap: 0.4rem; /* tighter spacing between buttons */
  margin-left: 0;
}

.post-card .btn-sm {
  padding: .18rem .38rem; /* smaller horizontal padding */
  font-size: .74rem;      /* slightly smaller text */
  min-width: 60px;        /* reduce min width so buttons can fit */
  line-height: 1;         /* compact height */
  border-radius: .35rem;  /* slightly smaller radius to match compact size */
}

/* Ensure delete button stays visually distinct but compact */
.post-card .btn-sm.btn-danger {
  padding: .16rem .36rem;
  font-weight: 600;
}

/* Make sure outline/hover states remain usable at smaller sizes */
.post-card .btn-sm:focus {
  outline-width: 2px;
  outline-offset: 2px;
}

/* Wizard form: constrain field widths on large screens */
.wizard-step .form-control:not(textarea),
.wizard-step .form-select {
	width: 100%;
}
@media (min-width: 992px) {
	.wizard-card {
		max-width: 820px;
		margin-left: auto;
		margin-right: auto;
	}
	.wizard-step .form-control:not(textarea),
	.wizard-step .form-select {
		width: 100%;
		max-width: 440px;
	}
}

/* Responsive enhancements for wide screens: make form fields and the map use available horizontal space */
@media (min-width: 992px) {
	/* Let post-card stretch more on large viewports (form inside will use more space) */
	.post-card {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

		/* Ensure form controls can grow to available width */
		.post-card .form-control,
		.post-card .form-select,
		.post-card textarea,
		.post-card .input-group {
			width: 100%;
			max-width: none;
		}

		/* Wizard selects must match wizard inputs (post-card rule would override otherwise) */
		.wizard-step .form-select {
			max-width: 440px;
		}

			/* Make textarea a bit taller for easier editing on larger screens */
			.post-card textarea[name="Post.Description"] {
				min-height: 160px;
			}

	/* Thumbnail grid */
	.edit-thumbnails {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		margin-bottom: 1rem;
	}

	.edit-thumbnails .position-relative {
		width: 96px !important;
	}

	.edit-thumbnails img.post-thumb {
		width: 96px !important;
		height: 96px !important;
		object-fit: cover;
		border-radius: 12px;
		box-shadow: 0 2px 6px var(--shadow-sm);
		cursor: pointer;
	}

	/* Star (main image) icon button */
	.image-main-btn {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 20px !important;
		height: 20px !important;
		padding: 0 !important;
		min-width: unset !important;
		min-height: unset !important;
		font-size: 11px !important;
		line-height: 1 !important;
		border-radius: 50% !important;
		background: #ffffff !important;
		color: var(--brand) !important;
		border: none !important;
		box-shadow: 0 1px 4px var(--shadow-sm) !important;
	}

	.image-main-btn.main-selected {
		background: var(--brand) !important;
		color: #ffffff !important;
	}

	/* X (delete) icon button */
	.image-delete-btn {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 20px !important;
		height: 20px !important;
		padding: 0 !important;
		min-width: unset !important;
		min-height: unset !important;
		font-size: 11px !important;
		line-height: 1 !important;
		border-radius: 50% !important;
		background: #ffffff !important;
		color: var(--error) !important;
		border: none !important;
		box-shadow: 0 1px 4px var(--shadow-sm) !important;
	}

	@media (min-width: 992px) {
		.edit-thumbnails .position-relative {
			width: 120px !important;
		}
		.edit-thumbnails img.post-thumb {
			width: 120px !important;
			height: 120px !important;
		}
		#map {
			height: 400px;
			width: 100%;
		}
	}

	@media (max-width: 767.98px) {
		#map {
			height: 300px;
		}
	}
}

.home-markdown {
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	max-width: none;
	margin: 0;
	color: var(--text-secondary);
	font-size: 1rem;
	line-height: 1.7;
}

.home-markdown h1, .home-markdown h2, .home-markdown h3 {
	color: var(--text);
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	font-weight: 700;
}

.home-markdown h1 { font-size: 1.6rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.home-markdown h2 { font-size: 1.25rem; }
.home-markdown h3 { font-size: 1.05rem; }
.home-markdown ul { margin: 0.75rem 0 0.75rem 1.5rem; list-style: disc; }
.home-markdown li { margin-bottom: 0.35rem; }
.home-markdown p { margin-bottom: 0.75rem; }
.home-markdown hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Posts index cards: mobile-first banner layout (<576px); desktop unchanged */
@media (max-width: 575.98px) {
	/* Keep last cards / pagination clear of the footer band (override Bootstrap .pb-3 !important) */
	main[role="main"] {
		padding-bottom: 3.25rem !important;
	}

	.posts-grid {
		margin-bottom: 1.5rem;
	}

	.posts-grid + nav {
		margin-bottom: 1.25rem;
	}



	.posts-grid .post-card {
		display: grid;
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
		padding: 0;
		overflow: hidden;
		min-height: 0;
	}

	.posts-grid .post-card .post-type {
		top: 0;
		left: 0;
		right: auto;
		transform: none;
	}



	.posts-grid .post-card > .d-flex {
		grid-column: 1;
		grid-row: 1;
		flex-direction: column;
		margin: 0;
	}

	.posts-grid .post-card .thumb {
		flex: none;
		width: 100%;
		max-width: none;
		height: 160px;
		border-radius: 10px 10px 0 0;
		margin: 0 !important;
	}

	.posts-grid .post-card .flex-grow-1 {
		padding: 0.85rem 1rem 0.5rem;
		padding-bottom: 0;
		min-width: 0;
	}

	.posts-grid .post-card .desc {
		-webkit-line-clamp: 5;
		max-width: none;
	}


}

/* Lost/Found hero banner on post details page */
.post-type-hero {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.6rem;
	padding: 0.75rem 1rem;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	color: #fff;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

.post-type-hero.hero-lost {
	background: var(--danger);
}

.post-type-hero.hero-found {
	background: #2a6a3a;
}

/* Admin post management table — force readable dark text */
.admin-posts-table td {
	color: var(--muted);
}

/* Admin table expired badge — better contrast than text-bg-secondary */
.badge-expired {
	background: #e0e0e0;
	color: #3a3a3a;
}

/* ============================================================
   HERO SECTION (Home page)
   ============================================================ */
.hero-section {
	background: linear-gradient(150deg, #FFF4DC 0%, #FFECC8 40%, #FFF8EC 100%);
	border-radius: 0 0 var(--radius-card) var(--radius-card);
	padding: 64px 24px;
	text-align: center;
	margin-bottom: 1.5rem;
	border: 1px solid rgba(232,138,47,0.22);
	box-shadow: 0 4px 24px rgba(232,138,47,0.08);
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.hero-section .hero-icon {
	font-size: 3rem;
	display: block;
	margin-bottom: 0.75rem;
}

.hero-section h1 {
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--text);
	margin-bottom: 0.4rem;
	line-height: 1.1;
}

.hero-section .hero-sub {
	color: var(--text-secondary);
	font-size: 1.05rem;
	margin-bottom: 1.5rem;
}

.hero-ctas {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
}

@media (max-width: 575.98px) {
	.hero-section {
		padding: 32px 16px;
		border-radius: 0 0 var(--radius-global) var(--radius-global);
	}
	.hero-section h1 { font-size: 1.6rem; }
	.hero-ctas { flex-direction: column; align-items: stretch; }
}

.home-info-box {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 0 0 var(--radius-global) var(--radius-global);
	padding: 16px;
	max-width: 600px;
	margin: 0 auto 1.5rem;
}

/* ============================================================
   PILL TOGGLE BUTTONS (Wizard)
   ============================================================ */
.pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pill-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}

.pill-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 1.1rem;
	border-radius: 18px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text-secondary);
	font-weight: 500;
	font-size: 0.9rem;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
	user-select: none;
	height: 36px;
	white-space: nowrap;
}

.pill-input:checked + .pill-label {
	background: var(--brand);
	border-color: var(--brand);
	color: #ffffff;
	font-weight: 600;
}

.pill-label:hover {
	border-color: var(--brand);
	background: rgba(232, 138, 47, 0.07);
}

.pill-input:focus-visible + .pill-label {
	outline: 3px solid rgba(232, 138, 47, 0.4);
	outline-offset: 2px;
}

/* ============================================================
   WIZARD (Create/Edit post)
   ============================================================ */
.wizard-progress-wrap {
	height: 4px;
	background: var(--border);
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 0;
}

.wizard-progress-bar {
	height: 100%;
	background: var(--brand);
	border-radius: 2px;
	transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps-label {
	font-size: 13px;
	color: var(--text-secondary);
	padding: 0.3rem 0;
}

.wizard-step-label.active {
	color: var(--brand);
	font-weight: 700;
}

.wizard-card {
	background: var(--card);
	border-radius: var(--radius-card);
	padding: 24px;
	padding-bottom: 0;
	overflow: visible;
	border-bottom: none;
}

.wizard-sticky-nav {
	position: static;
	background: var(--card);
	padding: 0 1rem;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	z-index: 10;
	margin: 1rem -24px -24px;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
	border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.wizard-dots {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.wizard-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--border);
	transition: background 0.2s ease, transform 0.2s ease;
	display: block;
}

.wizard-dot.active {
	background: var(--brand);
	transform: scale(1.25);
}

.btn-wizard-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--brand-secondary);
	color: var(--text);
	border: none;
	border-radius: var(--radius-btn);
	padding: 0 1.25rem;
	font-weight: 600;
	height: 48px;
	cursor: pointer;
	transition: filter 0.12s ease;
	font-size: 0.95rem;
}

.btn-wizard-back:hover {
	filter: brightness(0.95);
}

/* ============================================================
   POSTER DOWNLOAD BLOCK (Details view)
   ============================================================ */
.poster-download-block {
	position: relative;
	margin-top: 48px;
	padding: 16px 20px;
	background: #F7F7F9;
	border-radius: 12px;
}

.poster-download-block::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -32px;
	border-top: 1px solid #E0E0E0;
}

.poster-download-title {
	margin: 0 0 6px;
	color: #333333;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	text-align: right;
}

.poster-download-description {
	margin: 0 0 14px auto;
	max-width: 460px;
	color: #555555;
	font-size: 14px;
	line-height: 1.4;
	text-align: right;
}

.poster-download-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	row-gap: 10px;
}

.poster-download-right {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-left: auto;
}

.poster-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #E88A2F;
	color: #FFFFFF;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	border: none;
	white-space: nowrap;
}

.poster-download-btn:hover,
.poster-download-btn:focus {
	background: #D17A26;
	color: #FFFFFF;
}

.btn-wizard-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--brand);
	color: #ffffff;
	border: none;
	border-radius: var(--radius-btn);
	padding: 0 1.75rem;
	font-weight: 600;
	height: 48px;
	cursor: pointer;
	transition: filter 0.12s ease, transform 0.1s ease;
	font-size: 0.95rem;
}

.btn-wizard-next:hover { filter: brightness(0.9); }
.btn-wizard-next:active { transform: scale(0.97); }

@keyframes slideInRight {
	from { opacity: 0; transform: translateX(24px); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
	from { opacity: 0; transform: translateX(-24px); }
	to   { opacity: 1; transform: translateX(0); }
}

.wizard-step.slide-in-right { animation: slideInRight 0.22s ease; }
.wizard-step.slide-in-left  { animation: slideInLeft  0.22s ease; }

/* ============================================================
   IMAGE UPLOAD ZONE
   ============================================================ */
.image-upload-zone {
	position: relative;
	border: 2px dashed var(--border);
	border-radius: 12px;
	padding: 24px 1rem;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	background: var(--card);
}

.image-upload-zone:hover,
.image-upload-zone.drag-over {
	border-color: var(--brand);
	background: rgba(232, 138, 47, 0.05);
}

.image-upload-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.image-upload-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-secondary);
	pointer-events: none;
	font-size: 0.9rem;
}

/* ============================================================
   FILTER PANEL (Posts/Index)
   ============================================================ */
/* Filter card container */
.post-card.mb-3,
.filter-card {
	background: linear-gradient(135deg, var(--card) 0%, #FFF6E8 100%);
	border-radius: 0 0 var(--radius-global) var(--radius-global);
	padding: 14px 16px;
	border: 1px solid rgba(232,138,47,0.18);
}

/* Flat filter grid */
.filter-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: flex-end;
}

.filter-grid .form-group {
	flex: 1 1 180px;
	min-width: 140px;
}

.filter-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}

.filter-card .form-label {
	font-size: 12px;
	margin-bottom: 3px;
	color: var(--text-secondary);
	font-weight: 500;
}

@media (max-width: 767.98px) {
	.filter-grid .form-group {
		flex: 1 1 100%;
		min-width: 100%;
	}
	.filter-actions {
		flex-direction: column;
	}
	.filter-actions .btn-save,
	.filter-actions .btn-back {
		width: 100%;
		justify-content: center;
	}
}

/* All filter inputs and selects */
.post-card .form-control,
.post-card .form-select {
	height: 40px;
	font-size: 14px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	width: 100%;
	max-width: none;
}

.post-card textarea {
	height: auto;
	font-size: 14px;
	border-radius: 8px;
	border: 1px solid var(--border);
}

.radius-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.radius-display {
	min-width: 2.5rem;
	text-align: right;
	font-weight: 700;
	color: var(--brand);
	font-size: 0.95rem;
}

/* Radius slider track and thumb */
.form-range::-webkit-slider-thumb { background: var(--brand); }
.form-range::-moz-range-thumb { background: var(--brand); }
.form-range::-webkit-slider-runnable-track { background: var(--border); }



/* ============================================================
   MAP FLOATING ACTION BUTTONS
   ============================================================ */
#map.map-invalid {
	outline: 2px solid #dc3545;
	outline-offset: -2px;
	border-radius: 8px;
}

.map-fab-stack {
	position: absolute;
	bottom: 1.5rem;
	right: 1rem;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.map-fab {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--brand);
	color: #ffffff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	text-decoration: none;
	flex-shrink: 0;
}

.map-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
	color: #ffffff;
}

.map-fab:active { transform: scale(0.95); }

.map-fab-secondary {
	background: var(--brand);
	color: #ffffff;
	border: none;
}

.map-fab-secondary:hover { color: #ffffff; }

/* ============================================================
   MAP SLIDE-IN DETAIL PANEL
   ============================================================ */
.map-slide-panel {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 900;
	background: var(--surface);
	border-radius: var(--radius-card) var(--radius-card) 0 0;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
	padding: 1rem 1.25rem 2rem;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	max-height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.map-slide-panel.open {
	transform: translateY(0);
}

.map-panel-handle {
	width: 40px;
	height: 4px;
	background: rgba(90,78,60,0.18);
	border-radius: 2px;
	margin: 0 auto 1rem;
}

.map-panel-close {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
	background: none;
	border: none;
	color: var(--muted);
	opacity: 0.5;
	cursor: pointer;
	font-size: 1.2rem;
	padding: 0.25rem;
	line-height: 1;
}

.map-panel-close:hover { opacity: 1; }

.map-panel-thumb {
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 0.6rem;
	margin-bottom: 0.75rem;
}

.map-panel-type {
	display: inline-block;
	padding: 0.2rem 0.75rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.map-panel-type.lost {
	background: linear-gradient(180deg, var(--brand-dark) 0%, #8a6914 100%);
	color: #fffdf6;
}

.map-panel-type.found {
	background: linear-gradient(180deg, #2a6a3a 0%, #1d4a28 100%);
	color: #f4fff7;
}

.map-panel-meta {
	font-size: 0.85rem;
	color: var(--muted);
	margin-bottom: 0.5rem;
	opacity: 0.8;
}

.map-panel-desc {
	font-size: 0.9rem;
	color: var(--muted);
	margin-bottom: 1rem;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (min-width: 768px) {
	.map-slide-panel {
		top: 0;
		bottom: 0;
		left: auto;
		right: 0;
		width: 320px;
		border-radius: 0;
		max-height: none;
		transform: translateX(100%);
	}
	.map-slide-panel.open { transform: translateX(0); }
	.map-panel-handle { display: none; }
}

/* ============================================================
   MAP FILTER DRAWER
   ============================================================ */
.map-filter-drawer {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 890;
	width: 260px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 0 var(--radius-global) var(--radius-global) 0;
	box-shadow: 4px 0 16px var(--shadow-sm);
	padding: 1.25rem 1rem;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
}

.map-filter-drawer.open { transform: translateX(0); }

.map-filter-title {
	font-weight: 700;
	color: var(--text);
	margin-bottom: 1rem;
	font-size: 0.95rem;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton-shimmer {
	background: linear-gradient(90deg, #ede8da 25%, #f5f0e8 50%, #ede8da 75%);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
	border-radius: 4px;
}

@keyframes shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ============================================================
   CARD HOVER MICRO-INTERACTION
   ============================================================ */
.post-card-clickable {
	transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.post-card-clickable:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(41,40,37,0.1) !important;
}

