/**
 * Superfast enhancements stylesheet.
 * Loaded after style.css - only adds new, additive rules so it never
 * conflicts with the original theme framework/customizer output.
 *
 * @package Superfast
 */

/* -----------------------------------------------------------------------
 * Reading progress bar (single post only)
 * ------------------------------------------------------------------- */
#gmr-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: transparent;
	z-index: 100000;
	pointer-events: none;
}
#gmr-reading-progress-bar {
	display: block;
	height: 100%;
	width: 0%;
	background-color: var(--superfast-accent, #1e73be);
	transition: width 0.1s ease-out;
}
.gmr-sticky.admin-bar #gmr-reading-progress {
	top: 32px;
}
@media (max-width: 782px) {
	.gmr-sticky.admin-bar #gmr-reading-progress {
		top: 46px;
	}
}
@media screen and (max-width: 600px) {
	.gmr-sticky.admin-bar #gmr-reading-progress {
		top: 0;
	}
}

/* -----------------------------------------------------------------------
 * Reading time badge next to post meta
 * ------------------------------------------------------------------- */
.gmr-reading-time {
	display: inline-block;
	margin-left: 10px;
	padding-left: 12px;
	border-left: 1px solid rgba(0, 0, 0, 0.15);
}

/* -----------------------------------------------------------------------
 * Widget title accent bar/underline - force the theme's blue accent
 * (#1e73be) so it can never render as orange, regardless of any other
 * color scheme setting saved elsewhere.
 * ------------------------------------------------------------------- */
.widget-title:before,
.widget-title:after {
	background-color: #1e73be !important;
}

/* -----------------------------------------------------------------------
 * Recent Posts widget only (.widget_recent_entries) - decorative pulsing
 * dot before each title. Scoped strictly to the Recent Posts widget, not
 * to the Related Posts grid below (which uses its own accent bar).
 * ------------------------------------------------------------------- */
.widget_recent_entries ul li {
	position: relative;
	padding-left: 20px;
}
.widget_recent_entries ul li:before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: var(--superfast-accent, #1e73be);
	animation: gmr-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes gmr-dot-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(30, 115, 190, 0.45);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(30, 115, 190, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(30, 115, 190, 0);
	}
}
@media (prefers-reduced-motion: reduce) {
	.widget_recent_entries ul li:before {
		animation: none;
	}
}

/* -----------------------------------------------------------------------
 * Related Posts grid (image + title only), count configurable via
 * the shortcode's "count" attribute - see functions.php.
 * ------------------------------------------------------------------- */
.gmr-related-posts {
	margin: 30px 0;
	clear: both;
}
.gmr-related-posts-title {
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	margin: 0 0 16px;
	padding-left: 14px;
	position: relative;
}
.gmr-related-posts-title:before {
	content: "";
	position: absolute;
	top: 2px;
	left: 0;
	width: 4px;
	height: 16px;
	border-radius: 5px;
	background-color: var(--superfast-accent, #1e73be);
}
/*
 * Layout modifier: side-by-side grid (default) vs stacked list.
 * Controlled by the "Related Posts Layout" Customizer setting
 * (gmr_relatedposts_layout). The extra specificity + !important on
 * display/grid-template-columns guards against theme/content-area
 * list styles (e.g. .entry-content ul) forcing the items to stack,
 * since the markup is injected inside .entry-content.
 */
.gmr-related-posts .gmr-related-posts-grid,
ul.gmr-related-posts-grid.gmr-related-posts-grid--grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.gmr-related-posts-grid .gmr-related-post-item {
	margin: 0;
	padding: 0;
}
.gmr-related-posts-grid .gmr-related-post-link {
	display: block;
	text-decoration: none !important;
	color: inherit;
}
.gmr-related-posts-grid .gmr-related-post-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 5px;
	background-color: #f1f2f3;
	margin-bottom: 10px;
}
.gmr-related-posts-grid .gmr-related-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.gmr-related-posts-grid .gmr-related-post-link:hover .gmr-related-post-thumb img {
	transform: scale(1.06);
}
.gmr-related-posts-grid .gmr-related-post-title {
	display: block;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: #333;
	transition: color 0.2s ease;
}
.gmr-related-posts-grid .gmr-related-post-link:hover .gmr-related-post-title {
	color: var(--superfast-accent, #1e73be);
}
@media (max-width: 767px) {
	.gmr-related-posts .gmr-related-posts-grid,
	ul.gmr-related-posts-grid.gmr-related-posts-grid--grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
@media (max-width: 480px) {
	.gmr-related-posts .gmr-related-posts-grid,
	ul.gmr-related-posts-grid.gmr-related-posts-grid--grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px;
	}
}

/* "Stacked (List)" layout option: image left, title right, one per row */
.gmr-related-posts .gmr-related-posts-grid.gmr-related-posts-grid--list {
	display: block !important;
}
.gmr-related-posts-grid--list .gmr-related-post-item {
	margin-bottom: 14px;
}
.gmr-related-posts-grid--list .gmr-related-post-item:last-child {
	margin-bottom: 0;
}
.gmr-related-posts-grid--list .gmr-related-post-link {
	display: flex;
	align-items: center;
	gap: 14px;
}
.gmr-related-posts-grid--list .gmr-related-post-thumb {
	flex: 0 0 100px;
	width: 100px;
	margin-bottom: 0;
}
.gmr-related-posts-grid--list .gmr-related-post-title {
	flex: 1 1 auto;
}
#primary-menu > li > a:focus-visible,
#primary-menu .sub-menu a:focus-visible,
#primary-menu .children a:focus-visible,
#gmr-responsive-menu:focus-visible,
a.gmr-ontop:focus-visible {
	outline: 2px solid var(--superfast-accent, #1e73be);
	outline-offset: 2px;
	border-radius: 5px;
}

/* -----------------------------------------------------------------------
 * Small professional polish
 * ------------------------------------------------------------------- */
.widget {
	transition: box-shadow 0.2s ease;
}
