/* KHOME Blog archive — classic PHP template styles */

:root {
	--kh-orange:     #ff6b1a;
	--kh-orange-600: #e85a0c;
	--kh-navy:       #0c2340;
	--kh-navy-700:   #143258;
	--kh-grey-900:   #1f2937;
	--kh-grey-700:   #374151;
	--kh-grey-500:   #6b7280;
	--kh-grey-300:   #d1d5db;
	--kh-grey-200:   #e5e7eb;
	--kh-grey-100:   #f3f4f6;
	--kh-grey-50:    #f8fafc;
	--kh-white:      #ffffff;
	--kh-radius:     10px;
	--kh-radius-lg:  16px;
	--kh-shadow-sm:  0 1px 2px rgba(12,35,64,.06), 0 1px 3px rgba(12,35,64,.08);
	--kh-shadow-md:  0 6px 18px rgba(12,35,64,.08);
	--kh-shadow-lg:  0 18px 40px rgba(12,35,64,.12);
	--kh-transition: 200ms cubic-bezier(.2,.7,.3,1);
}

.kh-blog,
.kh-blog * { box-sizing: border-box; }
.kh-blog { color: var(--kh-grey-700); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.kh-blog .kh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.kh-blog h1, .kh-blog h2, .kh-blog h3, .kh-blog h4 { color: var(--kh-navy); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
.kh-blog h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
.kh-blog h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.kh-blog h3 { font-size: 1.2rem; }
.kh-blog p { margin: 0 0 1em; }
.kh-blog a { color: var(--kh-orange); text-decoration: none; transition: color var(--kh-transition); }
.kh-blog a:hover { color: var(--kh-orange-600); }
.kh-blog img { max-width: 100%; display: block; }

/* Buttons */
.kh-blog .kh-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: 12px 24px; border-radius: 6px; font-weight: 600; font-size: .95rem; letter-spacing: .01em; border: 2px solid transparent; cursor: pointer; transition: all var(--kh-transition); white-space: nowrap; }
.kh-blog .kh-btn-primary { background: var(--kh-orange); color: var(--kh-white); border-color: var(--kh-orange); }
.kh-blog .kh-btn-primary:hover { background: var(--kh-orange-600); border-color: var(--kh-orange-600); color: var(--kh-white); transform: translateY(-1px); box-shadow: var(--kh-shadow-md); }
.kh-blog .kh-btn-lg { padding: 16px 32px; font-size: 1rem; }

/* Eyebrow + tag */
.kh-blog .kh-eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--kh-orange); margin-bottom: 16px; padding: 6px 14px; background: rgba(255,107,26,.12); border-radius: 4px; }
.kh-blog .kh-tag { display: inline-block; background: var(--kh-orange); color: var(--kh-white); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.kh-blog .kh-link-arrow { display: inline-flex; align-items: center; font-weight: 600; color: var(--kh-orange); transition: gap var(--kh-transition); }
.kh-blog .kh-link-arrow:hover { color: var(--kh-orange-600); }

/* Breadcrumb */
.kh-blog .kh-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; font-size: .85rem; color: var(--kh-grey-500); }
.kh-blog .kh-breadcrumb li + li::before { content: '/'; margin-right: 8px; color: var(--kh-grey-300); }
.kh-blog .kh-breadcrumb a { color: var(--kh-grey-500); font-weight: 500; }
.kh-blog .kh-breadcrumb a:hover { color: var(--kh-orange); }
.kh-blog .kh-breadcrumb [aria-current="page"] { color: var(--kh-navy); font-weight: 600; }
.kh-blog .kh-breadcrumb-light ol { color: rgba(255,255,255,.7); }
.kh-blog .kh-breadcrumb-light a { color: rgba(255,255,255,.8); }
.kh-blog .kh-breadcrumb-light a:hover { color: var(--kh-orange); }
.kh-blog .kh-breadcrumb-light li + li::before { color: rgba(255,255,255,.4); }
.kh-blog .kh-breadcrumb-light [aria-current="page"] { color: var(--kh-white); }

/* Hero */
.kh-blog-hero { position: relative; min-height: 460px; display: flex; align-items: center; color: var(--kh-white); overflow: hidden; }
.kh-blog-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(12,35,64,.55), rgba(12,35,64,.92)), url('https://images.unsplash.com/photo-1455390582262-044cdead277a?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat; z-index: 0; }
.kh-blog-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(12,35,64,.5) 100%); z-index: 1; }
.kh-blog-hero-inner { position: relative; z-index: 2; padding: 80px 24px 90px; max-width: 880px; }
.kh-blog-hero h1 { color: var(--kh-white); }
.kh-blog-hero .accent { color: var(--kh-orange); }
.kh-blog-hero .lead { font-size: 1.1rem; color: rgba(255,255,255,.9); max-width: 680px; margin: 8px 0 0; }

/* Toolbar */
.kh-blog-toolbar { background: var(--kh-white); border-bottom: 1px solid var(--kh-grey-200); padding: 15px 0; }
.kh-blog-toolbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.kh-blog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.kh-filter-chip { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; background: transparent; border: 1px solid var(--kh-grey-200); color: var(--kh-grey-700); font-size: .85rem; font-weight: 500; cursor: pointer; transition: all var(--kh-transition); text-decoration: none; }
.kh-filter-chip:hover { color: var(--kh-navy); border-color: var(--kh-grey-300); background: var(--kh-grey-50); }
.kh-filter-chip.active { background: var(--kh-navy); border-color: var(--kh-navy); color: var(--kh-white); }
.kh-filter-chip.active:hover { color: var(--kh-white); }
.kh-blog-search { position: relative; flex: 0 0 280px; margin: 0; }
.kh-blog-search input { width: 100%; padding: 10px 14px 10px 40px; border: 1px solid var(--kh-grey-200); border-radius: 8px; font-family: inherit; font-size: .9rem; color: var(--kh-navy); background: var(--kh-grey-50); transition: all var(--kh-transition); }
.kh-blog-search input::placeholder { color: var(--kh-grey-500); }
.kh-blog-search input:focus { outline: none; border-color: var(--kh-orange); background: var(--kh-white); box-shadow: 0 0 0 4px rgba(255,107,26,.1); }
.kh-blog-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--kh-grey-500); pointer-events: none; }

/* Featured */
.kh-featured-section { padding: 80px 0 60px; }
.kh-featured-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; background: var(--kh-white); border: 1px solid var(--kh-grey-200); border-radius: var(--kh-radius-lg); overflow: hidden; transition: all var(--kh-transition); }
.kh-featured-card:hover { box-shadow: var(--kh-shadow-lg); border-color: transparent; }
.kh-featured-thumb { aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: var(--kh-grey-200); display: block; }
.kh-featured-body { padding: 16px 48px 16px 0; }
.kh-featured-body .kh-tag { margin-bottom: 16px; }
.kh-featured-body h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 14px; }
.kh-featured-body h2 a { color: var(--kh-navy); }
.kh-featured-body h2 a:hover { color: var(--kh-orange); }
.kh-featured-body p { color: var(--kh-grey-500); font-size: 1rem; margin-bottom: 20px; }
.kh-post-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--kh-grey-500); font-size: .85rem; margin-bottom: 24px; }
.kh-post-meta-row strong { color: var(--kh-navy); font-weight: 600; }

/* Posts grid */
.kh-posts-section { padding: 40px 0 100px; }
.kh-posts-section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.kh-posts-section-head h2 { margin: 0; font-size: 1.6rem; }
.kh-posts-count { color: var(--kh-grey-500); font-size: .9rem; }
.kh-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.kh-post-card { background: var(--kh-white); border: 1px solid var(--kh-grey-200); border-radius: var(--kh-radius-lg); overflow: hidden; transition: all var(--kh-transition); display: flex; flex-direction: column; }
.kh-post-card:hover { transform: translateY(-4px); box-shadow: var(--kh-shadow-lg); border-color: transparent; }
.kh-post-card-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: var(--kh-grey-200); overflow: hidden; }
.kh-post-card-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(12,35,64,.08) 100%); opacity: 0; transition: opacity var(--kh-transition); }
.kh-post-card:hover .kh-post-card-thumb::after { opacity: 1; }
.kh-post-card-tag { align-self: flex-start; margin-bottom: 12px; }
.kh-blog a.kh-post-card-tag { color: var(--kh-white); text-decoration: none; transition: background-color var(--kh-transition); }
.kh-blog a.kh-post-card-tag:hover { background: var(--kh-orange-600); color: var(--kh-white); }
.kh-post-card-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.kh-post-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: var(--kh-grey-500); margin-bottom: 20px; }
.kh-post-card h3 { font-size: 1.15rem; margin: 0 0 10px !important; line-height: 1.4; }
.kh-post-card h3 a { color: var(--kh-navy); }
.kh-post-card h3 a:hover { color: var(--kh-orange); }
.kh-post-card p { color: var(--kh-grey-500); font-size: .92rem; margin-bottom: 18px; flex: 1; }
.kh-post-card .kh-link-arrow { font-size: .9rem; align-self: flex-start; }

/* Empty state */
.kh-blog-empty { text-align: center; padding: 60px 0; color: var(--kh-grey-500); font-size: 1rem; }

/* Pagination — paginate_links() classes */
.kh-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 64px; flex-wrap: wrap; }
.kh-pagination a,
.kh-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--kh-grey-700); background: var(--kh-white); border: 1px solid var(--kh-grey-200); transition: all var(--kh-transition); text-decoration: none; }
.kh-pagination a:hover { color: var(--kh-navy); border-color: var(--kh-grey-300); background: var(--kh-grey-50); }
.kh-pagination .current { background: var(--kh-navy); color: var(--kh-white); border-color: var(--kh-navy); }
.kh-pagination .dots { background: transparent; border: 0; color: var(--kh-grey-500); }
.kh-pagination .prev,
.kh-pagination .next { padding: 0 18px; }

/* CTA */
.kh-blog-cta { background: var(--kh-navy); background-image: radial-gradient(circle at 20% 50%, rgba(255,107,26,.15), transparent 50%), radial-gradient(circle at 80% 50%, rgba(20,50,88,.8), transparent 50%); color: var(--kh-white); padding: 80px 0; }
.kh-blog-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.kh-blog-cta-copy { max-width: 640px; }
.kh-blog-cta-copy h2 { color: var(--kh-white); margin-bottom: 8px; }
.kh-blog-cta-copy p { color: rgba(255,255,255,.8); font-size: 1.05rem; margin: 0; }

@media (max-width: 960px) {
	.kh-blog-hero { min-height: 380px; }
	.kh-blog-hero-inner { padding: 56px 24px 64px; }
	.kh-blog-toolbar-inner { flex-direction: column; align-items: stretch; gap: 14px; }
	.kh-blog-search { flex: 1; }
	.kh-featured-card { grid-template-columns: 1fr; gap: 0; }
	.kh-featured-body { padding: 28px 32px 36px; }
	.kh-featured-section { padding: 60px 0 40px; }
	.kh-post-grid { grid-template-columns: repeat(2, 1fr); }
	.kh-blog-cta-inner { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 600px) {
	.kh-post-grid { grid-template-columns: 1fr; }
	.kh-featured-body { padding: 24px; }
	.kh-pagination a, .kh-pagination span { min-width: 36px; height: 36px; font-size: .85rem; }
	.kh-pagination .prev, .kh-pagination .next { padding: 0 12px; }
}
