@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
	--bg: #fdf8f0;
	--panel-bg: #f2e7d5;
	--sand: #e6d9c4;
	--cactus: #3a7d5c;
	--cactus-light: #5aab7e;
	--shadow-dark: rgba(150, 125, 85, 0.15);
	--shadow-light: rgba(255, 255, 255, 0.9);
	--primary: #3a7d5c;
	--primary-dark: #265a40;
	--accent: #d4a24e;
	--accent-light: #f0d89a;
	--text-color: #3b3626;
	--muted-color: #6d6352;
	--radius: 20px;
	--glass: rgba(255, 255, 255, 0.55);
	--glass-border: rgba(232, 220, 196, 0.6);
	--transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
	scroll-behavior: smooth;
}

* {
	box-sizing: border-box;
}

/* === Accessibility: focus styles === */
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

/* === Links inside SEO blocks === */
.seo-block a {
	color: var(--cactus);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color 0.2s ease;
}

.seo-block a:hover {
	color: var(--primary-dark);
}

body {
	margin: 0;
	background: var(--bg);
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	color: var(--text-color);
	min-height: 100vh;
	display: flex;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.6;
}

/* === Page Layout with Ad Sidebar === */
.page-layout {
	display: flex;
	min-height: 100vh;
	width: 100%;
}

/* Ad sidebar (right column, desktop only) */
.page-ad-sidebar {
	width: 300px;
	min-width: 300px;
	padding: 20px 16px;
	display: none; /* hidden by default, shown on wide screens */
}

@media (min-width: 1200px) {
	.page-ad-sidebar {
		display: block;
	}
}

.ad-sidebar-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ad-sidebar-sticky {
	position: sticky;
	top: 20px;
}

/* === Form Elements: Checkboxes, Radios, Sliders, Labels === */

/* Checkbox & Radio styling */
input[type="checkbox"],
input[type="radio"] {
	width: 20px;
	height: 20px;
	min-width: 20px;
	accent-color: var(--primary);
	cursor: pointer;
	margin: 0;
	border-radius: 4px;
	vertical-align: middle;
}

input[type="radio"] {
	border-radius: 50%;
}

/* Checkbox/Radio + label layout */
.card-body label:has(input[type="checkbox"]),
.card-body label:has(input[type="radio"]),
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 10px 14px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.4);
	border: 1px solid var(--glass-border);
	margin-top: 8px;
	margin-bottom: 4px;
	transition: background 0.2s;
	font-size: 0.95em;
}

label:has(input[type="checkbox"]):hover,
label:has(input[type="radio"]):hover {
	background: rgba(255, 255, 255, 0.7);
}

/* Range slider styling */
input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 8px;
	border-radius: 4px;
	background: var(--sand);
	outline: none;
	margin: 10px 0;
	padding: 0;
	border: none;
	box-shadow: none;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary) 0%, var(--cactus) 100%);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(58, 125, 92, 0.3);
	border: 3px solid #fff;
	transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary) 0%, var(--cactus) 100%);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(58, 125, 92, 0.3);
	border: 3px solid #fff;
}

/* Number input inside card */
input[type="number"] {
	width: 80px;
	text-align: center;
	font-weight: 600;
}

/* === 🧭 SIDEBAR === */
/* === 🧭 SIDEBAR === */
nav.sidebar {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: 300px;
	min-width: 300px;
	max-width: 300px;
	background: linear-gradient(180deg, var(--panel-bg) 0%, #e8dbc5 100%);
	border-right: 1px solid var(--sand);
	display: flex;
	flex-direction: column;
	padding: 10px 16px 0;
	gap: 16px;
	user-select: none;
	overflow: hidden;
	z-index: 1000;
}

/* === 🔹 Logo === */
a:has(.logo) {
	text-decoration: none;
}

nav.sidebar .logo {
	display: flex;
	align-items: center;
	font-size: 1.6em;
	font-weight: 700;
	color: var(--primary-dark);
	border-radius: var(--radius);
	text-align: center;
	padding-top: 10px;
	text-decoration: none !important;
	letter-spacing: -0.02em;
}

.logo img {
	width: 70px;
}

/* === 💬 Motto === */
nav.sidebar .motto {
	font-size: 0.82em;
	color: var(--muted-color);
	border-top: 1px solid rgba(0,0,0,0.06);
	padding-top: 0;
	margin-top: auto;
	text-align: center;
	line-height: 1.55;
	opacity: 0.7;
	letter-spacing: 0.01em;
}

/* === 📋 Menu === */
nav.sidebar ul.menu {
	list-style: none;
	padding: 0;
	margin: 0;
	flex-grow: 1;
	overflow-y: auto;                /* ✅ Only the menu scrolls */
	scrollbar-width: thin;
	scrollbar-color: var(--sand) transparent;
}

nav.sidebar ul.menu::-webkit-scrollbar {
	width: 8px;
}

nav.sidebar ul.menu::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 4px;
}

nav.sidebar ul.menu::-webkit-scrollbar-thumb {
	background-color: var(--cactus-light);
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

nav.sidebar ul.menu::-webkit-scrollbar-thumb:hover {
	background-color: var(--cactus);
}

nav.sidebar ul.menu li {
	margin-bottom: 6px;
}

nav.sidebar ul.menu a {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 14px;
	border-radius: 12px;
	font-size: 0.95em;
	color: var(--text-color);
	background: var(--glass);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	text-decoration: none;
	border: 1px solid var(--glass-border);
	justify-content: flex-start;
	transition: all var(--transition);
}

nav.sidebar ul.menu a:hover {
	color: var(--primary-dark);
	background: rgba(255, 255, 255, 0.75);
	transform: translateX(3px);
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

nav.sidebar ul.menu a.active {
	background: linear-gradient(135deg, var(--primary) 0%, var(--cactus) 100%);
	color: #fff;
	box-shadow: 0 4px 12px rgba(61, 122, 95, 0.3);
	border-color: transparent;
}

nav.sidebar ul.menu a.active .menu-title,
nav.sidebar ul.menu a.active .menu-sub {
	color: #fff;
}

nav.sidebar ul.menu a.active i {
	color: #fff;
}

nav.sidebar ul.menu a i {
	font-size: 1.1em;
	color: var(--accent);
	width: 20px;
	min-width: 20px;
	margin-top: 3px;
	text-align: center;
	transition: color var(--transition);
}

nav.sidebar ul.menu a:hover i {
	color: var(--primary);
}

/* === 🔍 Search === */
.sidebar-search {
	position: relative;
}

.sidebar-search input {
	width: 100%;
	border: 1px solid var(--sand);
	border-radius: 10px;
	font-size: 0.88em;
	margin-bottom: 0;
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.sidebar-search .search-icon {
	position: absolute;
	right: 12px;
	top: 15px;
	color: #888;
}

/* === 🧾 Menu Text Layout === */
.menu-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.menu-title {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--text-color);
	letter-spacing: -0.01em;
}

.menu-sub {
	font-size: 0.75rem;
	color: var(--muted-color);
	opacity: 0.85;
}

/* === 🧱 MAIN SECTION === */
main.main {
	margin-left: 300px;              /* ✅ Leave room for fixed sidebar */
	padding: 36px 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	overflow-y: auto;
}

/* === FAQ Section === */


.faq-section{
	background: rgba(90, 158, 122, 0.06) !important;
	border-radius: var(--radius);
	padding: 22px 26px;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
	border: 1px solid var(--glass-border);
}

.faq-item {
  border-bottom: 1px solid #e6dec1;
  padding: 10px 10px;
  margin: 0px -5px;
}

.faq-item h3 {
  display: flex;
  align-items: center;
  justify-content: space-between; /* arrow to right */
  gap: 10px;
  font-size: 1.05em;
  color: var(--primary-dark);
  margin: 0;
  cursor: pointer;
  transition: color 0.25s ease;
}

.faq-item h3:hover {
  color: var(--primary);
}

/* Left part: question icon + title */
.faq-item h3 .faq-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Question icon */
.faq-item h3 i.fas.fa-question-circle {
  color: var(--cactus);
  flex-shrink: 0;
}

/* Right toggle arrow */
.faq-item h3 i.faq-toggle {
  color: var(--muted-color);
  font-size: 0.85em;
  transition: transform 0.25s ease, color 0.25s ease;
}

.faq-item.open h3 i.faq-toggle {
  transform: rotate(180deg);
  color: var(--cactus);
}

/* Answer container — collapsed by default */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 0 0 28px;
  color: var(--text-color);
  line-height: 1.5;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Open state: expand smoothly */
.faq-item.open .faq-answer {
  max-height: 400px; /* enough for multiple lines */
  padding: 8px 0 12px 28px;
}

/* Paragraph styling inside answers */
.faq-answer p {
  margin: 0;
  font-size: 0.95em;
  color: var(--muted-color);
}

/* Optional: subtle hover highlight */
.faq-item:hover {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  transition: background 0.2s ease;
}





.ads-placeholder {
	width: 96%;
	height: 50px;
	background: var(--panel-bg);
	border-radius: var(--radius);
	box-shadow: 2px 2px 8px var(--shadow-dark),
		-1.5px -1.5px 6px var(--shadow-light);
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--muted-color);
}

.ad-block {
	max-width: 1300px;
	width: 100%;
	/* background: var(--panel-bg); */
	/* border-radius: var(--radius); */
	/* padding: 20px; */
	/* box-shadow: 2.5px 2.5px 12px var(--shadow-dark), -2.5px -2.5px 12px var(--shadow-light); */
	color: var(--text-color);
}

.seo-block {
	max-width: 1300px;
	background: linear-gradient(135deg, rgba(255, 252, 245, 0.8) 0%, rgba(240, 216, 154, 0.15) 100%);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	width: 100%;
	border-radius: var(--radius);
	padding: 24px 28px;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--glass-border);
	color: var(--text-color);
	font-size: 0.92em;
}

.seo-block h1 {
	color: var(--primary-dark);
	font-size: 1.85rem;
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.seo-block h1::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 1.1em;
	background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
	border-radius: 2px;
	margin-right: 12px;
	vertical-align: middle;
}

.seo-block h2 {
	margin-bottom: 10px;
	margin-top: 0px;
}

.seo-block p,
.seo-block ul {
	color: var(--muted-color);
}


hr {
	width: 100%;
	border-top: 1px solid var(--cactus-light);
}

/* Grid */
.content-grid {
	width: 100%;
	max-width: 1300px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: stretch;
}

@media (max-width: 900px) {
	.content-grid {
		grid-template-columns: 1fr;
	}
}

/* Cards */

.card {
	background: rgba(255, 253, 248, 0.7);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-radius: var(--radius);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--glass-border);
	max-height: calc(100vh - 100px);
	transition: box-shadow var(--transition);
}

.card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.card-header {
	background: linear-gradient(135deg, rgba(58, 125, 92, 0.04) 0%, rgba(212, 162, 78, 0.06) 100%);
}

.card-header {
	padding: 18px 22px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	border-top-left-radius: var(--radius);
	border-top-right-radius: var(--radius);
	position: sticky;
}

.card-header h2 {
	margin: 0;
	font-size: 1.2em;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--primary);
	letter-spacing: -0.01em;
}

.card-header h2 i {
	color: var(--accent);
}

.card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: stretch;
	padding: 20px;
	overflow: auto;
}

.card-body label {
	align-self: flex-start;
	margin-top: 20px;
	margin-bottom: 10px;
	color: var(--muted-color);
	font-weight: 500;
	width: 100%;
	display: block;
}

.card-footer {
	padding: 12px 15px 17px;
	display: flex;
	justify-content: center;
	gap: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
	height: 74px;
}

input,
select {
	padding: 13px 16px;
	border-radius: 12px;
	border: 1px solid var(--sand);
	width: 100%;
	background: rgba(255, 255, 255, 0.75);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	font-size: 1em;
	margin-bottom: 10px;
	color: var(--text-color);
	transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(77, 139, 106, 0.12);
}

/* Buttons */
button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 24px;
	border: none;
	border-radius: 12px;
	font-weight: 600;
	font-size: 0.95em;
	cursor: pointer;
	transition: all var(--transition);
	letter-spacing: 0.01em;
}

button.green {
	background: linear-gradient(135deg, #3a7d5c 0%, #2d6648 100%);
	color: #fff;
	box-shadow: 0 4px 14px rgba(58, 125, 92, 0.35);
}

button.green:hover {
	background: linear-gradient(135deg, #43926a 0%, #357552 100%);
	box-shadow: 0 6px 20px rgba(58, 125, 92, 0.45);
	transform: translateY(-1px);
}

button.green:active {
	transform: translateY(1px);
	box-shadow: 0 2px 8px rgba(58, 125, 92, 0.3);
}

button.beige {
	background: rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--text-color);
	border: 1px solid var(--sand);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

button.beige:hover {
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
}

button.beige:active {
	transform: translateY(1px);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.format-selector {
	text-align: left;
	/* margin: 1.5rem auto; */
	width: 100%;
	display: inline-flex;
	justify-content: space-between;
	align-items: flex-end;
}

.format-controls {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
	float: left;
}

.format-select label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: #6a5d4f;
	margin-bottom: 4px;
}

.format-select select {
	padding: 8px 12px;
	border-radius: 6px;
	border: 1px solid #ccc;
	font-size: 1rem;
	background: #fff;
	min-width: 120px;
	margin-bottom: 0px;
	height: 38px;
}

.swap-btn {
	background: #e0d7c8;
	color: #5a4c3d;
	border: none;
	padding: 10px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s;
	margin-bottom: 0px;
	height: 38px;
}

.swap-btn:hover {
	background: #d6cab7;
}

.compress-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 0.9rem;
	text-decoration: none;
	/* color: #0047ff; */
	float: right;
}



/* QR preview */
#qrcode {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 210px;
	width: fit-content;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.65);
	border: 1.5px dashed rgba(0, 0, 0, 0.1);
	opacity: 0;
	transform: scale(0.95);
	transition: all 0.3s ease;
	margin: auto;
}

#qrcode.visible {
	opacity: 1;
	transform: scale(1);
	box-shadow: 0 0 15px rgba(78, 125, 101, 0.22);
}

svg {
	width: 200px;
	height: auto;
}


.dropzone {
	border: 2px dashed var(--sand);
	border-radius: 16px;
	padding: 28px 20px;
	text-align: center;
	color: var(--muted-color);
	background: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	transition: all var(--transition);
}

.dropzone:hover {
	background: rgba(255, 255, 255, 0.7);
	border-color: var(--cactus-light);
	box-shadow: 0 4px 16px rgba(61, 122, 95, 0.08);
}

.dropzone.dragover {
	background: rgba(90, 158, 122, 0.06);
	border-color: var(--cactus);
	box-shadow: 0 0 0 4px rgba(61, 122, 95, 0.08);
}

.dropzone i {
	color: var(--cactus);
	margin: 10px;
}

.related-tool-link {
	text-align: center;
	margin-top: 18px;
	font-size: 0.95rem;
	color: #5b5339;
}

.related-tool-link a {
	color: #4e7d65;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px dotted #4e7d65;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.related-tool-link a:hover {
	color: #2f5c45;
	border-color: #2f5c45;
}





/* FORMATTER */
.card-body textarea {
	width: 100%;
	min-height: 200px;
	height: 100%;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid var(--sand);
	resize: vertical;
	background: rgba(255, 255, 255, 0.7);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	font-family: 'JetBrains Mono', 'Fira Code', monospace;
	font-size: 0.9em;
	color: var(--text-color);
	transition: border-color var(--transition), box-shadow var(--transition);
}

.card-body textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(77, 139, 106, 0.12);
	outline: none;
}

pre.code-block {
	background: rgba(255, 255, 255, 0.85);
	box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.08),
		inset -2px -2px 6px rgba(255, 255, 255, 0.9);
	padding: 16px;
	border-radius: 10px;
	font-family: monospace;
	font-size: 0.9em;
	overflow-x: auto;
	color: #3a3322;
	white-space: pre-wrap;
	word-break: break-word;
}

.error-msg {
	color: #b33;
	font-weight: 600;
	margin-top: 12px;
}

#formatOutput code {
	font-family: 'JetBrains Mono', 'Fira Code', monospace;
	font-size: 0.85em;
	line-height: 1.4;
	color: #403a2a;
	display: block;
	padding: 10px;
	border-radius: 8px;
	backdrop-filter: blur(6px);
}



/* XML FORMATTER */

#xmlOutput {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.75em;
	line-height: 1.3;
	white-space: pre-wrap;
	word-break: break-word;
	max-height: 70vh;
	overflow-y: auto;
	scroll-behavior: smooth;
}

.xml-bracket {
	color: #4e7d65;
	font-weight: 700;
}

/* greenish for < and > */
.xml-tag {
	color: #2b6cb0;
	font-weight: 600;
}

/* blue for tags */
.xml-attr {
	color: #805ad5;
}

/* purple for attributes */
.xml-value {
	color: #c53030;
}

/* red for values */
.xml-comment {
	color: #718096;
	font-style: italic;
}

/* gray for comments */

.xml-error {
	background: #ffb3b3;
	color: #700;
	padding: 0 3px;
	border-radius: 2px;
	font-weight: bold;
}

.xml-error-line {
	background: #ffecec;
	border-left: 3px solid #b33;
	padding-left: 6px;
}

#xmlOutput mark.xml-error::after {
	content: " ⟵ error here";
	color: #b33;
	font-style: italic;
	font-size: 0.85em;
}


/* JSON FORMATTER */

#jsonOutput {
  font-family: 'JetBrains Mono', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.75em;
  line-height: 1.3;
}

.json-key     { color:#2b6cb0; font-weight:600; }   /* blue keys */
.json-string  { color:#c53030; }                    /* red strings */
.json-number  { color:#2f855a; }                    /* green numbers */
.json-boolean { color:#805ad5; font-weight:500; }
.json-null    { color:#805ad5; font-style: italic; }

.json-error {
  background:#ffb3b3; color:#700;
  border-radius:2px; padding:0 2px; font-weight:bold;
}

.json-error::after {
	content: " ⟵ error here";
	color: #b33;
	font-style: italic;
	font-size: 0.85em;
}




/* 🎨 COLOR PICKER */

#canvas {
	cursor: crosshair;
	display: block;
	margin: 20px auto;
	max-width: 100%;
	border-radius: 12px;
	border: 2px solid #ddd;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: box-shadow 0.3s ease;
}

#canvas:hover {
	box-shadow: 0 0 12px rgba(78, 125, 101, 0.35);
}

#canvas::after {
	content: "👆 Hover and click to pick a color";
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(78, 125, 101, 0.9);
	color: #fff;
	padding: 5px 12px;
	border-radius: 8px;
	font-size: 0.9rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

#canvas:hover::after {
	opacity: 1;
}

.color-picker-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: flex-start;
	gap: 30px;
}

.picked-color {
	display: flex;
	align-items: center;
	gap: 20px;
	background: rgba(255, 255, 255, 0.7);
	padding: 16px 20px;
	border-radius: 14px;
	margin-top: 10px;
}

.picked-left {
	flex: 0 0 90px;
}

.picked-swatch {
	width: 90px;
	height: 90px;
	border-radius: 12px;
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.picked-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.picked-right p {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(255, 255, 255, 0.4);
	border-radius: 8px;
	padding: 6px 12px;
	margin: 0;
	font-size: 0.95rem;
	color: #5b5339;
}

.picked-right p strong {
	width: 60px;
	color: #4e7d65;
}

.picked-right span {
	flex: 1;
	text-align: left;
	font-family: monospace;
	font-weight: 500;
}

#paletteCard {
	width: 100%;
	text-align: center;
}

.palette-container {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
	/* margin: 20px auto 0; */
	max-width: 750px;
}

.palette-item {
	flex: 1;
	/* min-width: 130px; */
	text-align: center;
}

.color-swatch {
	min-width: fit-content;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	margin: auto;
}

.color-swatch:hover {
	transform: scale(1.05);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.color-info {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.color-info .hex {
	font-weight: 600;
	color: #5b5339;
}

.copy-btn {
	background: #f2f1ef;
	border: none;
	border-radius: 8px;
	padding: 6px 14px;
	font-weight: 600;
	cursor: pointer;
	color: #222;
	transition: background 0.2s ease, transform 0.15s ease;
}

.copy-btn:hover {
	background: #e6e4e0;
	transform: translateY(-1px);
}






/* 📱 Responsive */
@media (max-width: 900px) {
	.color-picker-layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.picked-color {
		flex-direction: column;
		align-items: flex-start;
	}

	.picked-left {
		align-self: center;
	}

	.picked-right p {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.picked-right strong {
		width: auto;
	}
}



/* === 📱 HAMBURGER SIDEBAR (Mobile) === */

.hamburger {
	display: none;
	/* hidden on desktop */
	background: none;
	border: none;
	font-size: 1.6rem;
	color: var(--primary-dark);
	cursor: pointer;
	transition: color .2s;
}

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

/* === Mobile (<=768px): collapse sidebar into top bar + hamburger === */
@media (max-width: 768px) {

	/* Layout */
	body,
	.page-layout {
		flex-direction: column;
	}

	main.main {
		margin-left: 0;
		padding: 20px;
		gap: 18px;
	}

	/* Sidebar turns into top bar */
	nav.sidebar {
		position: relative !important;
		top: auto;
		left: auto;
		bottom: auto;
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
		height: auto !important;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: 12px 18px;
		border-right: none;
		border-bottom: 1px solid #e6dec1;
		overflow: visible;
		z-index: 1000;
		background: var(--panel-bg);
	}

	nav.sidebar .logo {
		display: inline-flex;
	}


	/* Top row with logo + hamburger */
	.sidebar-top {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.hamburger {
		display: inline-flex;
		background: none;
		border: none;
		font-size: 1.6rem;
		color: var(--primary-dark);
		cursor: pointer;
	}

	.hamburger:hover {
		color: var(--primary);
	}

	/* Hide motto, coffee btn, PH badge & sidebar search on mobile */
	nav.sidebar .motto,
	nav.sidebar .bmc-sidebar-btn,
	nav.sidebar .ph-sidebar-btn,
	nav.sidebar .sidebar-search {
		display: none !important;
	}

	/* Menu is hidden by default */
	nav.sidebar ul.menu {
		display: none;
		flex-direction: column;
		width: 100%;
		background: var(--panel-bg);
		position: absolute;
		top: 100%;
		left: 0;
		border-bottom: 1px solid #e6dec1;
		padding: 12px 0;
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
		z-index: 1001;
	}

	/* Open state toggled by JS */
	nav.sidebar ul.menu.open {
		display: flex;
	}

	nav.sidebar ul.menu li {
		margin: 0;
	}

	nav.sidebar ul.menu a {
		width: 100%;
		padding: 12px 20px;
		border-radius: 0;
		border: none;
		font-size: 1rem;
		background: transparent;
		white-space: normal;
	}

	nav.sidebar ul.menu a:hover {
		background: rgba(255, 255, 255, 0.5);
		box-shadow: none;
	}

	/* Cards/grid stack */
	.content-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.card {
		max-height: none;
	}

	.card-body {
		overflow: visible;
	}

	/* Format selector stacks */
	.format-selector {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.format-controls {
		flex-direction: column;
		width: 100%;
		align-items: stretch;
	}

	.swap-btn,
	.compress-link {
		width: 100%;
		text-align: center;
	}

	/* SEO block + headings + buttons */
	.seo-block {
		padding: 16px;
	}

	.seo-block h1 {
		font-size: 1.5rem;
	}

	/* Buttons: stack vertically with touch-friendly size */
	button {
		width: 100%;
		justify-content: center;
		min-height: 44px;
	}

	.card-footer {
		flex-wrap: wrap;
		height: auto;
	}

	/* Textarea sizing on mobile */
	.card-body textarea {
		min-height: 150px;
		height: auto;
	}

	/* Code blocks: constrain to viewport */
	pre.code-block {
		max-width: 100vw;
		overflow-x: auto;
	}

	/* Tool search input: larger for mobile typing */
	.tool-search-wrap input {
		font-size: 1.2em;
		padding: 16px 20px;
	}

	.sidebar-search input {
		font-size: 1em;
		padding: 12px 14px;
	}

	/* Hamburger menu z-index: ensure dropdown appears above all content */
	nav.sidebar ul.menu {
		z-index: 9999;
	}
}

/* === Very small screens (phones < 480px) === */
@media (max-width: 480px) {
	.tool-cards {
		grid-template-columns: 1fr;
	}
}

/* === Blog Article Styles === */

/* Styled code blocks */
article.seo-block pre {
	background: #1e1e2e;
	color: #cdd6f4;
	border-radius: 12px;
	padding: 20px 22px;
	overflow-x: auto;
	font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
	font-size: 0.85em;
	line-height: 1.6;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	margin: 16px 0;
	position: relative;
}

article.seo-block pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	color: inherit;
}

article.seo-block code {
	background: rgba(58, 125, 92, 0.1);
	color: var(--primary-dark);
	padding: 2px 7px;
	border-radius: 5px;
	font-family: 'JetBrains Mono', 'Fira Code', monospace;
	font-size: 0.88em;
	font-weight: 500;
}

/* CTA buttons for tool links */
.blog-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 24px 0;
	padding: 16px 28px;
	background: linear-gradient(135deg, #3a7d5c 0%, #2d6648 100%);
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 14px;
	font-weight: 700;
	font-size: 1.05em;
	letter-spacing: 0.01em;
	box-shadow: 0 4px 16px rgba(58, 125, 92, 0.3);
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(58, 125, 92, 0.4);
	background: linear-gradient(135deg, #43926a 0%, #357552 100%);
}

.blog-cta i {
	font-size: 1.2em;
}

/* Related tools cards at bottom of article */
.blog-related-tools {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin: 20px 0 8px;
}

.blog-related-tools a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: rgba(255, 253, 248, 0.7);
	backdrop-filter: blur(8px);
	border: 1px solid var(--glass-border);
	border-radius: 12px;
	text-decoration: none;
	color: var(--text-color);
	font-weight: 600;
	font-size: 0.9em;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-related-tools a:hover {
	background: rgba(255, 255, 255, 0.85);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	color: var(--primary-dark);
}

.blog-related-tools a i {
	color: var(--accent);
	font-size: 1.1em;
	width: 20px;
	text-align: center;
}

/* Blog cross-links section */
.blog-more-articles {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--sand);
	font-size: 0.9em;
	color: var(--muted-color);
}

.blog-more-articles a {
	color: var(--primary);
	font-weight: 600;
	text-decoration: none;
}

.blog-more-articles a:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}

@media (max-width: 768px) {
	.blog-cta {
		padding: 14px 20px;
		font-size: 0.95em;
	}
	.blog-related-tools {
		grid-template-columns: 1fr;
	}
}