/* ==========================================================================
   Qahal Events — front end
   ========================================================================== */

.qahal {
	--qahal-bg: #0a0a0a;
	--qahal-surface: #1e1e1e;
	--qahal-hover: #161616;
	--qahal-hover-line: #2c2c2c;
	--qahal-text: #ffffff;
	--qahal-muted: rgba(255, 255, 255, 0.7);
	--qahal-line: rgba(255, 255, 255, 0.16);
	--qahal-line-strong: rgba(255, 255, 255, 0.32);
	--qahal-btn: #ffffff;
	--qahal-btn-text: #0a0a0a;
	--qahal-btn-muted: #474747;
	--qahal-btn-muted-text: #ffffff;
	--qahal-shadow: 0 1px 3px rgba(30, 30, 30, 1);
	--qahal-radius: 16px;
	--qahal-max: 1152px;

	background: var(--qahal-bg);
	color: var(--qahal-text);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.qahal--light {
	--qahal-bg: #ffffff;
	--qahal-surface: #f4f4f5;
	--qahal-hover: #f6f6f7;
	--qahal-hover-line: #e6e6e8;
	--qahal-text: #0a0a0a;
	--qahal-muted: rgba(10, 10, 10, 0.64);
	--qahal-line: rgba(10, 10, 10, 0.12);
	--qahal-line-strong: rgba(10, 10, 10, 0.24);
	--qahal-btn: #0a0a0a;
	--qahal-btn-text: #ffffff;
	--qahal-btn-muted: #e4e4e7;
	--qahal-btn-muted-text: #0a0a0a;
	--qahal-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.qahal--embed {
	background: transparent;
}

.qahal--font,
html .qahal--font :is(h1, h2, h3, h4, h5, h6, p, li, a, button, input, span, summary, div) {
	font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	letter-spacing: 0.15px;
}

/* ---- resets (beat theme / Elementor kit styles) ------------------------- */
html .qahal *,
html .qahal *::before,
html .qahal *::after {
	box-sizing: border-box;
}
html .qahal :is(h1, h2, h3, h4, p, ul, ol, figure) {
	margin: 0;
	padding: 0;
	color: inherit;
}
html .qahal ul {
	list-style: none;
}
html .qahal a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}
html .qahal button,
html .qahal summary {
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	color: inherit;
	font: inherit;
	padding: 0;
	margin: 0;
	cursor: pointer;
	text-transform: none;
	line-height: inherit;
}
html .qahal button:hover,
html .qahal button:focus {
	background: none;
	color: inherit;
}
html .qahal img {
	max-width: 100%;
	height: auto;
	border: 0;
	box-shadow: none;
	border-radius: 0;
}
.qahal-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	display: inline-block;
	vertical-align: middle;
}
.qahal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.qahal [hidden] {
	display: none !important;
}
.qahal :focus-visible {
	outline: 2px solid var(--qahal-text);
	outline-offset: 3px;
}

/* ---- layout + type ------------------------------------------------------ */
.qahal-container {
	width: 100%;
	max-width: calc(var(--qahal-max) + 48px);
	margin: 0 auto;
	padding: 0 24px;
}

html .qahal .qahal-h1 {
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.4px;
}
html .qahal .qahal-h2 {
	font-size: 24px;
	line-height: 1.334;
	font-weight: 700;
}
html .qahal .qahal-h3 {
	font-size: 20px;
	line-height: 1.33;
	font-weight: 700;
}
html .qahal .qahal-lead {
	font-size: 16px;
	line-height: 1.75;
	color: var(--qahal-text);
	opacity: 0.88;
	margin-top: 4px;
}
html .qahal .qahal-small {
	font-size: 14px;
	line-height: 1.43;
	margin-top: 16px;
}

/* ---- buttons ------------------------------------------------------------ */
html .qahal .qahal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	min-width: 180px;
	padding: 8px 22px;
	border-radius: 12px;
	background: var(--qahal-btn);
	color: var(--qahal-btn-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}
html .qahal .qahal-btn:hover {
	opacity: 0.9;
	background: var(--qahal-btn);
	color: var(--qahal-btn-text);
}
html .qahal .qahal-btn:active {
	transform: scale(0.98);
}
html .qahal .qahal-btn--muted,
html .qahal .qahal-btn--muted:hover {
	background: var(--qahal-btn-muted);
	color: var(--qahal-btn-muted-text);
}
html .qahal .qahal-btn--ghost,
html .qahal .qahal-btn--ghost:hover {
	background: transparent;
	color: var(--qahal-text);
	border: 1px solid var(--qahal-line-strong);
}
html .qahal .qahal-btn--block {
	display: flex;
	width: 100%;
	min-width: 0;
}
.qahal-btn .qahal-icon {
	width: 18px;
	height: 18px;
}

/* ---- events page -------------------------------------------------------- */
.qahal-archive {
	padding-bottom: 96px;
}
.qahal-page-head {
	padding: 56px 0 8px;
}
.qahal-page-head .qahal-lead {
	color: var(--qahal-muted);
	opacity: 1;
	font-size: 18px;
	margin-top: 8px;
}
.qahal-section {
	margin-top: 48px;
}
.qahal-section > .qahal-h2,
.qahal-section__head {
	margin-bottom: 24px;
}
.qahal-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

/* search + filters */
html .qahal .qahal-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 300px;
	max-width: 100%;
}
.qahal-search .qahal-icon {
	position: absolute;
	left: 14px;
	color: var(--qahal-muted);
	pointer-events: none;
}
html .qahal .qahal-search input {
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 16px 0 44px;
	border: 1px solid var(--qahal-line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--qahal-text);
	font-size: 16px;
	box-shadow: none;
	outline: none;
}
html .qahal .qahal-search input::placeholder {
	color: var(--qahal-muted);
}
html .qahal .qahal-search input:focus {
	border-color: var(--qahal-text);
}
.qahal-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -8px 0 24px;
}
html .qahal .qahal-pill {
	padding: 7px 16px;
	border: 1px solid var(--qahal-line-strong);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--qahal-text);
	transition: background-color 0.15s ease, color 0.15s ease;
}
html .qahal .qahal-pill:hover {
	background: var(--qahal-surface);
	color: var(--qahal-text);
}
html .qahal .qahal-pill.is-active,
html .qahal .qahal-pill.is-active:hover {
	background: var(--qahal-text);
	border-color: var(--qahal-text);
	color: var(--qahal-bg);
}

/* grid */
.qahal-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px 0;
	margin: 0 -16px;
}
.qahal-cols-1 { grid-template-columns: minmax(0, 1fr); }
.qahal-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qahal-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* card */
html .qahal .qahal-card {
	display: block;
	padding: 16px;
	border: 1px solid transparent;
	border-radius: var(--qahal-radius);
	color: var(--qahal-text);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
html .qahal .qahal-card:hover,
html .qahal .qahal-card:focus-visible {
	background: var(--qahal-hover);
	border-color: var(--qahal-hover-line);
	color: var(--qahal-text);
}
.qahal-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--qahal-radius);
	overflow: hidden;
	box-shadow: var(--qahal-shadow);
	background: var(--qahal-surface);
}
html .qahal .qahal-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.qahal-card:hover .qahal-card__img {
	transform: scale(1.03);
}
.qahal-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	background:
		radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
		linear-gradient(135deg, #2a2a2a, #121212);
	color: #ffffff;
}
.qahal-card__body {
	padding-top: 16px;
}
html .qahal .qahal-card__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.33;
}
html .qahal .qahal-card__sub {
	font-size: 14px;
	line-height: 1.43;
	color: var(--qahal-muted);
}

/* meta rows (icon + text) */
html .qahal .qahal-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}
.qahal-meta li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	line-height: 1.43;
}
.qahal-meta .qahal-icon {
	color: var(--qahal-muted);
}
html .qahal .qahal-meta--lg {
	gap: 16px;
	margin-top: 20px;
}
.qahal-meta--lg li {
	font-size: 16px;
	line-height: 1.5;
}

/* featured banner */
.qahal-featured {
	position: relative;
	border-radius: var(--qahal-radius);
	overflow: hidden;
	background: var(--qahal-surface);
	min-height: 320px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}
html .qahal .qahal-featured__media {
	position: absolute;
	inset: 0;
	display: block;
}
html .qahal .qahal-featured__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.qahal-featured__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 10, 10, 0) 35%, rgba(10, 10, 10, 0.55) 65%, rgba(10, 10, 10, 0.92) 100%);
}
.qahal-featured__bar {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding: 220px 16px 16px;
	color: #ffffff;
	pointer-events: none;
}
.qahal-featured__bar a {
	pointer-events: auto;
}
html .qahal .qahal-featured__title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.33;
	color: #ffffff;
}
html .qahal .qahal-featured__sub {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.86);
}
.qahal-featured__actions {
	display: flex;
	gap: 16px;
	flex-shrink: 0;
}
html .qahal .qahal-featured .qahal-btn {
	background: #ffffff;
	color: #0a0a0a;
	min-width: 214px;
}
html .qahal .qahal-featured .qahal-btn--muted {
	background: rgba(255, 255, 255, 0.24);
	color: #ffffff;
	backdrop-filter: blur(8px);
}

/* empty */
.qahal-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 72px 24px;
	border: 1px dashed var(--qahal-line-strong);
	border-radius: var(--qahal-radius);
	text-align: center;
	color: var(--qahal-muted);
}
.qahal-empty .qahal-icon {
	width: 32px;
	height: 32px;
	margin-bottom: 8px;
}
html .qahal .qahal-empty__title {
	font-size: 20px;
	font-weight: 700;
	color: var(--qahal-text);
}

.qahal-embed-foot {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

/* ---- single event ------------------------------------------------------- */
.qahal-single {
	padding-bottom: 96px;
}
.qahal-hero {
	position: relative;
	height: clamp(380px, 64vh, 640px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: var(--qahal-surface);
}
.qahal-hero--plain {
	height: auto;
	min-height: 300px;
	background:
		radial-gradient(100% 140% at 0% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
		var(--qahal-surface);
}
html .qahal .qahal-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.qahal-hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 10, 10, 0) 38%, rgba(10, 10, 10, 0.55) 70%, rgba(10, 10, 10, 0.9) 100%);
}
.qahal--light .qahal-hero--plain .qahal-hero__shade {
	display: none;
}
.qahal-hero__text {
	position: relative;
	padding-top: 96px;
	padding-bottom: 40px;
	color: #ffffff;
}
.qahal--light .qahal-hero--plain .qahal-hero__text {
	color: var(--qahal-text);
}
html .qahal .qahal-hero .qahal-h1 {
	max-width: 820px;
	color: inherit;
}
html .qahal .qahal-hero .qahal-lead {
	color: inherit;
	max-width: 720px;
}
html .qahal .qahal-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 500;
	opacity: 0.85;
	color: inherit;
}
.qahal-back::before {
	content: "\2190";
}
html .qahal .qahal-back:hover {
	opacity: 1;
	color: inherit;
}

.qahal-ended-note {
	background: var(--qahal-surface);
	border-bottom: 1px solid var(--qahal-line);
	padding: 14px 0;
	font-size: 14px;
	font-weight: 500;
}
html .qahal .qahal-ended-note a {
	text-decoration: underline;
	margin-left: 6px;
}

.qahal-layout {
	display: grid;
	grid-template-columns: minmax(0, 654px) minmax(0, 434px);
	justify-content: space-between;
	gap: 48px;
	padding-top: 32px;
}
.qahal-content {
	padding: 0 24px;
}
.qahal-prose {
	font-size: 16px;
	line-height: 1.5;
	max-width: 520px;
}
html .qahal .qahal-prose > * + * {
	margin-top: 16px;
}
html .qahal .qahal-prose a {
	text-decoration: underline;
	text-underline-offset: 3px;
}
html .qahal .qahal-prose ul {
	list-style: disc;
	padding-left: 22px;
}
html .qahal .qahal-prose ol {
	padding-left: 22px;
}
html .qahal .qahal-prose :is(h2, h3, h4) {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.33;
	margin-top: 28px;
}
html .qahal .qahal-prose img {
	border-radius: 12px;
}
html .qahal .qahal-hr {
	border: 0;
	border-top: 1px solid var(--qahal-line);
	margin: 24px 0;
	height: 0;
	background: none;
}

/* provides */
html .qahal .qahal-provides {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-top: 32px;
}
.qahal-provides li {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 16px;
	line-height: 1.5;
}
.qahal-provides .qahal-icon {
	width: 24px;
	height: 24px;
}
.qahal-provides li.is-extra {
	display: none;
}
.qahal-provides.is-open li.is-extra {
	display: flex;
}
html .qahal .qahal-more {
	margin-top: 20px;
	padding: 8px 24px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 12px;
}
html .qahal .qahal-more:hover {
	background: var(--qahal-surface);
}

/* side panel */
.qahal-aside {
	position: relative;
}
.qahal-panel {
	position: sticky;
	top: 32px;
	background: var(--qahal-surface);
	border-radius: var(--qahal-radius);
	padding: 24px;
	display: flex;
	flex-direction: column;
}
.admin-bar .qahal-panel {
	top: 64px;
}
.qahal-panel__loc {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}
.qahal-panel__icon {
	margin-top: 2px;
}
.qahal-panel__where {
	flex: 1;
	min-width: 0;
}
html .qahal .qahal-panel__name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}
html .qahal .qahal-panel__addr {
	font-size: 14px;
	line-height: 1.43;
	color: var(--qahal-muted);
}
.qahal-panel__acts {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}
html .qahal .qahal-act {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 58px;
	padding: 4px 4px 2px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--qahal-text);
}
html .qahal .qahal-act:hover {
	background: rgba(127, 127, 127, 0.16);
	color: var(--qahal-text);
}
.qahal-act .qahal-icon {
	width: 24px;
	height: 24px;
}
html .qahal .qahal-panel > .qahal-btn,
html .qahal .qahal-panel > .qahal-cal {
	margin-top: 24px;
}
html .qahal .qahal-panel > .qahal-btn + .qahal-cal {
	margin-top: 12px;
}
.qahal-cal {
	position: relative;
}
html .qahal .qahal-cal > summary {
	list-style: none;
}
.qahal-cal > summary::-webkit-details-marker {
	display: none;
}
.qahal-cal__menu {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 5;
	display: flex;
	flex-direction: column;
	padding: 6px;
	border-radius: 12px;
	background: var(--qahal-bg);
	border: 1px solid var(--qahal-line);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
html .qahal .qahal-cal__menu a {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
}
html .qahal .qahal-cal__menu a:hover {
	background: var(--qahal-surface);
}

.qahal-more-events {
	margin-top: 48px;
}

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
	.qahal-grid,
	.qahal-cols-3,
	.qahal-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.qahal-layout {
		grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
		gap: 32px;
	}
	.qahal-content {
		padding: 0;
	}
}

@media (max-width: 760px) {
	.qahal-layout {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 24px;
	}
	.qahal-aside {
		order: -1;
	}
	.qahal-panel {
		position: static;
	}
	.qahal-featured__bar {
		flex-direction: column;
		align-items: stretch;
		padding-top: 180px;
	}
	.qahal-featured__actions {
		flex-direction: column;
		gap: 10px;
	}
	html .qahal .qahal-featured .qahal-btn {
		min-width: 0;
		width: 100%;
	}
	html .qahal .qahal-search {
		width: 100%;
	}
	.qahal-hero {
		height: clamp(320px, 56vh, 480px);
	}
	.qahal-hero__text {
		padding-bottom: 28px;
	}
}

@media (max-width: 640px) {
	.qahal-container {
		padding: 0 16px;
	}
	.qahal-grid,
	.qahal-cols-2,
	.qahal-cols-3,
	.qahal-cols-4 {
		grid-template-columns: minmax(0, 1fr);
		margin: 0 -12px;
	}
	html .qahal .qahal-card {
		padding: 12px;
	}
	.qahal-page-head {
		padding-top: 36px;
	}
	.qahal-section {
		margin-top: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qahal * {
		transition: none !important;
	}
}

/* Match the page background to the scheme so theme footers with top margins
   (e.g. Elementor footer containers) don't show a white strip. */
body.qahal-scheme-dark { background-color: #0a0a0a; }
body.qahal-scheme-light { background-color: #ffffff; }

/* ==========================================================================
   Single event hero — rounded card, whole image always visible (never
   cropped), soft dark gradient at the bottom with the title on top of it.
   --qahal-hero-ar (image width / height) is set by qahal.js; 16:9 fallback.
   ========================================================================== */

html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) {
	position: relative;
	display: block;
	width: calc(100% - 32px);
	max-width: none;
	height: auto;
	min-height: 0;
	margin: 16px auto 0;
	overflow: hidden;
	border-radius: var(--qahal-radius, 16px);
	background: var(--qahal-surface);
	isolation: isolate;
}

html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__img {
	position: relative;
	inset: auto;
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	object-fit: contain;
	margin: 0;
	border-radius: 0;
}

html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__shade {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(26, 26, 26, 0) 45%, rgba(26, 26, 26, 0.55) 72%, rgba(26, 26, 26, 0.94) 100%);
}

html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	max-width: none;
	margin: 0;
	padding: 24px 32px 28px;
	color: #ffffff;
}

html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-h1 {
	color: #ffffff;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-lead,
html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-back {
	color: rgba(255, 255, 255, 0.82);
}

/* Phones and small tablets: the image is too small to carry the title, so
   the title sits in the dark band under the image (still inside the card). */
@media (max-width: 720px) {
	html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) {
		width: calc(100% - 32px);
		max-width: none;
		margin-top: 16px;
		background: #1a1a1a;
	}

	html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__img {
		max-height: none;
		-webkit-mask-image: linear-gradient(180deg, #000 55%, rgba(0, 0, 0, 0) 100%);
		mask-image: linear-gradient(180deg, #000 55%, rgba(0, 0, 0, 0) 100%);
	}

	html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__shade {
		display: none;
	}

	html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__text {
		position: relative;
		padding: 16px 20px 22px;
	}

	html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-h1 {
		font-size: clamp(26px, 7vw, 34px);
	}
}

/* ==========================================================================
   Sub-events (programme)
   ========================================================================== */

.qahal-subs {
	margin-top: 56px;
	margin-bottom: 24px;
}

.qahal-subs__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 20px;
}

html .qahal .qahal-subs__count {
	margin: 0;
	color: var(--qahal-muted);
	font-size: 14px;
}

html .qahal .qahal-subs__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

html .qahal .qahal-sub {
	--qahal-sub-bg: var(--qahal-surface);
	--qahal-sub-ink: var(--qahal-text);
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 300px;
	margin: 0;
	padding: 0;
	border-radius: var(--qahal-radius);
	overflow: hidden;
	background-color: var(--qahal-sub-bg);
	color: var(--qahal-sub-ink);
}

html .qahal .qahal-sub.has-color {
	background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.28) 100%);
}

html .qahal .qahal-sub::marker {
	content: none;
}

html .qahal .qahal-sub__img {
	display: block;
	width: 100%;
	height: auto;
}

.qahal-sub__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px 20px 22px;
	text-align: center;
}

.qahal-sub__badge {
	align-self: center;
	margin-bottom: 14px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.qahal-sub.is-upcoming .qahal-sub__badge {
	background: #ffffff;
	color: #0a0a0a;
}

.qahal-sub.is-now .qahal-sub__badge {
	background: #22c55e;
	color: #04130a;
}

html .qahal .qahal-sub__title {
	margin: 0;
	color: inherit;
	font-size: clamp(20px, 1.9vw, 24px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

html .qahal .qahal-sub__subtitle {
	margin: 6px 0 0;
	color: inherit;
	font-size: 15px;
	opacity: 0.85;
	text-transform: uppercase;
}

.qahal-sub__foot {
	margin-top: auto;
	padding-top: 24px;
}

html .qahal .qahal-sub__when {
	margin: 0 0 10px;
	color: inherit;
	font-size: 15px;
	text-transform: uppercase;
}

html .qahal .qahal-sub__date {
	display: inline-block;
	margin: 0;
	padding: 8px 14px;
	border: 2px solid currentColor;
	color: inherit;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-transform: uppercase;
}

html .qahal .qahal-sub__loc {
	margin: 10px 0 0;
	color: inherit;
	font-size: 14px;
	opacity: 0.85;
}

.qahal-sub__desc {
	margin-top: 16px;
	font-size: 14px;
	opacity: 0.9;
	text-align: left;
}

html .qahal .qahal-sub__desc p {
	margin: 0 0 8px;
	color: inherit;
}

.qahal-sub.is-past {
	opacity: 0.55;
	filter: saturate(0.4);
}

@media (max-width: 640px) {
	.qahal-subs {
		margin-top: 40px;
	}

	html .qahal .qahal-subs__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	html .qahal .qahal-sub {
		min-height: 240px;
	}

	.qahal-sub__body {
		padding: 18px 12px 16px;
	}

	html .qahal .qahal-sub__title {
		font-size: 17px;
	}

	html .qahal .qahal-sub__subtitle,
	html .qahal .qahal-sub__when {
		font-size: 13px;
	}

	html .qahal .qahal-sub__date {
		padding: 6px 8px;
		font-size: 14px;
	}
}

@media (max-width: 380px) {
	html .qahal .qahal-subs__grid {
		grid-template-columns: 1fr;
	}
}

/* Single event: space between the hero card and the details below it
   (the mobile container padding was removing the gap). */
html .qahal.qahal-single .qahal-layout {
	padding-top: 32px;
}

@media (max-width: 760px) {
	html .qahal.qahal-single .qahal-layout {
		padding-top: 20px;
	}
}

/* Single event hero: smaller, centred, full flyer kept visible (no cropping).
   The hero box shrinks to the image width so the title and details sit on the image. */
html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) {
	width: fit-content;
	max-width: calc(100% - 32px);
	margin-left: auto;
	margin-right: auto;
}
html .qahal.qahal-single .qahal-hero:not(.qahal-hero--plain) .qahal-hero__img {
	width: auto;
	max-width: 100%;
	max-height: min(65vh, 620px);
	margin: 0;
}
