/*
Theme Name: TagManagerBuilder
Theme URI: https://tagmanagerbuilder.com
Author: Humayun Kabir Naim
Description: A fast, ad-friendly theme built around one free tool - the GTM Container Builder wizard - and the ready-to-import recipes it produces. Ships with a purpose-built home page, generic page template, blog listing, single post view, and 404.
Version: 1.7.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gtm4woo
*/

/* ---------- Design tokens ---------- */
:root {
	--ink: #10201F;
	--ink-soft: #33453F;
	--paper: #F6F5F0;
	--surface: #FFFFFF;
	--signal: #14B8A6;
	--signal-dark: #0E8F7D;
	--spark: #FFB020;
	--wire: #D8D3C4;
	--wire-soft: #E7E3D6;
	--danger: #D14343;

	--font-display: "Space Grotesk", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
	--font-body: -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;

	--radius: 10px;
	--radius-lg: 16px;
	--container: 1180px;
	--shadow-card: 0 1px 2px rgba(16,32,31,.06), 0 8px 24px rgba(16,32,31,.06);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--signal);
	outline-offset: 2px;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 .5em;
	letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
code, .mono { font-family: var(--font-mono); }

/*
 * Gutenberg's core Code block (<pre class="wp-block-code"><code>...</code></pre>).
 * Dark, on-brand, with a floating Copy button (assets/code-copy.js) rather
 * than a full syntax-highlighting library - keeps this dependency-free and
 * fast, matching this theme's Core Web Vitals priority (see the note atop
 * this file about ad revenue depending on it).
 */
pre.wp-block-code {
	position: relative;
	background: var(--ink);
	color: var(--paper);
	border-radius: var(--radius-lg);
	padding: 1.75rem 1.25rem 1.25rem;
	overflow-x: auto;
	font-size: .92rem;
	line-height: 1.6;
}
pre.wp-block-code code {
	background: none;
	color: inherit;
	font-family: var(--font-mono);
	white-space: pre;
}
.code-copy-btn {
	position: absolute;
	top: .6rem;
	right: .6rem;
	background: var(--ink-soft);
	color: var(--paper);
	border: 1px solid var(--wire-soft);
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: .78rem;
	font-weight: 600;
	padding: .35rem .7rem;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.code-copy-btn:hover { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.code-copy-btn.is-copied { background: var(--signal); color: var(--ink); border-color: var(--signal); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	clip: rect(0,0,0,0);
	overflow: hidden;
	white-space: nowrap;
}
.screen-reader-text:focus {
	position: fixed !important;
	top: 8px; left: 8px;
	width: auto; height: auto;
	clip: auto;
	background: var(--ink);
	color: var(--surface);
	padding: .8em 1.2em;
	border-radius: var(--radius);
	z-index: 100;
}

.eyebrow {
	font-family: var(--font-mono);
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--signal-dark);
	display: inline-flex;
	align-items: center;
	gap: .5em;
	margin-bottom: .75em;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(20,184,166,.18); }

.btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: .98rem;
	padding: .8em 1.4em;
	border-radius: var(--radius);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
	transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--signal-dark); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--wire); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Top utility bar (social + Product Hunt) ---------- */
.topbar { background: var(--ink); color: #B9C7C3; font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar-ph { color: #B9C7C3; font-weight: 500; }
.topbar-ph:hover { color: var(--surface); text-decoration: none; }
.topbar-social { display: flex; align-items: center; gap: .9rem; }
.topbar-social a { color: #B9C7C3; display: inline-flex; }
.topbar-social a:hover { color: var(--spark); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(246,245,240,.9);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--wire-soft);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1.5rem; }
.site-logo { display: flex; align-items: center; gap: .55em; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.site-logo:hover { text-decoration: none; }
.site-logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(20,184,166,.15); }
.primary-nav { display: flex; align-items: center; gap: 1.75rem; }
.primary-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.primary-nav a { color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.primary-nav a:hover { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--wire); border-radius: 8px; padding: .5em .7em; }

@media (max-width: 820px) {
	.primary-nav { position: fixed; inset: 68px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 1.5rem; gap: 1.5rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
	.primary-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
	.primary-nav ul { flex-direction: column; gap: 1.1rem; }
	.nav-toggle { display: inline-flex; }
}

/* ---------- Hero + manifest signature ---------- */
.hero { padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: .45em; }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: .9rem; margin-top: 1.6rem; flex-wrap: wrap; }

.manifest {
	background: var(--ink);
	border-radius: var(--radius-lg);
	padding: 1.4rem 1.5rem;
	box-shadow: var(--shadow-card);
	font-family: var(--font-mono);
	font-size: .84rem;
	overflow: hidden;
}
.manifest-titlebar { display: flex; gap: .4rem; margin-bottom: 1rem; }
.manifest-titlebar span { width: 10px; height: 10px; border-radius: 50%; background: #4a5a56; }
.manifest-line { color: #7d938d; white-space: pre; padding: .28em 0; opacity: 0; animation: mf-in .5s ease forwards; }
.manifest-line .k { color: #9fb4af; }
.manifest-line .v { color: var(--spark); }
.manifest-line .status { color: var(--signal); }
.manifest-line:nth-child(2) { animation-delay: .15s; }
.manifest-line:nth-child(3) { animation-delay: .45s; }
.manifest-line:nth-child(4) { animation-delay: .75s; }
.manifest-line:nth-child(5) { animation-delay: 1.05s; }
.manifest-line:nth-child(6) { animation-delay: 1.35s; }
.manifest-line:nth-child(7) { animation-delay: 1.65s; }
@keyframes mf-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Platform strip ---------- */
.platform-strip { padding: 2.2rem 0; border-top: 1px solid var(--wire-soft); border-bottom: 1px solid var(--wire-soft); }
.platform-strip .container { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.platform-badge {
	font-family: var(--font-mono);
	font-size: .82rem;
	padding: .5em .9em;
	border: 1px solid var(--wire);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink-soft);
	text-decoration: none !important;
	display: inline-block;
	transition: border-color .12s ease, color .12s ease;
}
a.platform-badge:hover { border-color: var(--signal); color: var(--ink); }

/* ---------- Generic sections ---------- */
.section { padding: 4rem 0; }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--wire-soft); border-radius: var(--radius-lg); padding: 1.5rem; }
.step .num { font-family: var(--font-mono); color: var(--signal-dark); font-size: .85rem; margin-bottom: .8em; display: block; }
.step h3 { margin-bottom: .4em; }
.step p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .value-grid { grid-template-columns: 1fr; } }
.value-card { padding: 1.6rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--wire-soft); }
.value-card h3 { color: var(--signal-dark); }
.value-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.platform-card { display: block; padding: 1.6rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--wire-soft); color: var(--ink); }
.platform-card:hover { border-color: var(--signal); text-decoration: none; }
.platform-card h3 { color: var(--signal-dark); margin-bottom: .4em; }
.platform-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 820px) { .guides-grid { grid-template-columns: 1fr; } }
.guide-card {
	display: block;
	padding: 1.25rem 1.4rem;
	background: var(--surface);
	border: 1px solid var(--wire-soft);
	border-radius: var(--radius);
	color: var(--ink);
}
.guide-card:hover { border-color: var(--signal); text-decoration: none; }
.guide-card .tag { font-family: var(--font-mono); font-size: .75rem; color: var(--signal-dark); display: block; margin-bottom: .4em; }
.guide-card strong { font-size: 1rem; }

.cta-band {
	background: var(--ink);
	color: var(--surface);
	border-radius: var(--radius-lg);
	padding: 3rem 2.5rem;
	text-align: center;
}
.cta-band h2 { color: var(--surface); }
.cta-band p { color: #B9C7C3; max-width: 50ch; margin: 0 auto 1.6rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--wire-soft); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: var(--ink-soft); font-size: .92rem; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .9em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55em; }
.footer-col a { color: var(--ink); font-size: .92rem; }
.footer-bottom { border-top: 1px solid var(--wire-soft); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--ink-soft); align-items: center; }
.footer-social { display: flex; align-items: center; gap: 1rem; }
.footer-social a { color: var(--ink-soft); display: inline-flex; }
.footer-social a:hover { color: var(--signal-dark); }
.footer-badges { display: flex; align-items: center; gap: .75rem; }
.footer-badges img { display: block; opacity: .85; transition: opacity .15s ease; }
.footer-badges a:hover img { opacity: 1; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .services-grid { grid-template-columns: 1fr; } }
.service-card { padding: 1.6rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--wire-soft); display: flex; flex-direction: column; }
.service-card h3 { margin-bottom: .5em; }
.service-card p { color: var(--ink-soft); font-size: .95rem; flex-grow: 1; }
.service-card a { align-self: flex-start; margin-top: .8em; }

.ph-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: 2rem 2.2rem;
	background: var(--surface);
	border: 1px solid var(--wire-soft);
	border-radius: var(--radius-lg);
}
.ph-card .ph-copy { max-width: 46ch; }
.ph-card h3 { margin-bottom: .3em; }
.ph-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.ph-embed { display: flex; justify-content: center; }

.ad-slot { margin: 2.5rem 0; text-align: center; }

/* ---------- Generic page / blog content ---------- */
.page-header { padding: 3rem 0 1rem; }
.page-header h1 { margin-bottom: .3em; }
.entry-content { max-width: 72ch; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content a { text-decoration: underline; }
.entry-content img { border-radius: var(--radius); margin: 1.2em 0; }

.post-list { display: flex; flex-direction: column; gap: 1.75rem; max-width: 72ch; }
.post-list article { padding-bottom: 1.75rem; border-bottom: 1px solid var(--wire-soft); }
.post-list h2 { margin-bottom: .3em; font-size: 1.35rem; }
.post-meta { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); margin-bottom: .6em; }

.error-404 { padding: 5rem 0; text-align: center; }
.error-404 .code { font-family: var(--font-mono); color: var(--signal-dark); font-size: 1rem; }

/* ---------- Widgets (blog sidebar) ---------- */
.widget-area { display: flex; flex-direction: column; gap: 1.5rem; }
.widget {
	background: var(--surface);
	border: 1px solid var(--wire-soft);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
}
.widget h4 {
	font-family: var(--font-mono);
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ink-soft);
	margin: 0 0 1em;
}
.widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75em; }
.widget ul ul { margin-top: .6em; padding-left: 1em; }
.widget a { color: var(--ink); font-size: .95rem; }
.widget a:hover { color: var(--signal-dark); text-decoration: none; }

.widget .search-form { display: flex; gap: .5rem; }
.widget .search-form label { flex: 1; margin: 0; }
.widget .search-form .search-field {
	width: 100%;
	padding: .65em .9em;
	border: 1px solid var(--wire);
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: .92rem;
	background: var(--paper);
	color: var(--ink);
}
.widget .search-form .search-submit {
	padding: .65em 1.1em;
	border: none;
	border-radius: var(--radius);
	background: var(--ink);
	color: var(--surface);
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
}
.widget .search-form .search-submit:hover { background: var(--signal-dark); }

/* Social share plugin buttons (rendered above the sidebar widgets) - neutralize default square/harsh look to match the rest of the site's rounded, restrained style. */
.entry-content + div[class*="share"],
.share-buttons,
.sharedaddy {
	display: flex;
	gap: .5rem;
	margin: 1.5rem 0;
}



/* Answer-first summary + FAQ (homepage) */
.answer-box { max-width: 78ch; margin: 0 auto; padding: 1.4rem 1.6rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--wire-soft); border-left: 4px solid var(--signal); box-shadow: var(--shadow-card); }
.answer-box h2 { font-size: 1.15rem; margin-bottom: .5em; }
.answer-box p { margin: 0; color: var(--ink-soft); }
.faq-list { max-width: 78ch; }
.faq-item { background: var(--surface); border: 1px solid var(--wire-soft); border-radius: var(--radius); margin-bottom: .75rem; }
.faq-item summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; color: var(--ink); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--signal-dark); font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0; padding: 0 1.25rem 1.1rem; color: var(--ink-soft); }
@media (max-width: 800px) { 