/*
Theme Name: BanglaBrife News
Theme URI: https://banglabrife.com/
Author: BanglaBrife Custom Theme
Author URI: https://banglabrife.com/
Description: A lightweight, stable, Bengali news portal theme with dynamic homepage sections, category blocks, breaking news ticker, ads, widgets, Customizer controls, and clean WordPress templates.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: banglabrife-news
Tags: news, blog, custom-logo, custom-menu, featured-images, translation-ready, theme-options, right-sidebar, two-columns
*/

:root {
	--brife-primary: #d71920;
	--brife-primary-dark: #a90f16;
	--brife-text: #151515;
	--brife-muted: #6b7280;
	--brife-border: #e5e7eb;
	--brife-bg: #ffffff;
	--brife-soft: #f6f7f9;
	--brife-card: #ffffff;
	--brife-black: #0f172a;
	--brife-radius: 14px;
	--brife-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
	--brife-font: "Noto Serif Bengali", "Noto Sans Bengali", "SolaimanLipi", "Bangla", "Hind Siliguri", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--brife-bg);
	color: var(--brife-text);
	font-family: var(--brife-font);
	font-size: 16px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease, background .2s ease; }
a:hover, a:focus { color: var(--brife-primary); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff;
	clip: auto !important;
	clip-path: none;
	color: var(--brife-black);
	display: block;
	font-size: 15px;
	height: auto;
	left: 10px;
	line-height: normal;
	padding: 12px 16px;
	top: 10px;
	width: auto;
	z-index: 100000;
}

.brife-container {
	width: min(1180px, calc(100% - 32px));
	margin-inline: auto;
}
.brife-main { padding: 22px 0 46px; }
.brife-grid { display: grid; gap: 22px; }
.brife-two-col { grid-template-columns: minmax(0, 1fr); }
.brife-content-sidebar { grid-template-columns: minmax(0, 1fr); align-items: start; }

.brife-topbar {
	background: #111827;
	color: #f9fafb;
	font-size: 14px;
}
.brife-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 38px;
}
.brife-topbar__left,
.brife-topbar__right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brife-date { color: #d1d5db; }
.brife-social { display: inline-flex; align-items: center; gap: 8px; }
.brife-social a {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.08);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}
.brife-social a:hover { background: var(--brife-primary); color: #fff; }

.brife-site-header { border-bottom: 1px solid var(--brife-border); background: #fff; }
.brife-brand-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	align-items: center;
	padding: 22px 0;
}
.brife-branding { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brife-custom-logo img { max-height: 78px; width: auto; }
.brife-site-title { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; font-weight: 900; letter-spacing: -.02em; }
.brife-site-title a { color: var(--brife-primary); }
.brife-tagline { margin: 4px 0 0; color: var(--brife-muted); font-size: 15px; }
.brife-header-ad { justify-self: stretch; }
.brife-ad {
	width: 100%;
	min-height: 70px;
	background: repeating-linear-gradient(135deg, #f3f4f6, #f3f4f6 10px, #eceff3 10px, #eceff3 20px);
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	color: var(--brife-muted);
	text-align: center;
	overflow: hidden;
}
.brife-ad:empty::before { content: "Advertisement"; }
.brife-ad img { margin-inline: auto; }

.brife-nav-wrap { background: #fff; border-top: 1px solid var(--brife-border); border-bottom: 3px solid var(--brife-primary); }
.brife-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; }
.brife-menu-toggle {
	border: 0;
	background: var(--brife-primary);
	color: #fff;
	border-radius: 8px;
	padding: 8px 12px;
	font-weight: 700;
}
.brife-primary-menu { display: none; width: 100%; }
.brife-primary-menu.is-open { display: block; }
.brife-primary-menu ul { list-style: none; margin: 0; padding: 0; }
.brife-primary-menu > ul { display: flex; flex-direction: column; gap: 0; }
.brife-primary-menu a {
	display: block;
	padding: 12px 10px;
	font-weight: 800;
	border-bottom: 1px solid var(--brife-border);
}
.brife-primary-menu .current-menu-item > a,
.brife-primary-menu .current-category-ancestor > a,
.brife-primary-menu .current-post-ancestor > a { color: var(--brife-primary); }
.brife-search-toggle {
	border: 1px solid var(--brife-border);
	background: #fff;
	border-radius: 999px;
	padding: 7px 11px;
	white-space: nowrap;
}
.brife-search-panel { display: none; padding: 14px 0; background: var(--brife-soft); border-bottom: 1px solid var(--brife-border); }
.brife-search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-field {
	width: 100%;
	border: 1px solid var(--brife-border);
	border-radius: 8px;
	padding: 11px 12px;
	background: #fff;
}
.search-submit,
.brife-button {
	border: 0;
	background: var(--brife-primary);
	color: #fff;
	border-radius: 8px;
	padding: 10px 15px;
	font-weight: 800;
}
.search-submit:hover,
.brife-button:hover { background: var(--brife-primary-dark); color: #fff; }

.brife-breaking {
	background: #fff;
	border-bottom: 1px solid var(--brife-border);
}
.brife-breaking__inner { display: flex; align-items: center; gap: 12px; min-height: 46px; overflow: hidden; }
.brife-breaking__label {
	background: var(--brife-primary);
	color: #fff;
	font-weight: 900;
	padding: 5px 10px;
	border-radius: 999px;
	white-space: nowrap;
	font-size: 14px;
}
.brife-breaking__items {
	display: flex;
	gap: 24px;
	white-space: nowrap;
	animation: brife-ticker 32s linear infinite;
}
.brife-breaking:hover .brife-breaking__items { animation-play-state: paused; }
.brife-breaking__items a { font-weight: 700; }
@keyframes brife-ticker {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.brife-breaking__items { animation: none; overflow-x: auto; }
	*, *::before, *::after { scroll-behavior: auto !important; }
}

.brife-section { margin-top: 26px; }
.brife-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 2px solid var(--brife-border);
	margin-bottom: 16px;
}
.brife-section__title {
	position: relative;
	margin: 0;
	padding: 0 0 9px;
	font-size: clamp(22px, 2.5vw, 30px);
	line-height: 1.2;
	font-weight: 900;
}
.brife-section__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 84px;
	height: 3px;
	background: var(--brife-primary);
}
.brife-more-link { color: var(--brife-primary); font-weight: 800; font-size: 15px; }

.brife-lead-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
.brife-hero-card,
.brife-card,
.brife-list-card,
.brife-widget,
.brife-article,
.brife-archive-header {
	background: var(--brife-card);
	border: 1px solid var(--brife-border);
	border-radius: var(--brife-radius);
	overflow: hidden;
}
.brife-hero-card { box-shadow: var(--brife-shadow); }
.brife-card__media { aspect-ratio: 16/9; background: var(--brife-soft); overflow: hidden; }
.brife-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.brife-card:hover .brife-card__media img,
.brife-hero-card:hover .brife-card__media img { transform: scale(1.025); }
.brife-card__body { padding: 14px; }
.brife-hero-card .brife-card__body { padding: 18px; }
.brife-card__title { margin: 0; font-size: 20px; line-height: 1.38; font-weight: 900; }
.brife-hero-card .brife-card__title { font-size: clamp(26px, 4vw, 42px); line-height: 1.22; }
.brife-card__excerpt { margin: 10px 0 0; color: #4b5563; }
.brife-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--brife-muted); font-size: 13px; margin-top: 9px; }
.brife-category-badge {
	display: inline-flex;
	align-items: center;
	background: var(--brife-primary);
	color: #fff !important;
	border-radius: 999px;
	padding: 3px 9px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.5;
	margin-bottom: 8px;
}
.brife-category-badge:hover { color: #fff; background: var(--brife-primary-dark); }

.brife-latest-panel { background: var(--brife-soft); border: 1px solid var(--brife-border); border-radius: var(--brife-radius); padding: 14px; }
.brife-latest-panel__title { margin: 0 0 10px; font-size: 22px; line-height: 1.3; }
.brife-news-list { display: grid; gap: 0; }
.brife-list-card {
	border-radius: 0;
	border-width: 0 0 1px;
	background: transparent;
	padding: 10px 0;
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
}
.brife-list-card:first-child { padding-top: 0; }
.brife-list-card:last-child { border-bottom: 0; padding-bottom: 0; }
.brife-list-card__thumb {
	aspect-ratio: 4/3;
	border-radius: 10px;
	overflow: hidden;
	background: #e5e7eb;
}
.brife-list-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.brife-list-card__title { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 850; }

.brife-card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.brife-category-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
.brife-category-layout .brife-card:first-child .brife-card__title { font-size: clamp(22px, 3vw, 30px); }
.brife-compact-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.brife-sidebar { display: grid; gap: 18px; }
.brife-widget { padding: 16px; }
.brife-widget__title,
.widget-title {
	margin: 0 0 12px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 900;
	padding-bottom: 9px;
	border-bottom: 2px solid var(--brife-border);
	position: relative;
}
.brife-widget__title::after,
.widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	height: 3px;
	width: 54px;
	background: var(--brife-primary);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--brife-border); }
.widget li:last-child { border-bottom: 0; }

.brife-article { padding: clamp(16px, 4vw, 34px); }
.brife-single-header { margin-bottom: 20px; }
.brife-single-title { margin: 0; font-size: clamp(30px, 5vw, 54px); line-height: 1.18; letter-spacing: -.02em; font-weight: 950; }
.brife-single-image { margin: 18px 0; border-radius: var(--brife-radius); overflow: hidden; background: var(--brife-soft); }
.brife-single-image img { width: 100%; }
.brife-content { font-size: clamp(18px, 2vw, 20px); line-height: 1.9; }
.brife-content p { margin: 0 0 1.25em; }
.brife-content h2, .brife-content h3, .brife-content h4 { line-height: 1.32; margin: 1.6em 0 .55em; }
.brife-content a { color: var(--brife-primary); text-decoration: underline; text-underline-offset: 3px; }
.brife-content blockquote {
	margin: 24px 0;
	padding: 18px 20px;
	border-left: 4px solid var(--brife-primary);
	background: var(--brife-soft);
	font-size: 1.08em;
}
.brife-share { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.brife-share a {
	border: 1px solid var(--brife-border);
	border-radius: 999px;
	padding: 7px 12px;
	font-weight: 800;
	font-size: 14px;
	background: #fff;
}
.brife-share a:hover { background: var(--brife-primary); color: #fff; border-color: var(--brife-primary); }
.brife-post-nav {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	border-top: 1px solid var(--brife-border);
	padding-top: 20px;
	margin-top: 26px;
}
.brife-post-nav a {
	display: block;
	padding: 14px;
	border: 1px solid var(--brife-border);
	border-radius: 12px;
	font-weight: 800;
}
.brife-updated { display: inline-flex; color: var(--brife-muted); }

.brife-archive-header { padding: 20px; margin-bottom: 20px; }
.brife-archive-title { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.2; }
.brife-archive-description { color: var(--brife-muted); margin-top: 8px; }
.brife-pagination { margin-top: 28px; display: flex; justify-content: center; }
.brife-pagination .nav-links { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.brife-pagination a,
.brife-pagination span {
	min-width: 40px;
	height: 40px;
	border: 1px solid var(--brife-border);
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	font-weight: 800;
	background: #fff;
}
.brife-pagination .current,
.brife-pagination a:hover { background: var(--brife-primary); color: #fff; border-color: var(--brife-primary); }

.brife-footer { background: #0b1220; color: #e5e7eb; margin-top: 40px; }
.brife-footer a:hover { color: #fff; }
.brife-footer__top { padding: 36px 0; }
.brife-footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.brife-footer .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,.16); }
.brife-footer .widget li { border-bottom-color: rgba(255,255,255,.1); }
.brife-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; color: #cbd5e1; font-size: 14px; }
.brife-footer__bottom-inner { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; align-items: flex-start; }
.brife-footer-menu ul { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; }

.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.wp-caption { max-width: 100%; color: var(--brife-muted); font-size: 14px; }
.gallery { display: grid; gap: 10px; }
.bypostauthor { outline: 2px solid var(--brife-primary); }
.sticky { border-top: 4px solid var(--brife-primary); }

@media (min-width: 640px) {
	.brife-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.brife-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.brife-post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.brife-footer__bottom-inner { flex-direction: row; align-items: center; }
}
@media (min-width: 800px) {
	.brife-brand-row { grid-template-columns: minmax(260px, 1fr) minmax(320px, 728px); }
	.brife-menu-toggle { display: none; }
	.brife-primary-menu { display: block; width: auto; }
	.brife-primary-menu > ul { flex-direction: row; align-items: center; flex-wrap: wrap; }
	.brife-primary-menu a { border-bottom: 0; padding: 14px 11px; }
	.brife-primary-menu li { position: relative; }
	.brife-primary-menu ul ul {
		position: absolute;
		left: 0;
		top: 100%;
		z-index: 30;
		min-width: 210px;
		background: #fff;
		box-shadow: var(--brife-shadow);
		border: 1px solid var(--brife-border);
		border-radius: 0 0 10px 10px;
		display: none;
	}
	.brife-primary-menu li:hover > ul,
	.brife-primary-menu li:focus-within > ul { display: block; }
	.brife-primary-menu ul ul a { padding: 10px 12px; border-bottom: 1px solid var(--brife-border); }
	.brife-lead-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, .95fr); }
	.brife-category-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
	.brife-content-sidebar { grid-template-columns: minmax(0, 1fr) 330px; }
	.brife-footer-grid { grid-template-columns: 1.1fr 1fr 1fr; }
}
@media (min-width: 1040px) {
	.brife-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.brife-compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.brife-primary-menu a { padding-inline: 14px; }
}
@media (max-width: 520px) {
	.brife-container { width: min(100% - 22px, 1180px); }
	.brife-topbar__inner { align-items: flex-start; padding: 8px 0; flex-direction: column; }
	.brife-list-card { grid-template-columns: 78px minmax(0, 1fr); }
	.brife-card__body { padding: 12px; }
	.brife-hero-card .brife-card__body { padding: 14px; }
}
