/* Hisham BaRajaa theme — main styles */

:root {
	--ink: #28206B;
	--ink-2: #463D8C;
	--night: #1C1650;
	--orange: #F26A1B;
	--orange-d: #FF8A3D;
	--lav: #8F84D9;
	--lav-soft: #EEEBFA;
	--muted: #5E5878;
	--body: #3A3460;
	--soft: #C9C3EE;
	--ground: #F6F5FB;
	--line: #E4E1F2;
	--peach: #FFF3EA;
	--peach-line: #FBD9C2;
	--white: #FFFFFF;
	--radius: 16px;
	--font-ar: 'Alexandria', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	--font-en: 'Space Grotesk', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-ar);
	font-size: 16px;
	line-height: 1.8;
	color: var(--ink);
	background: var(--ground);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
.hb-mark { flex-shrink: 0; height: auto; }
.hb-icon { flex-shrink: 0; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange-d); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.4; margin: 0; }
bdi.hb-mono, .hb-mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }

.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;
}

.hb-skip {
	position: absolute; top: -100px; inset-inline-start: 16px; z-index: 100;
	background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.hb-skip:focus { top: 12px; color: #fff; }

.hb-wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.hb-narrow { max-width: 880px; margin: 0 auto; padding-inline: 24px; }

/* ---------- Names lockup ---------- */
.hb-names { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 7px; line-height: 1; }
.hb-names__ar { padding-bottom: 2px; }
.hb-names__ar { display: inline-block; font-weight: 700; white-space: nowrap; color: var(--ink); line-height: 1.15; }
.hb-names__en { display: inline-block; font-family: var(--font-en); font-weight: 600; white-space: nowrap; color: var(--ink-2); word-spacing: .6em; }
.hb-names--sm .hb-names__ar { font-size: 23px; }
.hb-names--sm .hb-names__en { font-size: 11px; }
.hb-names--md .hb-names__ar { font-size: 27px; }
.hb-names--md .hb-names__en { font-size: 13px; }
.hb-names--dark .hb-names__ar { color: #fff; }
.hb-names--dark .hb-names__en { color: var(--soft); }

.hb-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.hb-brand--dark { gap: 10px; }

/* ---------- Buttons ---------- */
.hb-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 50px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent;
	font-family: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
	transition: transform .15s ease, background-color .15s ease;
}
.hb-btn:hover { transform: translateY(-1px); }
.hb-btn--accent { background: var(--orange-d); color: var(--night); }
.hb-btn--accent:hover { background: #FF9C5A; color: var(--night); }
.hb-btn--primary { background: var(--ink); color: #fff; }
.hb-btn--primary:hover { background: var(--night); color: #fff; }
.hb-btn--outline-dark { border-color: #4A4290; color: #fff; font-weight: 600; }
.hb-btn--outline-dark:hover { border-color: var(--lav); color: #fff; }
.hb-btn--light { background: #fff; border-color: var(--peach-line); color: var(--ink); font-weight: 600; }

.hb-btn-ghost {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
	border-radius: 10px; border: 1px solid var(--line); background: var(--ground);
	color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.hb-btn-ghost:hover { border-color: var(--lav); color: var(--ink); }
.hb-lang { font-family: var(--font-en); background: #fff; }

.hb-chip {
	display: inline-block; font-size: 13px; font-weight: 600; color: var(--ink);
	background: var(--lav-soft); padding: 3px 10px; border-radius: 6px; text-decoration: none; line-height: 1.6;
}

/* ---------- Header ---------- */
.hb-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .hb-header { top: 32px; }
.hb-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.hb-header__panel { display: flex; align-items: center; gap: 24px; flex: 1 1 auto; justify-content: space-between; margin-inline-start: 24px; }
.hb-header__tools { display: flex; align-items: center; gap: 10px; }

.hb-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 26px; }
.hb-menu li { position: relative; }
.hb-menu a {
	display: block; padding: 8px 2px; text-decoration: none; color: var(--body);
	font-weight: 500; border-bottom: 3px solid transparent;
}
.hb-menu a:hover { color: var(--ink); border-bottom-color: var(--line); }
.hb-menu .current-menu-item > a,
.hb-menu .current-menu-ancestor > a,
.hb-menu .current_page_item > a { color: var(--ink); font-weight: 700; border-bottom-color: var(--orange); }
.hb-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; inset-inline-start: 0; min-width: 220px;
	background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(28, 22, 80, .08);
	display: none;
}
.hb-menu li:hover > .sub-menu, .hb-menu li:focus-within > .sub-menu { display: block; }
.hb-menu .sub-menu a { border: 0; padding: 8px 12px; border-radius: 8px; }
.hb-menu .sub-menu a:hover { background: var(--ground); }

.hb-search__label {
	display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
	background: var(--ground); border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
}
.hb-search__label:focus-within { border-color: var(--lav); }
.hb-search__input {
	border: 0; background: transparent; font-family: inherit; font-size: 15px; color: var(--ink);
	width: 160px; outline: none; min-width: 0;
}
.hb-search__input::placeholder { color: var(--muted); }

.hb-menu-toggle {
	display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
	background: #fff; color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.hb-menu-toggle__close { display: none; }
.hb-menu-toggle[aria-expanded="true"] .hb-menu-toggle__open { display: none; }
.hb-menu-toggle[aria-expanded="true"] .hb-menu-toggle__close { display: flex; }
.hb-menu-toggle__open { display: flex; }

@media (max-width: 960px) {
	.hb-menu-toggle { display: inline-flex; }
	.hb-header__inner { flex-wrap: wrap; }
	.hb-header__panel {
		display: none; flex-basis: 100%; flex-direction: column; align-items: stretch;
		margin: 0; padding: 8px 0 12px; gap: 14px;
	}
	.hb-header__panel.is-open { display: flex; }
	.hb-menu { flex-direction: column; gap: 0; }
	.hb-menu a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
	.hb-menu .current-menu-item > a { border-bottom-color: var(--line); border-inline-start: 3px solid var(--orange); padding-inline-start: 10px; }
	.hb-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0; padding-inline-start: 16px; }
	.hb-header__tools { flex-wrap: wrap; }
	.hb-search { flex: 1 1 200px; }
	.hb-search__input { width: 100%; }
}
@media (max-width: 782px) { .admin-bar .hb-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .hb-header { position: relative; top: 0; } }

/* ---------- Hero ---------- */
.hb-hero { background: var(--night); color: #fff; overflow: hidden; }
.hb-hero__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 48px; padding-block: 80px; }
.hb-hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hb-hero__art { flex: 1 1 260px; display: flex; justify-content: center; }
.hb-hero__art .hb-mark { width: min(300px, 70vw); }
.hb-kicker { margin: 0; font-family: var(--font-mono); font-size: 15px; color: var(--orange-d); text-align: start; }
[dir="rtl"] .hb-kicker { text-align: right; }
.hb-hero__title { font-size: clamp(34px, 5vw, 52px); font-weight: 700; line-height: 1.3; }
.hb-hero__lead { margin: 0; font-size: 19px; line-height: 1.9; color: var(--soft); max-width: 600px; }
.hb-hero .hb-actions { margin-top: 6px; }

/* ---------- Sections ---------- */
.hb-section { padding-top: 56px; display: flex; flex-direction: column; gap: 26px; }
.hb-section--last { padding-bottom: 80px; }
.hb-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.hb-section__head h2 { font-size: 30px; font-weight: 700; }
.hb-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }

.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ---------- Covers & cards ---------- */
.hb-cover {
	position: relative; overflow: hidden; height: 150px; background: var(--night);
	display: flex; align-items: flex-end; padding: 16px 18px;
}
.hb-cover--img { padding: 0; background: var(--lav-soft); }
.hb-cover--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-cover__mark { position: absolute; top: -24px; left: -24px; opacity: .16; line-height: 0; }
.hb-cover__tag { position: relative; display: inline-flex; align-items: baseline; gap: 2px; font-size: 15px; font-weight: 600; color: var(--orange-d); }
.hb-cover__prompt, .hb-cover__tag .hb-cursor { font-family: var(--font-mono); font-weight: 500; }
.hb-cursor { animation: hb-blink 1.1s steps(1) infinite; }
@keyframes hb-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hb-cursor { animation: none; } .hb-btn { transition: none; } }

.hb-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.hb-card:hover { border-color: var(--lav); box-shadow: 0 8px 24px rgba(28, 22, 80, .07); }
.hb-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.hb-card__link:hover { color: var(--ink); }
.hb-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; align-items: flex-start; }
.hb-card__title { font-size: 19px; font-weight: 700; line-height: 1.6; }
.hb-card__link:hover .hb-card__title { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 5px; }
.hb-meta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hb-meta__sep { opacity: .6; }

/* ---------- Topics ---------- */
.hb-topics { display: flex; flex-wrap: wrap; gap: 18px; }
.hb-topic {
	flex: 1 1 260px; display: flex; align-items: center; gap: 16px; background: #fff;
	border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink);
}
.hb-topic:hover { border-color: var(--lav); color: var(--ink); }
.hb-topic__icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; background: var(--lav-soft); display: flex; align-items: center; justify-content: center; }
.hb-topic__text { display: flex; flex-direction: column; gap: 4px; }
.hb-topic__name { font-size: 19px; font-weight: 700; }
.hb-topic__count { font-size: 13px; font-weight: 500; color: var(--muted); }
.hb-topic__desc { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- Series ---------- */
.hb-series { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-wrap: wrap; }
.hb-series__intro {
	flex: 1 1 340px; background: var(--ink); color: #fff; padding: 40px;
	display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.hb-series__intro p { margin: 10px 0 0; color: var(--soft); line-height: 1.8; }
.hb-series__title { font-size: 30px; font-weight: 700; line-height: 1.4; }
.hb-badge { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--night); background: var(--orange-d); padding: 5px 12px; border-radius: 8px; }
.hb-series__list { flex: 999 1 420px; list-style: none; margin: 0; padding: 32px 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.hb-episode { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
a.hb-episode:hover { border-color: var(--lav); color: var(--ink); }
.hb-episode > .hb-icon { margin-inline-start: auto; }
.hb-episode__num {
	width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; background: var(--ground);
	display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 20px;
}
.hb-episode__text { display: flex; flex-direction: column; gap: 2px; }
.hb-episode__title { font-size: 17px; font-weight: 700; line-height: 1.6; }
.hb-episode__date { font-size: 14px; color: var(--muted); }
.hb-episode--next { border-style: dashed; color: var(--muted); }

/* ---------- Help CTA ---------- */
.hb-help {
	background: var(--peach); border: 1px solid var(--peach-line); border-radius: 22px; padding: 36px 40px;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.hb-help__text { flex: 999 1 420px; }
.hb-help__text h2 { font-size: 28px; font-weight: 700; }
.hb-help__text p { margin: 6px 0 0; color: var(--body); }

/* ---------- Page head / archives ---------- */
.hb-pagehead { background: #fff; border-bottom: 1px solid var(--line); }
.hb-pagehead .hb-wrap { padding-block: 44px 36px; display: flex; flex-direction: column; gap: 12px; }
.hb-pagehead__title { font-size: clamp(30px, 4vw, 42px); font-weight: 700; }
.hb-pagehead__desc { color: var(--body); font-size: 17px; margin: 0; }
.hb-pagehead__desc p { margin: 0; }
.hb-pagehead__search .hb-search__input { width: 260px; }
.hb-crumbs { font-size: 14px; color: var(--muted); }
.hb-crumbs a { color: var(--muted); }
.hb-crumbs--dark, .hb-crumbs--dark a { color: var(--soft); }
.hb-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hb-pill {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 22px;
	background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.hb-pill:hover { border-color: var(--lav); color: var(--ink); }
.hb-pill.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.hb-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-block: 40px 72px; }
.hb-layout__main { flex: 999 1 560px; min-width: 0; }
.hb-layout__side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 18px; }

.hb-list { display: flex; flex-direction: column; gap: 16px; }
.hb-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hb-row:hover { border-color: var(--lav); }
.hb-row__link { display: flex; text-decoration: none; color: var(--ink); }
.hb-row__link:hover { color: var(--ink); }
.hb-cover--row { flex: 0 0 200px; height: auto; min-height: 132px; }
.hb-row__body { flex: 1 1 auto; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hb-row__title { font-size: 19px; font-weight: 700; line-height: 1.6; }
.hb-row__excerpt { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.8; }
.hb-row__link:hover .hb-row__title { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 5px; }
@media (max-width: 600px) {
	.hb-row__link { flex-direction: column; }
	.hb-cover--row { flex-basis: auto; height: 120px; min-height: 0; }
}

.hb-pagination { margin-top: 28px; }
.hb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hb-pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line);
	display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-family: var(--font-en);
}
.hb-pagination .prev, .hb-pagination .next { font-family: var(--font-ar); }
.hb-pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }

.hb-empty { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; }
.hb-empty p { color: var(--muted); }

/* ---------- Sidebar ---------- */
.hb-about { background: var(--night); color: #fff; border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hb-about__name { font-size: 20px; font-weight: 700; }
.hb-about p { margin: 0; color: var(--soft); font-size: 15px; }
.hb-about a { color: var(--orange-d); font-weight: 600; }
.hb-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.hb-box__title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.hb-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hb-box li a { text-decoration: none; font-size: 15px; line-height: 1.7; }
.hb-box li a:hover { text-decoration: underline; }

/* ---------- Single ---------- */
.hb-posthead { background: var(--night); color: #fff; }
.hb-posthead .hb-wrap { padding-block: 56px 52px; display: flex; flex-direction: column; gap: 16px; }
.hb-posthead__title { max-width: 900px; font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.45; }
.hb-posthead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 14px; color: var(--soft); }
.hb-author, .hb-posthead__time { display: inline-flex; align-items: center; gap: 8px; }

.hb-article-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-block: 48px 72px; }
.hb-toc { flex: 1 1 220px; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 6px; }
.hb-toc[hidden] { display: none; }
.hb-toc__title { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.hb-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hb-toc__list a { display: block; font-size: 15px; line-height: 1.6; text-decoration: none; color: var(--body); padding: 6px 12px; border-inline-start: 3px solid var(--line); }
.hb-toc__list a:hover { color: var(--ink); border-inline-start-color: var(--lav); }
.hb-toc__list a.is-active { color: var(--ink); font-weight: 600; border-inline-start-color: var(--orange); }
.hb-toc__list .is-sub a { padding-inline-start: 24px; font-size: 14px; }
@media (max-width: 960px) { .hb-toc { position: static; } }

.hb-article {
	flex: 999 1 600px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px;
	padding: clamp(22px, 4vw, 44px);
}
.hb-article__thumb { margin: 0 0 24px; }
.hb-article__thumb img { border-radius: 14px; display: block; width: 100%; }

/* Article typography — works with content written in the classic and block editors */
.hb-prose { font-size: 15px; line-height: 1.9; color: var(--body); overflow-wrap: anywhere; }
.hb-prose > *:first-child { margin-top: 0; }
.hb-prose p { margin: 0 0 1.1em; }
.hb-prose p:empty, .hb-prose p:has(> br:only-child) { display: none; }
.hb-prose h2 { font-size: 21px; font-weight: 700; color: var(--ink); margin: 1.6em 0 .6em; scroll-margin-top: 100px; }
.hb-prose h3 { font-size: 17.5px; font-weight: 700; color: var(--ink); margin: 1.4em 0 .5em; scroll-margin-top: 100px; }
.hb-prose h4 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 1.2em 0 .4em; }
.hb-prose a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--orange); }
.hb-prose a:hover { color: var(--orange); }
.hb-prose img { border-radius: 12px; border: 1px solid var(--line); display: block; margin: 1em auto; }
.hb-prose figure { margin: 1.4em 0; }
.hb-prose figcaption { text-align: center; font-size: 14px; color: var(--muted); }
.hb-prose ul, .hb-prose ol { padding: 0; padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.hb-prose li { margin-bottom: .4em; }
.hb-prose li::marker { color: var(--orange); font-weight: 700; }
.hb-prose blockquote {
	margin: 1.4em 0; padding: 18px 22px; background: var(--peach); border: 1px solid var(--peach-line);
	border-radius: 14px; color: var(--body);
}
.hb-prose blockquote p:last-child { margin: 0; }
.hb-prose code { font-family: var(--font-mono); font-size: .88em; background: var(--lav-soft); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.hb-prose pre {
	direction: ltr; text-align: left; background: var(--night); color: #fff; padding: 18px 20px; border-radius: 14px;
	overflow-x: auto; font-size: 15px; line-height: 1.7;
}
.hb-prose pre code { background: none; padding: 0; color: inherit; }
.hb-prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 16px; display: block; overflow-x: auto; }
.hb-prose th, .hb-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; }
.hb-prose th { background: var(--ground); color: var(--ink); }
.hb-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.hb-prose iframe { max-width: 100%; border-radius: 12px; }
.hb-prose .alignleft { float: left; margin: .4em 0 1em 1.4em; }
.hb-prose .alignright { float: right; margin: .4em 1.4em 1em 0; }
.hb-prose .aligncenter { margin-inline: auto; }
.hb-prose .wp-caption { max-width: 100%; }

/* Forms inside content: Contact Form 7, Jetpack forms, comments */
.hb-prose input[type="text"], .hb-prose input[type="email"], .hb-prose input[type="tel"], .hb-prose input[type="url"],
.hb-prose input[type="number"], .hb-prose select, .hb-prose textarea,
.hb-comments input[type="text"], .hb-comments input[type="email"], .hb-comments input[type="url"], .hb-comments textarea {
	width: 100%; font-family: inherit; font-size: 16px; color: var(--ink); background: var(--ground);
	border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
.hb-prose textarea, .hb-comments textarea { min-height: 140px; resize: vertical; }
.hb-prose input:focus, .hb-prose select:focus, .hb-prose textarea:focus,
.hb-comments input:focus, .hb-comments textarea:focus { outline: none; border-color: var(--lav); box-shadow: 0 0 0 3px var(--lav-soft); }
.hb-prose label { font-size: 15px; font-weight: 600; color: var(--ink); }
.hb-prose input[type="submit"], .hb-prose button[type="submit"], .hb-prose .wp-block-button__link, .hb-comments input[type="submit"] {
	font-family: inherit; font-size: 16px; font-weight: 700; min-height: 50px; padding: 0 30px; border: 0; border-radius: 12px;
	background: var(--ink); color: #fff; cursor: pointer; text-decoration: none;
}
.hb-prose input[type="submit"]:hover, .hb-prose button[type="submit"]:hover, .hb-comments input[type="submit"]:hover { background: var(--night); }
.wpcf7-form p { margin-bottom: 18px; }
.wpcf7-not-valid-tip { font-size: 14px; }

.hb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hb-share { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hb-share > span { font-size: 15px; color: var(--muted); }
.hb-share__btns { display: flex; flex-wrap: wrap; gap: 10px; }

.hb-related { background: #fff; border-top: 1px solid var(--line); }
.hb-related .hb-section { padding-bottom: 64px; }

/* ---------- Comments ---------- */
.hb-comments { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 28px; }
.hb-comments__title, .hb-comments .comment-reply-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.hb-comments__list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hb-comments__list .children { list-style: none; padding: 0; padding-inline-start: 24px; margin-top: 14px; }
.hb-comments .comment-body { background: var(--ground); border-radius: 14px; padding: 16px 18px; }
.hb-comments .comment-meta { font-size: 14px; color: var(--muted); }
.hb-comments .avatar { border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; }

/* English (left-to-right) pages */
html:not([dir="rtl"]) .hb-icon--arrow { transform: scaleX(-1); }
html:not([dir="rtl"]) .hb-names__en { margin-right: 0 !important; }
.hb-comments .comment-form p { margin: 0 0 14px; }

/* ---------- Pages & contact ---------- */
.hb-page { padding-block: 40px 72px; }
.hb-article--page { max-width: 880px; margin: 0 auto; }
.hb-contact { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-block: 40px 80px; }
.hb-contact__form { flex: 999 1 520px; }
.hb-contact__side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.hb-contact-card {
	display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
	border-radius: 18px; padding: 22px; text-decoration: none; color: var(--ink);
}
.hb-contact-card > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.hb-contact-card strong { font-size: 18px; }
.hb-contact-card small { font-size: 14px; color: var(--muted); }
.hb-contact-card__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--lav-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hb-contact-card--dark { background: var(--night); border-color: var(--night); color: #fff; }
.hb-contact-card--dark:hover { color: #fff; }
.hb-contact-card--dark small { color: var(--soft); }
.hb-contact-card--dark .hb-contact-card__icon { background: #2C2470; color: var(--orange-d); }
.hb-note { background: var(--peach); border: 1px solid var(--peach-line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.hb-note span { font-size: 15px; color: var(--body); }
.hb-note a { font-weight: 700; }

/* ---------- 404 ---------- */
.hb-404 { padding-block: 80px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.hb-404 h1 { font-size: 36px; }
.hb-404 p { margin: 0; color: var(--muted); }
.hb-404 .hb-kicker { text-align: center; color: var(--orange); }

/* ---------- Footer ---------- */
.hb-footer { background: var(--night); color: #fff; }
.hb-footer .hb-wrap { padding-block: 52px 28px; display: flex; flex-direction: column; gap: 36px; }
.hb-footer__top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.hb-footer__about { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.hb-footer__about p { margin: 0; color: var(--soft); max-width: 360px; font-size: 15px; }
.hb-footer__col { flex: 1 1 180px; }
.hb-footer__title { font-size: 14px; font-weight: 700; color: var(--orange-d); margin-bottom: 12px; }
.hb-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.hb-footer a { color: #fff; text-decoration: none; }
.hb-footer a:hover { color: var(--orange-d); }
.hb-footer__ico { display: inline-flex; align-items: center; gap: 8px; }
.hb-footer__ico .hb-icon { color: var(--orange-d); }
.hb-footer__bottom { border-top: 1px solid #332B78; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--soft); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.hb-cover { height: 120px; }
	.hb-hero__inner { padding-block: 52px; gap: 28px; }
	.hb-hero__art { display: none; }
	.hb-series__intro, .hb-series__list { padding: 26px; }
	.hb-help { padding: 26px; }
	.hb-section__head h2 { font-size: 24px; }
	.hb-grid { grid-template-columns: 1fr; }
	.hb-prose { font-size: 14.5px; }
}

.trp-floating-switcher{display:none!important}

/* GTranslate language switch (Google Translate) */
.hb-gt { display: flex; align-items: center; }
.hb-gt a.glink {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line);
	border-radius: 10px; background: #fff; color: var(--ink); font-family: var(--font-en); font-size: 14px;
	font-weight: 600; text-transform: uppercase; text-decoration: none;
}
.hb-gt a.glink:hover { border-color: var(--lav); color: var(--ink); }
.hb-gt a.glink.gt-current-lang { display: none; }
html.translated-ltr body { direction: ltr; }
html.translated-ltr .hb-icon--arrow { transform: scaleX(-1); }
html.translated-ltr .hb-names__en { margin-right: 0 !important; }

.hb-only-en { display: none; }
html.translated-ltr .hb-only-en, html:not([dir="rtl"]) .hb-only-en { display: inline; }
html.translated-ltr .hb-only-ar, html:not([dir="rtl"]) .hb-only-ar { display: none; }

/* Phones & tablets: no sideways scroll, bigger tap targets */
html, body { overflow-x: clip; }
@media (max-width: 960px) {
	.hb-footer__list a, .hb-about a, .hb-note a, .hb-box li a, .hb-more { display: inline-block; padding-block: 8px; }
	.hb-footer__list { gap: 2px; }
}
.hb-posthead__date { display: inline-flex; align-items: center; gap: 6px; }
.hb-views { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Tutorial components (used inside posts) ---------- */
.hb-prose .hb-lead { font-size: 15.5px; color: var(--ink); background: var(--ground); border-inline-start: 4px solid var(--orange); border-radius: 12px; padding: 18px 22px; margin: 0 0 1.6em; }
.hb-prose .hb-lead p:last-child { margin: 0; }
.hb-prose .hb-note { background: var(--lav-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 1.2em 0 1.8em; font-size: 14.5px; line-height: 1.9; }
.hb-prose .hb-note > strong:first-child { display: block; color: var(--ink); margin-bottom: 4px; }
.hb-prose .hb-note--warn { background: #FFF4EC; border-color: #FBD3B8; }
.hb-prose .hb-note ul { margin: 0; }
.hb-prose .hb-note p:last-child { margin: 0; }
.hb-prose ul.hb-checks { list-style: none; padding: 0; }
.hb-prose ul.hb-checks li { position: relative; padding-inline-start: 30px; }
.hb-prose ul.hb-checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--orange); font-weight: 700; }
.hb-prose ol.hb-steps { list-style: none; padding: 0; margin: 1.4em 0 2em; counter-reset: hbstep; }
.hb-prose ol.hb-steps > li { counter-increment: hbstep; position: relative; padding-inline-start: 58px; margin: 0 0 2em; }
.hb-prose ol.hb-steps > li::before { content: counter(hbstep); position: absolute; inset-inline-start: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 17px; display: grid; place-items: center; box-shadow: 0 0 0 5px var(--ground); }
.hb-prose ol.hb-steps > li::after { content: ""; position: absolute; inset-inline-start: 19px; top: 50px; bottom: -1.6em; width: 2px; background: var(--line); }
.hb-prose ol.hb-steps > li:last-child::after { display: none; }
.hb-prose .hb-steps h3 { font-size: 16px; margin: 6px 0 .35em; }
.hb-prose .hb-steps p { margin: 0 0 .6em; }
.hb-prose .hb-steps figure { margin: .9em 0 0; }
.hb-prose .hb-steps img, .hb-prose .hb-shot img { margin: 0; max-width: 100%; height: auto; box-shadow: 0 8px 24px rgba(40, 32, 107, .08); }
.hb-prose .hb-shot--phone img { max-width: min(300px, 100%); }
.hb-prose .hb-shots { display: flex; flex-wrap: wrap; gap: 14px; margin: .9em 0 0; }
.hb-prose .hb-shots figure { margin: 0; flex: 0 1 auto; }
.hb-prose .hb-shots img { max-width: min(300px, 100%); }
.hb-prose .hb-role { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--ground); color: var(--ink); border: 1px solid var(--line); margin-bottom: 8px; }
.hb-prose .hb-role + br { display: none; }
.hb-prose .hb-role--other { background: #FFF4EC; border-color: #FBD3B8; color: #A2470F; }
.hb-prose .hb-sign { text-align: center; color: var(--muted); font-size: 16px; margin-top: 2.2em; }
@media (max-width: 600px) {
	.hb-prose ol.hb-steps > li { padding-inline-start: 46px; }
	.hb-prose ol.hb-steps > li::before { width: 32px; height: 32px; font-size: 15px; }
	.hb-prose ol.hb-steps > li::after { inset-inline-start: 15px; top: 42px; }
	.hb-prose .hb-shots img, .hb-prose .hb-shot--phone img { max-width: 100%; }
}

/* ---------- Newsletter (footer) ---------- */
.hb-news { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 36px; background: #2A2172; border: 1px solid #3A3189; border-radius: 18px; padding: 26px 28px; }
.hb-news__text { display: flex; gap: 16px; align-items: flex-start; flex: 1 1 340px; }
.hb-news__icon { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--orange); color: #fff; display: grid; place-items: center; }
.hb-news__title { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.hb-news__text p { margin: 0; color: var(--soft); font-size: 14.5px; line-height: 1.8; }
.hb-news__form { flex: 1 1 360px; max-width: 460px; }
.hb-news__form .wp-block-jetpack-subscriptions__container, .hb-news__form .jetpack_subscription_widget, .hb-news__form .wp-block-jetpack-subscriptions { margin: 0 !important; padding: 0 !important; }
.hb-news__form form { display: flex !important; flex-wrap: nowrap; gap: 8px; margin: 0 !important; align-items: stretch; }
.hb-news__form form p { margin: 0 !important; padding: 0 !important; }
.hb-news__form form p:first-of-type, .hb-news__form #subscribe-email { flex: 1 1 auto; }
.hb-news__form label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hb-news__form input[type="email"] { width: 100% !important; height: 50px; border-radius: 12px !important; border: 1px solid #4A41A0 !important; background: #fff !important; color: var(--ink) !important; padding: 0 16px !important; font: inherit !important; font-size: 15px !important; direction: ltr; text-align: right; box-shadow: none !important; margin: 0 !important; }
.hb-news__form input[type="email"]::placeholder { color: var(--muted); text-align: right; }
.hb-news__form button, .hb-news__form input[type="submit"] { height: 50px; border-radius: 12px !important; border: 0 !important; background: var(--orange) !important; color: #fff !important; font: inherit !important; font-weight: 700 !important; font-size: 15px !important; padding: 0 26px !important; cursor: pointer; white-space: nowrap; margin: 0 !important; width: auto !important; }
.hb-news__form button:hover, .hb-news__form input[type="submit"]:hover { background: var(--orange-d) !important; }
.hb-news__form .success, .hb-news__form .wp-block-jetpack-subscriptions__subscribed, .hb-news__form .jetpack-subscribe-success { color: #fff; font-size: 15px; }
@media (max-width: 600px) {
	.hb-news { padding: 22px 18px; }
	.hb-news__form form { flex-wrap: wrap; }
	.hb-news__form button, .hb-news__form input[type="submit"] { width: 100% !important; }
}

/* ---------- Announcement popup ---------- */
.hb-pop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; }
.hb-pop[hidden] { display: none; }
.hb-pop__overlay { position: absolute; inset: 0; background: rgba(28, 22, 80, .62); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s ease; }
.hb-pop__box { position: relative; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(28, 22, 80, .35); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.hb-pop.is-open .hb-pop__overlay { opacity: 1; }
.hb-pop.is-open .hb-pop__box { transform: none; opacity: 1; }
.hb-pop__close { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); z-index: 1; }
.hb-pop__close:hover { background: var(--ground); }
.hb-pop__img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: 20px 20px 0 0; }
.hb-pop__body { padding: 28px 26px 26px; text-align: center; border-top: 4px solid var(--orange); border-radius: 20px 20px 0 0; }
.hb-pop__img + .hb-pop__body { border-radius: 0; }
.hb-pop__title { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 10px; padding-inline: 34px; }
.hb-pop__text { font-size: 15.5px; line-height: 1.9; color: var(--body); margin: 0 0 20px; }
.hb-pop__btn { display: inline-flex; }
body.hb-pop-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .hb-pop__overlay, .hb-pop__box { transition: none; } }
