/* MHMS theme — supplementary styles (colours and type live in theme.json). */

/* ---------- Header ---------- */
.mhms-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}
.admin-bar .mhms-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mhms-header { top: 46px; } }

.mhms-header .wp-block-site-title a { text-decoration: none; color: inherit; }
.mhms-header .wp-block-navigation a { text-decoration: none; }
.mhms-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--gold-soft); }
.mhms-header .wp-block-navigation__submenu-container {
	color: var(--wp--preset--color--ink) !important;
	background: var(--wp--preset--color--white) !important;
	border: 1px solid var(--wp--preset--color--sand) !important;
	border-radius: 10px;
	padding: 0.4rem 0;
	box-shadow: 0 10px 30px rgba(10, 51, 40, 0.12);
}
.mhms-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--green);
}
.mhms-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--green-deep) !important;
	color: var(--wp--preset--color--white) !important;
}

.mhms-brand-mark {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
}

/* ---------- Pattern backgrounds ---------- */
.mhms-pattern-bg {
	background-image: url(../images/pattern.svg);
	background-size: 80px 80px;
	background-repeat: repeat;
}

/* ---------- Hero ---------- */
.mhms-hero {
	position: relative;
	overflow: hidden;
}
.mhms-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 6px;
	background: linear-gradient(90deg, var(--wp--preset--color--gold), var(--wp--preset--color--gold-soft), var(--wp--preset--color--gold));
}
.mhms-hero h1 { color: var(--wp--preset--color--white); }

/* ---------- Eyebrow label ---------- */
.mhms-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 600;
	font-size: 0.8rem !important;
	color: var(--wp--preset--color--gold);
	margin-bottom: 0.25rem;
}

/* ---------- Cards ---------- */
.mhms-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(10, 51, 40, 0.04), 0 8px 24px rgba(10, 51, 40, 0.05);
	height: 100%;
}
.mhms-card h3 { margin-top: 0; }
.mhms-card .mhms-icon {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--wp--preset--color--green-soft);
	color: var(--wp--preset--color--green);
	font-size: 1.3rem;
	line-height: 1;
	margin: 0 0 0.75rem;
}

/* ---------- Prayer times ---------- */
.mhms-prayer-times {
	background: var(--wp--preset--color--white);
	border-radius: 18px;
	border: 1px solid var(--wp--preset--color--sand);
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: 0 12px 40px rgba(10, 51, 40, 0.1);
}
.mhms-prayer-times__title {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--green-deep);
	font-size: 1.5rem;
	margin: 0;
}
.mhms-prayer-times__date {
	color: var(--wp--preset--color--muted);
	font-size: 0.95rem;
	margin: 0.25rem 0 1rem;
}
.mhms-prayer-times__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.6rem;
}
.mhms-prayer-times__list li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	padding: 0.85rem 0.4rem;
	border-radius: 12px;
	background: var(--wp--preset--color--cream);
	text-align: center;
}
.mhms-prayer-times__name {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.mhms-prayer-times__time {
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--wp--preset--color--green-deep);
	font-variant-numeric: tabular-nums;
}
.mhms-prayer-times__list li.is-sunrise { opacity: 0.7; }
.mhms-prayer-times__list li.is-next {
	background: var(--wp--preset--color--green);
}
.mhms-prayer-times__list li.is-next .mhms-prayer-times__name { color: var(--wp--preset--color--gold-soft); }
.mhms-prayer-times__list li.is-next .mhms-prayer-times__time { color: var(--wp--preset--color--white); }
.mhms-prayer-times__note {
	margin: 1rem 0 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
}
.mhms-prayer-times__fallback { display: none; }
.mhms-prayer-times.is-error .mhms-prayer-times__fallback { display: block; }
.mhms-prayer-times.is-error .mhms-prayer-times__list { display: none; }
@media (max-width: 700px) {
	.mhms-prayer-times__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- People (board / staff) ---------- */
.mhms-person {
	text-align: center;
}
.mhms-person .wp-block-image img {
	width: 100%;
	aspect-ratio: 5 / 6;
	object-fit: cover;
	border-radius: 14px;
	background: var(--wp--preset--color--green-soft);
}
.mhms-person h3 {
	margin: 0.75rem 0 0.1rem;
	font-size: 1.15rem;
}
.mhms-person p {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: 0.95rem;
}

/* ---------- Schedule table ---------- */
.mhms-schedule table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: 14px;
	overflow: hidden;
}
.mhms-schedule th,
.mhms-schedule td {
	border: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--sand) !important;
	padding: 0.85rem 1rem;
	text-align: left;
	vertical-align: top;
}
.mhms-schedule thead th {
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--white);
	font-weight: 600;
}
.mhms-schedule tbody tr:last-child td { border-bottom: 0 !important; }
.mhms-schedule tbody tr:nth-child(even) td { background: var(--wp--preset--color--cream); }

/* ---------- Footer ---------- */
.mhms-footer a { color: var(--wp--preset--color--gold-soft); text-decoration: none; }
.mhms-footer a:hover { color: var(--wp--preset--color--white); text-decoration: underline; }
.mhms-footer h2,
.mhms-footer h3 { color: var(--wp--preset--color--white); }
.mhms-footer .wp-block-navigation a { color: var(--wp--preset--color--gold-soft); }

/* ---------- Misc ---------- */
.mhms-map iframe {
	width: 100%;
	min-height: 360px;
	border: 0;
	border-radius: 16px;
	display: block;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	border-width: 2px;
}
.mhms-on-dark .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--white);
	border-color: rgba(255, 255, 255, 0.7);
	background: transparent;
}
.mhms-on-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* Full-width sections sit flush against each other */
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }

/* ---------- v1.2: logo, donate button, photo hero, news ---------- */
.mhms-header-logo { margin: 0; }
.mhms-header-logo img { width: 38px; height: auto; display: block; }

.mhms-header .mhms-nav-donate > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--green-deep) !important;
	padding: 0.45rem 1.1rem;
	border-radius: 999px;
	font-weight: 700;
}
.mhms-header .mhms-nav-donate > .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--gold-soft);
	color: var(--wp--preset--color--green-deep) !important;
}
.mhms-header .wp-block-navigation__responsive-container.is-menu-open .mhms-nav-donate > .wp-block-navigation-item__content {
	margin-top: 0.5rem;
}

.mhms-hero-photo { margin: 0; }
.mhms-hero-photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 35%;
	border-radius: 20px;
	border: 4px solid rgba(201, 162, 39, 0.55);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	display: block;
}
@media (max-width: 781px) {
	.mhms-hero-photo img { aspect-ratio: 1 / 1; object-position: center 55%; }
}

.mhms-news-card .wp-block-post-featured-image { margin: -1.5rem -1.5rem 1rem; }
.mhms-news-card .wp-block-post-featured-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 16px 16px 0 0;
}
.mhms-news-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--green-deep); }
.mhms-news-card .wp-block-post-title a:hover { text-decoration: underline; }

.mhms-qr img {
	width: 100%;
	max-width: 280px;
	display: block;
	margin: 0 auto;
	border-radius: 12px;
	background: #fff;
	padding: 10px;
	border: 1px solid var(--wp--preset--color--sand);
}
.mhms-detail strong { color: var(--wp--preset--color--green-deep); }
.mhms-copy { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* ---------- v1.3: transparent mosque silhouette behind the home banner ---------- */
.mhms-hero--mosque {
	isolation: isolate;
}
.mhms-hero--mosque::before {
	content: "";
	position: absolute;
	z-index: -1;
	right: max(0px, calc((100% - 1240px) / 2));
	bottom: 6px;
	width: min(58%, 720px);
	height: 96%;
	background: url(../images/mosque-top.webp) no-repeat right bottom / contain;
	opacity: 0.6;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%);
	mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}
.mhms-hero--mosque::after { z-index: 1; }
.mhms-hero--mosque > * { position: relative; z-index: 1; }
.mhms-hero-text { padding-block: clamp(1rem, 5vw, 3.5rem); }
.mhms-hero-text > * { max-width: 600px; }
.mhms-hero--mosque h1 { text-shadow: 0 2px 18px rgba(10, 51, 40, 0.6); }
@media (max-width: 900px) {
	.mhms-hero--mosque::before {
		width: 100%;
		right: 0;
		height: 70%;
		background-position: center bottom;
		opacity: 0.35;
		-webkit-mask-image: none;
		mask-image: none;
	}
}
