/* ==========================================================================
   BuzzFeed-Style Feed — theme stylesheet
   ========================================================================== */

:root {
	--bf-yellow: #ffd500;
	--bf-black: #181818;
	--bf-pink: #ff5c8d;
	--bf-gray: #767676;
	--bf-gray-light: #a8a8a8;
	--bf-border: #eeeeee;
	--bf-bg: #ffffff;
	--bf-bg-soft: #fafafa;

	--bf-font-display: 'Baloo 2', 'Inter', sans-serif;
	--bf-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

	--bf-container: 1300px;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; max-width: 100%; }

body {
	margin: 0;
	overflow-x: hidden;
	max-width: 100%;
	font-family: var(--bf-font-sans);
	color: var(--bf-black);
	background: var(--bf-bg-soft);
	line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

.bf-media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 140px;
	background: linear-gradient(135deg, var(--bf-yellow), var(--bf-pink));
	opacity: 0.25;
}

/* ---------- Masthead ---------- */

.bf-masthead { position: relative; background: var(--bf-yellow); }
.bf-masthead-inner {
	max-width: var(--bf-container);
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	align-items: center;
	gap: 1.25rem;
}
.bf-logo,
.bf-logo-wrap a {
	font-family: var(--bf-font-display);
	font-weight: 800;
	font-size: clamp(1.9rem, 5vw, 2.4rem);
	color: var(--bf-black);
}
.bf-logo, .bf-logo-wrap { flex: 1; text-align: center; }

/* ---------- Primary nav strip ---------- */

.bf-nav { background: var(--bf-yellow); border-top: 1px solid rgba(0,0,0,0.08); }
.bf-nav-inner { max-width: var(--bf-container); margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; }
.bf-nav-menu-wrap {
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.bf-nav-menu-wrap::-webkit-scrollbar { display: none; }
.bf-menu { display: flex; flex-wrap: nowrap; min-width: 0; width: max-content; gap: 0.25rem; }
.bf-menu > li { flex: 0 0 auto; }
.bf-menu li a {
	display: block;
	white-space: nowrap;
	padding: 0.6rem 0.75rem;
	color: var(--bf-black);
	font-weight: 700;
	font-size: 0.9rem;
	border-radius: 999px;
}
.bf-menu li a:hover,
.bf-menu li.current-menu-item a { background: rgba(0,0,0,0.08); }

.bf-nav-toggle { display: flex; order: -1; flex-shrink: 0; flex-direction: column; gap: 4px; background: none; border: 0; padding: 0.5rem; }
.bf-nav-toggle span { display: block; width: 20px; height: 2px; background: var(--bf-black); }

.bf-mobile-menu-wrap {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--bf-yellow);
	box-shadow: 0 12px 20px rgba(0,0,0,0.15);
	max-height: 70vh;
	overflow-y: auto;
	z-index: 50;
	padding: 0.5rem 1.25rem 0.75rem;
}
.bf-mobile-menu-wrap.is-open { display: block; }
.bf-mobile-menu { display: flex; flex-direction: column; }
.bf-mobile-menu li a {
	display: block;
	padding: 0.7rem 0;
	color: var(--bf-black);
	font-weight: 700;
	font-size: 0.9rem;
	border-bottom: 1px solid rgba(0,0,0,0.1);
}
.bf-mobile-menu li:last-child a { border-bottom: 0; }

.bf-search {
	display: flex;
	align-items: center;
	background: rgba(255,255,255,0.6);
	border-radius: 999px;
	padding: 0.35rem 0.4rem 0.35rem 0.9rem;
	flex-shrink: 0;
}
.bf-search input { background: none; border: 0; outline: none; width: 130px; font-size: 0.85rem; font-family: var(--bf-font-sans); }
.bf-search button { background: none; border: 0; color: var(--bf-black); display: flex; padding: 0.3rem; }

/* ---------- Shared layout ---------- */

.bf-main { max-width: var(--bf-container); margin: 0 auto; padding: 1.75rem 1.25rem 3.5rem; }

.bf-pill-row-outer { max-width: var(--bf-container); margin: 0 auto; padding: 0.25rem 0 1.5rem; overflow: hidden; }
.bf-pill-row {
	display: inline-flex;
	gap: 0.6rem;
	width: max-content;
	animation: bf-marquee 24s linear infinite;
}
.bf-pill-row-outer:hover .bf-pill-row { animation-play-state: paused; }

@keyframes bf-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.bf-pill-row { animation: none; }
	.bf-pill-row-outer { overflow-x: auto; }
}
.bf-pill {
	display: inline-block;
	white-space: nowrap;
	color: #fff;
	font-family: var(--bf-font-display);
	font-weight: 700;
	font-size: 0.85rem;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	flex-shrink: 0;
}
.bf-pill:hover { transform: scale(1.05); }

.bf-dek { color: var(--bf-gray); font-size: 1rem; line-height: 1.55; margin: 0.4rem 0 0.6rem; }
.bf-dek-single { font-size: 1.15rem; margin: 0.6rem 0 1rem; }

.bf-meta { font-size: 0.78rem; color: var(--bf-gray); }
.bf-dot { margin: 0 0.35rem; color: var(--bf-gray-light); }

.bf-section-heading { margin-bottom: 1.25rem; }
.bf-section-heading h2 { font-family: var(--bf-font-display); font-weight: 800; font-size: 1.4rem; margin: 0; }

/* ---------- Hero card ---------- */

.bf-hero-section { margin-bottom: 2rem; }
.bf-hero {
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.bf-hero-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bf-bg-soft); }
.bf-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.bf-hero-title { font-family: var(--bf-font-display); font-weight: 800; font-size: clamp(1.6rem, 3.8vw, 2.4rem); line-height: 1.15; margin: 0; }
.bf-hero-title a:hover { color: var(--bf-pink); }
.bf-hero-body { padding: 1.5rem; }

/* ---------- Card grid ---------- */

.bf-grid-section { margin-bottom: 2rem; }
.bf-card-grid { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.bf-card-grid > .bf-card { flex: 1 1 220px; }
.bf-card {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0,0,0,0.06);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bf-card:hover { transform: rotate(-1deg) translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,0.12); }
.bf-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bf-bg-soft); }
.bf-card-media img { width: 100%; height: 100%; object-fit: cover; }
.bf-card-body { padding: 1.1rem 1.2rem 1.3rem; }
.bf-card-title { font-family: var(--bf-font-display); font-weight: 700; font-size: 1.12rem; line-height: 1.3; margin: 0 0 0.5rem; }
.bf-card-title a:hover { color: var(--bf-pink); }

/* Grid style variant — smaller cards, more columns, for the "You Might
   Also Like" block so the main column reads as a distinct section. */
.bf-grid-dense { gap: 1.1rem; }
.bf-grid-dense > .bf-card { flex: 1 1 175px; }
.bf-grid-dense .bf-card-title { font-size: 1rem; }

.bf-home-feed { width: 100%; }
.bf-grid-standard, .bf-grid-wide2, .bf-grid-compact, .bf-grid-mosaic { display: flex; flex-wrap: wrap; }
.bf-grid-standard { gap: 1.75rem; }
.bf-grid-wide2    { gap: 1.75rem; }
.bf-grid-compact  { gap: 1rem; }
.bf-grid-mosaic   { gap: 1.25rem; }
.bf-grid-standard > * { flex: 1 1 220px; }
.bf-grid-wide2 > *    { flex: 1 1 300px; }
.bf-grid-compact > *  { flex: 1 1 145px; }
.bf-grid-mosaic > *   { flex: 1 1 195px; }
.bf-grid-mosaic > *:first-child { flex-basis: 400px; }
.bf-hlist { display: flex; flex-direction: column; gap: 0.9rem; }
.bf-hlist > .bf-card { display: flex; flex-direction: row; align-items: center; gap: 1.1rem; border-radius: 12px; box-shadow: none; border: 1px solid rgba(0,0,0,0.08); }
.bf-hlist > .bf-card:hover { transform: none; }
.bf-hlist > .bf-card .bf-card-media { width: 150px; flex-shrink: 0; aspect-ratio: 4 / 3; }
.bf-hlist > .bf-card .bf-card-body { padding: 0.75rem 1rem 0.75rem 0; flex: 1; min-width: 0; }

/* ---------- Body layout: main column + sidebar ---------- */

.bf-columns { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
.bf-body-main { min-width: 0; }

.bf-sidebar { display: flex; flex-direction: column; gap: 1.75rem; align-self: start; }
.bf-widget-title { font-family: var(--bf-font-display); font-weight: 700; font-size: 1rem; margin: 0 0 0.6rem; }
.bf-widget-list { display: flex; flex-direction: column; gap: 0.6rem; }
.bf-widget-list li { border-bottom: 1px solid var(--bf-border); padding-bottom: 0.6rem; }
.bf-widget-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.bf-widget-item { display: flex; align-items: center; gap: 0.75rem; }
.bf-widget-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 4px; overflow: hidden; background: var(--bf-bg-soft); }
.bf-widget-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-widget-thumb-fallback { display: block; width: 100%; height: 100%; background: var(--bf-bg-soft); }
.bf-widget-text { flex: 1; min-width: 0; }
.bf-widget-item:hover .bf-widget-text { color: var(--bf-pink); }
.bf-widget-list a { font-size: 0.92rem; line-height: 1.35; }
.bf-widget-list a:hover { color: var(--bf-pink); }
.bf-widget-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bf-widget-pill { font-size: 0.76rem; background: #fff; border-radius: 999px; padding: 0.28rem 0.7rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.bf-widget-pill:hover { background: var(--bf-yellow); }
.bf-widget-pill-tag { color: var(--bf-pink); }

/* ---------- Ribbon (corner tag on thumbnails) ---------- */

.bf-ribbon {
	position: absolute;
	top: 0.75rem;
	left: -0.5rem;
	color: #fff;
	font-family: var(--bf-font-display);
	font-weight: 700;
	font-size: 0.72rem;
	padding: 0.3rem 0.9rem 0.3rem 1.1rem;
	border-radius: 0 999px 999px 0;
	box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* ---------- Archive / search headers ---------- */

.bf-archive-header { margin-bottom: 1.75rem; }
.bf-archive-title { font-family: var(--bf-font-display); font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin: 0; }
.bf-archive-title span { color: var(--bf-pink); }
.bf-archive-desc { color: var(--bf-gray); margin-top: 0.4rem; }
.bf-no-results { color: var(--bf-gray); }
.bf-archive { margin-bottom: 2rem; }

/* ---------- Pagination ---------- */

.pagination,
.navigation.pagination { display: flex; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	background: #fff;
	border-radius: 999px;
	font-family: var(--bf-font-display);
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--bf-black);
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.pagination .page-numbers.current { background: var(--bf-pink); color: #fff; }

/* ---------- Single article ---------- */

.bf-single {
	max-width: 740px;
	margin: 0 auto;
	background: #fff;
	border-radius: 18px;
	padding: 2rem;
	box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.bf-single-header { text-align: center; margin-bottom: 1.5rem; }
.bf-single-title { font-family: var(--bf-font-display); font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 2.6rem); line-height: 1.12; margin: 0.3rem 0 0; }
.bf-byline-row { margin-top: 1rem; font-size: 0.85rem; color: var(--bf-gray); }

.bf-single-media { margin: 1.75rem 0; border-radius: 14px; overflow: hidden; }
.bf-single-media img { width: 100%; }

.bf-single-content { font-size: 1.1rem; line-height: 1.75; }
.bf-single-content p { margin: 0 0 1.35rem; }
.bf-single-content blockquote {
	background: var(--bf-bg-soft);
	border-left: 4px solid var(--bf-pink);
	margin: 1.75rem 0;
	padding: 1rem 1.25rem;
	font-style: italic;
	font-size: 1.2rem;
	border-radius: 0 14px 14px 0;
}
.bf-single-content h2,
.bf-single-content h3 { font-family: var(--bf-font-display); font-weight: 800; }

.bf-single-footer { margin-top: 1.25rem; text-align: center; }
.bf-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.bf-tag { background: var(--bf-bg-soft); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.8rem; color: var(--bf-black); font-weight: 600; }
.bf-tag:hover { background: var(--bf-yellow); }

.bf-related { max-width: var(--bf-container); margin: 3rem auto 0; }

/* ---------- Page ---------- */

.bf-page { max-width: 740px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 2rem; box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.bf-page-title { font-family: var(--bf-font-display); font-weight: 800; font-size: clamp(1.8rem, 3.8vw, 2.4rem); margin-bottom: 1.25rem; }

/* ---------- 404 ---------- */

.bf-404 { text-align: center; padding: 4rem 1rem; max-width: 560px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.bf-404-code { display: block; font-family: var(--bf-font-display); font-weight: 800; font-size: 3.5rem; color: var(--bf-pink); line-height: 1; }
.bf-404 h1 { font-family: var(--bf-font-display); }
.bf-404-search { justify-content: center; margin: 1.5rem auto; }
.bf-404-search button { color: var(--bf-pink); font-weight: 700; padding: 0 0.75rem; }
.bf-404-home { display: inline-block; margin-top: 1rem; color: var(--bf-pink); font-weight: 700; text-decoration: underline; }

/* ---------- Comments ---------- */

.comment-respond,
.comments-area { max-width: 740px; margin: 2.5rem auto 0; }
.comment-reply-title,
.comments-title { font-family: var(--bf-font-display); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--bf-border);
	border-radius: 12px;
	font-family: var(--bf-font-sans);
	margin-bottom: 0.75rem;
}
.comment-form input[type="submit"] {
	background: var(--bf-pink);
	color: #fff;
	border: 0;
	padding: 0.65rem 1.5rem;
	border-radius: 999px;
	font-weight: 700;
}

/* ---------- Footer (dense, mega-footer) ---------- */

.bf-footer { background: var(--bf-black); color: #cfcfcf; margin-top: 3rem; }

.bf-footer-nav { border-bottom: 1px solid #2c2c2c; }
.bf-footer-nav-list {
	max-width: var(--bf-container);
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.25rem;
}
.bf-footer-nav-list a {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	font-family: var(--bf-font-display);
	font-size: 0.78rem;
	color: #cfcfcf;
	border-right: 1px solid #2c2c2c;
}
.bf-footer-nav-list li:last-child a { border-right: 0; }
.bf-footer-nav-list a:hover { color: var(--bf-yellow); }

.bf-footer-rows {
	max-width: var(--bf-container);
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
	display: flex;
	flex-direction: column;
}
.bf-footer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.3rem 0;
	padding: 0.85rem 0;
	border-bottom: 1px solid #2c2c2c;
}
.bf-footer-row:last-child { border-bottom: 0; }
.bf-footer-row-label {
	font-family: var(--bf-font-display);
	font-size: 0.78rem;
	color: #fff;
	flex-shrink: 0;
	margin-right: 0.9rem;
}
.bf-footer-row-links { display: flex; flex-wrap: wrap; }
.bf-footer-row-links a { color: #cfcfcf; font-size: 0.88rem; }
.bf-footer-row-links a:hover { color: var(--bf-yellow); }
.bf-footer-row-links a:not(:last-child)::after { content: "|"; color: rgba(255,255,255,0.25); margin: 0 0.6rem; }

.bf-footer-about {
	max-width: var(--bf-container);
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
	border-top: 1px solid #2c2c2c;
	text-align: center;
}
.bf-footer-logo,
.bf-footer-about-logo { font-family: var(--bf-font-display); font-weight: 800; font-size: 1.4rem; color: var(--bf-yellow); margin: 0 0 0.4rem; }
.bf-footer-about-desc { color: #8a8a8a; max-width: 640px; margin: 0 auto; font-size: 0.9rem; }

.bf-footer-compliance {
	max-width: var(--bf-container);
	margin: 0 auto;
	padding: 0 1.25rem 1.5rem;
	text-align: center;
}
.bf-footer-menu { display: flex; flex-wrap: wrap; justify-content: center; }
.bf-footer-menu li:not(:last-child)::after { content: "|"; color: rgba(255,255,255,0.25); margin: 0 0.7rem; }
.bf-footer-menu a { color: #cfcfcf; font-size: 0.84rem; }
.bf-footer-menu a:hover { color: var(--bf-yellow); }

.bf-footer-bottom { border-top: 1px solid #2c2c2c; text-align: center; padding: 1rem; font-size: 0.78rem; color: #8a8a8a; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1300px) {
	.bf-single, .bf-page, .bf-404 { padding: 1.25rem; border-radius: 14px; }
	.bf-footer-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

@media (max-width: 480px) {
	.bf-search input { width: 90px; }
}

@media (min-width: 900px) {
	.bf-columns { grid-template-columns: 2.2fr 1fr; }
	.bf-sidebar { position: sticky; top: 90px; }
}
