/*
Theme Name: Classic World Theme
Theme URI: https://classic-world.com/
Author: Classic World
Description: Original WordPress theme for Classic World.
Version: 0.2.0
Text Domain: classic-world-theme
*/

:root {
	--cw-text: #20242c;
	--cw-muted: #68707c;
	--cw-border: #dfe3e8;
	--cw-background: #f7f8fa;
	--cw-surface: #ffffff;
	--cw-accent: #7c2335;
	--cw-accent-dark: #5d1726;
	--cw-content-width: 1180px;
	--cw-reading-width: 800px;
	--cw-radius: 12px;
	--cw-shadow: 0 12px 32px rgba( 28, 36, 48, 0.08 );
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--cw-text);
	background: var(--cw-background);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
	font-size: 16px;
	line-height: 1.8;
}

a {
	color: var(--cw-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

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

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

button,
input,
select,
textarea {
	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 {
	z-index: 100000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	clip: auto;
	background: var(--cw-surface);
	box-shadow: var(--cw-shadow);
}

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-header {
	position: relative;
	z-index: 20;
	background: rgba( 255, 255, 255, 0.97 );
	border-bottom: 1px solid var(--cw-border);
}

.site-header__inner,
.site-footer__inner,
.site-main,
.page-header {
	width: min( calc( 100% - 40px ), var(--cw-content-width) );
	margin-inline: auto;
}

.site-header__inner {
	min-height: 82px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.site-branding {
	min-width: 0;
}

.custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.custom-logo {
	max-height: 58px;
	width: auto;
}

.site-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp( 1.45rem, 2.5vw, 2rem );
	line-height: 1.2;
}

.site-title a {
	color: var(--cw-text);
	text-decoration: none;
}

.site-description {
	margin: 5px 0 0;
	color: var(--cw-muted);
	font-size: 0.82rem;
	line-height: 1.5;
}

.menu-toggle {
	display: none;
	padding: 10px 14px;
	color: var(--cw-text);
	background: var(--cw-surface);
	border: 1px solid var(--cw-border);
	border-radius: 8px;
	cursor: pointer;
}

.primary-navigation ul,
.footer-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-navigation > div > ul {
	display: flex;
	align-items: center;
	gap: 24px;
}

.primary-navigation a {
	color: var(--cw-text);
	font-size: 0.94rem;
	font-weight: 600;
	text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a:focus,
.primary-navigation .current-menu-item > a {
	color: var(--cw-accent);
}

.site-content {
	flex: 1 0 auto;
}

.site-main {
	padding-block: 64px 88px;
}

.page-header {
	padding-top: 60px;
}

.page-title,
.entry-title {
	margin-top: 0;
	font-family: Georgia, "Times New Roman", "Yu Mincho", serif;
	line-height: 1.35;
}

.page-title {
	font-size: clamp( 2rem, 4vw, 3rem );
}

.entry-title {
	font-size: clamp( 1.65rem, 3vw, 2.4rem );
}

.entry-title a {
	color: var(--cw-text);
	text-decoration: none;
}

.entry-meta {
	margin-bottom: 18px;
	color: var(--cw-muted);
	font-size: 0.9rem;
}

.post-list {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 24px;
}

.post-card,
.entry-single,
.page-entry,
.no-results {
	background: var(--cw-surface);
	border: 1px solid var(--cw-border);
	border-radius: var(--cw-radius);
	box-shadow: var(--cw-shadow);
}

.post-card {
	overflow: hidden;
}

.post-card__thumbnail {
	display: block;
	aspect-ratio: 16 / 9;
	background: #eceff2;
	overflow: hidden;
}

.post-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

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

.post-card__body {
	padding: 24px;
}

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

.entry-summary > :first-child,
.entry-content > :first-child {
	margin-top: 0;
}

.entry-summary > :last-child,
.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-single,
.page-entry,
.no-results {
	max-width: var(--cw-reading-width);
	margin-inline: auto;
	padding: clamp( 28px, 5vw, 56px );
}

.entry-single__thumbnail {
	margin: calc( clamp( 28px, 5vw, 56px ) * -1 ) calc( clamp( 28px, 5vw, 56px ) * -1 ) 36px;
	border-radius: var(--cw-radius) var(--cw-radius) 0 0;
	overflow: hidden;
}

.entry-single__thumbnail img {
	width: 100%;
	display: block;
}

.navigation.pagination {
	margin-top: 44px;
}

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

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 6px 12px;
	background: var(--cw-surface);
	border: 1px solid var(--cw-border);
	border-radius: 8px;
	text-decoration: none;
}

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

.search-form {
	display: flex;
	gap: 8px;
}

.search-form label {
	flex: 1;
}

.search-field {
	width: 100%;
	padding: 11px 13px;
	background: #fff;
	border: 1px solid var(--cw-border);
	border-radius: 8px;
}

.search-submit {
	padding: 11px 18px;
	color: #fff;
	background: var(--cw-accent);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.site-footer {
	flex-shrink: 0;
	color: #f2f3f5;
	background: #20242c;
}

.site-footer__inner {
	padding-block: 42px;
}

.footer-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
}

.footer-navigation a {
	color: #f2f3f5;
	text-decoration: none;
}

.site-info {
	margin-top: 24px;
	color: #bcc1ca;
	font-size: 0.85rem;
}

.error-404 {
	text-align: center;
}

@media ( max-width: 900px ) {
	.menu-toggle {
		display: inline-flex;
	}

	.primary-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		padding: 0 20px 20px;
		background: var(--cw-surface);
		border-bottom: 1px solid var(--cw-border);
	}

	.primary-navigation[hidden] {
		display: none;
	}

	.primary-navigation > div > ul {
		display: block;
		padding: 12px 0;
	}

	.primary-navigation li + li {
		border-top: 1px solid var(--cw-border);
	}

	.primary-navigation a {
		display: block;
		padding: 12px 4px;
	}

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

@media ( max-width: 620px ) {
	.site-header__inner,
	.site-footer__inner,
	.site-main,
	.page-header {
		width: min( calc( 100% - 28px ), var(--cw-content-width) );
	}

	.site-header__inner {
		min-height: 70px;
	}

	.site-description {
		display: none;
	}

	.site-main {
		padding-block: 40px 64px;
	}

	.page-header {
		padding-top: 38px;
	}

	.post-list {
		grid-template-columns: 1fr;
	}

	.search-form {
		align-items: stretch;
		flex-direction: column;
	}

	.search-submit {
		width: 100%;
	}
}
