/**
 * Mauritius Finance — Gallery.
 *
 * Covers the album index (the Gallery page template) and the single album
 * view. Album content is authored with ordinary blocks, so the grid rules
 * below target whatever the core Gallery block or Kadence gallery outputs
 * rather than any markup of ours.
 */

.mf-gal {
	--g-navy:  #001030;
	--g-navy2: #0a1c44;
	--g-gold:  #f0b000;
	--g-ink:   #1d2534;
	--g-muted: #5a6478;
	--g-line:  #e6eaf1;
	--g-light: #f4f7fb;
	background: linear-gradient(180deg, #ffffff 0%, #f7fafd 100%);
}
.mf-gal * { box-sizing: border-box; }
.mfg-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */

.mfg-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(115deg, #001030 0%, #0a1c44 55%, #12305f 100%);
	color: #fff;
}
.mfg-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: .3;
	filter: saturate(.85);
}
.mfg-hero.has-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0,16,48,.95) 0%, rgba(0,16,48,.78) 48%, rgba(0,16,48,.5) 100%);
}
.mfg-hero-in {
	position: relative;
	z-index: 1;
	max-width: 1180px;
	margin: 0 auto;
	padding: 62px 24px 58px;
}
.mfg-eyebrow,
.mfg-back {
	display: inline-block;
	margin-bottom: 14px;
	color: var(--g-gold);
	font-size: .74rem;
	font-weight: 800;
	letter-spacing: .22em;
	text-transform: uppercase;
	text-decoration: none;
}
.mfg-back:hover { color: #fff; }
.mfg-hero h1 {
	margin: 0;
	color: #fff;
	font-size: clamp(1.9rem, 4vw, 2.9rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.02em;
	max-width: 20ch;
	text-wrap: balance;
}
.mfg-rule {
	display: block;
	width: 96px;
	height: 3px;
	margin: 20px 0 16px;
	border-radius: 3px;
	background: var(--g-gold);
}
.mfg-meta {
	margin: 0;
	color: #b9cbe4;
	font-size: .84rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.mfg-dot { margin: 0 8px; }
.mfg-lede {
	margin: 16px 0 0;
	max-width: 62ch;
	color: #dbe5f2;
	font-size: 1.02rem;
	line-height: 1.75;
}
.mfg-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 26px;
	margin: 26px 0 0;
	color: #93a8c6;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.mfg-stats strong {
	display: block;
	color: #fff;
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}

/* ---------- Body ---------- */

.mfg-body { padding: 62px 0 84px; }
.mfg-empty { color: var(--g-muted); font-size: 1rem; }

/* ---------- Album index ---------- */

.mfg-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
}
@media (max-width: 980px) { .mfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 600px) { .mfg-grid { grid-template-columns: 1fr; } }

.mfg-card > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--g-line);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 4px 16px rgba(0, 16, 48, .06);
	transition: transform .22s ease, box-shadow .22s ease;
}
.mfg-card > a:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 38px rgba(0, 16, 48, .13);
}
.mfg-card-img {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--g-light);
	overflow: hidden;
}
.mfg-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}
.mfg-card > a:hover .mfg-card-img img { transform: scale(1.045); }
.mfg-badge {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(0, 16, 48, .82);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	backdrop-filter: blur(3px);
}
.mfg-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 20px 22px;
	border-top: 3px solid var(--g-gold);
}
.mfg-card-date {
	color: #c08000;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.mfg-card-title {
	margin-top: 9px;
	color: var(--g-navy);
	font-size: 1.06rem;
	font-weight: 800;
	line-height: 1.32;
	letter-spacing: -.01em;
}
.mfg-card-desc {
	flex: 1;
	margin-top: 10px;
	color: #3b465a;
	font-size: .92rem;
	line-height: 1.65;
}
.mfg-card-go {
	margin-top: 16px;
	color: var(--g-navy2);
	font-size: .74rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.mfg-card > a:hover .mfg-card-go { color: var(--g-gold); }

/* ---------- Album photographs ---------- */
/* Whatever gallery block MF use, normalise it to one grid. */

.mf-gal-single .wp-block-gallery,
.mf-gal-single .kb-gallery-ul,
.mf-gal-single .kt-blocks-gallery-ul {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (max-width: 980px) {
	.mf-gal-single .wp-block-gallery,
	.mf-gal-single .kb-gallery-ul,
	.mf-gal-single .kt-blocks-gallery-ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
.mf-gal-single .wp-block-gallery .wp-block-image,
.mf-gal-single .kb-gallery-ul li,
.mf-gal-single .kt-blocks-gallery-ul li {
	margin: 0 !important;
	width: auto !important;
	max-width: none !important;
}
.mf-gal-single .wp-block-gallery figure { margin: 0; height: 100%; }
.mf-gal-single .mfg-wrap img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 12px;
	background: var(--g-light);
	box-shadow: 0 4px 14px rgba(0, 16, 48, .08);
	cursor: zoom-in;
	transition: transform .25s ease, box-shadow .25s ease;
}
.mf-gal-single .mfg-wrap img:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 32px rgba(0, 16, 48, .16);
}
.mf-gal-single .mfg-wrap figcaption {
	margin-top: 8px;
	color: var(--g-muted);
	font-size: .82rem;
	line-height: 1.5;
}
.mf-gal-single .mfg-wrap > p {
	max-width: 72ch;
	margin: 0 0 1.35em;
	color: var(--g-ink);
	font-size: 1.02rem;
	line-height: 1.8;
}

/* ---------- Prev / next ---------- */

.mfg-nav { padding: 0 0 84px; }
.mfg-nav-in {
	display: flex;
	gap: 20px;
	justify-content: space-between;
	padding-top: 26px;
	border-top: 3px solid var(--g-gold);
}
.mfg-nav a { text-decoration: none; max-width: 46%; }
.mfg-nav-r { text-align: right; }
.mfg-nav-lab {
	display: block;
	color: var(--g-muted);
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.mfg-nav-t {
	display: block;
	margin-top: 5px;
	color: var(--g-navy);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
}
.mfg-nav a:hover .mfg-nav-t { color: var(--g-gold); }

/* ---------- Lightbox ---------- */

.mfg-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
    align-items: center;
	justify-content: center;
	background: rgba(0, 8, 24, .94);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.mfg-lb.is-open { opacity: 1; pointer-events: auto; }
.mfg-lb img {
	max-width: 92vw;
	max-height: 82vh;
	border-radius: 8px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.mfg-lb-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.mfg-lb-btn:hover { background: rgba(255, 255, 255, .18); }
.mfg-lb-prev { left: 3vw; }
.mfg-lb-next { right: 3vw; }
.mfg-lb-close { top: 22px; right: 3vw; transform: none; }
.mfg-lb-count {
	position: absolute;
	bottom: 26px;
	left: 0;
	right: 0;
    text-align: center;
	color: #b9cbe4;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
	.mfg-lb-btn { width: 44px; height: 44px; }
	.mfg-lb-prev { left: 10px; }
	.mfg-lb-next { right: 10px; }
	.mfg-lb-close { right: 10px; top: 14px; }
}

@media (max-width: 900px) {
	.mfg-hero-in { padding: 46px 24px 44px; }
	.mfg-body { padding: 44px 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
	.mfg-card > a,
	.mfg-card-img img,
	.mf-gal-single .mfg-wrap img,
	.mfg-lb { transition: none; }
	.mfg-card > a:hover,
	.mf-gal-single .mfg-wrap img:hover { transform: none; }
	.mfg-card > a:hover .mfg-card-img img { transform: none; }
}
