/*
Theme Name:  ToolSphere Theme
Theme URI:   https://example.com/toolsphere-theme
Author:      ToolSphere
Author URI:  https://example.com
Description: Fast, clean companion theme for the ToolSphere plugin — a modern design for a free online tools website with a searchable tool directory front page.
Version:     1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toolsphere-theme
Tags:        blog, one-column, custom-menu, translation-ready
*/

:root {
	--ts-accent: #4f46e5;
	--ts-accent-dark: #4338ca;
	--ts-accent-soft: #eef2ff;
	--ts-ink: #1e293b;
	--ts-muted: #64748b;
	--ts-line: #e2e8f0;
	--ts-bg: #f8fafc;
	--ts-card: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	color: var(--ts-ink);
	background: var(--ts-bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--ts-accent); }
a:hover { color: var(--ts-accent-dark); }

.ts-container {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 20px;
}

/* --- Accessibility ------------------------------------------------------ */
.skip-link {
	position: absolute;
	left: -9999px;
	background: var(--ts-accent);
	color: #fff;
	padding: 10px 16px;
	border-radius: 0 0 8px 0;
	z-index: 1000;
}
.skip-link:focus { left: 0; top: 0; color: #fff; }

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px; width: 1px;
	overflow: hidden;
}

/* --- Header ------------------------------------------------------------- */
.ts-header {
	background: var(--ts-card);
	border-bottom: 1px solid var(--ts-line);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}
.ts-header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 64px;
	flex-wrap: wrap;
	padding: 8px 0;
}
.ts-logo {
	font-size: 22px;
	font-weight: 800;
	text-decoration: none;
	color: var(--ts-ink);
	letter-spacing: -0.02em;
}
.ts-logo .ts-logo-mark { color: var(--ts-accent); }
.ts-tagline { color: var(--ts-muted); font-size: 13px; }

.ts-nav { margin-left: auto; }
.ts-nav ul {
	list-style: none;
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}
.ts-nav a {
	display: block;
	padding: 8px 14px;
	text-decoration: none;
	color: var(--ts-ink);
	font-weight: 600;
	font-size: 15px;
	border-radius: 8px;
}
.ts-nav a:hover { background: var(--ts-accent-soft); color: var(--ts-accent); }

/* --- Hero --------------------------------------------------------------- */
.ts-hero {
	background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #9333ea 100%);
	color: #fff;
	text-align: center;
	padding: 56px 20px 48px;
}
.ts-hero h1 {
	margin: 0 0 12px;
	font-size: clamp(28px, 5vw, 44px);
	letter-spacing: -0.02em;
	line-height: 1.15;
}
.ts-hero p {
	margin: 0 auto;
	max-width: 640px;
	font-size: 18px;
	opacity: .92;
}
.ts-hero .ts-hero-badges {
	margin-top: 22px;
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}
.ts-hero .ts-badge {
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 14px;
	font-weight: 600;
}

/* --- Main content ------------------------------------------------------- */
.ts-main { padding: 36px 0 70px; }

.ts-content {
	background: var(--ts-card);
	border: 1px solid var(--ts-line);
	border-radius: 16px;
	padding: 36px;
}
.ts-content h1 { margin-top: 0; }
.ts-content h1, .ts-content h2, .ts-content h3 { color: var(--ts-ink); line-height: 1.3; }
.ts-content p, .ts-content li { color: #334155; font-size: 16.5px; line-height: 1.75; }

/* Front page: shortcode grid sits directly on the page background. */
.ts-front .ts-content {
	background: transparent;
	border: 0;
	padding: 0;
}

.ts-entry-meta { color: var(--ts-muted); font-size: 14px; margin-bottom: 18px; }

/* --- Archive cards ------------------------------------------------------- */
.ts-post-list { display: grid; gap: 18px; }
.ts-post-card {
	background: var(--ts-card);
	border: 1px solid var(--ts-line);
	border-radius: 14px;
	padding: 24px;
}
.ts-post-card h2 { margin: 0 0 8px; font-size: 22px; }
.ts-post-card h2 a { text-decoration: none; color: var(--ts-ink); }
.ts-post-card h2 a:hover { color: var(--ts-accent); }

/* --- Pagination / navigation --------------------------------------------- */
.ts-pagination { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.ts-pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--ts-line);
	border-radius: 8px;
	text-decoration: none;
	background: var(--ts-card);
}
.ts-pagination .current { background: var(--ts-accent); color: #fff; border-color: var(--ts-accent); }

/* --- 404 ------------------------------------------------------------------ */
.ts-404 { text-align: center; padding: 70px 20px; }
.ts-404 .ts-404-code { font-size: 88px; font-weight: 800; color: var(--ts-accent); line-height: 1; }

.ts-btn {
	display: inline-block;
	background: var(--ts-accent);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	padding: 12px 24px;
	border-radius: 10px;
}
.ts-btn:hover { background: var(--ts-accent-dark); }

/* --- Footer ---------------------------------------------------------------- */
.ts-footer {
	background: #0f172a;
	color: #cbd5e1;
	margin-top: 40px;
	padding: 44px 0 24px;
}
.ts-footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 36px;
}
@media (max-width: 760px) { .ts-footer-grid { grid-template-columns: 1fr; } }
.ts-footer h3 { color: #fff; font-size: 16px; margin: 0 0 12px; }
.ts-footer ul { list-style: none; margin: 0; padding: 0; }
.ts-footer li { margin-bottom: 8px; }
.ts-footer a { color: #cbd5e1; text-decoration: none; }
.ts-footer a:hover { color: #fff; text-decoration: underline; }
.ts-footer-bottom {
	border-top: 1px solid #1e293b;
	margin-top: 32px;
	padding-top: 18px;
	font-size: 14px;
	color: #94a3b8;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

/* --- WordPress core classes ------------------------------------------------ */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin: 12px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--ts-muted); font-size: 14px; text-align: center; }
.sticky { border-left: 4px solid var(--ts-accent); }
.bypostauthor { font-weight: inherit; }

@media (max-width: 640px) {
	.ts-content { padding: 22px; }
	.ts-header-inner { gap: 10px; }
}
