/**
 * TROEON widgets — front-end styles.
 */

/* ── Nav Menu ─────────────────────────────────────────────────────────────── */

.sehfb-nav-wrap {
	position: relative;
}

.sehfb-nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sehfb-nav-vertical .sehfb-nav-menu {
	flex-direction: column;
	align-items: flex-start;
}

.sehfb-nav-menu li {
	position: relative;
	margin: 0;
}

.sehfb-nav-menu a {
	display: block;
	text-decoration: none;
	line-height: 1.4;
}

/* Dropdowns */
.sehfb-nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99;
	min-width: 200px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, .08 );
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, .12 );
	opacity: 0;
	visibility: hidden;
	transform: translateY( 6px );
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.sehfb-nav-menu li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY( 0 );
}

.sehfb-nav-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.sehfb-nav-menu .sub-menu a {
	padding: 8px 16px;
	white-space: nowrap;
}

/* Mobile toggle */
.sehfb-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.sehfb-nav-toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	margin: 0 auto;
	background: currentColor;
	transition: transform .2s ease, opacity .2s ease;
}

@media ( max-width: 1024px ) {
	.sehfb-nav-toggle {
		display: flex;
	}

	.sehfb-nav-wrap .sehfb-nav-menu {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}

	.sehfb-nav-wrap.sehfb-nav-open .sehfb-nav-menu {
		display: flex;
	}

	.sehfb-nav-menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding-left: 16px;
	}

	.sehfb-nav-menu a {
		padding: 10px 0;
	}
}

/* ── Search Form ──────────────────────────────────────────────────────────── */

.sehfb-search {
	display: flex;
	gap: 8px;
}

.sehfb-search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 8px 12px;
}

.sehfb-search button {
	padding: 8px 16px;
	border: 0;
	cursor: pointer;
}

/* ── Site logo / titles ───────────────────────────────────────────────────── */

.sehfb-site-logo img {
	display: inline-block;
	height: auto;
}

.sehfb-site-title,
.sehfb-post-title,
.sehfb-archive-title {
	margin: 0;
}

/* ── Post info ────────────────────────────────────────────────────────────── */

.sehfb-post-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: .9em;
}

.sehfb-info-sep {
	opacity: .5;
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */

.sehfb-breadcrumbs {
	font-size: .9em;
}

.sehfb-crumb-sep {
	opacity: .5;
	margin: 0 6px;
}

/* ── Posts grid ───────────────────────────────────────────────────────────── */

.sehfb-posts {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 28px;
}

.sehfb-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.sehfb-card-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.sehfb-card-body {
	padding-top: 14px;
}

.sehfb-card-meta {
	font-size: .85em;
	opacity: .7;
	margin-bottom: 6px;
}

.sehfb-card-title {
	margin: 0 0 8px;
	font-size: 1.15em;
}

.sehfb-card-title a {
	text-decoration: none;
}

.sehfb-card-excerpt {
	font-size: .95em;
	line-height: 1.6;
}

.sehfb-posts-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.sehfb-posts-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	text-decoration: none;
	border: 1px solid rgba( 0, 0, 0, .12 );
	border-radius: 6px;
}

.sehfb-posts-pagination .page-numbers.current {
	background: #4f46e5;
	color: #fff;
	border-color: #4f46e5;
}

@media ( max-width: 1024px ) {
	.sehfb-posts {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 767px ) {
	.sehfb-posts {
		grid-template-columns: 1fr;
	}
}
