/**
 * Advanced UI — New Bloggers Theme v1.2
 *
 * @package New_Bloggers_Theme
 */

/* Reading progress */
.cst-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0;
	background: linear-gradient(90deg, var(--cst-color-accent), #e74c3c);
	z-index: 99999;
	transition: width 0.1s linear;
}

/* Sticky header */
.nbt-sticky-header .cst-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nbt-sticky-header .cst-header.is-scrolled {
	animation: nbtSlideDown 0.35s ease;
}

@keyframes nbtSlideDown {
	from { transform: translateY(-100%); }
	to { transform: translateY(0); }
}

/* Badges & section titles */
.cst-badge {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	background: var(--cst-color-accent);
	color: #fff !important;
	border-radius: 2px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cst-section-eyebrow {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--cst-color-accent);
	margin-bottom: 0.35rem;
}

.cst-section-title,
.cst-page-header--fancy .cst-page-title {
	position: relative;
	font-family: var(--cst-font-heading);
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	margin: 0 0 1.25rem;
	padding-bottom: 0.65rem;
}

.cst-section-title::after,
.cst-page-header--fancy .cst-page-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 3px;
	background: var(--cst-color-accent);
}

.cst-section-head {
	margin: 2rem 0 1rem;
}

/* Featured hero homepage */
.cst-featured-hero {
	margin-bottom: 2rem;
}

.cst-featured-hero__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: var(--cst-gap);
	min-height: 420px;
}

.cst-featured-hero__main .cst-card__image,
.cst-featured-hero__main .cst-card__image--placeholder {
	min-height: 420px;
	aspect-ratio: auto;
}

.cst-featured-hero__side {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.cst-card--mini {
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	background: var(--cst-color-surface);
	box-shadow: var(--cst-shadow);
}

.cst-card__mini-link {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 0.85rem;
	padding: 0.75rem;
	color: inherit;
}

.cst-card__thumb {
	width: 96px;
	height: 72px;
	object-fit: cover;
	border-radius: 3px;
}

.cst-card__title--sm {
	font-size: 1rem;
	margin: 0.25rem 0;
	line-height: 1.35;
}

/* Magazine loops */
.cst-magazine-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--cst-gap);
	margin-top: var(--cst-gap);
}

.cst-magazine-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cst-magazine-split {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: var(--cst-gap);
	margin-bottom: var(--cst-gap);
}

.cst-magazine-hero {
	margin-bottom: var(--cst-gap);
}

.cst-featured-grid__top {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--cst-gap);
	margin-bottom: var(--cst-gap);
}

.cst-card--featured .cst-card__featured-link {
	position: relative;
	display: block;
	border-radius: var(--cst-radius);
	overflow: hidden;
	color: #fff;
}

.cst-card--featured .cst-card__image {
	min-height: 360px;
}

.cst-card__featured-content {
	position: absolute;
	inset: auto 0 0;
	padding: 2rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
}

.cst-card--featured .cst-card__title,
.cst-card--featured .cst-card__meta,
.cst-card--featured .cst-card__category a,
.cst-card--featured .cst-card__excerpt {
	color: #fff;
}

/* Timeline */
.cst-post-loop--timeline {
	position: relative;
	padding-left: 1.5rem;
	border-left: 2px solid var(--cst-color-border);
}

.cst-card--timeline {
	position: relative;
	background: var(--cst-color-surface);
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	padding: 1.25rem;
	margin-bottom: 1.25rem;
	box-shadow: var(--cst-shadow);
}

.cst-timeline__marker {
	position: absolute;
	left: -1.85rem;
	top: 1.4rem;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--cst-color-accent);
	box-shadow: 0 0 0 4px var(--cst-color-bg);
}

.cst-timeline__date {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cst-color-accent);
	margin-bottom: 0.5rem;
}

/* Header 4 */
.cst-breaking-bar {
	background: var(--cst-color-accent);
	color: #fff;
	font-size: 0.8125rem;
}

.cst-breaking-bar__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.45rem 0;
	overflow: hidden;
}

.cst-breaking-bar__label {
	flex: 0 0 auto;
	padding: 0.15rem 0.5rem;
	background: rgba(0, 0, 0, 0.2);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.6875rem;
}

.cst-nav--underline .cst-menu a {
	position: relative;
	padding-bottom: 0.35rem;
}

.cst-nav--underline .cst-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--cst-color-accent);
	transition: width 0.25s ease;
}

.cst-nav--underline .cst-menu a:hover::after,
.cst-nav--underline .current-menu-item > a::after {
	width: 100%;
}

/* Footer 4 newsletter */
.cst-footer--4 .cst-footer__newsletter {
	background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
	padding: 2.5rem 0;
}

.cst-footer__newsletter-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: center;
}

.cst-footer__newsletter-title {
	margin: 0 0 0.5rem;
	color: #fff;
	font-family: var(--cst-font-heading);
}

.cst-footer__newsletter-copy p {
	margin: 0;
	color: rgba(255, 255, 255, 0.75);
}

.cst-newsletter-form {
	display: flex;
	gap: 0.5rem;
}

.cst-newsletter-form__field {
	flex: 1;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: var(--cst-radius);
}

/* Single advanced */
.cst-entry-meta--advanced {
	margin: 1rem 0 1.5rem;
	padding: 1rem 0;
	border-block: 1px solid var(--cst-color-border);
}

.cst-entry-meta__author {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.cst-entry-meta__avatar {
	border-radius: 50%;
}

.cst-entry-meta__by {
	display: block;
	font-weight: 700;
}

.cst-entry-meta__details {
	font-size: 0.8125rem;
	color: var(--cst-color-muted);
}

.cst-entry-media--wide {
	margin-inline: -2rem;
	border-radius: 0;
}

.cst-hero-overlay--tall .cst-entry-image {
	min-height: 420px;
	object-fit: cover;
}

.cst-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 1rem 0 1.5rem;
}

.cst-share__label {
	font-weight: 700;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.cst-share__btn {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--cst-color-border);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--cst-color-text);
}

.cst-share__btn:hover {
	border-color: var(--cst-color-accent);
	color: var(--cst-color-accent);
}

.cst-author-box {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 1rem;
	margin-top: 2rem;
	padding: 1.5rem;
	background: var(--cst-color-bg);
	border-radius: var(--cst-radius);
	border: 1px solid var(--cst-color-border);
}

.cst-author-box__avatar {
	border-radius: 50%;
}

.cst-author-box__name {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
}

.cst-related {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 2px solid var(--cst-color-border);
}

.cst-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--cst-gap);
}

.cst-single-wrap--style-3 .cst-article {
	max-width: 720px;
	margin-inline: auto;
}

.cst-single-wrap--style-6 .cst-entry-content blockquote {
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid var(--cst-color-accent);
	background: var(--cst-color-bg);
	font-family: var(--cst-font-heading);
	font-size: 1.25rem;
	line-height: 1.5;
}

/* Card hover polish */
.cst-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cst-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

@media (max-width: 960px) {
	.cst-featured-hero__grid,
	.cst-magazine-split,
	.cst-footer__newsletter-inner,
	.cst-related__grid,
	.cst-featured-grid__top {
		grid-template-columns: 1fr;
	}

	.cst-magazine-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cst-entry-media--wide {
		margin-inline: 0;
	}
}

@media (max-width: 640px) {
	.cst-magazine-grid,
	.cst-magazine-grid--3,
	.cst-related__grid {
		grid-template-columns: 1fr;
	}

	.cst-card__mini-link {
		grid-template-columns: 72px 1fr;
	}

	.cst-newsletter-form {
		flex-direction: column;
	}
}

/* Header style 5 */
.cst-header--5 .cst-header__inner--centered {
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.75rem;
}

.cst-header--5 .cst-header__utilities {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cst-top-bar {
	background: var(--cst-color-ink, #111);
	color: #fff;
	font-size: 0.85rem;
}

.cst-top-bar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.35rem 0;
}

.cst-header-search {
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}

/* Breadcrumbs */
.cst-breadcrumbs {
	padding: 0.75rem 0;
	font-size: 0.85rem;
}

.cst-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cst-breadcrumbs__item:not(:last-child)::after {
	content: "/";
	margin-left: 0.35rem;
	opacity: 0.5;
}

/* Dark mode */
html.nbt-dark {
	color-scheme: dark;
}

html.nbt-dark body {
	background: #121212;
	color: #e8e8e8;
}

html.nbt-dark .cst-header,
html.nbt-dark .cst-card {
	background: #1e1e1e;
}
