/* Honey Badger Theme — main stylesheet
 * CSS-variables встановлюються wp_add_inline_style() у functions.php.
 */

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #1f2937;
	background: #fff;
}
a { color: var(--hb-primary, #16a34a); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.25; color: #111827; margin: 0 0 12px; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 9999; background: #fff; padding: 8px 12px; border: 2px solid var(--hb-primary); }

/* ----- Topbar (currency strip) ----- */
.hb-topbar {
	background: var(--hb-bg-dark, #064e3b);
	color: #fff;
	padding: 6px 16px;
	font-size: 13px;
}
.hb-currency-strip { display: flex; gap: 24px; justify-content: flex-end; max-width: 1200px; margin: 0 auto; }
.hb-cstrip-item strong { color: var(--hb-accent, #fbbf24); margin-right: 6px; }

/* ----- Header ----- */
.hb-header {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	padding: 16px;
}
.hb-header-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.hb-brand { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hb-brand-text { font-weight: 700; font-size: 22px; color: var(--hb-primary); }
.hb-brand-tagline { font-size: 12px; color: #6b7280; margin: 0; }
/* Custom logo — обмежуємо висоту жорстко.
   Без цього великий PNG (1200×300) заповнював би весь header.
   40px desktop / 32px mobile — стандарт для бiльшостi WP-тем (Astra ~40, Twenty Twenty-Three ~36). */
.hb-brand .custom-logo,
.hb-brand img {
	max-height: 40px;
	width: auto;
	height: auto;
	max-width: 220px;
	object-fit: contain;
	display: block;
}
@media (max-width: 920px) {
	.hb-brand .custom-logo,
	.hb-brand img { max-height: 32px; max-width: 180px; }
}
.hb-nav-toggle {
	display: none;
	background: var(--hb-primary);
	color: #fff;
	border: none;
	padding: 10px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}
.hb-primary-menu {
	display: flex;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-weight: 500;
}
.hb-primary-menu a { color: #374151; padding: 8px 0; }
.hb-primary-menu a:hover { color: var(--hb-primary); }
.hb-header-actions { display: flex; align-items: center; }

/* ----- Search form (header + search.php) ----- */
.hb-search-form {
	display: flex;
	align-items: center;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 4px 6px 4px 14px;
	transition: border-color .15s, box-shadow .15s;
}
.hb-search-form:focus-within {
	border-color: var(--hb-primary);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.hb-search-input {
	border: none;
	background: transparent;
	outline: none;
	font-size: 14px;
	width: 180px;
	padding: 6px 4px;
	color: #1f2937;
}
.hb-search-input::placeholder { color: #9ca3af; }
.hb-search-submit {
	background: var(--hb-primary);
	color: #fff;
	border: none;
	border-radius: 999px;
	width: 30px;
	height: 30px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
}
.hb-search-submit:hover { background: var(--hb-bg-dark); }

@media (max-width: 920px) {
	.hb-search-form { padding: 2px 4px 2px 10px; }
	.hb-search-input { width: 120px; font-size: 13px; }
}

/* ----- Search results page ----- */
.hb-search-results { max-width: 900px; padding-top: 32px; }
.hb-search-header { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid #e5e7eb; }
.hb-search-header h1 { font-size: 26px; margin: 0 0 8px; }
.hb-search-query { color: var(--hb-primary); }
.hb-search-count { color: #6b7280; font-size: 14px; margin: 0 0 14px; }
.hb-search-hint { color: #6b7280; font-size: 14px; margin: 0 0 14px; }
.hb-search-form-wrap { max-width: 480px; }
.hb-search-empty { background: #f9fafb; padding: 24px 28px; border-radius: 8px; }
.hb-search-empty ul { margin: 12px 0 0; padding-left: 20px; }

/* ----- Layout containers ----- */
.hb-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 16px;
}
.hb-with-sidebar {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 32px;
}
.hb-content { min-width: 0; }
.hb-sidebar { font-size: 14px; }
.hb-widget { background: #f9fafb; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.hb-widget-title { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin-bottom: 8px; }

/* ----- Cards (post / mfo / news) ----- */
.hb-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 16px;
	transition: box-shadow .15s, transform .15s;
}
.hb-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); transform: translateY(-1px); }
.hb-card-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hb-card-body { padding: 16px 18px; }
.hb-card-title { font-size: 19px; margin: 0 0 6px; }
.hb-card-title a { color: #111827; }
.hb-card-meta { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.hb-card-excerpt { color: #4b5563; font-size: 14px; margin-bottom: 12px; }
.hb-card-cta {
	display: inline-block;
	background: var(--hb-primary);
	color: #fff !important;
	padding: 8px 14px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
}
.hb-card-cta:hover { background: var(--hb-bg-dark); text-decoration: none; }

/* ----- Badges ----- */
.hb-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	margin-right: 6px;
}
.hb-badge-app {
	background: linear-gradient(135deg, var(--hb-primary), var(--hb-accent));
	color: #fff;
	box-shadow: 0 0 0 0 var(--hb-accent);
	animation: hb-pulse 2.4s ease-in-out infinite;
}
@keyframes hb-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
	50%      { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.18); }
}

/* ----- Hero (front-page) ----- */
.hb-hero {
	background: linear-gradient(135deg, var(--hb-primary), var(--hb-bg-dark));
	color: #fff;
	padding: 60px 20px;
	border-radius: 12px;
	margin-bottom: 32px;
	text-align: center;
}
.hb-hero h1 { color: #fff; font-size: 40px; }
.hb-hero-lead { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto; }

/* ----- Pages (page.php — статичнi сторiнки) ----- */
.hb-page-full { max-width: 1280px; }
.hb-page-header { margin-bottom: 24px; }
.hb-page-title { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
.hb-page-featured { margin: 0 0 24px; border-radius: 12px; overflow: hidden; }
.hb-page-featured img { width: 100%; height: auto; display: block; max-height: 400px; object-fit: cover; }
.hb-page-body { font-size: 16px; line-height: 1.7; color: #1f2937; }
.hb-page-body p { margin: 0 0 16px; }
.hb-page-body h2 { margin-top: 28px; font-size: 24px; }
.hb-page-body h3 { margin-top: 22px; font-size: 19px; }

/* ----- Single ----- */
.hb-single-header { margin-bottom: 24px; }
.hb-single-title { font-size: 36px; }
.hb-single-meta { color: #6b7280; font-size: 14px; margin-bottom: 16px; }
.hb-single-featured img { border-radius: 12px; margin-bottom: 24px; max-height: 480px; object-fit: cover; }
.hb-single-body p { margin: 0 0 16px; }
.hb-single-body h2, .hb-single-body h3 { margin-top: 28px; }

/* ----- No results ----- */
.hb-no-results { text-align: center; padding: 60px 20px; color: #6b7280; }

/* ----- Footer-widgets area (3 колонки) — рендериться лише коли SMFO неактивний АБО toggle ON ----- */
.hb-footer-widgets-area {
	background: var(--hb-bg-dark, #1f2937);
	color: #d1d5db;
	padding: 40px 16px;
	margin-top: 60px;
}
.hb-footer-widgets {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
}
.hb-footer-widgets-area .hb-footer-widget h4 { color: var(--hb-accent); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.hb-footer-widgets-area a { color: #d1d5db; }
.hb-footer-widgets-area a:hover { color: var(--hb-accent); }

/* ----- Тонкий footer (завжди рендериться) ----- */
.hb-footer-thin {
	background: #f3f4f6;
	border-top: 1px solid #e5e7eb;
	padding: 14px 16px;
	font-size: 12px;
	color: #6b7280;
	margin-top: 32px;
}
.hb-footer-thin-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.hb-copyright { color: #4b5563; }
.hb-footer-menu {
	display: flex;
	gap: 18px;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 12px;
}
.hb-footer-menu a { color: #6b7280; }
.hb-footer-menu a:hover { color: var(--hb-primary); }

/* ============ MOBILE ============ */
@media (max-width: 920px) {
	.hb-with-sidebar { grid-template-columns: 1fr; }
	.hb-sidebar { order: 99; }
	.hb-nav-toggle { display: block; }
	.hb-primary-menu {
		display: none;
		flex-direction: column;
		width: 100%;
		background: #fff;
		padding: 12px 16px;
		border-radius: 8px;
		margin-top: 12px;
	}
	.hb-primary-menu.hb-open { display: flex; }
	.hb-currency-strip { gap: 12px; font-size: 12px; }
	.hb-hero { padding: 40px 16px; }
	.hb-hero h1 { font-size: 28px; }
	.hb-single-title { font-size: 26px; }
}

/* ============ LAYOUT VARIANTS ============ */
/* finance.ua-style — компактнi сiтки */
.hb-layout-finance .hb-card { font-size: 14px; }
.hb-layout-finance .hb-card-title { font-size: 16px; }

/* hotline-style — sidebar лiворуч */
.hb-layout-hotline .hb-with-sidebar { grid-template-columns: 280px 1fr; }
.hb-layout-hotline .hb-sidebar { order: -1; }
@media (max-width: 920px) {
	.hb-layout-hotline .hb-with-sidebar { grid-template-columns: 1fr; }
	.hb-layout-hotline .hb-sidebar { order: 99; }
}
