/*
 * Bluesky feed styles (.bluesky-* ) — homepage section + [bluesky_feed] shortcode.
 * Loaded site-wide so the shortcode works anywhere. Uses brand tokens from style.css.
 */
.bluesky-section {
	background: var(--bg-subtle);
	padding: 56px 24px;
	font-family: var(--font-sans);
}
.bluesky-inner {
	max-width: calc(1200px + 320px); /* match the other full-width sections (content + rail width) */
	margin: 0 auto;
}
.bluesky-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}
.bluesky-header .section-subtitle a {
	color: var(--blue-primary);
	font-weight: 600;
}

/* Feed grid */
.bluesky-feed {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.bluesky-post {
	position: relative;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: box-shadow 0.2s, border-color 0.2s;
}
.bluesky-post:hover {
	border-color: var(--blue-primary);
	box-shadow: 0 4px 16px rgba(0, 68, 204, 0.08);
}
/* --- Author-forward card (homepage module + [bluesky_feed] shortcode) --- */
.bluesky-post__avatar-link {
	display: block;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
}
.bluesky-post__name {
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--text-darkest);
	text-decoration: none;
}
.bluesky-post__name:hover { color: var(--blue-primary); }
.bluesky-post__handle {
	font-size: 0.8rem;
	color: var(--blue-primary);
	text-decoration: none;
}
.bluesky-post__handle:hover { text-decoration: underline; }
.bluesky-post__card { text-decoration: none; color: inherit; }
/* clamp body text so the 3-up cards stay even */
.bluesky-post__text {
	display: -webkit-box;
	-webkit-line-clamp: 7;
	line-clamp: 7;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bluesky-post__foot {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
}
.bluesky-post__view {
	color: var(--blue-primary);
	font-weight: 600;
	font-size: 0.82rem;
	text-decoration: none;
	white-space: nowrap;
}
.bluesky-post__view:hover { text-decoration: underline; }
.bluesky-post__head {
	display: flex;
	align-items: center;
	gap: 10px;
}
.bluesky-post__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}
.bluesky-post__meta {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.bluesky-post__name {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--text-darkest);
}
.bluesky-post__date {
	font-size: 0.78rem;
	color: var(--text-subtle);
}
.bluesky-post__text {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--text-strong);
}
.bluesky-post__images {
	display: grid;
	gap: 4px;
	border-radius: var(--radius);
	overflow: hidden;
}
.bluesky-post__images--1 { grid-template-columns: 1fr; }
.bluesky-post__images--2,
.bluesky-post__images--3,
.bluesky-post__images--4 { grid-template-columns: 1fr 1fr; }
.bluesky-post__images img {
	width: 100%;
	height: 100%;
	max-height: 220px;
	object-fit: cover;
	display: block;
}
/* External link card */
.bluesky-post__card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	position: relative;
	z-index: 2; /* sit above the stretched overlay so its own link wins if added later */
}
.bluesky-post__card-thumb {
	width: 100%;
	max-height: 160px;
	object-fit: cover;
	display: block;
}
.bluesky-post__card-body {
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.bluesky-post__card-title {
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--text-darkest);
	line-height: 1.3;
}
.bluesky-post__card-desc {
	font-size: 0.8rem;
	color: var(--text-medium);
	line-height: 1.4;
}
.bluesky-post__card-host {
	font-size: 0.72rem;
	color: var(--text-subtle);
	text-transform: lowercase;
}
.bluesky-feed--empty {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	text-align: center;
	color: var(--text-medium);
}
.bluesky-feed--empty a { color: var(--blue-primary); }

@media (max-width: 992px) {
	.bluesky-feed { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.bluesky-feed { grid-template-columns: 1fr; }
}

/* Compact rail variant (bottom of the homepage sidebar rail) */
.rail-bluesky .rail-bsky-item {
	padding: 10px 0;
	border-bottom: 1px solid var(--border);
}
.rail-bluesky .rail-bsky-item:first-of-type {
	padding-top: 0;
}
.rail-bluesky .rail-bsky-item p {
	margin: 0 0 4px;
	font-size: 0.85rem;
	line-height: 1.45;
	color: var(--text-strong);
}
.rail-bluesky .rail-bsky-item a {
	font-size: 0.8rem;
	color: var(--blue-primary);
	font-weight: 600;
	text-decoration: none;
}
.rail-bluesky .rail-bsky-item a:hover {
	text-decoration: underline;
}

/* --- Text-only short posts: bold "quote" card (dark blue, large white text) --- */
.bluesky-post--quote {
	background: var(--blue-dark);
	border-color: var(--blue-dark);
}
.bluesky-post--quote .bluesky-post__name { color: #fff; }
.bluesky-post--quote .bluesky-post__handle { color: var(--blue-light); }
.bluesky-post--quote .bluesky-post__text {
	color: #fff;
	font-size: clamp(1.3rem, 1.7vw, 1.65rem);
	line-height: 1.4;
	font-weight: 500;
	-webkit-line-clamp: 10;
	line-clamp: 10;
	margin-top: auto;          /* with the foot's margin-top:auto, centers the quote vertically */
	margin-bottom: auto;
}
.bluesky-post--quote .bluesky-post__foot {
	border-top-color: rgba(255, 255, 255, 0.22);
}
.bluesky-post--quote .bluesky-post__date { color: rgba(255, 255, 255, 0.7); }
.bluesky-post--quote .bluesky-post__view { color: #fff; }

/* --- Video posts: poster image + play overlay (links to the post on bsky.app) --- */
.bluesky-post__video {
	display: block;
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	background: #000;
}
.bluesky-post__video img {
	width: 100%;
	max-height: 240px;
	object-fit: cover;
	display: block;
}
.bluesky-post__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	transition: background 0.2s;
}
.bluesky-post__video:hover .bluesky-post__play { background: var(--blue-primary); }
.bluesky-post__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #fff;
}
