/*
Theme Name: ToolNest
Theme URI: https://toolnest.example
Author: ToolNest
Description: A clean, fast theme for the ToolNest free online tools site. Pairs with the ToolNest Converters plugin.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: toolnest
*/

/* ---------------- Reset & base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1c2b36;
	background: #ffffff;
	line-height: 1.6;
	font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0d6ba8; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 800; color: #10202b; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.3em; }
button { font-family: inherit; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}
.tn-skip-link {
	position: fixed; top: -60px; left: 0; z-index: 10000;
	background: #0d6ba8; color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 8px 0;
	transition: top .15s ease;
}
.tn-skip-link:focus { top: 0; width: auto; height: auto; overflow: visible; clip: auto; }

.tn-container { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }

.tn-btn {
	display: inline-block;
	background: #0d6ba8;
	color: #fff;
	font-weight: 700;
	padding: .75rem 1.5rem;
	border-radius: 999px;
	text-decoration: none;
	margin-right: .6rem;
}
.tn-btn:hover { background: #094e7a; text-decoration: none; color: #fff; }
.tn-btn-outline { background: transparent; color: #0d6ba8; border: 2px solid #0d6ba8; padding: .65rem 1.4rem; }
.tn-btn-outline:hover { background: #eaf4fa; color: #0d6ba8; }

/* ---------------- Header ---------------- */
.tn-site-header {
	border-bottom: 1px solid #e6edf2;
	position: sticky;
	top: 0;
	background: #ffffffee;
	backdrop-filter: blur(6px);
	z-index: 500;
}
.tn-site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .9rem 1.25rem;
	gap: 1rem;
}
.tn-logo { display: flex; align-items: center; gap: .55rem; }
.tn-logo-mark {
	display: inline-flex;
	width: 34px; height: 34px;
	align-items: center; justify-content: center;
	background: linear-gradient(135deg, #0d6ba8, #17c3b2);
	border-radius: 9px;
	color: #fff;
	flex-shrink: 0;
}
.tn-logo-mark svg { width: 20px; height: 20px; }
.tn-logo-text { font-weight: 800; font-size: 1.25rem; color: #10202b; letter-spacing: -.02em; }
.tn-logo:hover { text-decoration: none; }

.tn-menu { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
.tn-menu a { color: #33475a; font-weight: 600; }
.tn-menu a:hover { color: #0d6ba8; text-decoration: none; }

.tn-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px; height: 40px;
	background: none;
	border: 1px solid #d9e3ea;
	border-radius: 8px;
	cursor: pointer;
}
.tn-nav-toggle span { display: block; width: 18px; height: 2px; background: #10202b; margin: 0 auto; }

/* ---------------- Hero ---------------- */
.tn-hero {
	background: radial-gradient(circle at 15% 20%, #e8f5fb 0%, #ffffff 55%);
	padding: 3.5rem 0 2.5rem;
	text-align: center;
}
.tn-hero-inner { max-width: 760px; }
.tn-hero-sub { font-size: 1.08rem; color: #48606f; margin-bottom: 1.75rem; }
.tn-hero-search input {
	width: 100%;
	max-width: 480px;
	padding: .9rem 1.2rem;
	border-radius: 999px;
	border: 1px solid #d9e3ea;
	font-size: 1rem;
	box-shadow: 0 6px 20px rgba(13,107,168,.08);
}
.tn-hero-search input:focus { outline: 2px solid #17c3b2; }

/* ---------------- Filter tabs ---------------- */
.tn-tools-section { padding: 2.5rem 1.25rem 1rem; }
.tn-filter-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 1.75rem;
}
.tn-filter-tab {
	background: #f2f6f8;
	border: 1px solid transparent;
	color: #33475a;
	font-weight: 600;
	font-size: .88rem;
	padding: .5rem 1.1rem;
	border-radius: 999px;
	cursor: pointer;
}
.tn-filter-tab:hover { text-decoration: none; background: #e6edf2; }
.tn-filter-tab.is-active { background: #0d6ba8; color: #fff; }

/* ---------------- Tool cards / grid ---------------- */
.tn-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}
.tn-card {
	--tn-card-accent: #0d6ba8;
	display: flex;
	align-items: flex-start;
	gap: .85rem;
	background: #fff;
	border: 1px solid #e6edf2;
	border-radius: 14px;
	padding: 1.1rem 1.2rem;
	position: relative;
	transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tn-card:hover {
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(16,32,43,.08);
	border-color: var(--tn-card-accent);
}
.tn-card-icon {
	flex-shrink: 0;
	width: 42px; height: 42px;
	border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	background: color-mix(in srgb, var(--tn-card-accent) 12%, white);
	color: var(--tn-card-accent);
}
.tn-card-icon svg { width: 22px; height: 22px; }
.tn-card-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.tn-card-title { font-weight: 700; color: #10202b; font-size: 1rem; }
.tn-card-desc { font-size: .84rem; color: #5c7182; line-height: 1.45; }
.tn-card-tag {
	position: absolute;
	top: .8rem; right: .9rem;
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--tn-card-accent);
	opacity: .0;
}
.tn-no-results { text-align: center; color: #5c7182; padding: 2rem 0; }
.tn-notice {
	background: #fff3cd;
	border: 1px solid #ffe08a;
	color: #6b5300;
	padding: 1rem 1.25rem;
	border-radius: 10px;
}

/* ---------------- Why section ---------------- */
.tn-why-section { background: #f7fafc; padding: 3rem 0; margin-top: 2.5rem; }
.tn-why-section h2 { text-align: center; margin-bottom: 1.75rem; }
.tn-why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.tn-why-item { text-align: center; padding: 0 1rem; }
.tn-why-item h3 { color: #0d6ba8; }
.tn-why-item p { color: #48606f; font-size: .95rem; }

/* ---------------- Breadcrumbs ---------------- */
.tn-breadcrumbs { font-size: .82rem; color: #7c8fa0; margin: 1.25rem 0 .75rem; }
.tn-breadcrumbs a { color: #7c8fa0; }
.tn-breadcrumb-sep { margin: 0 .35rem; }

/* ---------------- Single tool page ---------------- */
.tn-tool-page { padding-bottom: 1rem; }
.tn-tool-header { max-width: 760px; margin: 0 auto 1.75rem; text-align: center; }
.tn-tool-category-tag {
	display: inline-block;
	background: #eaf4fa;
	color: #0d6ba8;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: .3rem .8rem;
	border-radius: 999px;
	margin-bottom: .75rem;
}
.tn-tool-lede { font-size: 1.08rem; color: #48606f; }
.tn-tool-widget-wrap { margin-bottom: 2rem; }

/* Usage table */
.tn-usage-table-wrap { max-width: 780px; margin: 0 auto 2.5rem; }
.tn-usage-heading { text-align: center; }
.tn-usage-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e6edf2;
	border-radius: 12px;
	overflow: hidden;
}
.tn-usage-table th, .tn-usage-table td {
	padding: .75rem 1rem;
	border-bottom: 1px solid #eef2f5;
	text-align: left;
	vertical-align: top;
	font-size: .92rem;
}
.tn-usage-table thead th {
	background: #f7fafc;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #5c7182;
}
.tn-usage-table tbody tr:last-child td { border-bottom: none; }
.tn-step-num {
	width: 2.2rem;
	font-weight: 800;
	color: #17c3b2;
}

/* Article typography */
.tn-tool-article { max-width: 760px; margin: 0 auto 3rem; font-size: 1.03rem; color: #253846; }
.tn-tool-article h2 { margin-top: 1.9em; }
.tn-tool-article h3 { margin-top: 1.5em; color: #0d6ba8; }
.tn-tool-article blockquote {
	margin: 1.5em 0;
	padding: .2rem 1.25rem;
	border-left: 4px solid #17c3b2;
	color: #48606f;
	font-style: italic;
}
.tn-tool-article ul, .tn-tool-article ol { padding-left: 1.4em; }
.tn-tool-article li { margin-bottom: .4em; }

/* Related tools */
.tn-related-section { background: #f7fafc; padding: 2.5rem 0 3rem; }
.tn-related-section h2 { text-align: center; margin-bottom: 1.5rem; }

/* ---------------- Generic pages ---------------- */
.tn-page-inner { max-width: 760px; padding-top: 2.5rem; padding-bottom: 3rem; }
.tn-page-content p, .tn-page-content li { color: #33475a; }
.tn-404 { text-align: center; }

/* ---------------- Footer ---------------- */
.tn-site-footer { background: #10202b; color: #c6d4dd; margin-top: 2rem; }
.tn-footer-inner {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2rem;
	padding: 3rem 1.25rem 2rem;
}
.tn-footer-col h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .9rem; }
.tn-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.tn-footer-col a { color: #a9bbc7; }
.tn-footer-col a:hover { color: #17c3b2; }
.tn-footer-brand p { color: #90a4b2; font-size: .9rem; max-width: 320px; }
.tn-footer-bottom {
	border-top: 1px solid #1e3140;
	padding: 1.1rem 1.25rem;
	font-size: .8rem;
	color: #7891a0;
}
.tn-footer-bottom p { margin: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
	.tn-footer-inner { grid-template-columns: 1fr 1fr; }
	.tn-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
	.tn-nav-toggle { display: flex; }
	.tn-primary-nav {
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: #fff;
		border-bottom: 1px solid #e6edf2;
		display: none;
		padding: 1rem 1.25rem 1.25rem;
	}
	.tn-primary-nav.is-open { display: block; }
	.tn-menu { flex-direction: column; gap: .9rem; }
	.tn-hero { padding: 2.5rem 0 2rem; }
	.tn-tools-grid { grid-template-columns: 1fr; }
	.tn-footer-inner { grid-template-columns: 1fr; }
}
