/*
Theme Name: HTML5 Chat Blog
Theme URI: https://html5-chat.com/blog/
Description: Child theme of Sparkling matching the html5-chat.com design: gradient header, site navigation, post cards and calls to action.
Template: sparkling
Version: 1.0.0
Text Domain: sparkling-html5chat
*/

:root {
	--h5-blue: #0062cc;
	--h5-violet: #6c5ce7;
	--h5-pink: #d45674;
	--h5-ink: #1f2a44;
	--h5-text: #3d424a;
	--h5-muted: #6b7280;
	--h5-bg: #f4f6fb;
	--h5-soft: #eef2fb;
	--h5-radius: 16px;
	--h5-shadow: 0 2px 14px rgba(20, 30, 60, .06);
	--h5-shadow-hover: 0 10px 28px rgba(20, 30, 60, .12);
}

/* ── Base ─────────────────────────────────────────── */
body,
body.custom-background {
	background: var(--h5-bg) !important;
	color: var(--h5-text);
	font-family: 'Outfit', 'Open Sans', system-ui, sans-serif;
	font-size: 17px;
}
h1, h2, h3, h4, h5, h6,
.entry-title, .widget-title, .page-title {
	font-family: 'Outfit', system-ui, sans-serif;
	color: var(--h5-ink);
	letter-spacing: -.01em;
}
a { color: var(--h5-blue); }
a:hover, a:focus { color: #004fa3; }
.h5-icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }

/* ── Header ───────────────────────────────────────── */
.h5-header {
	background: linear-gradient(135deg, var(--h5-blue) 0%, var(--h5-violet) 100%);
	color: #fff;
	position: relative;
	z-index: 100;
}
.h5-header-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 14px;
}
.h5-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; }
.h5-brand-icon {
	width: 38px; height: 38px; border-radius: 10px;
	background: rgba(255, 255, 255, .18);
	display: inline-flex; align-items: center; justify-content: center;
}
.h5-brand-name { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 22px; }
.h5-brand-blog {
	color: #fff !important; text-decoration: none !important;
	font-weight: 600; font-size: 14px;
	border: 1px solid rgba(255, 255, 255, .55); border-radius: 20px; padding: 2px 12px;
}
.h5-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.h5-nav a {
	color: rgba(255, 255, 255, .9) !important; text-decoration: none !important;
	font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px;
}
.h5-nav a:hover, .h5-nav a.is-active { background: rgba(255, 255, 255, .16); color: #fff !important; }
.h5-nav a.h5-nav-cta {
	background: var(--h5-pink); color: #fff !important; font-weight: 600;
	margin-left: 8px; padding: 9px 16px; display: inline-flex; align-items: center; gap: 6px;
}
.h5-nav a.h5-nav-cta:hover { background: #c04764; }
.h5-nav-toggle, .h5-nav-burger { display: none; }

/* ── Layout ───────────────────────────────────────── */
.site-content { padding-top: 0; }
.main-content-area { margin-top: 36px; margin-bottom: 40px; max-width: 1180px; }
#secondary .widget, .post-inner-content, .main-content-inner .comments-area {
	background: #fff; border: 0; border-radius: var(--h5-radius); box-shadow: var(--h5-shadow);
}

/* ── Listing header ───────────────────────────────── */
.h5-listing-head { text-align: center; padding: 18px 10px 30px; }
.h5-listing-head h1 { font-size: 40px; font-weight: 700; margin: 0 0 10px; }
.h5-listing-head p { font-size: 18px; color: var(--h5-muted); max-width: 640px; margin: 0 auto 22px; }
.h5-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.h5-cats a {
	background: #fff; color: var(--h5-ink) !important; text-decoration: none !important;
	border-radius: 20px; padding: 6px 15px; font-weight: 500; font-size: 14px; box-shadow: var(--h5-shadow);
}
.h5-cats a:hover { color: var(--h5-blue) !important; }
.h5-cats a.is-active { background: var(--h5-blue); color: #fff !important; }
.h5-listing-head .search-form { max-width: 420px; margin: 0 auto; }

/* ── Cards ────────────────────────────────────────── */
.h5-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
}
.h5-card {
	background: #fff; border-radius: var(--h5-radius); box-shadow: var(--h5-shadow);
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform .18s, box-shadow .18s; margin: 0;
}
.h5-card:hover { transform: translateY(-4px); box-shadow: var(--h5-shadow-hover); }
.h5-card-media { display: block; aspect-ratio: 750 / 410; background: var(--h5-soft); overflow: hidden; }
.h5-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.h5-card-placeholder {
	width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--h5-blue), var(--h5-violet)); color: rgba(255, 255, 255, .9);
}
.h5-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.h5-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--h5-muted); margin-bottom: 10px; }
.h5-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.h5-card-cat {
	background: var(--h5-soft); color: var(--h5-blue) !important; text-decoration: none !important;
	border-radius: 20px; padding: 2px 10px; font-weight: 600;
}
.h5-card-title { font-size: 21px; line-height: 1.3; font-weight: 700; margin: 0 0 10px; }
.h5-card-title a { color: var(--h5-ink) !important; text-decoration: none !important; }
.h5-card-title a:hover { color: var(--h5-blue) !important; }
.h5-card-excerpt { font-size: 15.5px; line-height: 1.6; color: #4a5568; margin: 0 0 16px; }
.h5-card-more {
	margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
	font-weight: 600; color: var(--h5-pink) !important; text-decoration: none !important;
}
.h5-card-more .h5-icon { transition: transform .18s; }
.h5-card:hover .h5-card-more .h5-icon { transform: translateX(3px); }

/* ── Pagination ───────────────────────────────────── */
.pagination, .navigation.pagination { display: flex; justify-content: center; margin: 40px 0 10px; }
.navigation.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.navigation.pagination .page-numbers {
	background: #fff; border-radius: 10px; padding: 8px 14px; box-shadow: var(--h5-shadow);
	color: var(--h5-ink); text-decoration: none; font-weight: 500;
}
.navigation.pagination .page-numbers.current { background: var(--h5-blue); color: #fff; }

/* ── Single post ──────────────────────────────────── */
.single .post-inner-content { padding: 40px 48px; }
.single .entry-title, .single .post-inner-content .entry-title { font-size: 36px; line-height: 1.2; font-weight: 700; color: var(--h5-ink); }
.entry-meta, .entry-meta a { color: var(--h5-muted) !important; font-size: 14px; }
.entry-content { font-size: 18px; line-height: 1.75; color: var(--h5-text); }
.entry-content h2, .entry-content .wp-block-heading {
	color: var(--h5-ink) !important; font-size: 26px; font-weight: 700; margin: 36px 0 12px;
}
.entry-content h3 { color: var(--h5-ink) !important; font-size: 21px; font-weight: 700; margin: 28px 0 10px; }
.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 18px; }
.entry-content li { margin-bottom: 8px; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content code { background: var(--h5-soft); color: var(--h5-ink); border-radius: 4px; padding: 1px 6px; font-size: .9em; }
.entry-content pre { background: var(--h5-ink); color: #e6ecff; border-radius: 10px; padding: 16px 18px; border: 0; }
.entry-content blockquote { border-left: 4px solid var(--h5-blue); background: var(--h5-soft); border-radius: 0 10px 10px 0; padding: 14px 20px; }
.entry-content img { border-radius: 12px; height: auto; }
.entry-content hr, .wp-block-separator { border: 0; border-top: 1px solid #e5e9f2; margin: 34px 0; }
.single-featured { border-radius: var(--h5-radius) var(--h5-radius) 0 0; }

/* Call to action under articles */
.h5-post-cta {
	margin: 40px 0 8px; padding: 26px 28px; border-radius: var(--h5-radius);
	background: linear-gradient(135deg, var(--h5-blue), var(--h5-violet)); color: #fff;
	display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.h5-post-cta-text { flex: 1 1 280px; }
.h5-post-cta-text strong { display: block; font-family: 'Outfit', sans-serif; font-size: 22px; color: #fff; margin-bottom: 4px; }
.h5-post-cta-text span { font-size: 15.5px; color: #e9ecff; line-height: 1.5; }
.h5-post-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.h5-btn { display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none !important; }
.h5-btn-primary { background: var(--h5-pink); color: #fff !important; }
.h5-btn-primary:hover { background: #c04764; }
.h5-btn-ghost { border: 1px solid rgba(255, 255, 255, .85); color: #fff !important; }
.h5-btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* Previous / next links and comments */
.post-navigation .nav-previous a, .post-navigation .nav-next a {
	background: #fff; border-radius: 10px; box-shadow: var(--h5-shadow); padding: 10px 16px; display: inline-block;
}
.main-content-inner .comments-area { padding: 30px 34px; margin-top: 24px; }
.btn-default, .comment-form #submit, input[type="submit"] {
	background: var(--h5-blue) !important; border: 0 !important; color: #fff !important; border-radius: 10px !important;
}

/* ── Sidebar ──────────────────────────────────────── */
#secondary .widget { padding: 24px 24px 18px; margin-bottom: 24px; }
#secondary .widget-title {
	font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0;
	color: var(--h5-ink); border: 0; margin: 0 0 12px;
}
#secondary .widget ul li { border-color: #eef1f6; padding: 8px 0; }
#secondary .widget a { color: var(--h5-text); }
#secondary .widget a:hover { color: var(--h5-blue); }
.search-form .form-control, .search-field {
	border-radius: 10px 0 0 10px; border: 1px solid #dde3ee; box-shadow: none; height: 42px;
}
.search-form .btn, .search-submit { background: var(--h5-blue) !important; border-color: var(--h5-blue) !important; border-radius: 0 10px 10px 0; height: 42px; }

/* ── Footer ───────────────────────────────────────── */
#footer-area { background: var(--h5-ink); }
#footer-area .widget-title { color: #fff; }
#colophon, .site-footer { background: #182238; color: #aab4c8; }
#colophon a { color: #d7def0; }

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 991px) {
	.h5-nav-burger { display: inline-flex; margin-left: auto; color: #fff; cursor: pointer; padding: 6px; }
	.h5-header-inner { flex-wrap: wrap; }
	.h5-nav {
		display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px;
		margin: 6px 0 4px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .2);
	}
	.h5-nav a.h5-nav-cta { margin: 6px 0 0; justify-content: center; }
	.h5-nav-toggle:checked ~ .h5-nav { display: flex; }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.h5-brand-name { font-size: 19px; }
	.main-content-area { margin-top: 20px; }
	.h5-listing-head h1 { font-size: 30px; }
	.h5-grid { grid-template-columns: 1fr; gap: 18px; }
	.single .post-inner-content { padding: 24px 20px; }
	.single .entry-title, .single .post-inner-content .entry-title { font-size: 27px; }
	.entry-content { font-size: 17px; }
	.h5-post-cta { padding: 22px 20px; }
}
