/* TechBeat.info — card feed styles (loads after main.css) */

/* Feed grid: 3 / 2 / 1 columns, rows top-aligned (cards end where their content ends) */
#feed {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.5em;
	align-items: start;
	margin: 0 0 2em 0;
}

@media screen and (max-width: 1280px) {
	#feed {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 736px) {
	#feed {
		grid-template-columns: 1fr;
	}
}

/* Card */
.post-card {
	min-width: 0;               /* prevents grid-item overflow */
	overflow-wrap: break-word;  /* long unbroken words can't push width */
}

.post-card .image {
	display: block;
	margin: 0 0 1.25em 0;
	border-bottom: none;
}

.post-card .image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0.375em;
	aspect-ratio: 16 / 10;      /* uniform image height across a row */
	object-fit: cover;
}

.post-card .channel-tag {
	display: inline-block;
	font-size: 0.7em;
	font-weight: bold;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #f56a6a;
	border-bottom: none;
}

.post-card .post-date {
	font-size: 0.7em;
	color: #9fa3a6;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.post-card h3 {
	margin: 0.5em 0 0.75em 0;
}

.post-card .post-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 0.5em;
}

.post-card .hashtags {
	font-size: 0.8em;
	color: #9fa3a6;
}

.post-card .telegram-link {
	border-bottom: none;
	font-size: 1.4em;
	color: #2aabee;
}

/* YouTube click-to-play */
.post-card .video-thumb {
	position: relative;
	margin: 0 0 1.25em 0;
	aspect-ratio: 16 / 10;
	border-radius: 0.375em;
	overflow: hidden;
	background: #1e252d;
	cursor: pointer;
}

.post-card .video-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card .video-thumb .play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 3.5em;
	height: 2.5em;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 0.5em;
	pointer-events: none;
}

.post-card .video-thumb .play-button::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-40%, -50%);
	border-style: solid;
	border-width: 0.55em 0 0.55em 0.95em;
	border-color: transparent transparent transparent #ffffff;
}

.post-card .video-thumb iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Active channel in the sidebar menu */
#menu a.active {
	color: #f56a6a;
}

/* Row dividers: full-width lines drawn by app.js, centered in each inter-row gap */
#feed {
	position: relative;   /* anchor for absolutely-positioned .row-divider lines */
}

.row-divider {
	position: absolute;
	left: 0;
	right: 0;
	height: 0;
	border-top: 1px solid rgba(210, 215, 217, 0.9);
	pointer-events: none;
}
