/*
Theme Name: Prime Free Tools
Theme URI: https://primefreetools.com
Author: PrimeFreeTools
Author URI: https://primefreetools.com
Description: A hand-drawn, sketchbook-style block theme for PrimeFreeTools — a free collection of 200+ browser-based calculators, converters, generators and developer tools. Wobbly borders, hard offset shadows, warm paper texture, and playful handwritten typography. Child of Twenty Twenty-Five.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.2
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toolsbased
Template: twentytwentyfive
Tags: one-column, customized-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/* Theme toggle button dimensions */
.tb-btn--theme-toggle,
[data-toolsbased-theme-toggle] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	max-width: 44px !important;
	min-height: 44px !important;
	max-height: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	flex: 0 0 44px !important;
	flex-shrink: 0 !important;
	flex-grow: 0 !important;
	box-sizing: border-box !important;
	justify-self: end !important;
	align-self: center !important;
	font-size: 1.25rem !important;
	line-height: 1 !important;
}

/* ==========================================================================
   Category Hub — Pillar Archive Styles
   ========================================================================== */

.category-hub {
	padding: 1.5rem 0 4rem;
	background: transparent;
}

.category-hub__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* --- Breadcrumbs --- */
.category-hub__breadcrumb {
	margin-bottom: 1.25rem;
	font-size: 0.9375rem;
	color: #64748b;
}

.category-hub__breadcrumb a {
	color: var(--tb-accent2, #2d5da1);
	text-decoration: none;
}

.category-hub__breadcrumb a:hover {
	text-decoration: underline;
}

.category-hub__breadcrumb-current {
	color: var(--tb-ink, #2d2d2d);
	font-weight: 600;
}

/* --- Editorial Hero Header --- */
.category-hub__hero {
	margin-bottom: 2.5rem;
	padding: 2.5rem 2rem;
	background: var(--tb-card, #ffffff);
	border: 3px solid var(--tb-ink, #2d2d2d);
	border-radius: var(--tb-wobble, 255px 15px 225px 15px / 15px 225px 15px 255px);
	box-shadow: var(--tb-shadow-lg, 8px 8px 0px 0px var(--tb-ink, #2d2d2d));
}

.category-hub__badge-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.category-hub__badge-row br {
	display: none;
}

.category-hub__badge {
	display: inline-block;
	font-family: var(--tb-font-head, system-ui);
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.25rem 0.6rem;
	background: var(--tb-postit, #fff9c4);
	color: var(--tb-ink, #2d2d2d);
	border: 2px solid var(--tb-ink, #2d2d2d);
	border-radius: 4px;
}

.category-hub__count {
	font-size: 0.875rem;
	font-weight: 600;
	color: #64748b;
}

.category-hub__title {
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.15;
	margin: 0 0 1rem;
	color: var(--tb-ink, #2d2d2d);
}

.category-hub__description {
	max-width: 75ch;
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--tb-ink, #2d2d2d);
	margin-bottom: 1.5rem;
}

.category-hub__description p:last-child {
	margin-bottom: 0;
}

/* Subtopics Pills */
.category-hub__subtopics {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-top: 1.25rem;
	border-top: 2px dashed var(--tb-erased, #e5e0d8);
	flex-wrap: wrap;
}

.category-hub__subtopics-label {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--tb-ink, #2d2d2d);
}

.category-hub__subtopics-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.category-hub__subtopic-pill {
	display: inline-block;
	padding: 0.25rem 0.65rem;
	font-size: 0.8125rem;
	color: var(--tb-ink, #2d2d2d);
	background: var(--tb-paper, #fdfbf7);
	border: 1.5px solid var(--tb-ink, #2d2d2d);
	border-radius: 999px;
	text-decoration: none;
	transition: all 0.15s ease;
}

.category-hub__subtopic-pill:hover {
	background: var(--tb-accent, #ff4d4d);
	color: #ffffff;
	transform: translateY(-1px);
}

/* --- Section Labels --- */
.category-hub__section-label {
	font-size: 1.5rem;
	margin: 0 0 1.25rem;
	color: var(--tb-ink, #2d2d2d);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* --- Featured Spotlight Card --- */
.category-hub__spotlight-section {
	margin-bottom: 3.5rem;
}

.category-hub__spotlight-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	padding: 1.75rem;
	background: var(--tb-card, #ffffff);
	border: 3px solid var(--tb-ink, #2d2d2d);
	border-radius: var(--tb-wobble-md, 95px 15px 100px 15px / 15px 95px 15px 100px);
	box-shadow: var(--tb-shadow, 4px 4px 0px 0px var(--tb-ink, #2d2d2d));
}

@media (min-width: 820px) {
	.category-hub__spotlight-card {
		grid-template-columns: 1.1fr 1fr;
		align-items: center;
		gap: 2.5rem;
		padding: 2.25rem;
	}
}

.category-hub__spotlight-media {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	border: 2px solid var(--tb-ink, #2d2d2d);
	aspect-ratio: 16 / 9;
	background: var(--tb-erased, #e5e0d8);
}

.category-hub__spotlight-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.category-hub__spotlight-card:hover .category-hub__spotlight-image {
	transform: scale(1.03);
}

.category-hub__card-meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.8125rem;
	color: #64748b;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.category-hub__pill {
	background: var(--tb-accent2, #2d5da1);
	color: #ffffff;
	font-weight: 700;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	text-transform: uppercase;
}

.category-hub__spotlight-title {
	font-size: clamp(1.5rem, 2.5vw, 2.1rem);
	line-height: 1.25;
	margin: 0 0 1rem;
}

.category-hub__spotlight-title a {
	color: var(--tb-ink, #2d2d2d);
	text-decoration: none;
}

.category-hub__spotlight-title a:hover {
	color: var(--tb-accent, #ff4d4d);
}

.category-hub__spotlight-excerpt {
	font-size: 1.05rem;
	line-height: 1.6;
	color: #475569;
	margin-bottom: 1.5rem;
}

/* --- Responsive Articles Grid --- */
.category-hub__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

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

@media (min-width: 1024px) {
	.category-hub__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.category-hub__card {
	display: flex;
	flex-direction: column;
	background: var(--tb-card, #ffffff);
	border: 2px solid var(--tb-ink, #2d2d2d);
	border-radius: 8px;
	box-shadow: var(--tb-shadow-card, 3px 3px 0px 0px rgba(45, 45, 45, 0.1));
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-hub__card:hover {
	transform: translateY(-3px);
	box-shadow: var(--tb-shadow, 4px 4px 0px 0px var(--tb-ink, #2d2d2d));
}

.category-hub__card-media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--tb-erased, #e5e0d8);
	overflow: hidden;
	border-bottom: 2px solid var(--tb-ink, #2d2d2d);
}

.category-hub__card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.category-hub__card:hover .category-hub__card-image {
	transform: scale(1.04);
}

.category-hub__card-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
}

.category-hub__card-body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.category-hub__card-title {
	font-size: 1.25rem;
	line-height: 1.35;
	margin: 0 0 0.75rem;
}

.category-hub__card-title a {
	color: var(--tb-ink, #2d2d2d);
	text-decoration: none;
}

.category-hub__card-title a:hover {
	color: var(--tb-accent, #ff4d4d);
}

.category-hub__card-excerpt {
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #475569;
	margin-bottom: 1.25rem;
	flex-grow: 1;
}

.category-hub__card-footer {
	padding-top: 0.75rem;
	border-top: 1px solid var(--tb-erased, #e5e0d8);
}

.category-hub__read-link {
	font-weight: 700;
	font-size: 0.875rem;
	color: var(--tb-accent2, #2d5da1);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.category-hub__read-link:hover {
	color: var(--tb-accent, #ff4d4d);
}

/* --- Numeric Pagination --- */
.category-hub__pagination {
	margin-top: 3.5rem;
	text-align: center;
}

.category-hub__pagination ul.page-numbers {
	display: inline-flex;
	list-style: none;
	gap: 0.5rem;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
	justify-content: center;
}

.category-hub__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.75rem;
	background: var(--tb-card, #ffffff);
	color: var(--tb-ink, #2d2d2d);
	font-weight: 700;
	border: 2px solid var(--tb-ink, #2d2d2d);
	border-radius: 6px;
	text-decoration: none;
	box-shadow: 2px 2px 0px 0px var(--tb-ink, #2d2d2d);
	transition: all 0.1s ease;
}

.category-hub__pagination .page-numbers.current {
	background: var(--tb-accent, #ff4d4d);
	color: #ffffff;
	transform: translate(2px, 2px);
	box-shadow: 0px 0px 0px 0px var(--tb-ink, #2d2d2d);
}

.category-hub__pagination a.page-numbers:hover {
	background: var(--tb-postit, #fff9c4);
	transform: translate(1px, 1px);
}

/* --- Editorial / Technical Pillar Block --- */
.category-hub__editorial-pillar {
	margin-top: 4.5rem;
	padding: 2.25rem;
	background: var(--tb-card, #ffffff);
	border: 3px solid var(--tb-ink, #2d2d2d);
	border-radius: var(--tb-wobble, 255px 15px 225px 15px / 15px 225px 15px 255px);
	box-shadow: var(--tb-shadow, 4px 4px 0px 0px var(--tb-ink, #2d2d2d));
}

.category-hub__pillar-heading {
	font-size: 1.625rem;
	margin: 0 0 1.5rem;
	color: var(--tb-ink, #2d2d2d);
}

.category-hub__pillar-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

@media (min-width: 768px) {
	.category-hub__pillar-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}
}

.category-hub__pillar-item h3 {
	font-size: 1.15rem;
	margin: 0 0 0.5rem;
	color: var(--tb-ink, #2d2d2d);
}

.category-hub__pillar-item p {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #475569;
	margin: 0;
}

.category-hub__pillar-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	background: var(--tb-paper, #fdfbf7);
	border: 2px dashed var(--tb-ink, #2d2d2d);
	border-radius: 8px;
	flex-wrap: wrap;
	gap: 1rem;
}

.category-hub__pillar-cta p {
	margin: 0;
	font-size: 1rem;
	color: var(--tb-ink, #2d2d2d);
}

/* ==========================================================================
   Master Categories & Tools Directory Template (/category/)
   Authentic Hand-Drawn Sketchbook Tab System & Layouts
   ========================================================================== */

/* Authentic Tab Navigation (matching homepage .tb-tabs / .tb-tab-nav) */
.tb-categories-tabs {
	margin: 2rem 0;
}

.tb-categories-tabs .tb-tab-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin: 0 0 2rem;
	padding: 0;
	border: none;
	background: transparent;
}

.tb-tab-btn {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--tb-font-head, system-ui);
	font-size: 1rem;
	font-weight: 700;
	min-height: 46px;
	padding: 0.45rem 1.05rem;
	border: 3px solid var(--tb-ink, #2d2d2d);
	border-radius: var(--tb-wobble-md, 95px 15px 100px 15px / 15px 95px 15px 100px);
	background: var(--tb-card, #ffffff);
	color: var(--tb-ink, #2d2d2d);
	box-shadow: var(--tb-shadow-card, 3px 3px 0px 0px rgba(45, 45, 45, 0.1));
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
	user-select: none;
	line-height: 1.2;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.tb-tab-btn:hover {
	transform: rotate(-1deg) translateY(-1px);
	background: var(--tb-paper, #fdfbf7);
	color: var(--tb-ink, #2d2d2d);
	box-shadow: var(--tb-shadow, 4px 4px 0px 0px var(--tb-ink, #2d2d2d));
}

.tb-tab-btn.is-active {
	background: var(--tb-postit, #fff9c4);
	color: var(--tb-ink, #2d2d2d);
	border-color: var(--tb-ink, #2d2d2d);
	box-shadow: var(--tb-shadow, 4px 4px 0px 0px var(--tb-ink, #2d2d2d));
	transform: translateY(1px) rotate(0deg);
}

.tb-tab-btn:focus-visible {
	outline: 3px solid var(--tb-accent2, #2d5da1);
	outline-offset: 2px;
}

.tb-tab-btn .tb-tab-count {
	font-size: 0.8rem;
	font-weight: 800;
	background: var(--tb-accent, #ff4d4d);
	color: #ffffff;
	border-radius: 999px;
	padding: 0.1rem 0.55rem;
	line-height: 1.2;
	display: inline-block;
	transition: background 0.12s ease;
}

.tb-tab-btn.is-active .tb-tab-count {
	background: #c62828;
	color: #ffffff;
}

@media (max-width: 600px) {
	.tb-categories-tabs .tb-tab-nav {
		gap: 0.45rem;
	}
	.tb-tab-btn {
		font-size: 0.875rem;
		min-height: 40px;
		padding: 0.35rem 0.75rem;
	}
	.tb-tab-btn .tb-tab-count {
		font-size: 0.75rem;
		padding: 0.05rem 0.45rem;
	}
}

/* Category Tab Panels */
.tb-cat-panel {
	display: none;
	animation: tbFadeIn 0.18s ease-out;
}

.tb-cat-panel.is-active {
	display: block;
}

@keyframes tbFadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Category Tab Header Banner */
.tb-cat-panel-header {
	margin-bottom: 2rem;
	padding: 1.75rem 2rem;
	background: var(--tb-card, #ffffff);
}

.tb-cat-panel-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.tb-cat-panel-header__title {
	font-family: var(--tb-font-head, system-ui);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	margin: 0;
	color: var(--tb-ink, #2d2d2d);
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.tb-cat-panel-header__desc {
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--tb-ink, #2d2d2d);
	opacity: 0.9;
	margin: 0 0 1rem;
	max-width: 75ch;
}

.tb-cat-panel-header__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.9rem;
	color: #64748b;
	padding-top: 0.75rem;
	border-top: 1.5px dashed var(--tb-erased, #e5e0d8);
}

.tb-cat-panel-header__meta a {
	color: var(--tb-accent2, #2d5da1);
	font-weight: 700;
	text-decoration: underline wavy var(--tb-accent2, #2d5da1) 1.5px;
	text-underline-offset: 3px;
}

.tb-cat-panel-header__meta a:hover {
	color: var(--tb-accent, #ff4d4d);
	text-decoration-color: var(--tb-accent, #ff4d4d);
}

/* Guide Items in Dual Column */
.tb-guide-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
}

.tb-guide-card {
	padding: 1.15rem;
	background: var(--tb-card, #ffffff);
	border: 2px solid var(--tb-ink, #2d2d2d);
	border-radius: var(--tb-wobble-md, 95px 15px 100px 15px / 15px 95px 15px 100px);
	box-shadow: var(--tb-shadow-card, 3px 3px 0px 0px rgba(45, 45, 45, 0.1));
	margin-bottom: 1rem;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tb-guide-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--tb-shadow, 4px 4px 0px 0px var(--tb-ink, #2d2d2d));
}

.tb-guide-card__meta {
	font-size: 0.8rem;
	color: #64748b;
	margin-bottom: 0.35rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.tb-guide-card__title {
	font-family: var(--tb-font-head, system-ui);
	font-size: 1.1rem;
	line-height: 1.35;
	margin: 0 0 0.4rem;
}

.tb-guide-card__title a {
	color: var(--tb-ink, #2d2d2d);
	text-decoration: none;
}

.tb-guide-card__title a:hover {
	color: var(--tb-accent2, #2d5da1);
	text-decoration: underline wavy var(--tb-accent, #ff4d4d) 1.5px;
}

.tb-guide-card__excerpt {
	font-size: 0.9rem;
	line-height: 1.5;
	color: #475569;
	margin: 0;
}

/* Empty states */
.tb-empty-notice {
	padding: 2rem;
	text-align: center;
	border: 2px dashed var(--tb-erased, #e5e0d8);
	border-radius: var(--tb-wobble-md, 95px 15px 100px 15px / 15px 95px 15px 100px);
	color: #64748b;
	font-style: italic;
	margin: 1rem 0;
}
