/*
Theme Name: theKoreaBuzz
Theme URI: https://thekoreabuzz.com
Author: theKoreaBuzz
Author URI: https://thekoreabuzz.com
Description: Child theme for theKoreaBuzz.com — Malaysia portal for K-Culture news in BM & EN.
Template: inkbridge-theme
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thekoreabuzz
Tags: one-column, custom-colors, custom-menu, custom-logo, full-site-editing, blog, entertainment, news
*/

/* ========================================
   HERO SECTION
   ======================================== */

/* Remove block gap between header template-part and main */
.wp-site-blocks > .wp-block-template-part:first-child + .wp-block-group,
.wp-site-blocks > .wp-block-template-part:first-child + * {
	margin-top: 0 !important;
}

.tkb-hero {
	overflow: hidden;
	max-width: 100vw !important;
	padding: 0 !important;
}

.tkb-hero > .wp-block-query {
	max-width: none !important;
}

.tkb-hero-template {
	max-width: none !important;
	padding: 0 !important;
}

.tkb-hero-columns {
	height: 620px;
	max-height: 620px;
	flex-wrap: nowrap !important;
	gap: 0 !important;
}

.tkb-hero-columns > .wp-block-column.tkb-hero-content {
	flex: 0 0 620px !important;
	max-width: 620px;
	max-height: 620px;
	overflow: hidden;
}

.tkb-hero-columns > .wp-block-column.tkb-hero-image {
	flex: 1 1 auto !important;
	max-height: 620px;
	overflow: hidden;
	position: relative;
}

.tkb-hero-content-inner {
	background: linear-gradient(180deg, #0A0A0A 0%, #141312 100%);
	max-height: 620px;
	overflow: hidden;
}

.tkb-hero-image .wp-block-post-featured-image {
	position: absolute;
	inset: 0;
	height: 100%;
	width: 100%;
	margin: 0;
}

.tkb-hero-image .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.tkb-hero-cat a {
	background: rgba(255, 132, 0, 0.1);
	padding: 5px 14px;
	border-radius: 100px;
	text-decoration: none;
}

.tkb-hero-cta {
	display: inline-block;
	text-decoration: none !important;
}

.tkb-hero-template {
	max-width: none !important;
}

/* ========================================
   ARTICLE CARDS
   ======================================== */

.tkb-card {
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 12px rgba(26, 25, 24, 0.03);
}

.tkb-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(26, 25, 24, 0.12);
}

.tkb-card .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
}

.tkb-card .wp-block-post-featured-image img {
	transition: transform 0.3s ease;
}

.tkb-card:hover .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* ========================================
   CATEGORY CARDS
   ======================================== */

.tkb-category-card {
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tkb-category-card .wp-block-cover {
	width: 100%;
	align-self: stretch;
}

.tkb-category-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(26, 25, 24, 0.12);
}

.tkb-category-card a {
	color: var(--wp--preset--color--accent-3) !important;
	text-decoration: none !important;
}

.tkb-category-card a:hover {
	color: var(--wp--preset--color--accent-1) !important;
}

/* ========================================
   ARTICLE HERO (Single Post)
   ======================================== */

.tkb-article-hero {
	position: relative;
	overflow: hidden;
}

.tkb-article-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.73) 55%, rgba(0, 0, 0, 0.93) 100%);
	pointer-events: none;
	z-index: 0;
}

.tkb-article-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
}

.tkb-article-badge a {
	background: var(--wp--preset--color--accent-1);
	padding: 6px 16px;
	border-radius: 100px;
	text-decoration: none;
	display: inline-block;
}

/* ========================================
   CONTENT + SIDEBAR LAYOUT
   ======================================== */

.tkb-content-sidebar {
	align-items: flex-start;
}

.tkb-content-sidebar > .tkb-sidebar {
	flex-shrink: 0;
	min-width: 300px;
}

.tkb-article-content {
	min-width: 0;
}

/* Article content typography */
.tkb-article-content .wp-block-post-content p {
	font-size: 1.0625rem;
	line-height: 1.8;
	color: var(--wp--preset--color--contrast);
}

.tkb-article-content .wp-block-post-content h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.tkb-article-content .wp-block-post-content h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
}

.tkb-article-content .wp-block-post-content blockquote {
	border-left: 4px solid var(--wp--preset--color--accent-1);
	background: #FFF8F0;
	padding: 20px 24px;
	margin: 1.5rem 0;
	border-radius: 0 8px 8px 0;
}

.tkb-article-content .wp-block-post-content blockquote p {
	font-style: italic;
	color: var(--wp--preset--color--contrast);
}

.tkb-article-content .wp-block-post-content img {
	border-radius: 12px;
}

/* Author bio card */
.tkb-author-card {
	box-shadow: 0 2px 12px rgba(26, 25, 24, 0.03);
}

/* ========================================
   SIDEBAR
   ======================================== */

.tkb-sidebar .wp-block-separator {
	opacity: 1;
	margin: 0;
}

/* Popular posts in sidebar */
.tkb-popular-posts .wp-block-post-featured-image {
	margin: 0;
	flex-shrink: 0;
}

.tkb-popular-posts .wp-block-post-featured-image img {
	border-radius: 12px;
	object-fit: cover;
}

/* Sidebar categories widget */
.tkb-sidebar-categories {
	list-style: none;
	padding: 0 !important;
	margin: 0;
}

.tkb-sidebar-categories li {
	padding: 12px 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.875rem;
}

.tkb-sidebar-categories li:last-child {
	border-bottom: none;
}

.tkb-sidebar-categories li a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-weight: 500;
}

.tkb-sidebar-categories li a:hover {
	color: var(--wp--preset--color--accent-1);
}

/* ========================================
   ARCHIVE HERO & PAGE
   ======================================== */

.tkb-archive-hero-image {
	flex-shrink: 0;
}

/* Archive title styling */
.tkb-archive-hero .wp-block-query-title {
	font-size: 3rem;
	font-weight: 800;
	letter-spacing: -1px;
}

/* Category images in archive hero */
.tkb-archive-hero-image {
	background-size: cover;
	background-position: center;
}

.category-k-drama .tkb-archive-hero-image {
	background-image: url('/wp-content/uploads/2026/03/tkb-cat-kdrama.jpg');
}

.category-k-pop .tkb-archive-hero-image {
	background-image: url('/wp-content/uploads/2026/03/tkb-cat-kpop.jpg');
}

.category-food .tkb-archive-hero-image {
	background-image: url('/wp-content/uploads/2026/03/tkb-cat-food.jpg');
}

.category-travel .tkb-archive-hero-image {
	background-image: url('/wp-content/uploads/2026/03/tkb-cat-travel.jpg');
}

.category-language .tkb-archive-hero-image {
	background-image: url('/wp-content/uploads/2026/03/tkb-cat-language.jpg');
}

.category-beauty .tkb-archive-hero-image {
	background-image: url('/wp-content/uploads/2026/03/tkb-cat-beauty.jpg');
}

/* Featured article: only show first post */
.tkb-featured-article {
	max-width: none !important;
}

.tkb-featured-article > li:not(:first-child) {
	display: none;
}

/* Featured card: horizontal layout (image left, info right) */
.tkb-featured-card {
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tkb-featured-card .wp-block-post-featured-image {
	margin: 0;
	flex-shrink: 0;
	min-height: 380px;
}

.tkb-featured-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tkb-featured-card-image {
	flex-basis: 55% !important;
	max-width: 55%;
}

.tkb-featured-card-info {
	min-width: 0;
}

/* Featured article cover in archive (legacy) */
.tkb-featured-cover {
	overflow: hidden;
}

/* ========================================
   SECTION SPACING OVERRIDES (match Pencil design)
   ======================================== */

/* Trending: reduce gap between title and grid (Pencil: 32px) */
.tkb-hero ~ .has-base-background-color[style*="padding-left:120px"] > .wp-block-heading + .wp-block-query {
	margin-top: 8px !important;
}

/* Latest Articles: remove extra block gap so margin-bottom on header is the only gap (Pencil: 40px) */
.has-base-background-color[style*="padding-left:80px"] > .wp-block-query {
	margin-top: 0 !important;
}

/* ========================================
   CTA NEWSLETTER
   ======================================== */

/* CTA outer wrapper: Pencil = 80px all sides */
.alignfull:has(> .tkb-cta-inner) {
	padding: 80px !important;
}

/* CTA inner card: Pencil = 60px padding, 48px gap */
.tkb-cta-inner {
	align-items: center;
	padding: 60px !important;
	gap: 48px !important;
}

/* CTA right column: Pencil = 380px fixed */
.tkb-cta-inner > .wp-block-group[style*="flex-basis:380px"] {
	flex-shrink: 0 !important;
}

.tkb-cta-inner .wp-block-search .wp-block-search__button {
	border-radius: 100px !important;
}

/* ========================================
   VIEW ALL BUTTON
   ======================================== */

.tkb-view-all-btn {
	transition: background 0.2s ease;
}

.tkb-view-all-btn:hover {
	background: var(--wp--preset--color--accent-6);
}

.tkb-view-all-btn a {
	text-decoration: none !important;
}

/* ========================================
   PAGINATION
   ======================================== */

.wp-block-query-pagination {
	gap: 8px;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	border: 1px solid #D1D0CD;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	border-color: var(--wp--preset--color--accent-1);
	font-weight: 600;
}

.wp-block-query-pagination-numbers .page-numbers:hover:not(.current) {
	background: var(--wp--preset--color--accent-6);
}

/* ========================================
   HEADER
   ======================================== */

.tkb-header .wp-block-search__button {
	background: transparent !important;
	border: none !important;
	padding: 4px !important;
}

.tkb-header .wp-block-search {
	width: auto;
}

.tkb-header .wp-block-search__inside-wrapper {
	border: none !important;
	padding: 0 !important;
	min-width: auto !important;
	gap: 0;
}

.tkb-header .wp-block-search__input,
.tkb-header .wp-block-search .wp-block-search__input {
	display: none !important;
	width: 0 !important;
	min-width: 0 !important;
	border: none !important;
	padding: 0 !important;
}

.tkb-header .wp-block-search__inside-wrapper {
	border: none !important;
	padding: 0 !important;
	min-width: auto !important;
	background: transparent !important;
}

/* ========================================
   FOOTER
   ======================================== */

.wp-block-group.has-accent-5-background-color ul.is-style-plain {
	list-style: none;
}

/* ========================================
   SEARCH BLOCK
   ======================================== */

.wp-block-search .wp-block-search__button {
	border-radius: 100px !important;
}

/* ========================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {

	/* --- Header --- */
	.tkb-header {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.tkb-lang-toggle {
		display: none;
	}

	.tkb-header-right .wp-block-search {
		display: none;
	}

	/* --- Hero --- */
	.tkb-hero-columns {
		flex-direction: column-reverse !important;
		flex-wrap: wrap !important;
		min-height: auto;
	}

	.tkb-hero-columns > .wp-block-column {
		flex-basis: 100% !important;
		flex-grow: 1 !important;
		flex-shrink: 1 !important;
		width: 100% !important;
	}

	.tkb-hero-image .wp-block-post-featured-image {
		height: 260px;
	}

	.tkb-hero-content-inner {
		min-height: auto !important;
		padding: 24px 20px !important;
	}

	.tkb-hero-content-inner .wp-block-post-title {
		font-size: 1.5rem !important;
	}

	/* --- Trending --- */
	.has-base-background-color[style*="padding-left:120px"],
	.has-base-background-color[style*="padding-left: 120px"] {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.wp-block-post-template.columns-4.is-layout-grid,
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}

	/* --- Category grid --- */
	.wp-block-columns:not(.tkb-hero-columns) {
		flex-wrap: wrap !important;
	}

	.wp-block-columns:not(.tkb-hero-columns) > .wp-block-column {
		flex-basis: calc(50% - 8px) !important;
		min-width: calc(50% - 8px);
	}

	/* --- Sections padding --- */
	.alignfull[style*="padding-left:80px"],
	.alignfull[style*="padding-left: 80px"] {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.alignfull[style*="padding-left:120px"],
	.alignfull[style*="padding-left: 120px"] {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	/* --- CTA Newsletter --- */
	.alignfull:has(> .tkb-cta-inner) {
		padding: 20px !important;
	}

	.tkb-cta-inner {
		flex-direction: column !important;
		padding: 28px !important;
		gap: 20px !important;
	}

	.tkb-cta-inner > .wp-block-group[style*="flex-basis"] {
		flex-basis: 100% !important;
		width: 100%;
	}

	.tkb-cta-inner h2 {
		font-size: 1.5rem !important;
	}

	/* --- Content + Sidebar --- */
	.tkb-content-sidebar {
		flex-direction: column !important;
	}

	.tkb-sidebar {
		display: none !important;
	}

	/* --- Article Hero --- */
	.tkb-article-hero {
		min-height: 300px !important;
	}

	.tkb-article-hero .wp-block-group[style*="padding-top:260px"] {
		padding-top: 140px !important;
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.tkb-article-hero .wp-block-post-title {
		font-size: 1.5rem !important;
	}

	/* --- Author Bio --- */
	.tkb-author-bio-wrap {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.tkb-author-card {
		flex-direction: column !important;
		text-align: center;
	}

	/* --- Archive Hero --- */
	.tkb-archive-hero .alignwide > .wp-block-group:first-child {
		flex-direction: column !important;
	}

	.tkb-archive-hero-image {
		display: none !important;
	}

	.tkb-archive-hero .wp-block-query-title {
		font-size: 2rem !important;
	}

	/* --- Featured Card (archive) --- */
	.tkb-featured-card {
		flex-direction: column !important;
	}

	.tkb-featured-card-image {
		flex-basis: auto !important;
		max-width: 100% !important;
	}

	.tkb-featured-card .wp-block-post-featured-image {
		min-height: 220px !important;
	}

	.tkb-featured-section {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	/* --- Grid adjustments --- */
	.tkb-content-sidebar .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}

	/* --- Footer --- */
	.has-accent-5-background-color .wp-block-columns {
		flex-direction: column !important;
		gap: 32px;
	}

	.has-accent-5-background-color .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.has-accent-5-background-color .wp-block-columns > .wp-block-column:first-child {
		text-align: center;
	}

	.has-accent-5-background-color .wp-block-social-links {
		justify-content: center;
	}

	.has-accent-5-background-color .wp-block-group.alignwide[style*="space-between"] {
		justify-content: center !important;
		text-align: center;
	}
}

/* ========================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) and (min-width: 769px) {

	/* --- Hero: shrink left column for tablet --- */
	.tkb-hero-columns > .wp-block-column.tkb-hero-content {
		flex: 0 0 480px !important;
		max-width: 480px !important;
	}

	.tkb-hero-content-inner {
		padding: 40px !important;
		min-height: 480px !important;
	}

	.tkb-hero-content-inner .wp-block-post-title {
		font-size: 1.75rem !important;
	}

	/* --- Section padding --- */
	.alignfull[style*="padding-left:120px"],
	.alignfull[style*="padding-left: 120px"] {
		padding-left: 40px !important;
		padding-right: 40px !important;
	}

	.alignfull[style*="padding-left:80px"],
	.alignfull[style*="padding-left: 80px"] {
		padding-left: 40px !important;
		padding-right: 40px !important;
	}

	/* --- Trending: 2-col grid at tablet --- */
	.wp-block-post-template.columns-4.is-layout-grid {
		grid-template-columns: 1fr 1fr !important;
	}

	/* --- CTA: reduce padding at tablet --- */
	.alignfull:has(> .tkb-cta-inner) {
		padding: 40px !important;
	}

	.tkb-cta-inner {
		padding: 40px !important;
	}
}
