/* Bigmache Hub — front-end */
.bmh {
	--bmh-primary: #0E7C66;
	--bmh-accent: #F2A541;
	--bmh-ink: #0F1E2E;
	--bmh-ink-2: #16314A;
	--bmh-paper: #F7F5F0;
	--bmh-card: #FFFFFF;
	--bmh-muted: #5A6878;
	--bmh-line: #E7E2D7;
	--bmh-radius: 22px;
	--bmh-shadow: 0 1px 2px rgba(15, 30, 46, .06), 0 8px 24px -12px rgba(15, 30, 46, .18);
	--bmh-shadow-hi: 0 2px 4px rgba(15, 30, 46, .06), 0 22px 44px -18px rgba(15, 30, 46, .35);

	font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
	color: var(--bmh-ink);
	line-height: 1.7;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 16px;
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
}
.bmh *, .bmh *::before, .bmh *::after { box-sizing: border-box; }
.bmh a { text-decoration: none; }
.bmh h1, .bmh h2, .bmh h3 { font-family: inherit; margin: 0; letter-spacing: 0; }
.bmh p { margin: 0; }
.bmh-ico { flex: none; display: block; }

/* ---------- Buttons ---------- */
.bmh-btn {
	display: inline-flex; align-items: center; gap: .55em;
	padding: .85em 1.5em; border-radius: 999px;
	font-weight: 800; font-size: 1rem; line-height: 1.2;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.bmh-btn:focus-visible, .bmh-card:focus-visible, .bmh-tab:focus-visible, .bmh-post a:focus-visible {
	outline: 3px solid var(--bmh-accent); outline-offset: 3px;
}
.bmh-btn--accent { background: var(--bmh-accent); color: var(--bmh-ink); box-shadow: 0 10px 28px -10px var(--bmh-accent); }
.bmh-btn--accent:hover { transform: translateY(-2px); color: var(--bmh-ink); }
.bmh-btn--accent .bmh-ico { animation: bmh-bob 1.8s ease-in-out infinite; }
.bmh-btn--ghost { border: 2px solid var(--bmh-ink); color: var(--bmh-ink); background: transparent; }
.bmh-btn--ghost:hover { background: var(--bmh-ink); color: #fff; }
.bmh-btn--ghost:hover .bmh-ico { transform: translateX(-4px); }
.bmh-btn .bmh-ico { transition: transform .2s ease; }

/* ---------- Hero ---------- */
.bmh-hero {
	position: relative; overflow: hidden; isolation: isolate;
	margin-block: 24px 8px;
	border-radius: calc(var(--bmh-radius) + 6px);
	background: linear-gradient(140deg, var(--bmh-ink) 0%, var(--bmh-ink-2) 100%);
	color: #fff;
	padding: clamp(40px, 7vw, 88px) clamp(22px, 5vw, 64px);
}
.bmh-hero__bg {
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(520px 320px at 12% 18%, color-mix(in srgb, var(--bmh-primary) 70%, transparent), transparent 70%),
		radial-gradient(420px 300px at 92% 100%, color-mix(in srgb, var(--bmh-accent) 45%, transparent), transparent 70%),
		radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.4px) 0 0 / 22px 22px;
}
.bmh-hero__inner { max-width: 760px; }
.bmh-pill {
	display: inline-flex; align-items: center; gap: .6em;
	padding: .4em 1em; border-radius: 999px;
	background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
	font-size: .9rem; font-weight: 700; backdrop-filter: blur(6px);
}
.bmh-live { width: 9px; height: 9px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: bmh-ping 1.8s infinite; }
.bmh-hero__title {
	margin-top: 18px !important;
	font-size: clamp(1.9rem, 4.6vw, 3.4rem); font-weight: 900; line-height: 1.25;
	color: #fff;
	text-wrap: balance;
}
.bmh-hero__text { margin-top: 16px !important; font-size: clamp(1rem, 1.7vw, 1.2rem); color: rgba(255,255,255,.82); max-width: 620px; }
.bmh-hero__actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.bmh-chips { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.bmh-chips li {
	width: 38px; height: 38px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--c1); color: var(--fg);
	border: 3px solid var(--bmh-ink);
	margin-inline-start: -10px;
}
.bmh-chips li:first-child { margin-inline-start: 0; }
.bmh-chips .bmh-chips__count {
	width: auto; height: auto; border: 0; background: none; color: rgba(255,255,255,.85);
	font-weight: 700; margin-inline-start: 12px; font-size: .95rem;
}

/* ---------- Section head ---------- */
.bmh-section { padding-block: clamp(36px, 6vw, 64px) 8px; scroll-margin-top: 80px; }
.bmh-head { margin-bottom: 26px; }
.bmh-head__kicker {
	display: inline-flex; align-items: center; gap: .45em;
	color: var(--bmh-primary); font-weight: 800; font-size: .9rem; margin-bottom: 6px;
}
.bmh-head__title {
	font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.3; color: var(--bmh-ink);
	position: relative; display: inline-block; padding-bottom: 10px;
}
.bmh-head__title::after {
	content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
	width: 64px; height: 5px; border-radius: 5px;
	background: linear-gradient(90deg, var(--bmh-accent), var(--bmh-primary));
}
.bmh-head__text { margin-top: 10px !important; color: var(--bmh-muted); font-size: 1.05rem; max-width: 640px; }

/* ---------- Filter tabs ---------- */
.bmh-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.bmh-tab {
	font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
	padding: .45em 1.15em; border-radius: 999px;
	border: 1.5px solid var(--bmh-line); background: var(--bmh-card); color: var(--bmh-ink);
	transition: all .18s ease;
}
.bmh-tab:hover { border-color: var(--bmh-ink); }
.bmh-tab.is-active { background: var(--bmh-ink); border-color: var(--bmh-ink); color: #fff; }

/* ---------- Group cards ---------- */
.bmh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.bmh-card {
	position: relative; overflow: hidden;
	display: flex; flex-direction: column; gap: 10px;
	padding: 20px; border-radius: var(--bmh-radius);
	background: var(--bmh-card); color: var(--bmh-ink);
	border: 1.5px solid var(--bmh-line);
	box-shadow: var(--bmh-shadow);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.bmh-card::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
	background: linear-gradient(90deg, var(--c1), var(--c2));
}
/* specificity guard: themes often color links inside content */
.bmh a.bmh-card, .bmh a.bmh-card:hover { color: var(--bmh-ink); }
.bmh a.bmh-btn--ghost { color: var(--bmh-ink); }
.bmh a.bmh-btn--ghost:hover { color: #fff; }
.bmh a.bmh-btn--accent, .bmh a.bmh-btn--accent:hover { color: var(--bmh-ink); }
.bmh .bmh-post__title a, .bmh .bmh-post__title a:hover { color: var(--bmh-ink); }
.bmh-card:hover { transform: translateY(-4px); box-shadow: var(--bmh-shadow-hi); border-color: color-mix(in srgb, var(--c1) 55%, var(--bmh-line)); color: var(--bmh-ink); }
.bmh-card.is-hidden { display: none; }

.bmh-card__top { display: flex; align-items: center; gap: 12px; }
.bmh-card__icon {
	width: 52px; height: 52px; border-radius: 16px; flex: none;
	display: grid; place-items: center;
	background: linear-gradient(135deg, var(--c1), var(--c2)); color: var(--fg);
	box-shadow: 0 10px 22px -10px var(--c1);
	transition: transform .25s ease;
}
.bmh-card__icon img { width: 30px; height: 30px; object-fit: contain; }
.bmh-card:hover .bmh-card__icon { transform: rotate(-6deg) scale(1.06); }
.bmh-card__plat { font-weight: 700; font-size: .88rem; color: var(--bmh-muted); }
.bmh-badge {
	margin-inline-start: auto;
	font-size: .78rem; font-weight: 800; line-height: 1;
	padding: .5em .8em; border-radius: 999px;
	background: color-mix(in srgb, var(--bmh-accent) 22%, #fff); color: #7A4A00;
	white-space: nowrap;
}
.bmh-card__name { font-size: 1.2rem; font-weight: 800; line-height: 1.4; margin-top: 4px; }
.bmh-card__desc { color: var(--bmh-muted); font-size: .96rem; }
.bmh-card__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bmh-card__members { display: inline-flex; align-items: center; gap: .4em; font-size: .9rem; font-weight: 700; color: var(--bmh-muted); }
.bmh-cta {
	margin-inline-start: auto;
	display: inline-flex; align-items: center; gap: .45em;
	padding: .6em 1.15em; border-radius: 999px;
	background: var(--c1); color: var(--fg);
	font-weight: 800; font-size: .95rem; line-height: 1.2;
	transition: gap .2s ease, filter .2s ease;
}
.bmh-card:hover .bmh-cta { gap: .8em; filter: brightness(1.05); }

/* Featured */
.bmh-card--featured {
	grid-column: span 2;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--c1) 10%, #fff), #fff 60%);
	border-color: color-mix(in srgb, var(--c1) 40%, var(--bmh-line));
	padding: 26px;
}
.bmh-card--featured .bmh-card__name { font-size: 1.45rem; }
.bmh-card--featured .bmh-card__icon { width: 62px; height: 62px; border-radius: 18px; }
.bmh-card--featured .bmh-cta { padding: .75em 1.4em; font-size: 1rem; box-shadow: 0 0 0 0 color-mix(in srgb, var(--c1) 60%, transparent); animation: bmh-pulse 2.4s infinite; }
.bmh-card--featured::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.65) 50%, transparent 60%);
	transform: translateX(120%);
	animation: bmh-shine 5s ease-in-out infinite;
}

/* ---------- Posts ---------- */
.bmh-posts__grid {
	display: grid; gap: 18px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bmh-post {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--bmh-card); border: 1.5px solid var(--bmh-line);
	border-radius: var(--bmh-radius); box-shadow: var(--bmh-shadow);
	transition: transform .22s ease, box-shadow .22s ease;
}
.bmh-post:hover { transform: translateY(-3px); box-shadow: var(--bmh-shadow-hi); }
.bmh-post__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bmh-paper); }
.bmh-post__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.bmh-post:hover .bmh-post__media img { transform: scale(1.05); }
.bmh-post__ph {
	width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.9);
	background: linear-gradient(135deg, var(--bmh-primary), var(--bmh-ink-2));
}
.bmh-post__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.bmh-post__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: var(--bmh-muted); font-weight: 600; }
.bmh-post__meta time { display: inline-flex; align-items: center; gap: .35em; }
.bmh-post__cat {
	background: color-mix(in srgb, var(--bmh-primary) 12%, #fff); color: var(--bmh-primary);
	padding: .25em .75em; border-radius: 999px; font-weight: 800;
}
.bmh-post__title { font-size: 1.05rem; font-weight: 800; line-height: 1.5; }
.bmh-post__title a { color: var(--bmh-ink); background: linear-gradient(var(--bmh-accent), var(--bmh-accent)) 100% 100% / 0 3px no-repeat; transition: background-size .3s ease; }
.bmh-post__title a:hover { background-size: 100% 3px; color: var(--bmh-ink); }
.bmh-post__excerpt { color: var(--bmh-muted); font-size: .92rem; }

.bmh-post--lead { grid-column: span 2; grid-row: span 2; }
.bmh-post--lead .bmh-post__media { aspect-ratio: 16 / 9; }
.bmh-post--lead .bmh-post__body { padding: 22px 24px 26px; }
.bmh-post--lead .bmh-post__title { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.45; }
.bmh-post--lead .bmh-post__excerpt { font-size: 1rem; }
.bmh-post:not(.bmh-post--lead) .bmh-post__excerpt { display: none; }

.bmh-more { text-align: center; margin-top: 30px !important; }

/* ---------- Ads ---------- */
.bmh-ad { margin-block: 28px; text-align: center; min-height: 90px; }
.bmh-empty { padding: 20px; border: 2px dashed var(--bmh-line); border-radius: 14px; text-align: center; color: var(--bmh-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.bmh-posts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bmh-post--lead { grid-row: auto; }
	.bmh-post:not(.bmh-post--lead) .bmh-post__excerpt { display: block; }
}
@media (max-width: 640px) {
	.bmh-hero { border-radius: var(--bmh-radius); margin-top: 12px; }
	.bmh-grid { grid-template-columns: 1fr; gap: 14px; }
	.bmh-card--featured { grid-column: auto; }
	.bmh-posts__grid { grid-template-columns: 1fr; }
	.bmh-post--lead { grid-column: auto; }
	.bmh-hero__actions .bmh-btn { width: 100%; justify-content: center; }
}

/* ---------- Motion ---------- */
@keyframes bmh-ping { 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@keyframes bmh-pulse { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes bmh-shine { 0%, 70% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
@keyframes bmh-bob { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
	.bmh *, .bmh *::before, .bmh *::after { animation: none !important; transition: none !important; }
}
