/* ==========================================================================
   Tohfe Mission 2026-08-24 — scoped UI fixes (loads LAST, after premium)
   1) Category archives: trust strip / related posts / below-grid content
   2) Sidebar balance on archive pages (desktop)
   3) Branch page: map action buttons (Google Maps + Neshan)
   4) New brand logo sizing (header / mobile drawer / footer)
   Scoped to body.tohfe-ui-v2 — no impact on home/product/blog/account.
   ========================================================================== */

/* ---------- 1a. Category trust strip (seo-upgrade.php) ---------- */
body.tohfe-ui-v2 .tohfe-cat-trust {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 12px;
	background: var(--th-surface);
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius-md);
	padding: 14px 16px;
	margin: 14px 0 6px;
	box-shadow: var(--th-shadow-sm);
}
body.tohfe-ui-v2 .tohfe-cat-trust-item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
body.tohfe-ui-v2 .tohfe-cat-trust-ico {
	flex: none;
	display: inline-flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--th-primary-soft);
	color: var(--th-primary);
}
body.tohfe-ui-v2 .tohfe-cat-trust-item strong {
	display: block;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--th-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
body.tohfe-ui-v2 .tohfe-cat-trust-item small {
	display: block;
	font-size: 11.5px;
	color: var(--th-muted);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
@media (max-width: 768px) {
	body.tohfe-ui-v2 .tohfe-cat-trust {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		padding: 12px;
	}
	body.tohfe-ui-v2 .tohfe-cat-trust-ico { width: 36px; height: 36px; }
}

/* ---------- 1b. Below-grid category content (long description) ---------- */
body.tohfe-ui-v2 .tohfe-cat-after-grid {
	margin: 42px 0 6px;
	padding-inline: var(--th-gutter);
}
body.tohfe-ui-v2 .tohfe-cat-after-grid .term-description {
	max-width: none !important;
}
body.tohfe-ui-v2 .tohfe-cat-after-grid .term-description p {
	font-size: 14.5px;
	line-height: 2.1;
	color: var(--th-muted);
	margin: 0 0 12px;
}

/* ---------- 1c. Category FAQ + related posts (below grid) ---------- */
body.tohfe-ui-v2 .tohfe-cat-faq-title,
body.tohfe-ui-v2 .tohfe-cat-posts-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--th-primary);
	margin: 0 0 14px;
}
body.tohfe-ui-v2 .tohfe-cat-posts {
	margin: 26px 0 10px;
	padding-inline: var(--th-gutter);
}
body.tohfe-ui-v2 .tohfe-cat-posts-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
body.tohfe-ui-v2 .tohfe-cat-post {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--th-surface);
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius-md);
	padding: 10px;
	text-decoration: none;
	box-shadow: var(--th-shadow-sm);
	transition: box-shadow .2s ease, transform .2s ease;
}
body.tohfe-ui-v2 .tohfe-cat-post:hover {
	box-shadow: var(--th-shadow-md);
	transform: translateY(-2px);
}
body.tohfe-ui-v2 .tohfe-cat-post img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--th-radius-sm);
	display: block;
}
body.tohfe-ui-v2 .tohfe-cat-post span {
	font-size: 13px;
	font-weight: 700;
	color: var(--th-text);
	line-height: 1.7;
	text-align: right;
}
@media (max-width: 768px) {
	body.tohfe-ui-v2 .tohfe-cat-posts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	body.tohfe-ui-v2 .tohfe-cat-posts-list { grid-template-columns: 1fr; }
}

/* ---------- 2. Sidebar balance on archives (desktop only) ---------- */
@media (min-width: 993px) {
	body.tohfe-ui-v2.ast-left-sidebar #secondary,
	body.tohfe-ui-v2.ast-right-sidebar #secondary {
		width: 300px !important;
		flex: 0 0 300px !important;
	}
	body.tohfe-ui-v2.ast-left-sidebar #primary,
	body.tohfe-ui-v2.ast-right-sidebar #primary {
		width: auto !important;
		flex: 1 1 auto !important;
	}
}

/* ---------- 3. Branch page: map action buttons ---------- */
body.tohfe-ui-v2 .th-branch-map-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 4px 0 12px;
}
@media (max-width: 480px) {
	body.tohfe-ui-v2 .th-branch-map-actions .th-btn {
		flex: 1 1 100%;
		justify-content: center;
		min-height: 46px;
	}
}

/* ---------- 4. New brand logo (tohfe-main-logo) ---------- */
body.tohfe-ui-v2 .th-logo__img {
	display: block;
	height: 52px;
	width: auto;
	aspect-ratio: 1 / 1;
}
body.tohfe-ui-v2 .th-drawer__brand-img {
	display: block;
	height: 40px;
	width: auto;
	aspect-ratio: 1 / 1;
}
body.tohfe-ui-v2 .th-footer__logo-img {
	display: block;
	height: 46px;
	width: auto;
	aspect-ratio: 1 / 1;
}
@media (max-width: 768px) {
	body.tohfe-ui-v2 .th-logo__img { height: 44px; }
}
