/* Masjid Al-Noor Home Page: the "What's on" section.
   Colours and heading font follow the mosque website and its other plugins.
   Rules start with .mnh so that theme and page-builder styles do not override them.
   The layout wraps by itself, so it works in a wide or a narrow Elementor container. */

.mnh {
	--mnh-heading-teal: #0389a5;
	--mnh-deep: #067089;
	--mnh-ink: #0b3b47;
	--mnh-text: #24434c;
	--mnh-mute: #4f6b73;
	--mnh-gold: #eaae21;
	--mnh-edge: rgba(185, 148, 0, .36);
	--mnh-line: #e2ecee;
	--mnh-mist: #eaf5f8;
	--mnh-live: #bd2415;
	--mnh-heading: 'Philosopher';
	--mnh-ease: cubic-bezier(.2, .8, .2, 1);

	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: clamp(28px, 4.5vw, 56px) clamp(12px, 3.5vw, 36px);
	color: var(--mnh-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
}
.mnh *, .mnh *::before, .mnh *::after { box-sizing: border-box; }
.mnh [hidden] { display: none !important; }
.elementor-widget:has(.mnh) { width: 100%; max-width: 100%; min-width: 0; flex-grow: 1; --container-widget-width: 100%; --container-widget-flex-grow: 1; }

.mnh .mnh-inner { width: 100%; max-width: 1160px; margin: 0 auto; }

/* Start from nothing, whatever the theme sets. */
.mnh h2, .mnh h3, .mnh h4, .mnh p, .mnh ul, .mnh li, .mnh dl, .mnh dt, .mnh dd { margin: 0; padding: 0; }
.mnh ul, .mnh li { list-style: none; }
.mnh h2, .mnh h3, .mnh h4 { color: var(--mnh-ink); font-family: var(--mnh-heading), Philosopher, serif; font-weight: 700; letter-spacing: 0; line-height: 1.22; text-transform: none; text-wrap: balance; overflow-wrap: break-word; }
.mnh img { display: block; max-width: 100%; margin: 0; }
.mnh a { text-decoration: none; }
.mnh .mnh-ico { flex: none; vertical-align: middle; }
.mnh .mnh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mnh a:focus-visible { outline: 3px solid #a86f00; outline-offset: 3px; }

/* ---------- Heading and notice ---------- */

.mnh .mnh-head { margin: 0 auto clamp(22px, 3vw, 32px); text-align: center; }
.mnh h2.mnh-head__title { color: var(--mnh-heading-teal); font-size: clamp(30px, 3.6vw, 42px); }
.mnh .mnh-head__intro { max-width: 56ch; margin: 8px auto 0; color: var(--mnh-text); font-size: 17px; text-wrap: balance; }

.mnh .mnh-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 22px; padding: 16px 20px; border: 1px solid #e6c862; border-left-width: 6px; border-radius: 12px; background: #fff6da; color: #3f2d00; }
.mnh .mnh-notice p { flex: 1 1 260px; font-weight: 500; overflow-wrap: break-word; }

.mnh .mnh-adminnote { margin: 0 0 16px; padding: 12px 16px; border: 2px dashed #b57d00; border-radius: 10px; background: #fffaf0; color: #4a3500; font-size: 14px; }

/* ---------- Buttons and links ---------- */

.mnh a.mnh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin: 0; padding: 10px 20px; border: 2px solid transparent; border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .25s var(--mnh-ease), transform .18s var(--mnh-ease); }
.mnh a.mnh-btn:hover { text-decoration: none; transform: translateY(-1px); }
.mnh a.mnh-btn:active { transform: translateY(0) scale(.98); }
.mnh a.mnh-btn--primary, .mnh a.mnh-btn--primary:visited, .mnh a.mnh-btn--primary:focus { border-color: var(--mnh-deep); background: var(--mnh-deep); color: #fff; }
.mnh a.mnh-btn--primary:hover { border-color: var(--mnh-ink); background: var(--mnh-ink); color: #fff; box-shadow: 0 12px 20px -12px rgba(11, 59, 71, .8); }
.mnh a.mnh-btn--quiet, .mnh a.mnh-btn--quiet:visited, .mnh a.mnh-btn--quiet:focus { border-color: #cfe1e6; background: #fff; color: var(--mnh-ink); }
.mnh a.mnh-btn--quiet:hover { border-color: var(--mnh-deep); background: var(--mnh-mist); color: var(--mnh-ink); }
.mnh a.mnh-btn--gold, .mnh a.mnh-btn--gold:visited, .mnh a.mnh-btn--gold:focus { border-color: var(--mnh-gold); background: var(--mnh-gold); color: #221700; }
.mnh a.mnh-btn--gold:hover { border-color: #ffd266; background: #ffd266; color: #221700; box-shadow: 0 14px 22px -14px rgba(0, 0, 0, .7); }
.mnh a.mnh-btn--ghost, .mnh a.mnh-btn--ghost:visited, .mnh a.mnh-btn--ghost:focus { border-color: rgba(255, 255, 255, .55); background: transparent; color: #fff; }
.mnh a.mnh-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; }

.mnh .mnh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- The two panels: next event and weekly lessons ---------- */

.mnh .mnh-now { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.mnh .mnh-now--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.mnh .mnh-now:not(.mnh-now--two) { width: 100%; max-width: 760px; margin: 0 auto; }
.mnh .mnh-panel { display: flex; flex-direction: column; min-width: 0; padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--mnh-edge); border-radius: 18px; background: #fff; box-shadow: 0 24px 38px -34px rgba(11, 59, 71, .6); }
.mnh h3.mnh-panel__title { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--mnh-line); font-size: 25px; }
.mnh .mnh-panel__foot { margin-top: auto; padding-top: 20px; }
.mnh .mnh-panel__foot a.mnh-btn { width: 100%; }

.mnh .mnh-empty { display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; border-radius: 12px; background: var(--mnh-mist); text-align: center; }
.mnh .mnh-empty__title { margin-bottom: 6px; color: var(--mnh-ink); font-family: var(--mnh-heading), Philosopher, serif; font-size: 21px; font-weight: 700; line-height: 1.3; }

/* Small labels: Today, Tonight, Cancelled and so on */
.mnh .mnh-flag { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 99px; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.mnh .mnh-flag--soon { background: #fff0c2; color: #4d3600; }
.mnh .mnh-flag--stop { background: #fde5e2; color: #8a170b; }
.mnh .mnh-flag--wait { background: #ffeacc; color: #6f3d00; }
.mnh .is-live .mnh-flag--soon { background: var(--mnh-live); color: #fff; }
.mnh .is-live .mnh-flag--soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: mnh-pulse 1.8s ease-out infinite; }
@keyframes mnh-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); } 75%, 100% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } }

/* Arch-shaped date marker */
.mnh .mnh-arch { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: flex-end; width: 54px; height: 68px; padding-bottom: 7px; border-radius: 27px 27px 7px 7px; background: var(--mnh-mist); color: var(--mnh-ink); line-height: 1.1; -webkit-clip-path: path('M0 62V30C0 17 9 13 18 9.500C23 7.500 26 4.500 27 0C28 4.500 31 7.500 36 9.500C45 13 54 17 54 30V62Q54 68 48 68H6Q0 68 0 62Z'); clip-path: path('M0 62V30C0 17 9 13 18 9.500C23 7.500 26 4.500 27 0C28 4.500 31 7.500 36 9.500C45 13 54 17 54 30V62Q54 68 48 68H6Q0 68 0 62Z'); transition: background-color .2s ease, color .2s ease; }
.mnh .mnh-arch__top { font-size: 12px; font-weight: 600; }
.mnh .mnh-arch__num { font-family: var(--mnh-heading), Philosopher, serif; font-size: 25px; font-weight: 700; font-variant-numeric: lining-nums; }

.mnh .mnh-arch--tbc .mnh-arch__num { font-size: 17px; line-height: 1.5; }

/* ---------- Next event ---------- */

.mnh .mnh-event { min-width: 0; }
.mnh .mnh-event__title { overflow-wrap: anywhere; }
.mnh .mnh-event__title a, .mnh .mnh-event__title a:visited { color: var(--mnh-ink); transition: color .18s ease; }
.mnh .mnh-event__title a:hover { color: var(--mnh-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.mnh .mnh-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.mnh .mnh-flags:not(:has(.mnh-flag:not([hidden]))) { display: none; }

/* The leading event */
.mnh .mnh-lead .mnh-event { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px; }
.mnh .mnh-lead a.mnh-poster { position: relative; display: block; flex: 1 1 215px; max-width: 250px; margin: 0 auto; overflow: hidden; aspect-ratio: var(--mnh-ar, .8); border-radius: 12px; background: var(--mnh-mist); box-shadow: 0 0 0 1px rgba(11, 59, 71, .12), 0 22px 28px -22px rgba(11, 59, 71, .7); transition: transform .35s var(--mnh-ease), box-shadow .35s var(--mnh-ease); }
.mnh .mnh-lead a.mnh-poster:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(11, 59, 71, .2), 0 30px 34px -24px rgba(11, 59, 71, .75); }
.mnh .mnh-lead a.mnh-poster img.mnh-poster__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 0; object-fit: contain; }
.mnh .mnh-lead .mnh-event--wide a.mnh-poster { flex-basis: 100%; max-width: 100%; }
.mnh .mnh-lead .mnh-arch { display: none; }
.mnh .mnh-lead .mnh-event--noposter .mnh-arch { display: flex; }
.mnh .mnh-lead .mnh-event__body { flex: 999 1 210px; min-width: 0; }
.mnh .mnh-lead .mnh-flags { margin-bottom: 8px; }
.mnh .mnh-lead h4.mnh-event__title { font-size: clamp(23px, 2.4vw, 28px); }
.mnh .mnh-lead .mnh-event__when { display: flex; flex-direction: column; margin-top: 8px; color: var(--mnh-ink); font-size: 17px; font-weight: 600; line-height: 1.5; }
.mnh .mnh-lead .mnh-event__when span + span:not(.mnh-sr) { color: var(--mnh-deep); }
.mnh .mnh-event__fact { margin-top: 6px; color: var(--mnh-mute); font-size: 15px; }
.mnh .mnh-event__summary { display: -webkit-box; margin-top: 10px; overflow: hidden; font-size: 15px; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.mnh .mnh-event__note { margin-top: 10px; color: var(--mnh-mute); font-size: 14.5px; }
.mnh .mnh-event--cancelled .mnh-event__note, .mnh .mnh-event--postponed .mnh-event__note { padding: 10px 14px; border-radius: 10px; background: #fff1ea; color: #702006; font-weight: 600; }
.mnh .mnh-lead .mnh-event--cancelled a.mnh-poster img { filter: grayscale(1) brightness(.8); }
.mnh .mnh-lead .mnh-actions a.mnh-btn { flex: 1 1 130px; }

/* The events after it */
.mnh .mnh-also { margin-top: 30px; }
.mnh h4.mnh-also__title { padding-bottom: 4px; font-size: 18px; }
.mnh .mnh-also .mnh-event { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 -10px; padding: 11px 10px; border-top: 1px solid var(--mnh-line); border-radius: 0; transition: background-color .18s ease; }
.mnh .mnh-also .mnh-event:hover { background: #f4fafb; }
.mnh .mnh-also a.mnh-poster, .mnh .mnh-also .mnh-event__more { display: none; }
.mnh .mnh-also .mnh-event__body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.mnh .mnh-also .mnh-flags { order: 3; margin-top: 5px; }
.mnh .mnh-also h4.mnh-event__title { font-size: 18px; }
/* The whole row opens the event. */
.mnh .mnh-also .mnh-event__title a::after { content: ""; position: absolute; inset: 0; }
.mnh .mnh-also .mnh-event__title a:focus-visible { outline: 0; }
.mnh .mnh-also .mnh-event__title a:focus-visible::after { outline: 3px solid #a86f00; outline-offset: -3px; }
.mnh .mnh-also .mnh-event__when { display: flex; flex-wrap: wrap; column-gap: 12px; color: var(--mnh-mute); font-size: 14px; }

/* ---------- Weekly lessons ---------- */

.mnh .mnh-lessons__notice { margin-bottom: 12px; padding: 12px 16px; border-radius: 10px; background: #fff6da; color: #3f2d00; font-size: 15px; font-weight: 500; }
.mnh .mnh-class { display: flex; align-items: center; gap: 14px; margin: 0 -10px; padding: 11px 10px; border-top: 1px solid var(--mnh-line); transition: background-color .18s ease; }
.mnh .mnh-class:first-child { border-top: 0; }
.mnh .mnh-class:hover { background: #f4fafb; }
.mnh .mnh-class.is-today { background: #fffaec; }
.mnh .mnh-class.is-today .mnh-arch { background: var(--mnh-ink); color: #fff; }
.mnh .mnh-class.is-today .mnh-arch__top { color: #ffd266; }
.mnh .mnh-class.is-off .mnh-arch { background: #eef0f1; color: #5b676b; }
.mnh .mnh-class__text { flex: 1 1 auto; min-width: 0; }
.mnh .mnh-class__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--mnh-ink); font-size: 16.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.mnh .mnh-class__meta { display: flex; flex-wrap: wrap; column-gap: 14px; margin-top: 2px; color: var(--mnh-mute); font-size: 14px; line-height: 1.5; }
.mnh .mnh-class__when { color: var(--mnh-deep); font-weight: 600; }
.mnh .mnh-class__off { margin-top: 4px; color: #702006; font-size: 14px; font-weight: 600; }
.mnh .mnh-class__listen { margin-top: 6px; }
.mnh .mnh-class__listen a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; color: var(--mnh-live); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.mnh .mnh-class__listen a:hover { color: #81150b; }

/* ---------- Madrasah ---------- */

.mnh .mnh-madrasah {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
	gap: 28px 44px;
	margin-top: 22px;
	padding: clamp(22px, 3.6vw, 40px);
	border-radius: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23eaae21' stroke-opacity='.13'%3E%3Crect x='20' y='20' width='56' height='56'/%3E%3Crect x='20' y='20' width='56' height='56' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='9'/%3E%3C/g%3E%3C/svg%3E") center top / 96px repeat, var(--mnh-ink);
	color: #fff;
}
.mnh .mnh-madrasah--single { grid-template-columns: minmax(0, 1fr); }
.mnh .mnh-madrasah p, .mnh .mnh-madrasah dt, .mnh .mnh-madrasah dd { color: #fff; }
.mnh .mnh-madrasah a:focus-visible { outline-color: #fff; }
.mnh .mnh-madrasah__intro { min-width: 0; }
.mnh h3.mnh-madrasah__title { margin-bottom: 12px; color: #fff; font-size: clamp(28px, 3vw, 34px); }
.mnh .mnh-madrasah__text { max-width: 60ch; font-size: 16.5px; line-height: 1.7; }
.mnh .mnh-madrasah__fees { max-width: 60ch; margin-top: 12px; font-weight: 600; }
.mnh .mnh-madrasah__times { min-width: 0; }
.mnh .mnh-madrasah__timesintro { margin-bottom: 12px; font-weight: 600; }
.mnh .mnh-shifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.mnh .mnh-shift { padding: 14px 18px 16px; border: 1px solid rgba(255, 255, 255, .17); border-top: 3px solid var(--mnh-gold); border-radius: 4px 4px 12px 12px; background: #124957; }
.mnh .mnh-madrasah .mnh-shift dt { margin-bottom: 6px; color: #ffd266; font-family: var(--mnh-heading), Philosopher, serif; font-size: 21px; font-weight: 700; line-height: 1.3; }
.mnh .mnh-shift dd { font-size: 14.5px; line-height: 1.55; }
.mnh .mnh-shift dd + dd { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); }
.mnh .mnh-madrasah__note { margin-top: 14px; font-size: 14.5px; opacity: .9; }

.mnh .mnh-workshop { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px 22px; border-radius: 12px; background: #fff6da; }
.mnh .mnh-madrasah .mnh-workshop p { display: flex; flex: 1 1 260px; flex-direction: column; color: #3f2d00; }
.mnh .mnh-workshop__lead { font-size: 14px; font-weight: 600; }
.mnh .mnh-workshop strong { color: var(--mnh-ink); font-family: var(--mnh-heading), Philosopher, serif; font-size: 22px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.mnh .mnh-madrasah .mnh-workshop a:focus-visible { outline-color: #a86f00; }

/* ---------- Helpful links ---------- */

.mnh ul.mnh-help { display: flex; flex-wrap: wrap; margin-top: 22px; overflow: hidden; border: 1px solid var(--mnh-edge); border-radius: 18px; background: #fff; }
.mnh li.mnh-help__item { display: flex; flex: 1 1 270px; flex-direction: column; min-width: 0; padding: 22px 24px 20px; box-shadow: -1px 0 0 var(--mnh-line), 0 -1px 0 var(--mnh-line); }
.mnh h3.mnh-help__title { margin-bottom: 6px; font-size: 21px; }
.mnh .mnh-help__item p { color: var(--mnh-mute); font-size: 15px; }
.mnh .mnh-help__item p.mnh-help__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: auto; padding-top: 14px; }
.mnh a.mnh-textlink, .mnh a.mnh-textlink:visited { display: inline-flex; align-items: center; min-height: 44px; color: var(--mnh-deep); font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--mnh-gold); text-decoration-thickness: 2px; text-underline-offset: 5px; transition: color .18s ease, text-decoration-color .18s ease; }
.mnh a.mnh-textlink:hover { color: var(--mnh-ink); text-decoration-color: var(--mnh-ink); }

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
	.mnh { padding-top: 24px; padding-bottom: 28px; }
	.mnh .mnh-now { gap: 16px; }
	.mnh .mnh-madrasah, .mnh ul.mnh-help { margin-top: 16px; }
	.mnh li.mnh-help__item { padding: 18px 20px 12px; }
	.mnh .mnh-also { margin-top: 22px; }
	.mnh .mnh-actions a.mnh-btn { flex: 1 1 100%; }
	.mnh .mnh-notice a.mnh-btn { width: 100%; }
	.mnh .mnh-workshop a.mnh-btn { width: 100%; }
	.mnh .mnh-lead a.mnh-poster { max-width: 230px; }
	.mnh .mnh-lead .mnh-event--wide a.mnh-poster { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.mnh *, .mnh *::before { animation: none !important; transition: none !important; }
	.mnh a.mnh-btn:hover, .mnh .mnh-lead a.mnh-poster:hover { transform: none; }
}
