/*
Theme Name: TechubberTheme
Theme URI: https://techubber.com
Author: Techubber
Author URI: https://techubber.com
Description: A fast, clean magazine theme built for Techubber. Featured and latest posts, configurable category sections, light/dark mode, ad slots that don't shift the layout, and built-in widgets for category posts, YouTube and WhatsApp Channel. Works with Rank Math, Site Kit, Easy Table of Contents, AddToAny, Contact Form 7, Quads, LiteSpeed Cache and the Classic Editor. No jQuery.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 7.1
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: techubbertheme
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, editor-style
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

@font-face {
	font-family: "Inter Var";
	src: url("assets/fonts/inter-latin-var.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--th-accent: #0e8a62;
	--th-accent-strong: #0a684a;
	--th-accent-soft: #e7f4ef;
	--th-accent-dark-mode: #5ab396;

	--th-bg: #ffffff;
	--th-surface: #f4f5f7;
	--th-surface-2: #eceef1;
	--th-text: #111418;
	--th-text-2: #3f4650;
	--th-text-3: #646b76;
	--th-border: #e3e6ea;
	--th-strong-rule: #111418;
	--th-link: var(--th-accent);
	--th-on-accent: #ffffff;

	--th-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--th-font-head: "Inter Var", var(--th-font);
	--th-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

	--th-max: 1240px;
	--th-gutter: 16px;
	--th-radius: 10px;
	--th-header-h: 60px;
	--th-admin-bar: 0px;

	color-scheme: light;
}

:root[data-mode="dark"] {
	--th-bg: #0e1013;
	--th-surface: #171a1f;
	--th-surface-2: #1f232a;
	--th-text: #e9ebee;
	--th-text-2: #bfc5cd;
	--th-text-3: #939aa5;
	--th-border: #2a2f37;
	--th-strong-rule: #e9ebee;
	--th-link: var(--th-accent-dark-mode);
	color-scheme: dark;
}

@media (min-width: 900px) {
	:root { --th-gutter: 24px; }
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--th-header-h) + var(--th-admin-bar) + 16px);
}

body {
	margin: 0;
	background: var(--th-bg);
	color: var(--th-text);
	font-family: var(--th-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

.admin-bar { --th-admin-bar: 32px; }
@media (max-width: 782px) { .admin-bar { --th-admin-bar: 46px; } }
@media (max-width: 600px) { .admin-bar { --th-admin-bar: 0px; } }

img,
video,
iframe,
svg { max-width: 100%; }
img { height: auto; }

a { color: var(--th-link); text-underline-offset: 0.18em; }
a:hover { color: var(--th-accent-strong); }
:root[data-mode="dark"] a:hover { color: var(--th-text); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--th-font-head);
	color: var(--th-text);
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin: 0 0 0.5em;
}

button,
input,
select,
textarea { font: inherit; color: inherit; }

:focus-visible {
	outline: 2px solid var(--th-link);
	outline-offset: 2px;
	border-radius: 4px;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus,
.skip-link:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--th-text);
	color: var(--th-bg);
	border-radius: 6px;
	text-decoration: none;
}

.th-container {
	width: 100%;
	max-width: var(--th-max);
	margin-inline: auto;
	padding-inline: var(--th-gutter);
}

.th-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

.th-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--th-accent);
	color: var(--th-on-accent);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}
.th-btn:hover { background: var(--th-accent-strong); color: var(--th-on-accent); }

.th-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--th-text);
	cursor: pointer;
}
.th-icon-btn:hover { background: var(--th-surface); }

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--th-border);
	border-radius: 8px;
	background: var(--th-bg);
	color: var(--th-text);
	font-size: 16px;
}
input:focus,
textarea:focus,
select:focus { border-color: var(--th-link); outline: none; box-shadow: 0 0 0 3px var(--th-accent-soft); }
:root[data-mode="dark"] input:focus,
:root[data-mode="dark"] textarea:focus { box-shadow: 0 0 0 3px rgba(90, 179, 150, 0.25); }

input[type="submit"],
button[type="submit"]:not(.th-search-submit),
.wpcf7-submit {
	padding: 11px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--th-accent);
	color: var(--th-on-accent);
	font-weight: 600;
	cursor: pointer;
}
input[type="submit"]:hover,
.wpcf7-submit:hover { background: var(--th-accent-strong); }

/* ==========================================================================
   3. Header, navigation, search, drawer
   ========================================================================== */

.th-header {
	position: sticky;
	top: var(--th-admin-bar);
	z-index: 60;
	background: var(--th-bg);
	border-bottom: 1px solid var(--th-border);
	transition: box-shadow 0.2s;
}
.th-header.is-scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }

.th-header-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: var(--th-header-h);
}

.th-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-right: auto;
	min-width: 0;
}
.th-brand .custom-logo-link { display: flex; }
.th-brand .custom-logo { width: auto; height: 36px; max-height: 36px; }
.th-site-name {
	font-family: var(--th-font-head);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--th-text);
	text-decoration: none;
	white-space: nowrap;
}
.th-site-name:hover { color: var(--th-text); }

.th-header-actions { display: flex; align-items: center; gap: 2px; }

.th-mode-light { display: none; }
:root[data-mode="dark"] .th-mode-light { display: inline-flex; }
:root[data-mode="dark"] .th-mode-dark { display: none; }

/* Desktop menu */
.th-nav { display: none; }

@media (min-width: 1024px) {
	.th-menu-toggle { display: none; }
	.th-brand { margin-right: 24px; }
	.th-nav { display: block; margin-right: auto; }
}

.th-menu,
.th-menu ul { list-style: none; margin: 0; padding: 0; }
.th-menu { display: flex; align-items: center; gap: 4px; }
.th-menu > li { position: relative; display: flex; align-items: center; }
.th-menu a {
	display: block;
	padding: 8px 10px;
	color: var(--th-text);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border-radius: 6px;
	white-space: nowrap;
}
.th-menu > li > a:hover,
.th-menu > .current-menu-item > a,
.th-menu > .current-menu-ancestor > a,
.th-menu > .current-menu-parent > a { color: var(--th-link); }

.th-menu .th-sub-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 28px;
	margin-left: -8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--th-text-3);
	cursor: pointer;
}
.th-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 70;
	min-width: 230px;
	padding: 8px;
	background: var(--th-bg);
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	visibility: hidden;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.th-menu li:hover > .sub-menu,
.th-menu li:focus-within > .sub-menu,
.th-menu li.is-open > .sub-menu { visibility: visible; opacity: 1; transform: none; }
.th-menu .sub-menu a { font-weight: 500; font-size: 14.5px; padding: 8px 10px; }
.th-menu .sub-menu a:hover { background: var(--th-surface); color: var(--th-text); }

/* Topics bar */
.th-topics { border-bottom: 1px solid var(--th-border); background: var(--th-bg); }
.th-topics-list {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	white-space: nowrap;
	-webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
	mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.th-topics-list::-webkit-scrollbar { display: none; }
.th-topics-list a {
	color: var(--th-text-2);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}
.th-topics-list a:hover,
.th-topics-list .current-menu-item > a { color: var(--th-link); }

/* Search panel */
.th-search-panel {
	border-top: 1px solid var(--th-border);
	padding: 14px 0;
	background: var(--th-bg);
}
.th-search-form { position: relative; display: flex; max-width: 680px; margin-inline: auto; }
.th-search-field { padding-right: 48px !important; border-radius: 999px !important; }
.th-search-submit {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 999px;
	background: var(--th-accent);
	color: var(--th-on-accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.th-search-field::-webkit-search-cancel-button { display: none; }

/* Mobile drawer */
.th-drawer { position: fixed; inset: 0; z-index: 200; }
.th-drawer[hidden] { display: none; }
.th-drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.th-drawer-panel {
	position: relative;
	z-index: 1;
	width: min(88vw, 380px);
	height: 100%;
	overflow-y: auto;
	padding: 12px 16px 32px;
	background: var(--th-bg);
	display: flex;
	flex-direction: column;
	gap: 16px;
	animation: th-slide 0.2s ease-out;
}
@keyframes th-slide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.th-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.th-drawer-open { overflow: hidden; }

.th-drawer-menu,
.th-drawer-menu ul,
.th-drawer .th-topics-list { list-style: none; margin: 0; padding: 0; }
.th-drawer .th-topics-list { display: block; -webkit-mask-image: none; mask-image: none; white-space: normal; }
.th-drawer-menu li,
.th-drawer .th-topics-list li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--th-border); }
.th-drawer-menu a,
.th-drawer .th-topics-list a {
	flex: 1;
	padding: 13px 4px;
	color: var(--th-text);
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
}
.th-drawer-menu .th-sub-toggle {
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: var(--th-text-2);
	cursor: pointer;
}
.th-drawer-menu .is-open > .th-sub-toggle svg { transform: rotate(180deg); }
.th-drawer-menu .sub-menu { display: none; width: 100%; padding: 0 0 8px 12px; }
.th-drawer-menu .is-open > .sub-menu { display: block; }
.th-drawer-menu .sub-menu li { border: 0; }
.th-drawer-menu .sub-menu a { font-weight: 500; font-size: 15px; padding: 9px 4px; color: var(--th-text-2); }

/* ==========================================================================
   4. Layout
   ========================================================================== */

.th-site-main { display: block; padding-bottom: 56px; }

.th-layout { padding-top: 24px; }
@media (min-width: 1024px) {
	.has-sidebar .th-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 56px;
		align-items: start;
	}
	.th-layout { padding-top: 32px; }
}
.th-primary { min-width: 0; }
.no-sidebar .th-layout .th-primary,
.th-layout-wide .th-primary { max-width: 820px; margin-inline: auto; }
.th-layout-wide .th-primary { max-width: 1000px; }

/* ==========================================================================
   5. Cards and post lists
   ========================================================================== */

.th-card { position: relative; min-width: 0; }

.th-card-media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--th-radius);
	background: var(--th-surface);
}
.th-card-media .th-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.th-card:hover .th-card-media .th-img { transform: scale(1.03); }
.th-img-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 30% 30%, var(--th-accent-soft), transparent 60%),
		linear-gradient(135deg, var(--th-surface), var(--th-surface-2));
}
:root[data-mode="dark"] .th-img-placeholder { background: linear-gradient(135deg, var(--th-surface), var(--th-surface-2)); }

.th-card-body { padding-top: 12px; }

.th-cat {
	display: inline-block;
	margin-bottom: 6px;
	color: var(--th-link);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
	text-decoration: none;
}
.th-cat:hover { text-decoration: underline; }

.th-card-title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 750;
	line-height: 1.28;
}
.th-card-title a { color: var(--th-text); text-decoration: none; }
.th-card-title a:hover { color: var(--th-link); }
.th-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.th-card .th-cat { position: relative; z-index: 2; }

.th-card-excerpt {
	margin: 0 0 8px;
	color: var(--th-text-2);
	font-size: 15px;
	line-height: 1.55;
}

.th-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	color: var(--th-text-3);
	font-size: 13px;
}
.th-meta a { color: inherit; }

.th-card-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-right: 8px;
	border-radius: 999px;
	background: var(--th-text);
	color: var(--th-bg);
	font-family: var(--th-font-head);
	font-size: 12px;
	font-weight: 800;
	vertical-align: 1px;
}

/* Lead variant */
.th-card--lead .th-card-body { padding-top: 16px; }
.th-card--lead .th-card-title { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
.th-card--lead .th-card-excerpt { font-size: 17px; max-width: 60ch; }

/* Side variant */
.th-card--side .th-card-title { font-size: 18px; }

/* List variant: thumbnail beside text */
.th-card--list {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 112px;
	gap: 14px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid var(--th-border);
}
.th-card--list .th-card-media { order: 2; border-radius: 8px; }
.th-card--list .th-card-body { order: 1; padding-top: 0; }
.th-card--list .th-card-title { font-size: 17px; }
.th-card--list .th-card-excerpt { display: none; }
@media (min-width: 600px) {
	.th-card--list { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
	.th-card--list .th-card-media { order: 0; }
	.th-card--list .th-card-title { font-size: 19px; }
	.th-card--list .th-card-excerpt { display: block; }
}

/* Compact variant (sidebar) */
.th-card--compact {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 12px 0;
	border-bottom: 1px solid var(--th-border);
}
.th-card--compact:first-child { padding-top: 0; }
.th-card--compact:last-child { border-bottom: 0; }
.th-card--compact .th-card-media { border-radius: 6px; }
.th-card--compact .th-card-body { padding-top: 0; }
.th-card--compact .th-card-title { font-size: 14.5px; font-weight: 650; line-height: 1.35; margin-bottom: 4px; }
.th-card--compact .th-meta { font-size: 12px; }

/* Grids */
.th-grid { display: grid; gap: 28px 24px; }
@media (min-width: 600px) { .th-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .th-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.has-sidebar .th-primary .th-grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.th-list .th-card--list:first-child { padding-top: 0; }
.th-list .th-card--list:last-child { border-bottom: 0; }

/* Section heading */
.th-block-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	padding-top: 12px;
	border-top: 3px solid var(--th-strong-rule);
}
.th-section-title {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.th-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--th-link);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.th-more:hover { text-decoration: underline; }
.th-more-below { margin-top: 12px; }

.th-block { margin-top: 48px; }

/* Lead + list layout */
.th-lead-layout { display: grid; gap: 24px; }
@media (min-width: 900px) {
	.th-lead-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
}
.th-lead-rest .th-card--list { grid-template-columns: minmax(0, 1fr) 112px; gap: 14px; }
.th-lead-rest .th-card--list .th-card-media { order: 2; }
.th-lead-rest .th-card--list .th-card-title { font-size: 16.5px; }
.th-lead-rest .th-card--list .th-card-excerpt { display: none; }
.th-lead-rest .th-card--list:first-child { padding-top: 0; }
.th-lead-layout .th-card--lead .th-card-title { font-size: clamp(22px, 2.4vw, 28px); }

/* ==========================================================================
   6. Homepage
   ========================================================================== */

.th-home { padding-top: 24px; }

.th-featured { display: grid; gap: 24px; }
@media (min-width: 900px) {
	.th-featured { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; }
	.th-featured-side { display: flex; flex-direction: column; gap: 24px; }
}
@media (min-width: 560px) and (max-width: 899px) {
	.th-featured-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 559px) {
	.th-featured-side { display: grid; gap: 0; }
	.th-featured-side .th-card--side {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 112px;
		gap: 14px;
		padding: 16px 0;
		border-top: 1px solid var(--th-border);
	}
	.th-featured-side .th-card--side .th-card-media { order: 2; border-radius: 8px; }
	.th-featured-side .th-card--side .th-card-body { padding-top: 0; }
	.th-featured-side .th-card--side .th-card-title { font-size: 17px; }
}

.th-latest { margin-top: 48px; display: grid; gap: 32px; }
@media (min-width: 1024px) {
	.th-latest.has-rail { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
	.th-latest.no-rail .th-list-numbered {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 40px;
	}
	.th-latest.no-rail .th-list-numbered .th-card--list { grid-template-columns: 160px minmax(0, 1fr); }
	.th-latest.no-rail .th-list-numbered .th-card--list:nth-child(2) { padding-top: 0; }
	.th-latest.no-rail .th-list-numbered .th-card--list:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
	.th-latest.no-rail .th-card-excerpt { display: none; }
}
.th-latest-rail .widget:first-child { margin-top: 0; }

.th-home-sections > .widget { margin: 0; }
.th-home-sections .th-block { margin-top: 56px; }

/* ==========================================================================
   7. Widgets, sidebar, ad slots
   ========================================================================== */

.th-widget-area .widget { margin: 0 0 36px; }
.th-widget-area .widget:last-child { margin-bottom: 0; }

.widget-title {
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-bottom: 1px solid var(--th-border);
}
.widget-title span {
	display: inline-block;
	padding-bottom: 8px;
	margin-bottom: -1px;
	border-bottom: 3px solid var(--th-accent);
}

.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; }
.widget li a { color: var(--th-text); text-decoration: none; }
.widget li a:hover { color: var(--th-link); }

.th-sidebar { margin-top: 48px; }
@media (min-width: 1024px) {
	.th-sidebar { margin-top: 0; height: 100%; }
	.th-sticky-last-widget .th-sidebar > .widget:last-child {
		position: sticky;
		top: calc(var(--th-header-h) + var(--th-admin-bar) + 20px);
	}
}

/* Tag cloud */
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a,
.th-tags a {
	display: inline-block;
	padding: 5px 11px;
	border: 1px solid var(--th-border);
	border-radius: 999px;
	color: var(--th-text-2);
	font-size: 13px !important;
	line-height: 1.3;
	text-decoration: none;
}
.tagcloud a:hover,
.th-tags a:hover { border-color: var(--th-link); color: var(--th-link); }
.tag-link-count { color: var(--th-text-3); }

/* Ad slots: reserve space so ads don't push content around (CLS). */
.th-slot { margin: 40px auto; }
.th-slot .widget { margin: 0 auto; }
.th-ad { text-align: center; }
.th-ad::before {
	content: "Advertisement";
	display: block;
	margin-bottom: 6px;
	color: var(--th-text-3);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.th-ad:has(ins.adsbygoogle) { min-height: 300px; }
.th-ad:has(ins[data-ad-format="autorelaxed"]) { min-height: 420px; }
.th-sidebar .th-ad:has(ins.adsbygoogle) { min-height: 280px; }
.th-ad:has(ins[data-ad-status="unfilled"]) { min-height: 0; }
.th-ad:has(ins[data-ad-status="unfilled"])::before { display: none; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.th-ad iframe { margin-inline: auto; }

/* Quads in-content ads */
.quads-location { clear: both; margin: 28px auto !important; text-align: center; }
.quads-location:has(ins.adsbygoogle) { min-height: 280px; }
.quads-location:has(ins[data-ad-status="unfilled"]) { min-height: 0; }

/* YouTube facade */
.th-yt {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--th-radius);
	background: #000;
}
.th-yt-btn {
	position: absolute;
	inset: 0;
	width: 100%;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
}
.th-yt-btn img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: opacity 0.2s; }
.th-yt-btn:hover img { opacity: 1; }
.th-yt-play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 44px;
	border-radius: 12px;
	background: #e00;
	color: #fff;
	transform: translate(-50%, -50%);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.th-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.th-yt-caption { margin: 10px 0 0; color: var(--th-text-2); font-size: 14px; }
.th-btn-yt { margin-top: 12px; background: #c00; }
.th-btn-yt:hover { background: #a00; }

/* WhatsApp card */
.th-wa {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius);
	background: var(--th-surface);
}
.th-wa-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
}
.th-wa-title { margin: 0 0 4px; font-family: var(--th-font-head); font-weight: 750; font-size: 16px; }
.th-wa-text { margin: 0 0 12px; color: var(--th-text-2); font-size: 14px; }
.th-btn-wa { background: #157a46; }
.th-btn-wa:hover { background: #0f5f36; }

/* Social icons */
.th-social { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.th-social li { padding: 0; }
.th-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: var(--th-surface);
	color: var(--th-text) !important;
	transition: background 0.15s, color 0.15s;
}
.th-social a:hover { background: var(--th-accent); color: var(--th-on-accent) !important; }
.th-social-small a { width: 32px; height: 32px; }
.th-social-small svg { width: 15px; height: 15px; }

/* ==========================================================================
   8. Single post and pages
   ========================================================================== */

.th-breadcrumbs { margin-bottom: 16px; color: var(--th-text-3); font-size: 13px; }
.th-breadcrumbs p { margin: 0; }
.th-breadcrumbs a { color: var(--th-text-2); text-decoration: none; }
.th-breadcrumbs a:hover { color: var(--th-link); text-decoration: underline; }
.th-breadcrumbs .separator { margin: 0 4px; color: var(--th-text-3); }

.th-entry-header { margin-bottom: 24px; }
.th-entry-title {
	margin: 4px 0 12px;
	font-size: clamp(28px, 4.4vw, 42px);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
}
.th-dek { margin: 0 0 16px; color: var(--th-text-2); font-size: 19px; line-height: 1.5; }

.th-meta-single { gap: 8px 18px; font-size: 14px; }
.th-author { display: inline-flex; align-items: center; gap: 8px; }
.th-author a { color: var(--th-text); font-weight: 600; text-decoration: none; }
.th-author a:hover { color: var(--th-link); }
.th-avatar { border-radius: 999px; }
.th-read { display: inline-flex; align-items: center; gap: 5px; }

.th-entry-media { margin: 0 0 28px; }
.th-entry-media .th-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--th-radius); background: var(--th-surface); }
.th-entry-media figcaption { margin-top: 8px; color: var(--th-text-3); font-size: 13px; }

/* Article text */
.th-prose {
	font-size: 18px;
	line-height: 1.75;
	color: var(--th-text);
}
.th-prose > * { margin-top: 0; margin-bottom: 1.15em; }
.th-prose h2 { font-size: 26px; font-weight: 800; margin: 1.9em 0 0.6em; }
.th-prose h3 { font-size: 21px; font-weight: 750; margin: 1.6em 0 0.5em; }
.th-prose h4 { font-size: 18px; font-weight: 750; margin: 1.4em 0 0.5em; }
.th-prose a { color: var(--th-link); text-decoration: underline; text-decoration-thickness: 1px; }
.th-prose a:hover { text-decoration-thickness: 2px; }
.th-prose ul,
.th-prose ol { padding-left: 1.4em; }
.th-prose li { margin-bottom: 0.4em; }
.th-prose li > ul,
.th-prose li > ol { margin-top: 0.4em; }
.th-prose strong { font-weight: 700; }
.th-prose img { border-radius: 6px; }
.th-prose figure { margin-left: 0; margin-right: 0; }
.th-prose figcaption,
.th-prose .wp-caption-text { color: var(--th-text-3); font-size: 14px; text-align: center; margin-top: 8px; }
.th-prose .wp-caption { max-width: 100%; }
.th-prose blockquote {
	margin-left: 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--th-accent);
	color: var(--th-text-2);
	font-style: italic;
}
.th-prose hr { border: 0; border-top: 1px solid var(--th-border); margin: 2em 0; }

/* Code */
.th-prose code,
.th-prose kbd,
.th-prose samp {
	padding: 0.15em 0.4em;
	border-radius: 5px;
	background: var(--th-surface);
	border: 1px solid var(--th-border);
	font-family: var(--th-font-mono);
	font-size: 0.86em;
	word-break: break-word;
}
.th-prose kbd { border-bottom-width: 2px; }
.th-prose pre {
	position: relative;
	padding: 16px 18px;
	overflow-x: auto;
	border-radius: var(--th-radius);
	background: #0f141a;
	color: #e6edf3;
	font-family: var(--th-font-mono);
	font-size: 14.5px;
	line-height: 1.6;
	-moz-tab-size: 4;
	tab-size: 4;
}
:root[data-mode="dark"] .th-prose pre { border: 1px solid var(--th-border); background: #090b0e; }
.th-prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; word-break: normal; }

/* Tables */
.th-table-wrap { overflow-x: auto; margin-bottom: 1.4em; -webkit-overflow-scrolling: touch; }
.th-prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.th-prose th,
.th-prose td { padding: 10px 12px; border: 1px solid var(--th-border); text-align: left; vertical-align: top; }
.th-prose thead th,
.th-prose tr:first-child th { background: var(--th-surface); font-weight: 700; }

/* WordPress alignment classes */
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) {
	.th-prose .alignleft,
	.th-prose .alignright { float: none; margin: 0 auto 1em; display: block; }
}
.th-prose::after { content: ""; display: table; clear: both; }

/* Tidy old posts (toggle in Customizer): hard-coded colours and justified text. */
.th-normalize-legacy .th-prose :is(h1, h2, h3, h4, h5, h6) [style*="color"],
.th-normalize-legacy .th-prose :is(h1, h2, h3, h4, h5, h6)[style*="color"] { color: inherit !important; }
.th-normalize-legacy .th-prose [style*="justify"] { text-align: left !important; }
.th-normalize-legacy .th-prose [style*="font-family"] { font-family: inherit !important; }
:root[data-mode="dark"] .th-normalize-legacy .th-prose [style*="color"] { color: inherit !important; }
:root[data-mode="dark"] .th-normalize-legacy .th-prose [style*="background"] { background: transparent !important; }

/* Post footer pieces */
.th-entry-footer { margin-top: 32px; display: grid; gap: 24px; }

.th-share {
	padding: 16px 18px;
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius);
}
.th-share-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 700; }

.th-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.th-author-box {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px;
	border-radius: var(--th-radius);
	background: var(--th-surface);
}
.th-author-box > .th-avatar { flex: 0 0 72px; width: 72px; height: 72px; }
.th-author-box-text { flex: 1 1 auto; min-width: 0; }
.th-author-box .th-social { flex-wrap: wrap; }
.th-author-box-name { margin: 0 0 4px; font-family: var(--th-font-head); font-weight: 800; font-size: 17px; }
.th-author-box-name a { color: var(--th-text); text-decoration: none; }
.th-author-box-bio { margin: 0 0 10px; color: var(--th-text-2); font-size: 15px; }

.th-post-nav {
	display: grid;
	gap: 16px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--th-border);
}
@media (min-width: 700px) { .th-post-nav { grid-template-columns: 1fr 1fr; } }
.th-post-nav a {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	color: var(--th-text);
	text-decoration: none;
}
.th-post-nav a .th-img,
.th-post-nav a .th-img-placeholder { width: 96px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 6px; }
.th-post-nav-next { text-align: right; grid-template-columns: minmax(0, 1fr) 96px !important; }
.th-post-nav-next > .th-img,
.th-post-nav-next > .th-img-placeholder { order: 2; }
.th-post-nav-label { display: block; color: var(--th-text-3); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.th-post-nav-title { display: block; font-family: var(--th-font-head); font-weight: 700; font-size: 15px; line-height: 1.35; }
.th-post-nav a:hover .th-post-nav-title { color: var(--th-link); }

.th-related { margin-top: 48px; }
.th-related .th-section-title { margin-bottom: 20px; padding-top: 12px; border-top: 3px solid var(--th-strong-rule); }
.th-related .th-card-title { font-size: 16.5px; }

.th-page-links { margin: 24px 0; font-weight: 600; }

/* ==========================================================================
   9. Archives, search, 404, pagination
   ========================================================================== */

.th-archive-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 3px solid var(--th-strong-rule); }
.th-kicker { margin: 0 0 4px; color: var(--th-link); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.th-archive-title { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.th-archive-desc { margin-top: 10px; color: var(--th-text-2); max-width: 70ch; }
.th-archive-desc p { margin: 0 0 0.6em; }
.th-archive-count { margin: 8px 0 0; color: var(--th-text-3); font-size: 14px; }

.th-list-archive .th-card--list .th-card-title { font-size: 19px; }
@media (min-width: 600px) { .th-list-archive .th-card--list .th-card-title { font-size: 21px; } }

.th-empty { padding: 32px 0; }
.th-empty .th-search-form { margin: 16px 0 0; }

.th-404 { padding-top: 40px; }
.th-404 .th-archive-header { max-width: 680px; }
.th-404 .th-search-form { margin: 16px 0 0; }

.navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--th-border);
	border-radius: 999px;
	color: var(--th-text);
	font-weight: 600;
	text-decoration: none;
}
.page-numbers.current { background: var(--th-text); border-color: var(--th-text); color: var(--th-bg); }
a.page-numbers:hover { border-color: var(--th-link); color: var(--th-link); }
.page-numbers.dots { border: 0; }

/* ==========================================================================
   10. Comments
   ========================================================================== */

.th-comments { margin-top: 48px; }
.th-comments > .th-section-title { padding-top: 12px; border-top: 3px solid var(--th-strong-rule); margin-bottom: 20px; }
.th-comment-list,
.th-comment-list .children { list-style: none; margin: 0; padding: 0; }
.th-comment-list .children { margin-left: 20px; padding-left: 16px; border-left: 2px solid var(--th-border); }
.th-comment-list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--th-border); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author .avatar { border-radius: 999px; }
.comment-author .says { display: none; }
.comment-metadata { margin: 2px 0 8px 50px; font-size: 13px; }
.comment-metadata a { color: var(--th-text-3); text-decoration: none; }
.comment-content { margin-left: 50px; }
.comment-content p { margin: 0 0 0.6em; }
.reply { margin-left: 50px; font-size: 14px; font-weight: 600; }
.reply a { text-decoration: none; }
.bypostauthor > .comment-body .comment-author b::after {
	content: "Author";
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--th-accent-soft);
	color: var(--th-accent-strong);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}
.comment-respond { margin-top: 32px; }
.comment-reply-title { font-size: 22px; font-weight: 800; }
.comment-reply-title small { margin-left: 8px; font-size: 14px; font-weight: 500; }
.comment-notes,
.logged-in-as { color: var(--th-text-3); font-size: 14px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ==========================================================================
   11. Footer
   ========================================================================== */

.th-footer {
	--th-text: #e9ebee;
	--th-text-2: #bfc5cd;
	--th-text-3: #939aa5;
	--th-border: #2a2f37;
	--th-surface: #1c2027;
	--th-link: #e9ebee;
	background: #0b0d10;
	color: var(--th-text-2);
	font-size: 15px;
}
.th-footer-grid { display: grid; gap: 36px; padding-top: 48px; padding-bottom: 40px; }
@media (min-width: 700px) { .th-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .th-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; } }
.th-footer .widget-title { color: #fff; border-bottom-color: var(--th-border); }
.th-footer .widget li { padding: 5px 0; }
.th-footer .widget li a { color: var(--th-text-2); }
.th-footer .widget li a:hover { color: #fff; text-decoration: underline; }
.th-footer .th-topics-list { display: block; -webkit-mask-image: none; mask-image: none; white-space: normal; padding: 0; }
.th-footer .th-topics-list li { padding: 5px 0; }
.th-footer-tagline { margin: 0 0 16px; }
.th-footer .th-social { margin-bottom: 20px; }
.th-footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.th-footer-links li { padding: 0; }
.th-footer-links a { color: var(--th-text-2); text-decoration: none; font-size: 14px; }
.th-footer-links a:hover { color: #fff; text-decoration: underline; }
.th-footer-bottom { border-top: 1px solid var(--th-border); }
.th-footer-bottom .th-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.th-copyright { margin: 0; font-size: 14px; color: var(--th-text-3); }
.th-copyright a { color: inherit; }
.th-to-top { display: inline-flex; align-items: center; gap: 6px; color: var(--th-text-2); font-size: 14px; text-decoration: none; }
.th-to-top:hover { color: #fff; }

/* ==========================================================================
   12. Plugin compatibility
   ========================================================================== */

/* Easy Table of Contents */
#ez-toc-container,
div#ez-toc-container {
	width: auto !important;
	display: block !important;
	margin: 0 0 1.6em !important;
	padding: 16px 20px !important;
	border: 1px solid var(--th-border) !important;
	border-radius: var(--th-radius) !important;
	background: var(--th-surface) !important;
	box-shadow: none !important;
	font-size: 16px;
}
#ez-toc-container .ez-toc-title { font-family: var(--th-font-head); font-weight: 800 !important; color: var(--th-text) !important; }
#ez-toc-container a,
#ez-toc-container a:visited { color: var(--th-text-2) !important; text-decoration: none !important; }
#ez-toc-container a:hover { color: var(--th-link) !important; }
#ez-toc-container ul { margin: 8px 0 0 !important; }
#ez-toc-container li { margin-bottom: 4px !important; }
#ez-toc-container .ez-toc-icon-toggle-span svg { fill: var(--th-text-2) !important; color: var(--th-text-2) !important; }

/* AddToAny */
.addtoany_share_save_container { margin: 0 0 1.2em; }
.addtoany_header { margin-right: 10px; color: var(--th-text-3); font-size: 14px; line-height: 24px; }
.th-share .a2a_kit { display: flex; flex-wrap: wrap; gap: 6px; }
.a2a_svg { border-radius: 8px !important; }

/* Contact Form 7 */
.wpcf7 form p { margin: 0 0 16px; }
.wpcf7 label { display: block; font-weight: 600; font-size: 15px; }
.wpcf7-not-valid-tip { font-size: 13px; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; }

/* Rank Math */
.rank-math-breadcrumb p { margin: 0; }

/* Affiliate blocks (Hostinger, AffiliateX): keep sizes readable on phones */
@media (max-width: 480px) {
	.th-prose [class*="hostinger-affiliate-block"] h3 { font-size: 1em !important; }
	.th-prose [class*="hostinger-affiliate-block"][class*="__image"] { max-width: 30% !important; min-width: 30% !important; }
}
.th-prose [class*="affx-"] img { border-radius: 6px; }

/* Content Views / WP Show Posts shortcodes left inside old posts */
.th-prose .pt-cv-wrapper img,
.th-prose .wp-show-posts img { border-radius: 6px; }

/* OneSignal bell sits above the back-to-top area */
#onesignal-bell-container.onesignal-reset.onesignal-bell-container-bottom-right { z-index: 50 !important; }

/* reCAPTCHA badge only appears on the contact page (see inc/performance.php). */

/* ==========================================================================
   13. Motion, print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.th-header,
	.th-topics,
	.th-sidebar,
	.th-footer,
	.th-slot,
	.th-share,
	.th-related,
	.th-post-nav,
	.th-comments,
	.quads-location,
	.addtoany_share_save_container { display: none !important; }
	body { background: #fff; color: #000; }
	.th-prose a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
