/*
Theme Name: Tech Hub Press
Theme URI: https://techhubmagazine.com/
Author: Tech Hub Magazine
Description: A clean Japanese magazine theme with migration support for LION MEDIA settings and advertising. Compatible with PHP 7.4 and PHP 8.
Version: 1.3.0
Requires at least: 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: tech-hub-press
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, block-styles, wide-blocks
*/

:root {
	--thp-accent: #828282;
	--thp-accent-dark: #616161;
	--thp-ink: #202326;
	--thp-muted: #737a80;
	--thp-line: #e8ebed;
	--thp-soft: #f5f7f8;
	--thp-paper: #fff;
	--thp-header-bg: #202427;
	--thp-width: 1180px;
	--thp-radius: 3px;
	--thp-shadow: 0 8px 28px rgba(22, 34, 42, .07);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--thp-paper);
	color: var(--thp-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN",
		"Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, sans-serif;
	font-size: 16px;
	line-height: 1.85;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color .18s ease, opacity .18s ease;
}

a:hover,
a:focus {
	color: var(--thp-accent-dark);
}

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

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: #fff;
	box-shadow: var(--thp-shadow);
}

.site-shell {
	width: min(calc(100% - 40px), var(--thp-width));
	margin-inline: auto;
}

.site-header {
	background: #fff;
}

.site-branding-row {
	position: relative;
	display: flex;
	min-height: 116px;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: var(--thp-header-bg);
	box-shadow: 0 0 0 100vmax var(--thp-header-bg);
	clip-path: inset(0 -100vmax);
	color: #fff;
}

.custom-logo {
	display: block;
	width: auto;
	max-height: 68px;
}

.site-title {
	margin: 0;
	font-size: clamp(1.65rem, 3vw, 2.45rem);
	font-weight: 800;
	letter-spacing: -.035em;
	line-height: 1.15;
}

.site-description {
	margin: 8px 0 0;
	color: #cbd0d3;
	font-size: .83rem;
	letter-spacing: .06em;
}

.social-menu,
.primary-menu,
.footer-menu {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-menu {
	gap: 14px;
	font-size: .86rem;
	font-weight: 700;
}

.nav-bar {
	border-block: 1px solid var(--thp-line);
}

.nav-inner {
	display: flex;
	min-height: 58px;
	align-items: center;
	justify-content: space-between;
}

.primary-menu {
	flex-wrap: wrap;
	gap: 0;
}

.primary-menu > li > a {
	display: block;
	padding: 17px 18px;
	font-size: .9rem;
	font-weight: 700;
	letter-spacing: .03em;
}

.primary-menu > li:first-child > a {
	padding-left: 0;
}

.primary-menu .current-menu-item > a,
.primary-menu a:hover {
	color: var(--thp-accent-dark);
}

.menu-toggle {
	display: none;
	padding: 10px 0;
	border: 0;
	background: transparent;
	color: var(--thp-ink);
	font-weight: 700;
	cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
	display: inline-block;
	width: 22px;
	height: 2px;
	background: currentColor;
}

.menu-toggle-bars {
	position: relative;
	margin-right: 9px;
	vertical-align: middle;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
	position: absolute;
	left: 0;
	content: "";
}

.menu-toggle-bars::before {
	top: -7px;
}

.menu-toggle-bars::after {
	top: 7px;
}

.header-search {
	font-size: .85rem;
	font-weight: 700;
}

.header-ad,
.infeed-ad,
.article-ad {
	text-align: center;
}

.header-ad {
	padding-block: 20px;
}

.site-main-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 54px;
	padding-block: 48px 70px;
}

.content-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 42px 28px;
}

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

.post-card-thumbnail {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--thp-soft);
	box-shadow: var(--thp-shadow);
}

.post-card-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.post-card-thumbnail:hover img {
	transform: scale(1.025);
}

.category-chip {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	padding: 7px 12px;
	background: rgba(31, 35, 38, .75);
	color: #fff;
	font-size: .74rem;
	line-height: 1;
}

.post-card-meta,
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 14px 0 0;
	color: #93999d;
	font-size: .73rem;
}

.post-card-title {
	margin: 9px 0 8px;
	font-size: clamp(1.04rem, 1.5vw, 1.22rem);
	line-height: 1.55;
	letter-spacing: -.015em;
}

.post-card-excerpt {
	margin: 0;
	color: #686f74;
	font-size: .88rem;
	line-height: 1.85;
}

.post-card-placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: #a2a8ac;
	font-size: .8rem;
	letter-spacing: .08em;
}

.infeed-ad {
	grid-column: 1 / -1;
	padding: 16px 0;
}

.archive-header,
.search-header {
	grid-column: 1 / -1;
	margin-bottom: -12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--thp-line);
}

.archive-title,
.search-title {
	margin: 0;
	font-size: 1.55rem;
}

.archive-description {
	margin-top: 8px;
	color: var(--thp-muted);
	font-size: .9rem;
}

.sidebar {
	min-width: 0;
}

.widget {
	margin: 0 0 38px;
}

.widget-title {
	position: relative;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--thp-line);
	font-size: 1.05rem;
	letter-spacing: .04em;
}

.widget-title::after {
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 82px;
	height: 1px;
	background: var(--thp-ink);
	content: "";
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 10px 0;
	border-bottom: 1px solid var(--thp-line);
	font-size: .86rem;
}

.sidebar-posts {
	display: grid;
	gap: 15px;
}

.sidebar-post {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.sidebar-post img {
	width: 88px;
	height: 62px;
	object-fit: cover;
}

.sidebar-image-placeholder {
	display: block;
	width: 88px;
	height: 62px;
	background: var(--thp-soft);
}

.sidebar-post-title {
	margin: 0;
	font-size: .8rem;
	line-height: 1.55;
}

.sidebar-ad {
	overflow: hidden;
	text-align: center;
}

.sidebar-ad ins.adsbygoogle {
	max-width: 100%;
}

.search-form {
	display: flex;
	border: 1px solid var(--thp-line);
}

.search-field {
	min-width: 0;
	flex: 1;
	padding: 10px 12px;
	border: 0;
	outline: 0;
}

.search-submit {
	padding: 10px 14px;
	border: 0;
	background: var(--thp-ink);
	color: #fff;
	cursor: pointer;
}

.pagination {
	grid-column: 1 / -1;
	margin-top: 12px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.page-numbers {
	display: grid;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	place-items: center;
	border: 1px solid var(--thp-line);
	font-size: .82rem;
}

.page-numbers.current,
.page-numbers:hover {
	border-color: var(--thp-accent);
	background: var(--thp-accent);
	color: #fff;
}

.single-layout .content-area,
.page-layout .content-area {
	min-width: 0;
}

.entry-header {
	margin-bottom: 28px;
}

.entry-categories {
	margin-bottom: 12px;
	color: var(--thp-accent-dark);
	font-size: .78rem;
	font-weight: 700;
}

.entry-title {
	margin: 0;
	font-size: clamp(1.8rem, 4vw, 2.65rem);
	line-height: 1.45;
	letter-spacing: -.035em;
}

.entry-thumbnail {
	margin: 26px 0 34px;
}

.entry-thumbnail img {
	width: 100%;
}

.entry-content {
	font-size: 1rem;
}

.entry-content > * {
	max-width: 100%;
}

.entry-content p {
	margin: 0 0 1.7em;
}

.entry-content h2 {
	margin: 2.3em 0 1em;
	padding: .65em .8em;
	border-left: 5px solid var(--thp-accent);
	background: var(--thp-soft);
	font-size: 1.45rem;
	line-height: 1.5;
}

.entry-content h3 {
	margin: 2em 0 .8em;
	padding-bottom: .55em;
	border-bottom: 2px solid var(--thp-line);
	font-size: 1.2rem;
}

.entry-content a {
	color: var(--thp-accent-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content blockquote {
	margin: 2em 0;
	padding: 18px 22px;
	border-left: 4px solid #c9d0d4;
	background: var(--thp-soft);
	color: #555d62;
}

.entry-content pre {
	overflow-x: auto;
	padding: 18px;
	background: #1f2326;
	color: #fff;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 10px;
	border: 1px solid var(--thp-line);
}

.article-ad {
	margin: 32px 0;
	padding: 18px 0;
	border-block: 1px solid var(--thp-line);
}

.ad-label {
	display: block;
	margin-top: 6px;
	color: var(--thp-muted);
	font-size: .65rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* Collapse AdSense auto-placement space only after Google reports no fill. */
ins.adsbygoogle[data-ad-status="unfilled"] {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.google-auto-placed:has(> ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.thp-in-article-ad {
	clear: both;
	margin-block: 38px;
	min-height: 1px;
}

.double-ads {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin: 38px 0;
	text-align: center;
}

.double-ad {
	min-width: 0;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
	color: var(--thp-muted);
	font-size: .72rem;
}

.share-bar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
	gap: 7px;
	margin: 26px 0;
}

.share-link {
	padding: 8px 10px;
	border: 1px solid currentColor;
	border-radius: 2px;
	font-size: .72rem;
	font-weight: 700;
	text-align: center;
}

.share-facebook { color: #1877f2; }
.share-x { color: #222; }
.share-hatebu { color: #00a4de; }
.share-pocket { color: #ef4056; }
.share-line { color: #06c755; }

.thp-toc {
	margin: 2em 0;
	padding: 20px 24px;
	border: 1px solid var(--thp-line);
	background: #fafafa;
}

.thp-toc summary {
	color: var(--thp-ink);
	font-weight: 700;
	cursor: pointer;
}

.thp-toc ol {
	margin: 14px 0 0;
	padding-left: 1.4em;
}

.thp-toc .toc-level-3 {
	margin-left: 1em;
}

.thp-toc .toc-level-4 {
	margin-left: 2em;
}

.author-box {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 22px;
	margin-top: 48px;
	padding: 26px;
	border: 1px solid var(--thp-line);
	background: var(--thp-soft);
}

.author-avatar img {
	border-radius: 50%;
}

.author-name {
	margin: 0 0 8px;
	font-size: 1.05rem;
}

.author-details p {
	margin: 0 0 10px;
	font-size: .85rem;
}

.author-links {
	display: flex;
	gap: 14px;
	color: var(--thp-accent-dark);
	font-size: .76rem;
	font-weight: 700;
}

.related-posts,
.category-latest {
	margin-top: 52px;
}

.section-title,
.home-section-title {
	margin: 0 0 26px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--thp-line);
	font-size: 1.35rem;
	letter-spacing: .02em;
}

.related-list {
	display: grid;
	gap: 24px;
}

.related-item {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 20px;
}

.related-thumbnail {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--thp-soft);
}

.related-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.related-item h3,
.related-item p {
	margin: 0;
}

.related-item h3 {
	font-size: 1rem;
	line-height: 1.55;
}

.related-item time {
	color: var(--thp-muted);
	font-size: .7rem;
}

.related-item p {
	margin-top: 6px;
	color: var(--thp-muted);
	font-size: .78rem;
}

.mini-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.mini-card img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.mini-card span {
	display: block;
	margin-top: 7px;
	font-size: .78rem;
	line-height: 1.55;
}

.sticky-sidebar {
	position: sticky;
	top: 28px;
}

.home-top-widgets {
	padding-top: 32px;
}

.home-pickup {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3px;
	padding-top: 30px;
}

.pickup-card {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #222;
}

.pickup-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .74;
	transition: transform .35s ease, opacity .35s ease;
}

.pickup-card:hover img {
	transform: scale(1.035);
	opacity: .62;
}

.pickup-overlay {
	position: absolute;
	right: 18px;
	bottom: 16px;
	left: 18px;
	color: #fff;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.5;
	text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
}

.home-wide-section {
	padding: 54px 0 62px;
}

.home-ranking {
	background: #f1f2f3;
}

.ranking-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 20px;
}

.ranking-card a {
	position: relative;
	display: block;
}

.ranking-card img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.rank-number {
	position: absolute;
	top: -7px;
	left: -7px;
	z-index: 1;
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	background: #222;
	color: #fff;
	font-size: .82rem;
	font-weight: 800;
}

.ranking-title {
	display: block;
	margin-top: 9px;
	font-size: .82rem;
	font-weight: 700;
	line-height: 1.55;
}

.category-home-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 26px;
}

.category-home-card > a:last-child {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.category-home-card img {
	width: 112px;
	height: 78px;
	object-fit: cover;
}

.category-home-name {
	display: block;
	margin-bottom: 12px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--thp-accent);
	font-size: .82rem;
	font-weight: 800;
}

.category-home-card span {
	font-size: .82rem;
	font-weight: 700;
	line-height: 1.55;
}

.legacy-ranking-list {
	counter-reset: lion-rank;
}

.legacy-ranking-list li {
	counter-increment: lion-rank;
}

.legacy-ranking-list a {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: 10px;
}

.legacy-ranking-list a::before {
	content: counter(lion-rank);
	position: absolute;
}

.legacy-ranking-list img {
	width: 80px;
	height: 58px;
	object-fit: cover;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
}

.post-tags a {
	padding: 6px 10px;
	background: var(--thp-soft);
	font-size: .75rem;
}

.post-navigation {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--thp-line);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.nav-next {
	text-align: right;
}

.comments-area {
	margin-top: 48px;
}

.comment-list {
	padding-left: 24px;
}

.comment-body {
	margin-bottom: 22px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--thp-line);
}

.comment-form input:not([type="submit"]),
.comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--thp-line);
}

.submit {
	padding: 11px 18px;
	border: 0;
	background: var(--thp-ink);
	color: #fff;
	cursor: pointer;
}

.site-footer {
	padding: 46px 0 28px;
	background: #202427;
	color: #cbd0d3;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

.site-footer .widget-title {
	color: #fff;
}

.site-footer .widget-title::after {
	background: var(--thp-accent);
}

.site-footer .widget li {
	border-color: #373d41;
}

.footer-bottom {
	display: flex;
	margin-top: 38px;
	padding-top: 22px;
	border-top: 1px solid #373d41;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	font-size: .76rem;
}

.footer-menu {
	flex-wrap: wrap;
	gap: 16px;
}

.empty-state {
	padding: 50px 0;
	text-align: center;
}

@media (max-width: 900px) {
	.site-main-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	.sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 30px;
	}

	.widget {
		margin-bottom: 10px;
	}

	.ranking-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.category-home-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.site-shell {
		width: min(calc(100% - 28px), var(--thp-width));
	}

	.site-branding-row {
		min-height: 92px;
	}

	.social-navigation,
	.header-search {
		display: none;
	}

	.menu-toggle {
		display: block;
	}

	.primary-navigation {
		width: 100%;
	}

	.nav-inner {
		display: block;
	}

	.primary-menu {
		display: none;
		padding-bottom: 12px;
	}

	.primary-navigation.is-open .primary-menu {
		display: block;
	}

	.primary-menu > li > a,
	.primary-menu > li:first-child > a {
		padding: 11px 0;
		border-top: 1px solid var(--thp-line);
	}

	.content-grid,
	.footer-widgets,
	.sidebar,
	.home-pickup,
	.category-home-grid {
		grid-template-columns: 1fr;
	}

	.site-main-grid {
		padding-top: 32px;
	}

	.post-card-title {
		font-size: 1.08rem;
	}

	.footer-bottom {
		display: block;
	}

	.footer-menu {
		margin-top: 12px;
	}

	.double-ads,
	.author-box,
	.related-item {
		grid-template-columns: 1fr;
	}

	.author-avatar {
		text-align: center;
	}

	.related-thumbnail {
		max-width: 260px;
	}

	.mini-card-grid,
	.ranking-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
