/* Modern homepage layout: hero, category sections, trending sidebar,
   and the post-card grid shared by archives/author/search/related posts. */

/* Web Stories carousel */
.web-stories { margin: 20px 0; }
.web-stories__track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}
.web-stories__track::-webkit-scrollbar { display: none; }
.web-stories__item { flex: none; width: 110px; }
.web-stories__ring {
	display: block;
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: 12px;
	overflow: hidden;
	background: var(--fmnews-subtle);
	padding: 3px;
	border: 3px solid var(--fmnews-primary);
}
.web-stories__ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.web-stories__title {
	position: absolute;
	left: 6px; right: 6px; bottom: 6px;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.25;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.home-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 32px;
}
.home-main { min-width: 0; }

/* Hero: big lead story + secondary story list */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 32px; }
.hero-card { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.hero-card__link { display: block; position: relative; }
.hero-card__media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.hero-card__overlay {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 20px;
	background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0) 70%);
}
.hero-card__category {
	display: inline-block;
	background: var(--fmnews-primary);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 3px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
}
.hero-card__title { font-size: 1.5rem; line-height: 1.3; margin: 0 0 6px; color: #fff; }
.hero-card__meta { font-size: 0.8rem; color: #ddd; }

.hero__secondary { display: flex; flex-direction: column; gap: 14px; }

/* Compact card: hero secondary list + trending sidebar */
.compact-card { display: flex; align-items: center; gap: 12px; }
.compact-card__rank { flex: none; width: 22px; font-weight: 800; color: var(--fmnews-primary); font-size: 1.1rem; }
.compact-card__media img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; }
.compact-card__title { font-size: 0.95rem; line-height: 1.35; margin: 0; }
.compact-card__title a { color: var(--fmnews-text); }

/* Category sections */
.home-section { margin: 32px 0; }
.home-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 14px;
	border-bottom: 2px solid var(--fmnews-text);
	padding-bottom: 8px;
}
.home-section__title { font-size: 1.25rem; margin: 0; }
.home-section__view-all { font-size: 0.85rem; font-weight: 600; }

.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 24px 0; }

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--fmnews-surface);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
	transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
.post-card__media img { aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { padding: 12px 14px 16px; }
.post-card__category {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fmnews-primary);
	margin-bottom: 6px;
}
.post-card__title { font-size: 1.05rem; line-height: 1.35; margin: 0 0 8px; }
.post-card__title a { color: var(--fmnews-text); }
/* #777 measured only ~4.57:1 against white — right at WCAG AA's 4.5:1
   floor, and PageSpeed flagged it as failing in practice. #555 gives a
   safe margin (~7.7:1). */
.post-card__meta { font-size: 0.78rem; color: var(--fmnews-muted); display: flex; gap: 8px; }

/* Trending sidebar */
.trending-sidebar {
	background: var(--fmnews-surface);
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
	align-self: start;
	position: sticky;
	top: 90px;
}
.trending-sidebar__title { font-size: 1.1rem; margin: 0 0 16px; border-bottom: 2px solid var(--fmnews-text); padding-bottom: 8px; }
.trending-sidebar__list { display: flex; flex-direction: column; gap: 16px; }
.trending-sidebar__follow { margin-top: 24px; }
.trending-sidebar__follow .social-icons a {
	background: var(--fmnews-subtle);
	color: var(--fmnews-text);
}
.trending-sidebar__follow .social-icons a:hover { background: var(--fmnews-primary); color: #fff; }

@media (max-width: 900px) {
	.home-layout { grid-template-columns: 1fr; }
	.trending-sidebar { position: static; }
}
@media (max-width: 700px) {
	.hero { grid-template-columns: 1fr; }
}

/* Breadcrumbs */
.breadcrumbs { margin: 20px 0 4px; font-size: 0.85rem; color: var(--fmnews-muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #bbb; }
.breadcrumbs li[aria-current="page"] { color: #444; }

/* Share bar */
.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.share-bar__label { font-size: 0.85rem; font-weight: 700; color: var(--fmnews-muted); margin-right: 4px; }
.share-bar__btn {
	display: inline-flex;
	align-items: center;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	color: #fff;
}
/* Darker than the raw brand colors on purpose: #25D366/#1877F2 with white
   text measure ~2:1 and ~4.3:1 contrast — both fail WCAG AA's 4.5:1
   minimum for this text size. These shades keep the same brand hue but
   pass (~4.6:1 and ~5.9:1). */
.share-bar__btn--whatsapp { background: #128C3E; }
.share-bar__btn--facebook { background: #1265C9; }
.share-bar__btn--x { background: #111; }
.share-bar__btn--copy { background: var(--fmnews-muted); }
.share-bar__btn:hover { opacity: 0.9; text-decoration: none; }

/* Archive / author / search headers — already inside main.fmnews-container,
   so these only add spacing, not another max-width/padding constraint. */
.archive-header, .author-header { margin: 24px 0; }
.archive-title { font-size: 1.75rem; margin: 0 0 4px; }
.archive-description { color: var(--fmnews-muted); }

.author-header { text-align: center; }
.author-header__name { margin: 8px 0 4px; }
.author-header__title { font-size: 0.85rem; color: var(--fmnews-primary); margin: 0 0 8px; }
.author-header__bio { color: var(--fmnews-muted); max-width: 560px; margin: 0 auto; }

.related-posts { margin-top: 32px; padding-top: 16px; border-top: 1px solid #e2e2e2; }
.related-posts__title { font-size: 1.25rem; }

.error-404 { text-align: center; padding: 48px 0; }
