/*
Theme Name: Alsruf Theme
Theme URI: https://alsruf.tistory.com/
Description: A restrained archive-style child theme for Twenty Twenty-Five.
Author: Custom for alsruf
Template: twentytwentyfive
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.2
Version: 1.2.0
Text Domain: alsruf-theme
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * The reference design is intentionally quiet: a generous header, a narrow
 * post column, and an always-legible archive sidebar.  Content and menu items
 * are managed in the Site Editor; these rules only define the presentation.
 */

:root {
	--mg-ink: #343434;
	--mg-muted: #878787;
	--mg-faint: #eeeeee;
	--mg-panel: #f7f7f7;
	--mg-wide: 1080px;
}

body {
	background: #ffffff;
	color: var(--mg-ink);
}

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

.mg-site-header {
	border-bottom: 1px solid var(--mg-faint);
	background: #ffffff;
}

.mg-site-header > .wp-block-site-title,
.mg-site-header > .wp-block-shortcode {
	box-sizing: border-box;
	width: min(var(--mg-wide), calc(100% - 64px));
	margin: 0 auto !important;
	padding: 0;
}

.mg-site-header > .wp-block-site-title {
	margin: 0;
	padding: 23px 0;
	font-family: inherit;
	font-size: 1.75em;
	font-weight: 800;
	letter-spacing: -0.2px;
	line-height: 32px;
}

.mg-site-header > .wp-block-site-title a,
.mg-header-links a {
	text-decoration: none !important;
}

.mg-site-header > .wp-block-site-title a:hover,
.mg-site-header > .wp-block-site-title a:focus-visible,
.mg-header-links a:hover,
.mg-header-links a:focus-visible {
	text-decoration: underline !important;
	text-underline-offset: 0.2em;
}

.mg-site-header > .wp-block-shortcode {
	height: 66px;
	overflow-x: auto;
	overflow-y: hidden;
	-ms-overflow-style: none;
}

.mg-site-header > .wp-block-shortcode::-webkit-scrollbar {
	display: none;
}

.mg-header-links {
	display: inline-block;
	margin-left: -30px;
	vertical-align: top;
}

.mg-header-links ul {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mg-header-links li {
	padding: 0 26px;
}

.mg-header-links a {
	position: relative;
	display: block;
	padding: 22px 4px 24px;
	color: #777;
	font-size: 1rem;
	line-height: 20px;
}

.mg-header-links a:hover,
.mg-header-links a:focus-visible,
.mg-header-links a[aria-current="page"] {
	color: #333;
}

.mg-header-links a:hover::after,
.mg-header-links a:focus-visible::after,
.mg-header-links a[aria-current="page"]::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background-color: #333;
	content: "";
}

.mg-page-layout {
	flex: 1;
}

.mg-content-grid {
	display: grid !important;
	grid-template-columns: 73.611111% 26.388889%;
	width: min(var(--mg-wide), calc(100% - 64px));
	margin: 0 auto !important;
	gap: 0 !important;
}

.mg-content-grid > .wp-block-column {
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	flex: initial !important;
}

.mg-posts-column {
	padding: 72px 55px 60px 0;
}

.mg-sidebar-column {
	min-height: 706px;
	border-left: 1px solid var(--mg-faint);
	padding: 75px 0 32px 55px;
}

.mg-query-heading,
.mg-query-heading .wp-block-query-title {
	margin: 0 0 18px;
	padding-top: 4px;
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.375;
}

.mg-post-list .wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 25px;
	row-gap: 58px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mg-post-list .wp-block-post {
	min-width: 0;
	margin: 0 !important;
}

.mg-post-list .wp-block-post {
	width: 100%;
	gap: 0 !important;
}

.mg-post-list .wp-block-post > .wp-block-post-featured-image {
	width: 100%;
	overflow: hidden;
	margin: 0 0 5px;
	background: var(--mg-panel);
}

.mg-post-list .wp-block-post > .wp-block-post-featured-image a,
.mg-post-list .wp-block-post > .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 23 / 14;
}

.mg-post-list .wp-block-post > .wp-block-post-featured-image img {
	object-fit: cover;
}

.mg-post-list .wp-block-post > .wp-block-post-title {
	overflow: hidden;
	max-width: 98%;
	margin: 0 0 4px;
	padding-top: 9px;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.4;
}

.mg-post-list .wp-block-post > .wp-block-post-title a {
	text-decoration: none !important;
}

.mg-post-list .wp-block-post > .wp-block-post-title a:hover,
.mg-post-list .wp-block-post > .wp-block-post-title a:focus-visible {
	text-decoration: underline !important;
	text-underline-offset: 0.2em;
}

.mg-post-list .wp-block-post > .wp-block-post-excerpt {
	max-width: 95%;
	margin: 0 0 15px;
	color: #999;
	font-size: 0.8125em;
	letter-spacing: 0;
	line-height: 1.5rem;
}

.mg-post-list .wp-block-post > .wp-block-post-excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.mg-post-list .wp-block-post > .wp-block-post-date,
.mg-single-meta .wp-block-post-date,
.mg-single-meta .wp-block-post-terms {
	margin: 0;
	color: #999;
	font-size: 0.75em;
	font-weight: 400;
	letter-spacing: 0;
}

.mg-post-list .wp-block-post > .wp-block-post-date a,
.mg-single-meta a {
	color: inherit;
	text-decoration: none !important;
}

.mg-post-list .wp-block-post > .wp-block-post-date a:hover,
.mg-post-list .wp-block-post > .wp-block-post-date a:focus-visible,
.mg-single-meta a:hover,
.mg-single-meta a:focus-visible {
	text-decoration: underline !important;
}

.mg-post-list .wp-block-query-pagination {
	width: 100%;
	margin: 0 0 60px;
	gap: 0;
	color: #999;
	font-size: 0.875em;
	justify-content: center !important;
}

.mg-post-list .wp-block-query-pagination a,
.mg-post-list .page-numbers {
	text-decoration: none !important;
}

.mg-post-list .page-numbers.current {
	font-weight: 700;
}

.mg-sidebar-column {
	color: #777;
	font-size: 1rem;
	line-height: 1.25;
}

.mg-sidebar-column > .wp-block-heading,
.mg-sidebar-column .mg-quick-links h2 {
	margin: 0 0 7px;
	color: #555;
	font-size: 0.875em;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.25;
}

.mg-sidebar-column > .mg-sidebar-intro {
	margin: 0 0 38px;
}

.mg-sidebar-column p {
	margin: 0;
}

.mg-sidebar-column a {
	color: #777;
	text-decoration: none !important;
}

.mg-sidebar-column a:hover,
.mg-sidebar-column a:focus-visible {
	text-decoration: underline !important;
	text-underline-offset: 0.2em;
}

.mg-sidebar-column .wp-block-categories,
.mg-sidebar-column .wp-block-categories ul,
.mg-sidebar-column .mg-quick-links ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mg-sidebar-column > .wp-block-shortcode {
	margin: 0 !important;
}

.mg-sidebar-column .mg-quick-links {
	margin-bottom: 36px;
}

.mg-sidebar-column .mg-quick-links li {
	padding: 4px 0 5px;
	font-size: 0.8125em;
	line-height: 1.25rem;
}

.mg-sidebar-column .wp-block-categories > li {
	padding: 0;
	font-size: 0.875em;
	font-weight: 600;
}

.mg-sidebar-column .wp-block-categories > li > ul {
	margin: 0;
	padding-top: 8px;
}

.mg-sidebar-column .wp-block-categories > li > ul > li {
	padding: 6px 0 7px;
	font-size: 1em;
	font-weight: 400;
}

.mg-sidebar-column .wp-block-categories ul ul ul {
	overflow: hidden;
	margin-bottom: -4px;
	padding-top: 6px;
}

.mg-sidebar-column .wp-block-categories ul ul ul li {
	position: relative;
	padding: 3px 0 3px 9px;
	font-size: 0.8125rem;
}

.mg-sidebar-column .wp-block-categories ul ul ul li::before {
	position: absolute;
	bottom: 7px;
	left: 0;
	width: 2px;
	height: 100%;
	background-color: #eee;
	content: "";
}

.mg-sidebar-column .wp-block-categories ul ul ul li a {
	color: #999;
}

.mg-sidebar-column > .wp-block-separator {
	display: none;
}

.mg-single-content,
.mg-page-content {
	max-width: 690px;
	font-size: 1rem;
	letter-spacing: -0.025em;
	line-height: 1.9;
}

.mg-single-title,
.mg-page-title {
	margin: 0;
	font-size: clamp(1.8rem, 4vw, 2.65rem);
	font-weight: 700;
	letter-spacing: -0.065em;
	line-height: 1.28;
}

.mg-single-featured-image {
	margin: 36px 0 42px;
}

.mg-single-featured-image img {
	width: 100%;
	height: auto;
}

.mg-single-navigation {
	margin-top: 60px;
	border-top: 1px solid var(--mg-faint);
	padding-top: 24px;
	font-size: 0.88rem;
}

.mg-site-footer {
	margin-top: auto;
	border-top: 1px solid var(--mg-faint);
	background: #ffffff;
}

.mg-footer-inner {
	width: min(var(--mg-wide), calc(100% - 64px));
	margin: 0 auto;
	padding: 36px 0 38px;
	color: #707070;
	font-size: 0.78rem;
	line-height: 1.5;
}

.mg-footer-inner p {
	margin: 0;
}

.mg-footer-inner p + p {
	margin-top: 32px;
}

.mg-footer-inner a {
	color: inherit;
	text-decoration: none !important;
}

.mg-footer-inner a:hover,
.mg-footer-inner a:focus-visible {
	text-decoration: underline !important;
}

@media (max-width: 1080px) and (min-width: 782px) {
	.mg-site-header > .wp-block-site-title,
	.mg-site-header > .wp-block-shortcode,
	.mg-footer-inner {
		width: min(var(--mg-wide), calc(100% - 48px));
	}

	.mg-content-grid {
		width: min(var(--mg-wide), calc(100% - 40px));
	}

	.mg-posts-column {
		padding-right: 5.1%;
	}

	.mg-sidebar-column {
		padding-left: 19.3%;
	}
}

@media (max-width: 781px) {
	.mg-site-header > .wp-block-site-title,
	.mg-site-header > .wp-block-shortcode,
	.mg-footer-inner {
		width: 100%;
	}

	.mg-site-header > .wp-block-site-title {
		position: relative;
		z-index: 1;
		padding: 24px;
		background-color: #fff;
	}

	.mg-site-header > .wp-block-shortcode {
		height: 69px;
		margin: 0;
	}

	.mg-header-links {
		margin-left: 0;
	}

	.mg-header-links li {
		padding: 0 24px;
	}

	.mg-header-links a {
		padding: 25px 0 24px;
	}

	.mg-content-grid {
		display: block !important;
		width: 100%;
	}

	.mg-posts-column {
		padding: 34px 24px 40px;
	}

	.mg-sidebar-column {
		min-height: auto;
		border-top: 1px solid var(--mg-faint);
		border-left: 0;
		padding: 40px 24px;
	}

	.mg-post-list .wp-block-post-template {
		grid-template-columns: 1fr;
		row-gap: 30px;
	}

	.mg-post-list .wp-block-post {
		width: 100%;
	}

	.mg-post-list .wp-block-post > .wp-block-post-featured-image {
		margin-bottom: 7px;
	}

	.mg-post-list .wp-block-post > .wp-block-post-title {
		margin-bottom: 12px;
	}

	.mg-post-list .wp-block-post > .wp-block-post-excerpt {
		margin-bottom: 12px;
	}

	.mg-post-list .wp-block-query-pagination {
		margin-bottom: 0;
	}

	.mg-footer-inner {
		box-sizing: border-box;
		padding: 32px 24px 26px;
	}
}

@media (max-width: 480px) {
	.mg-single-title,
	.mg-page-title {
		font-size: 1.85rem;
	}
}
