/**
 * TechBlog Theme Custom Styles
 * LINE Tech Blog inspired design
 */

/* ========================================
   Post Grid Layout
   ======================================== */

.is-style-post-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.is-style-post-grid .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.is-style-post-grid .wp-block-post-template {
		grid-template-columns: 1fr;
	}
}

/* ========================================
   Post Card Styles
   ======================================== */

.post-card {
	transition: all 0.3s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.post-card:hover {
	opacity: 0.85;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.post-card .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
}

.post-card .wp-block-post-featured-image img {
	transition: transform 0.3s ease;
}

.post-card:hover .wp-block-post-featured-image img {
	transform: scale(1.02);
}

/* ========================================
   Typography
   ======================================== */

.wp-block-post-title a {
	text-decoration: none;
}

.wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

/* Category Tags */
.wp-block-post-terms a {
	display: inline-block;
	padding: 2px 8px;
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base) !important;
	border-radius: 3px;
	text-decoration: none;
	font-size: 0.75rem;
	margin-right: 4px;
	margin-bottom: 4px;
}

.wp-block-post-terms a:hover {
	background-color: var(--wp--preset--color--contrast);
}

/* ========================================
   Header
   ======================================== */

/* Site Title */
.wp-block-site-title a {
	font-size: 1.75rem;  /* 기본 대비 약 +10px */
	font-weight: 700;
	text-decoration: none;
}

header .wp-block-navigation {
	gap: 24px;
}

header .wp-block-navigation a {
	text-decoration: none;
	font-weight: 500;
}

header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--accent);
}

header .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--accent-4);
	background: var(--wp--preset--color--base);
}

header .wp-block-search__input {
	border: none;
	padding: 8px 12px;
}

header .wp-block-search__button {
	background: transparent;
	border: none;
	padding: 8px;
}

header .wp-block-search__button svg {
	fill: var(--wp--preset--color--accent-3);
}

/* ========================================
   Footer
   ======================================== */

footer .wp-block-categories-list,
footer .wp-block-latest-posts {
	list-style: none;
	padding: 0;
	margin: 0;
}

footer .wp-block-categories-list li,
footer .wp-block-latest-posts li {
	margin-bottom: 8px;
}

footer .wp-block-categories-list a,
footer .wp-block-latest-posts a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-size: 0.875rem;
}

footer .wp-block-categories-list a:hover,
footer .wp-block-latest-posts a:hover {
	color: var(--wp--preset--color--accent);
}

footer .wp-block-latest-posts__post-date {
	display: block;
	color: var(--wp--preset--color--accent-3);
	font-size: 0.75rem;
}

/* ========================================
   Single Post
   ======================================== */

.single .wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.8;
}

.single .wp-block-post-content p {
	margin-bottom: 1.5em;
}

.single .wp-block-post-content h2,
.single .wp-block-post-content h3,
.single .wp-block-post-content h4 {
	margin-top: 2em;
	margin-bottom: 0.75em;
}

.single .wp-block-post-content img {
	border-radius: 8px;
}

.single .wp-block-post-content pre {
	background-color: #f5f5f5;
	padding: 1.5em;
	border-radius: 8px;
	overflow-x: auto;
}

.single .wp-block-post-content code {
	background-color: #f5f5f5;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.875em;
}

.single .wp-block-post-content pre code {
	background: none;
	padding: 0;
}

/* ========================================
   Pagination
   ======================================== */

.wp-block-query-pagination {
	gap: 8px;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--wp--preset--color--accent-4);
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.875rem;
}

.wp-block-query-pagination-numbers .page-numbers.current,
.wp-block-query-pagination-numbers .page-numbers:hover {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

/* ========================================
   Comments
   ======================================== */

.wp-block-comments {
	margin-top: 3rem;
}

.wp-block-comment-template {
	list-style: none;
	padding: 0;
}

.wp-block-avatar img {
	border-radius: 50%;
}

/* ========================================
   Utilities
   ======================================== */

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* Smooth scrolling */
html {
	scroll-behavior: smooth;
}

/* Selection color */
::selection {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}
