/*
Theme Name:   Hello Elementor — KeyTech
Theme URI:    https://kumapix.com/
Template:     hello-elementor
Author:       KumaPix
Author URI:   https://kumapix.com/
Description:  Hello Elementor child theme with a clean, professional single-post (blog) layout. Featured image hero, Poppins typography, fully responsive 3-breakpoint design.
Version:      1.0.0
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  hello-elementor-keytech
*/

/* ==========================================================================
   Single-post layout
   --------------------------------------------------------------------------
   - Hero featured image: full-bleed, fixed aspect ratio
   - Article container: max-width 760px for optimal reading line-length
   - Typography: Poppins (loaded by functions.php); generous line-height
   - 3 breakpoints: ≥1024 desktop, 640–1023 tablet, <640 mobile
   - Side padding scales: 32px → 24px → 16px
   ========================================================================== */

:root {
	--hk-fg:           #1a1f2e;
	--hk-muted:        #5b6573;
	--hk-link:         #1a73e8;
	--hk-accent:       #f9b233;          /* keytech yellow */
	--hk-border:       #e4e7eb;
	--hk-card-bg:      #ffffff;
	--hk-soft-bg:      #f8f9fa;
	--hk-radius:       12px;
	--hk-shadow:       0 1px 3px rgba(15,20,30,.04), 0 6px 18px rgba(15,20,30,.05);
	--hk-font:         "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--hk-font-serif:   Georgia, "Iowan Old Style", "Charter", serif;
}

.hk-single {
	font-family: var(--hk-font);
	color: var(--hk-fg);
	background: #fff;
	overflow-x: hidden;
}
.hk-single * { box-sizing: border-box; }

/* -------- Hero / featured image -------- */
.hk-hero {
	width: 100%;
	background: var(--hk-soft-bg);
	display: block;
	margin: 0 0 32px;
}
.hk-hero-img {
	display: block;
	width: 100%;
	max-height: 520px;
	height: auto;
	object-fit: cover;
	aspect-ratio: 16/9;
}
@media (min-width: 1024px) {
	.hk-hero-img { max-height: 560px; }
}

/* -------- Article container -------- */
.hk-article {
	max-width: 760px;
	margin: 0 auto;
	padding: 0 32px 64px;
}
@media (max-width: 1023px) {
	.hk-article { padding: 0 24px 48px; }
}
@media (max-width: 640px) {
	.hk-article { padding: 0 16px 40px; }
}

/* -------- Meta block (category + title + byline) -------- */
.hk-meta-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hk-cat {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hk-link);
	background: rgba(26,115,232,.08);
	padding: 4px 10px;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color .15s ease;
}
.hk-cat:hover { background: rgba(26,115,232,.16); text-decoration: none; }

/* The !important overrides defend against Hello Elementor's global h1 rule
   (color: #fff for hero sections) and any Elementor / Jeg Kit CSS that
   text-transforms titles to capitalised. We deliberately keep the !important
   localised to the scoped .hk-single .hk-title selector. */
.hk-single .hk-title,
article.hk-single h1.hk-title {
	font-family: var(--hk-font) !important;
	font-weight: 700 !important;
	font-size: 40px !important;
	line-height: 1.2 !important;
	letter-spacing: -.02em !important;
	margin: 8px 0 16px !important;
	color: var(--hk-fg) !important;
	text-transform: none !important;
	text-shadow: none !important;
	background: transparent !important;
	padding: 0 !important;
}
@media (max-width: 1023px) {
	.hk-single .hk-title,
	article.hk-single h1.hk-title { font-size: 32px !important; }
}
@media (max-width: 640px) {
	.hk-single .hk-title,
	article.hk-single h1.hk-title { font-size: 26px !important; }
}

.hk-byline {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--hk-muted);
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hk-border);
}
.hk-byline-sep { color: var(--hk-border); }
.hk-byline-author {
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 500;
	color: var(--hk-fg);
}
.hk-byline-avatar {
	width: 28px; height: 28px;
	border-radius: 50%;
	object-fit: cover;
}
.hk-byline-meta { display: inline-flex; align-items: center; gap: 4px; }
.hk-byline-meta svg { width: 14px; height: 14px; opacity: .65; }

/* -------- Article body -------- */
.hk-content {
	font-size: 17px;
	line-height: 1.75;
	color: #2d3441;
	word-wrap: break-word;
}
@media (max-width: 640px) {
	.hk-content { font-size: 16px; line-height: 1.7; }
}
.hk-content > * + * { margin-top: 1.2em; }
.hk-content p { margin: 0; }
.hk-content a {
	color: var(--hk-link);
	text-decoration: underline;
	text-decoration-color: rgba(26,115,232,.4);
	text-underline-offset: 3px;
}
.hk-content a:hover { text-decoration-color: var(--hk-link); }

.hk-content h2,
.hk-content h3,
.hk-content h4 {
	font-family: var(--hk-font) !important;
	font-weight: 700 !important;
	color: var(--hk-fg) !important;
	letter-spacing: -.01em !important;
	line-height: 1.3 !important;
	margin-top: 2em !important;
	margin-bottom: .6em !important;
	text-transform: none !important;
	background: transparent !important;
	padding: 0 !important;
	text-align: left !important;
}
.hk-content h2 { font-size: 28px !important; }
.hk-content h3 { font-size: 22px !important; }
.hk-content h4 { font-size: 18px !important; }
@media (max-width: 640px) {
	.hk-content h2 { font-size: 24px !important; }
	.hk-content h3 { font-size: 20px !important; }
}

.hk-content ul,
.hk-content ol {
	margin: 1.2em 0;
	padding-left: 1.6em;
}
.hk-content li { margin: .35em 0; }
.hk-content li::marker { color: var(--hk-link); }

.hk-content blockquote {
	margin: 1.6em 0;
	padding: 12px 0 12px 24px;
	border-left: 4px solid var(--hk-accent);
	font-family: var(--hk-font-serif);
	font-style: italic;
	font-size: 19px;
	line-height: 1.6;
	color: #2d3441;
}
.hk-content blockquote p { margin: 0; }

.hk-content img,
.hk-content figure { max-width: 100%; height: auto; }
.hk-content figure { margin: 1.6em 0; }
.hk-content figure img { display: block; width: 100%; border-radius: 8px; }
.hk-content figcaption {
	font-size: 13px;
	color: var(--hk-muted);
	margin-top: 8px;
	text-align: center;
}

.hk-content pre {
	background: #1a1f2e;
	color: #e6e9ee;
	padding: 16px 20px;
	border-radius: 8px;
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.6;
	margin: 1.4em 0;
}
.hk-content code {
	background: rgba(0,0,0,.05);
	padding: 1px 6px;
	border-radius: 4px;
	font-size: .92em;
}
.hk-content pre code { background: transparent; padding: 0; }

.hk-content hr {
	border: 0;
	height: 1px;
	background: var(--hk-border);
	margin: 2.4em 0;
}

.hk-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	margin: 1.4em 0;
}
.hk-content th,
.hk-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--hk-border);
	text-align: left;
}
.hk-content th { font-weight: 600; background: var(--hk-soft-bg); }

/* -------- Footer block (tags + back-to-blog) -------- */
.hk-footer {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--hk-border);
}
.hk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hk-tag {
	display: inline-block;
	padding: 4px 12px;
	background: var(--hk-soft-bg);
	color: var(--hk-muted);
	border-radius: 999px;
	font-size: 13px;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}
.hk-tag:hover { background: var(--hk-link); color: #fff; text-decoration: none; }

.hk-back {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--hk-link);
	font-weight: 500;
	text-decoration: none;
	font-size: 15px;
}
.hk-back:hover { text-decoration: underline; }
.hk-back svg { width: 16px; height: 16px; }

/* -------- Related posts -------- */
.hk-related {
	background: var(--hk-soft-bg);
	padding: 48px 0;
	margin-top: 48px;
}
.hk-related-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 32px;
}
@media (max-width: 1023px) { .hk-related-inner { padding: 0 24px; } }
@media (max-width: 640px)  { .hk-related-inner { padding: 0 16px; } }
.hk-related h2 {
	font-size: 24px; font-weight: 700; margin: 0 0 24px;
	letter-spacing: -.01em;
}
.hk-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
@media (max-width: 900px) { .hk-related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .hk-related-grid { grid-template-columns: 1fr; } }

.hk-related-card {
	background: #fff;
	border: 1px solid var(--hk-border);
	border-radius: var(--hk-radius);
	overflow: hidden;
	text-decoration: none;
	color: var(--hk-fg);
	display: flex;
	flex-direction: column;
	transition: transform .15s ease, box-shadow .15s ease;
}
.hk-related-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--hk-shadow);
	text-decoration: none;
}
.hk-related-thumb {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	background: var(--hk-soft-bg);
	display: block;
}
.hk-related-body { padding: 16px 18px 18px; }
.hk-related-cat {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hk-link);
	margin-bottom: 6px;
}
.hk-related-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--hk-fg);
	margin: 0;
	/* clamp to 3 lines for visual consistency */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
