:root {
	--bg: #fffaf3;
	--panel-bg: #f4e9d8;
	--sand: #f2e9db;
	--cactus: #4e7d65;
	--cactus-light: #6ea68a;
	--shadow-dark: rgba(180, 154, 108, 0.13);
	--shadow-light: rgba(255, 255, 255, 0.9);
	--primary: #7ca982;
	--primary-dark: #4a7857;
	--text-color: #5b5339;
	--muted-color: #796f5e;
	--radius: 26px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	font-family: 'Segoe UI', Arial, sans-serif;
	color: var(--text-color);
	min-height: 100vh;
	display: flex;
}
/* === 🧭 SIDEBAR === */
/* === 🧭 SIDEBAR === */
nav.sidebar {
	position: fixed;                  /* ✅ Sidebar stays visible */
	left: 0;
	top: 0;
	bottom: 0;
	width: 300px;
	min-width: 300px;
	max-width: 300px;
	background: var(--panel-bg);
	border-right: 1px solid #e6dec1;
	display: flex;
	flex-direction: column;
	padding: 10px 20px 0;
	gap: 20px;
	user-select: none;
	overflow: hidden;                /* Prevent body scroll inside */
	z-index: 1000;
}

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

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

.logo img {
	width: 70px;
}

/* === 💬 Motto === */
nav.sidebar .motto {
	font-size: 0.9em;
	color: var(--muted-color);
	border-top: 1px solid #e6dec1;
	padding-top: 0;
	margin-top: auto;
	text-align: center;
	line-height: 1.5;
	opacity: 0.8;
}

/* === 📋 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-thumb {
	background-color: var(--sand);
	border-radius: 4px;
}

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

nav.sidebar ul.menu a {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 1em;
	color: var(--primary);
	background: var(--bg);
	text-decoration: none;
	border: 1px solid var(--sand);
	justify-content: flex-start;
	transition: 0.25s;
	background: var(--shadow-light);
}

nav.sidebar ul.menu a:hover {
	color: var(--primary-dark);
	box-shadow: inset 3px 3px 8px var(--shadow-dark),
		inset -3px -3px 8px var(--shadow-light);
}

nav.sidebar ul.menu a.active {
	background: var(--primary);
	color: #fff;
	box-shadow: none;
}

nav.sidebar ul.menu a i {
	font-size: 1.1em;
	color: var(--cactus);
	width: 22px;
	min-width: 22px;
	margin-top: 3px;
}

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

.sidebar-search input {
	width: 100%;
	border: 1px solid var(--sand);
	border-radius: 8px;
	font-size: 0.9em;
	margin-bottom: 0;
}

.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.95rem;
	color: #222;
}

.menu-sub {
	font-size: 0.8rem;
	color: #666;
}

/* === 🧱 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: #6ea68a29 !important; /* slightly deeper tone for the FAQ card */
	border-radius: var(--radius);
	padding: 20px 25px;
	box-shadow: 3px 3px 10px var(--shadow-dark),
			  -3px -3px 10px var(--shadow-light);
}
.faq-section h2{
	color:var(--cactus);
}
.seo-block.faq-section p{
	/* padding-left: 0px !important; */
}

.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;
  padding-left: 24px !important;
}

/* 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);
  padding-left: 0px !important;
}

/* 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);
	display: none;
}

.seo-block {
	max-width: 1300px;
	background: #f7efdf; /* slightly lighter for info section */
	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);
	font-size:0.9em;
}

.seo-block h1 {
	color: var(--primary-dark);
	font-size: 2rem;
	font-weight: 700;
	margin: 0px;
}

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

.seo-block ul {
	color: var(--muted-color);
	padding-left: 20px !important;
}
.seo-block ul li{
	list-style:none;
	line-height:1.5em
}

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, 255, 255, 0.7);
	border-radius: var(--radius);
	box-shadow: 4px 4px 10px var(--shadow-dark),
		-4px -4px 10px var(--shadow-light);
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--sand);
	max-height: calc(100vh - 100px);
}

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

.card-header h2 {
	margin: 0;
	font-size: 1.25em;
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--primary);
}

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

.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: 14px 16px;
	border-radius: 10px;
	border: 1px solid var(--sand);
	width: 100%;
	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);
	font-size: 1.05em;
	margin-bottom: 10px;
	color: var(--text-color);
}

/* Buttons with fat lower border */
button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border: none;
	border-radius: 10px;
	font-weight: 600;
	font-size: 1em;
	cursor: pointer;
	transition: all 0.2s ease;
}

button.green {
	background: var(--cactus);
	color: #fff;
	box-shadow:
		0 4px 0 #375845,
		4px 4px 8px rgba(0, 0, 0, 0.2),
		-2px -2px 6px rgba(255, 255, 255, 0.9);
}

button.green:hover{
	background: #6e9280;
}
button.green:active {
	transform: translateY(2px);
	box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.25);
}

button.beige {
	background: #e6d3b2;
	/* warmer sand beige */
	color: #4d3b22;
	box-shadow:
		0 4px 0 #c0a87d,
		/* fat bottom edge */
		4px 4px 8px rgba(0, 0, 0, 0.2),
		-2px -2px 6px rgba(255, 255, 255, 0.9);
}

button.beige:hover {
	background: #f1e0c7;
}

button.beige:active {
	transform: translateY(2px);
	box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.25);
}

.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 #4e7d65;
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	color: #796f5e;
	background: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover {
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 0 12px rgba(78, 125, 101, 0.2);
}

.dropzone.dragover {
	background: #f0f8f5;
	border-color: #6ea68a;
}

.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: 10px;
	border: none;
	resize: vertical;
	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);
	font-family: monospace;
	font-size: 0.95em;
	color: var(--text-color);
}

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 tweaks */
  body {
	flex-direction: column;
  }

  /* Sidebar becomes relative / sticky top bar */
  nav.sidebar {
	position: sticky !important;
	top: 0;
	z-index: 1000;
	width: 100%;
	max-width: none;
	min-width: 0;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	padding: 12px 18px;
	border-right: none;
	border-bottom: 1px solid #e6dec1;
	overflow: visible;
  }

  /* Hide motto to save space */
  nav.sidebar .motto {
	display: none;
  }

  /* Top row: 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;
	width:70px;
  }
  .hamburger:hover {
	color: var(--primary);
  }

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

  /* Show menu when “open” class is toggled */
  nav.sidebar ul.menu.open {
	display: flex;
  }

  /* Main content should expand full width */
  main.main {
	margin-left: 0 !important;
	padding: 20px;
	gap: 18px;
  }

  /* Menu items */
  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;
  }

  /* Other layout adjustments */
  .content-grid {
	grid-template-columns: 1fr;
	gap: 20px;
  }
  .card {
	max-height: none;
  }
  .card-body {
	overflow: visible;
  }
  .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 {
	padding: 16px;
  }
  .seo-block h1 {
	font-size: 1.5rem;
  }
  button {
	width: 100%;
	justify-content: center;
  }
}