/*
Theme Name: MultiToolsBox
Theme URI: https://multitoolsbox.com/
Author: MultiToolsBox
Author URI: https://multitoolsbox.com/
Description: A fast, modern blue-and-white theme for an online tools website. Responsive, lightweight (no external fonts or libraries) and AdSense-friendly. Designed to work with the MultiToolsBox Tools plugin.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: multitoolsbox
Tags: blog, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

:root {
	--mtb-navy: #0b2a6f;
	--mtb-blue: #1d4ed8;
	--mtb-blue-dark: #1e40af;
	--mtb-blue-100: #dbeafe;
	--mtb-blue-50: #eff6ff;
	--mtb-ink: #0f172a;
	--mtb-muted: #52607a;
	--mtb-line: #d6e0f2;
	--mtb-soft: #f3f7ff;
	--mtb-radius: 14px;
	--mtb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--mtb-ink); font-family: var(--mtb-font); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--mtb-blue); text-underline-offset: 3px; }
a:hover { color: var(--mtb-blue-dark); }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.015em; color: var(--mtb-ink); }
p { margin: 0 0 1.1em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; margin: 0; padding: 12px 18px; clip: auto; background: #fff; color: var(--mtb-blue); border-radius: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
:focus-visible { outline: 3px solid #93b4ff; outline-offset: 2px; }

.mtb-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.page-container { max-width: 960px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--mtb-line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 68px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--mtb-navy); text-decoration: none; font-size: 1.28rem; font-weight: 800; letter-spacing: -0.02em; }
.site-brand:hover { color: var(--mtb-navy); }
.site-brand img, .custom-logo-link img { display: block; max-height: 44px; width: auto; }
.brand-mark { flex: none; }
.site-nav-wrap { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 20px; }
.nav-list { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-list a { display: block; padding: 9px 14px; border-radius: 10px; color: var(--mtb-ink); font-weight: 600; font-size: 0.97rem; text-decoration: none; }
.nav-list a:hover { background: var(--mtb-blue-50); color: var(--mtb-blue); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a, .nav-list .current-page-ancestor > a { background: var(--mtb-blue-50); color: var(--mtb-blue); }
.nav-list .sub-menu { display: none; }
.header-search { display: flex; align-items: center; }
.header-search input { width: 190px; min-height: 42px; padding: 0 14px; border: 1.5px solid var(--mtb-line); border-right: 0; border-radius: 10px 0 0 10px; background: #fff; color: var(--mtb-ink); font: inherit; font-size: 0.95rem; }
.header-search button { display: inline-flex; align-items: center; justify-content: center; width: 46px; min-height: 42px; border: 1.5px solid var(--mtb-blue); border-radius: 0 10px 10px 0; background: var(--mtb-blue); color: #fff; cursor: pointer; }
.header-search button:hover { background: var(--mtb-blue-dark); border-color: var(--mtb-blue-dark); }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; padding: 0; border: 1.5px solid var(--mtb-line); border-radius: 10px; background: #fff; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; margin: 0 auto; background: var(--mtb-ink); border-radius: 2px; content: ""; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-bars::after { position: absolute; top: 6px; left: 0; }
.is-open .nav-toggle-bars { background: transparent; }
.is-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.is-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
	.js .nav-toggle { display: block; }
	.js .site-nav-wrap { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 20px 20px; background: #fff; border-bottom: 1px solid var(--mtb-line); box-shadow: 0 16px 30px rgba(11, 42, 111, 0.12); }
	.js .is-open .site-nav-wrap { display: flex; }
	.site-nav-wrap { flex-basis: 100%; justify-content: flex-start; }
	.nav-list { flex-direction: column; }
	.nav-list a { padding: 12px 14px; }
	.header-search input { flex: 1 1 auto; width: 100%; }
	.header-search { width: 100%; }
}

/* ---------- Page structure ---------- */
.site-main { min-height: 50vh; }
.page-header { background: var(--mtb-soft); border-bottom: 1px solid var(--mtb-line); padding: 26px 0 28px; }
.page-title { margin: 6px 0 0; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.page-lede { margin: 10px 0 0; max-width: 60ch; color: var(--mtb-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; color: var(--mtb-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #9aa9c4; }
.breadcrumbs a { color: var(--mtb-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--mtb-blue); text-decoration: underline; }
.page-body { padding: 32px 0 72px; }
.front-content > *:first-child { margin-top: 0; }

/* ---------- Content typography ---------- */
.entry-content > p, .entry-content > ul, .entry-content > ol, .entry-content > h2, .entry-content > h3, .entry-content > h4,
.entry-content > blockquote, .entry-content > details, .entry-content > .wp-block-list { max-width: 72ch; }
.entry-content h2 { margin: 2em 0 0.55em; font-size: 1.6rem; }
.entry-content h3 { margin: 1.6em 0 0.4em; font-size: 1.2rem; }
.entry-content > .mtb-tool + h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin: 0.35em 0; }
.entry-content blockquote { margin: 1.5em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 4px solid var(--mtb-blue-100); color: var(--mtb-muted); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.97rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--mtb-line); text-align: left; }
.entry-content th { background: var(--mtb-soft); }
.entry-content img { border-radius: 10px; }
.entry-content pre { overflow-x: auto; padding: 16px; background: var(--mtb-soft); border-radius: 12px; font-size: 0.92rem; }
.entry-content code { padding: 0.1em 0.35em; background: var(--mtb-soft); border-radius: 5px; font-size: 0.92em; }
.entry-content pre code { padding: 0; background: none; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.wp-caption-text, figcaption { font-size: 0.88rem; color: var(--mtb-muted); }

/* ---------- Blog ---------- */
.loop-wrap { padding-top: 36px; padding-bottom: 72px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--mtb-line); border-radius: var(--mtb-radius); transition: border-color 0.15s, box-shadow 0.15s; }
.post-card:hover { border-color: var(--mtb-blue); box-shadow: 0 8px 24px rgba(29, 78, 216, 0.12); }
.post-card-thumb { display: block; aspect-ratio: 16 / 9; background: var(--mtb-blue-50); }
.post-card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.post-card-meta { margin: 0 0 6px; font-size: 0.85rem; color: var(--mtb-muted); }
.post-card-title { margin: 0 0 8px; font-size: 1.2rem; }
.post-card-title a { color: var(--mtb-ink); text-decoration: none; }
.post-card-title a:hover { color: var(--mtb-blue); }
.post-card-excerpt { margin: 0 0 14px; color: var(--mtb-muted); font-size: 0.97rem; }
.post-card-more { margin-top: auto; font-weight: 650; text-decoration: none; }
.empty-note { padding: 28px; text-align: center; color: var(--mtb-muted); background: var(--mtb-soft); border-radius: var(--mtb-radius); }
.navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers { display: inline-block; min-width: 42px; padding: 8px 14px; border: 1px solid var(--mtb-line); border-radius: 10px; color: var(--mtb-ink); text-align: center; text-decoration: none; }
.page-numbers:hover { border-color: var(--mtb-blue); color: var(--mtb-blue); }
.page-numbers.current { background: var(--mtb-blue); border-color: var(--mtb-blue); color: #fff; }

.single-meta { margin: 10px 0 0; font-size: 0.92rem; color: var(--mtb-muted); }
.single-thumb { margin: 0 0 28px; }
.single-thumb img { display: block; width: 100%; border-radius: var(--mtb-radius); }
.post-tags { margin: 28px 0 0; font-size: 0.92rem; color: var(--mtb-muted); }
.tools-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 0; padding: 22px 24px; background: var(--mtb-blue-50); border: 1px solid var(--mtb-blue-100); border-radius: var(--mtb-radius); }
.tools-cta p { margin: 0; font-weight: 650; color: var(--mtb-navy); }
.button-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 10px; background: var(--mtb-blue); color: #fff; font-weight: 650; text-decoration: none; }
.button-link:hover { background: var(--mtb-blue-dark); color: #fff; }
.post-navigation .nav-links { justify-content: space-between; margin-top: 32px; }
.post-navigation a { text-decoration: none; font-weight: 600; }

/* ---------- Forms, search, comments ---------- */
.search-form { display: flex; max-width: 520px; margin: 18px 0; }
.search-form input[type="search"] { flex: 1; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--mtb-line); border-right: 0; border-radius: 12px 0 0 12px; font: inherit; }
.search-form button { min-height: 48px; padding: 0 20px; border: 1.5px solid var(--mtb-blue); border-radius: 0 12px 12px 0; background: var(--mtb-blue); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.comments-area { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--mtb-line); }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { padding-left: 24px; list-style: none; }
.comment-body { margin-bottom: 20px; padding: 16px; background: var(--mtb-soft); border-radius: 12px; }
.comment-author img { float: left; margin-right: 12px; border-radius: 50%; }
.comment-metadata { font-size: 0.85rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--mtb-line); border-radius: 10px; font: inherit; }
.comment-form .submit { min-height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--mtb-blue); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }

/* ---------- 404 ---------- */
.error-404 { padding: 56px 0 72px; text-align: center; }
.error-404 .search-form { margin-left: auto; margin-right: auto; }
.error-404-code { margin: 0; font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; color: var(--mtb-blue); letter-spacing: -0.04em; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; background: #0a1f52; color: #c4d3f2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; padding-top: 52px; padding-bottom: 36px; }
.footer-brand .site-brand { color: #fff; }
.footer-blurb { max-width: 36ch; margin: 14px 0 0; font-size: 0.97rem; color: #aebfe6; }
.footer-title { margin: 0 0 14px; font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: 0; }
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list li { margin: 0 0 8px; }
.footer-list a { color: #c4d3f2; text-decoration: none; }
.footer-list a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.9rem; color: #9fb2de; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) {
	.footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.post-card, .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; }
}
