/*
Theme Name: Bahri Persian
Theme URI: https://example.com/
Author: Bahri
Description: قالب شرکتی فارسی، راست‌چین، سبک و سازگار با Bahri Visual Builder.
Version: 1.0.3
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: bahri-persian
Tags: rtl-language-support, custom-logo, custom-menu, featured-images, blog, one-column, two-columns
*/

:root{
	--bahri-navy:#1f2d43;
	--bahri-navy-2:#263b58;
	--bahri-blue:#4d86aa;
	--bahri-blue-soft:#eef5f9;
	--bahri-text:#202b3c;
	--bahri-muted:#6d7787;
	--bahri-border:#e5eaf0;
	--bahri-bg:#ffffff;
	--bahri-soft:#f7f9fc;
	--bahri-radius:18px;
	--bahri-shadow:0 12px 34px rgba(31,45,67,.08);
	--bahri-container:1320px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
	margin:0;
	background:var(--bahri-bg);
	color:var(--bahri-text);
	font-family:"Vazirmatn","IRANSansX",Tahoma,Arial,sans-serif;
	font-size:16px;
	line-height:1.9;
	direction:rtl;
	text-align:right;
	-webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto}
a{color:var(--bahri-blue);text-decoration:none}
a:hover{color:var(--bahri-navy)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.screen-reader-text{
	position:absolute!important;
	width:1px;height:1px;padding:0;margin:-1px;
	overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.screen-reader-text:focus{
	width:auto;height:auto;padding:12px 16px;margin:8px;
	clip:auto;white-space:normal;background:#fff;color:#000;z-index:99999;
}

.bahri-container{
	width:min(calc(100% - 40px),var(--bahri-container));
	margin-inline:auto;
}
.site-main{min-height:45vh}

/* Top bar */
.bahri-topbar{
	background:var(--bahri-navy);
	color:#fff;
	font-size:14px;
}
.bahri-topbar__inner{
	min-height:44px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:24px;
}
.bahri-topbar__contact{
	display:flex;
	flex-wrap:wrap;
	align-items:center;
	gap:22px;
}
.bahri-topbar a{color:#fff;opacity:.96}
.bahri-topbar a:hover{opacity:.78}
.bahri-topbar__admin{white-space:nowrap}

/* Header */
.bahri-header{
	background:#fff;
	border-bottom:1px solid var(--bahri-border);
	position:relative;
	z-index:100;
}
.bahri-header.is-sticky{
	position:sticky;
	top:0;
	box-shadow:0 8px 24px rgba(31,45,67,.07);
}
.admin-bar .bahri-header.is-sticky{top:32px}
.bahri-header__inner{
	min-height:96px;
	display:flex;
	align-items:center;
	gap:44px;
}
.bahri-brand{
	display:flex;
	align-items:center;
	flex:0 0 auto;
}
.bahri-brand .custom-logo{
	display:block;
	max-height:62px;
	width:auto;
}
.bahri-brand__title{
	color:var(--bahri-navy);
	font-size:29px;
	font-weight:800;
	line-height:1.25;
	white-space:nowrap;
}
.bahri-nav{
	flex:1 1 auto;
	display:flex;
	justify-content:flex-start;
}
.bahri-nav ul{
	list-style:none;
	margin:0;
	padding:0;
}
.bahri-nav > div > ul,
.bahri-nav > ul{
	display:flex;
	align-items:center;
	flex-wrap:wrap;
	gap:4px;
}
.bahri-nav li{position:relative}
.bahri-nav a{
	display:flex;
	align-items:center;
	min-height:48px;
	padding:8px 13px;
	border-radius:12px;
	color:var(--bahri-text);
	font-weight:700;
	transition:.2s ease;
}
.bahri-nav a:hover,
.bahri-nav .current-menu-item > a,
.bahri-nav .current-menu-ancestor > a{
	background:var(--bahri-blue-soft);
	color:#376f91;
}
.bahri-nav .menu-item-has-children > a::after{
	content:"⌄";
	font-size:12px;
	margin-inline-start:7px;
	transform:translateY(-1px);
}
.bahri-nav .sub-menu{
	position:absolute;
	top:calc(100% + 4px);
	right:0;
	min-width:250px;
	padding:10px;
	background:#fff;
	border:1px solid var(--bahri-border);
	border-radius:14px;
	box-shadow:var(--bahri-shadow);
	opacity:0;
	visibility:hidden;
	transform:translateY(8px);
	transition:.2s ease;
	z-index:300;
}
.bahri-nav li:hover > .sub-menu,
.bahri-nav li:focus-within > .sub-menu{
	opacity:1;
	visibility:visible;
	transform:none;
}
.bahri-nav .sub-menu a{
	min-height:42px;
	padding:8px 12px;
	font-weight:600;
}
.bahri-nav .sub-menu .sub-menu{
	top:0;
	right:100%;
	margin-right:8px;
}
.bahri-menu-toggle{
	display:none;
	width:46px;height:46px;
	border:1px solid var(--bahri-border);
	background:#fff;
	border-radius:12px;
	color:var(--bahri-navy);
	align-items:center;
	justify-content:center;
	font-size:23px;
}

/* Standard page */
.bahri-page,
.bahri-archive{
	padding:54px 0 80px;
}
.bahri-page__title,
.bahri-archive__title{
	margin:0 0 28px;
	font-size:clamp(28px,3vw,42px);
	line-height:1.35;
	color:var(--bahri-navy);
}
.bahri-entry{
	max-width:980px;
	margin-inline:auto;
}
.bahri-entry > :first-child{margin-top:0}
.bahri-entry > :last-child{margin-bottom:0}

/* Full width / builders */
.ava-front-page,
.bahri-builder-page,
.bahri-full-width{
	width:100%;
	max-width:none;
	margin:0;
	padding:0;
	overflow:hidden;
}
.ava-front-page > *,
.bahri-builder-page > *,
.bahri-full-width > *{
	max-width:none;
}
.alignwide{width:min(100%,var(--bahri-container));margin-inline:auto}
.alignfull{width:100%;max-width:none}
.wp-block-image img{border-radius:10px}

/* Do NOT force Gutenberg/Bahri columns layout here.
   The builder/plugin owns its own row/column CSS. */

/* Archive/cards */
.bahri-grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:26px;
}
.bahri-card{
	background:#fff;
	border:1px solid var(--bahri-border);
	border-radius:var(--bahri-radius);
	overflow:hidden;
	box-shadow:0 8px 24px rgba(31,45,67,.05);
	transition:.22s ease;
}
.bahri-card:hover{
	transform:translateY(-4px);
	box-shadow:var(--bahri-shadow);
}
.bahri-card__media{
	aspect-ratio:16/9;
	background:var(--bahri-soft);
	overflow:hidden;
}
.bahri-card__media img{
	width:100%;height:100%;object-fit:cover;
	transition:transform .35s ease;
}
.bahri-card:hover .bahri-card__media img{transform:scale(1.035)}
.bahri-card__body{padding:20px}
.bahri-card__meta{
	color:var(--bahri-muted);
	font-size:13px;
	margin-bottom:8px;
}
.bahri-card__title{
	margin:0 0 10px;
	font-size:19px;
	line-height:1.65;
}
.bahri-card__title a{color:var(--bahri-navy)}
.bahri-card__excerpt{
	color:#536071;
	font-size:14px;
}
.bahri-card__excerpt p{margin:0}
.bahri-card__more{
	display:inline-flex;
	margin-top:14px;
	font-weight:700;
}

/* Single */
.bahri-single{
	padding:54px 0 84px;
}
.bahri-single__article{
	max-width:980px;
	margin-inline:auto;
}
.bahri-single__title{
	font-size:clamp(30px,4vw,48px);
	line-height:1.45;
	color:var(--bahri-navy);
	margin:0 0 12px;
}
.bahri-single__meta{
	color:var(--bahri-muted);
	margin-bottom:28px;
}
.bahri-single__thumb{
	margin-bottom:28px;
	border-radius:20px;
	overflow:hidden;
}
.bahri-single__content{
	font-size:17px;
}
.bahri-single__content h2,
.bahri-single__content h3{
	color:var(--bahri-navy);
	margin-top:1.8em;
}

/* Pagination */
.navigation.pagination{margin-top:36px}
.nav-links{display:flex;gap:8px;flex-wrap:wrap}
.page-numbers{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-width:42px;height:42px;
	padding:0 12px;
	border:1px solid var(--bahri-border);
	border-radius:10px;
	background:#fff;
	color:var(--bahri-text);
}
.page-numbers.current,
.page-numbers:hover{
	background:var(--bahri-navy);
	border-color:var(--bahri-navy);
	color:#fff;
}

/* Footer */
.bahri-footer{
	background:var(--bahri-navy);
	color:#fff;
}
.bahri-footer__main{
	padding:46px 0 34px;
	display:grid;
	grid-template-columns:1.4fr 1fr;
	gap:50px;
	border-bottom:1px solid rgba(255,255,255,.12);
}
.bahri-footer__brand{
	font-size:22px;
	font-weight:800;
	margin-bottom:8px;
}
.bahri-footer__desc{
	max-width:620px;
	color:rgba(255,255,255,.72);
	font-size:14px;
}
.bahri-footer a{color:#fff}
.bahri-footer-menu{
	list-style:none;
	margin:0;padding:0;
	display:flex;
	flex-wrap:wrap;
	gap:8px 20px;
	justify-content:flex-end;
}
.bahri-footer__bottom{
	min-height:72px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:30px;
	font-size:14px;
}
.bahri-footer__team{
	margin-inline-start:auto;
}

/* Forms */
input[type="text"],input[type="email"],input[type="url"],input[type="search"],
input[type="tel"],input[type="number"],input[type="password"],select,textarea{
	width:100%;
	border:1px solid #d8dee7;
	border-radius:10px;
	padding:11px 13px;
	background:#fff;
	color:var(--bahri-text);
}
input:focus,select:focus,textarea:focus{
	outline:2px solid rgba(77,134,170,.22);
	border-color:var(--bahri-blue);
}
input[type="submit"],button[type="submit"],.wp-element-button{
	border:0;
	background:var(--bahri-navy);
	color:#fff;
	border-radius:10px;
	padding:11px 20px;
	font-weight:700;
}

/* Search/404 */
.bahri-empty{
	max-width:760px;
	margin:70px auto;
	text-align:center;
	padding:44px;
	background:var(--bahri-soft);
	border-radius:22px;
}
.bahri-empty h1,.bahri-empty h2{color:var(--bahri-navy)}

/* Responsive */
@media (max-width:1100px){
	.bahri-header__inner{gap:24px}
	.bahri-nav a{padding-inline:9px;font-size:14px}
	.bahri-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
	.admin-bar .bahri-header.is-sticky{top:46px}
	.bahri-topbar__inner{min-height:unset;padding-block:9px}
	.bahri-topbar__contact{gap:10px 18px}
	.bahri-header__inner{min-height:78px;justify-content:space-between}
	.bahri-menu-toggle{display:inline-flex}
	.bahri-nav{
		display:none;
		position:absolute;
		top:100%;
		right:0;left:0;
		background:#fff;
		border-top:1px solid var(--bahri-border);
		box-shadow:var(--bahri-shadow);
		padding:12px 20px 20px;
	}
	.bahri-nav.is-open{display:block}
	.bahri-nav > div > ul,
	.bahri-nav > ul{display:block}
	.bahri-nav a{min-height:46px}
	.bahri-nav .sub-menu{
		position:static;
		display:none;
		opacity:1;visibility:visible;transform:none;
		min-width:0;
		box-shadow:none;
		border:0;
		border-right:2px solid var(--bahri-border);
		border-radius:0;
		margin:2px 14px 8px 0;
		padding:0 10px 0 0;
	}
	.bahri-nav li.submenu-open > .sub-menu{display:block}
	.bahri-nav li:hover > .sub-menu{display:none}
	.bahri-nav li.submenu-open:hover > .sub-menu{display:block}
	.bahri-footer__main{grid-template-columns:1fr}
	.bahri-footer-menu{justify-content:flex-start}
}
@media (max-width:650px){
	.bahri-container{width:min(calc(100% - 28px),var(--bahri-container))}
	.bahri-topbar__inner{align-items:flex-start}
	.bahri-topbar__contact{display:grid;gap:2px}
	.bahri-brand__title{font-size:22px}
	.bahri-grid{grid-template-columns:1fr}
	.bahri-page,.bahri-archive,.bahri-single{padding-top:34px}
	.bahri-footer__bottom{
		padding-block:18px;
		flex-direction:column;
		justify-content:center;
		text-align:center;
		gap:4px;
	}
	.bahri-footer__team{margin:0}
}


/* =========================================================
   Bahri Persian 1.0.2 - News archive/card hardening
   This layer intentionally comes last to avoid legacy CSS conflicts.
   ========================================================= */

.bahri-archive {
	padding: 48px 0 80px !important;
	background: #fff;
}

.bahri-archive .bahri-container {
	width: min(calc(100% - 40px), 1320px) !important;
	margin-inline: auto !important;
}

.bahri-archive__title {
	margin: 0 0 30px !important;
	color: var(--bahri-navy, #1f2d43) !important;
	font-size: clamp(28px, 3vw, 42px) !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	text-decoration: none !important;
}

/* Both names are supported, so old/new archive.php files remain compatible. */
.bahri-grid,
.bahri-news-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 28px !important;
	align-items: stretch !important;
	width: 100% !important;
}

.bahri-card {
	display: flex !important;
	flex-direction: column !important;
	min-width: 0 !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	border: 1px solid #e3e8ef !important;
	border-radius: 18px !important;
	overflow: hidden !important;
	box-shadow: 0 8px 26px rgba(31, 45, 67, .06) !important;
	text-align: right !important;
	transition: transform .2s ease, box-shadow .2s ease !important;
}

.bahri-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 34px rgba(31, 45, 67, .11) !important;
}

.bahri-card__media {
	display: block !important;
	width: 100% !important;
	aspect-ratio: 16 / 10 !important;
	overflow: hidden !important;
	background: #eef2f6 !important;
	border: 0 !important;
}

.bahri-card__media img,
.bahri-card__img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	margin: 0 !important;
	border-radius: 0 !important;
}

.bahri-card__body {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	padding: 20px 22px 22px !important;
}

.bahri-card__meta {
	margin: 0 0 8px !important;
	color: #7a8493 !important;
	font-size: 13px !important;
	line-height: 1.7 !important;
}

.bahri-card__title {
	margin: 0 0 10px !important;
	color: var(--bahri-navy, #1f2d43) !important;
	font-size: 19px !important;
	font-weight: 800 !important;
	line-height: 1.75 !important;
}

.bahri-card__title a {
	color: inherit !important;
	text-decoration: none !important;
}

.bahri-card__title a:hover {
	color: var(--bahri-blue, #4d86aa) !important;
}

.bahri-card__excerpt {
	flex: 1 1 auto !important;
	margin: 0 !important;
	color: #536071 !important;
	font-size: 14px !important;
	line-height: 2 !important;
}

.bahri-card__excerpt p {
	margin: 0 !important;
}

.bahri-card__more {
	display: inline-flex !important;
	align-items: center !important;
	align-self: flex-start !important;
	margin-top: 16px !important;
	color: #477c9f !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	text-decoration: none !important;
}

.bahri-card__more:hover {
	color: var(--bahri-navy, #1f2d43) !important;
}

@media (max-width: 991px) {
	.bahri-grid,
	.bahri-news-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 22px !important;
	}
}

@media (max-width: 620px) {
	.bahri-archive .bahri-container {
		width: min(calc(100% - 28px), 1320px) !important;
	}

	.bahri-grid,
	.bahri-news-grid {
		grid-template-columns: 1fr !important;
		gap: 18px !important;
	}

	.bahri-card__title {
		font-size: 18px !important;
	}
}
/* کارت‌های راهکارها */
#solutions-cards .bvb-responsive-col {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
}

/* تصاویر */
#solutions-cards .bvb-responsive-col .wp-block-image {
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px !important;
}

#solutions-cards .bvb-responsive-col .wp-block-image img {
	width: 205px;
	height: 205px;
	object-fit: contain;
}

/* عنوان */
#solutions-cards .bvb-responsive-col h2,
#solutions-cards .bvb-responsive-col h3,
#solutions-cards .bvb-responsive-col h4 {
	min-height: 58px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	text-align: center;
}

/* جداکننده‌ها */
#solutions-cards .bvb-responsive-col hr {
	width: 100%;
	flex: 0 0 auto;
	margin: 15px 0 !important;
}

/* متن؛ این قسمت برای همه کارت‌ها ارتفاع یکسان می‌گیرد */
#solutions-cards .bvb-responsive-col p {
	min-height: 105px;
	margin: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 2;
}

/* دکمه */
#solutions-cards .bvb-responsive-col .wp-block-button,
#solutions-cards .bvb-responsive-col .wp-block-buttons,
#solutions-cards .bvb-responsive-col .avb-button {
	margin-top: auto !important;
	padding-top: 15px;
	text-align: center;
}
/* =========================================================
   Bahri - Premium Board Members
   Anchor: board-premium
   ========================================================= */

#board-premium {
	position: relative;
	overflow: hidden;
}

#board-premium::before {
	content: "";
	position: absolute;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	top: -260px;
	right: -180px;
	background: rgba(77, 134, 170, .10);
	pointer-events: none;
}

#board-premium::after {
	content: "";
	position: absolute;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	bottom: -220px;
	left: -120px;
	background: rgba(31, 45, 67, .055);
	pointer-events: none;
}

#board-premium > * {
	position: relative;
	z-index: 1;
}

#board-premium .bvb-team-kicker {
	width: max-content;
	margin: 0 auto 10px;
	padding: 7px 15px;
	border: 1px solid #cbdbe7;
	border-radius: 999px;
	background: rgba(255,255,255,.72);
	color: #4d86aa;
	font-size: 13px;
	font-weight: 800;
}

#board-premium .bvb-inner-grid {
	align-items: stretch !important;
}

/* Each internal column becomes a premium card */
#board-premium .bvb-inner-col {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	min-width: 0;
	padding: 14px 14px 20px;
	background: #fff;
	border: 1px solid #e2e9f1;
	border-radius: 22px;
	box-shadow: 0 12px 36px rgba(31,45,67,.075);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

#board-premium .bvb-inner-col:hover {
	transform: translateY(-7px);
	border-color: #c7d8e6;
	box-shadow: 0 20px 46px rgba(31,45,67,.13);
}

#board-premium .bvb-inner-col::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 4px;
	background: linear-gradient(90deg,#1f2d43,#4d86aa);
	z-index: 2;
}

/* Portrait */
#board-premium .bvb-inner-col .wp-block-image {
	width: 100%;
	margin: 0 0 0 !important;
	overflow: hidden;
	border-radius: 16px;
	background: #edf2f7;
	aspect-ratio: 4 / 4.6;
}

#board-premium .bvb-inner-col .wp-block-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center top;
	transition: transform .35s ease;
}

#board-premium .bvb-inner-col:hover .wp-block-image img {
	transform: scale(1.035);
}

/* Role badge */
#board-premium .bvb-team-role {
	position: relative;
	width: max-content;
	max-width: calc(100% - 22px);
	margin: -18px auto 14px;
	padding: 7px 13px;
	border-radius: 999px;
	background: #4d86aa;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	box-shadow: 0 6px 16px rgba(77,134,170,.24);
	z-index: 3;
}

/* Name */
#board-premium .bvb-inner-col h3 {
	min-height: 64px;
	margin: 0 0 4px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	line-height: 1.75;
}

/* Description */
#board-premium .bvb-inner-col .bvb-read-more,
#board-premium .bvb-inner-col p {
	color: #667285;
	font-size: 13px;
	line-height: 2;
}

#board-premium .bvb-inner-col p {
	margin: 0 !important;
}

/* Push final button to bottom */
#board-premium .bvb-inner-col > *:last-child {
	margin-top: auto !important;
	padding-top: 18px;
}

#board-premium .bvb-inner-col .wp-block-button,
#board-premium .bvb-inner-col .bvb-button {
	width: 100%;
	text-align: center;
}

#board-premium .bvb-inner-col .wp-block-button__link,
#board-premium .bvb-inner-col .bvb-button a,
#board-premium .bvb-inner-col a.avb-button {
	min-width: 145px;
	justify-content: center;
	border-radius: 10px;
}

/* Tablet */
@media (max-width: 991px) {
	#board-premium .bvb-inner-col h3 {
		min-height: auto;
	}
}

/* Mobile */
@media (max-width: 767px) {
	#board-premium .bvb-inner-col {
		max-width: 420px;
		width: 100%;
		margin-inline: auto;
	}

	#board-premium .bvb-inner-col .wp-block-image {
		aspect-ratio: 4 / 4.3;
	}
}

/* =========================================================
   Bahri Persian 1.0.3 - Archive pagination centered row
   ========================================================= */
.bahri-archive .navigation.pagination {
	display: block !important;
	width: 100% !important;
	clear: both !important;
	margin: 38px 0 0 !important;
	padding: 0 !important;
	text-align: center !important;
}

.bahri-archive .navigation.pagination .nav-links {
	display: flex !important;
	width: 100% !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 8px !important;
	flex-wrap: wrap !important;
	direction: rtl !important;
}
