/* ============================================================
   MosqueFinder — design system (modern, on top of Bootstrap 5)
   ============================================================ */

:root {
    --mf-primary:   #0f7a56;
    --mf-primary-d: #0a5c40;
    --mf-primary-l: #15a273;
    --mf-ink:       #0d1f19;
    --mf-body:      #46534c;
    --mf-muted:     #7c8a83;
    --mf-gold:      #d8a53c;
    --mf-bg:        #f2f7f4;
    --mf-surface:   #ffffff;
    --mf-border:    #e5ece8;
    --mf-r:      .75rem;
    --mf-r-lg:   1.25rem;
    --mf-pill:   999px;
    --mf-sh-sm:  0 1px 2px rgba(13,31,25,.05), 0 2px 6px rgba(13,31,25,.06);
    --mf-sh:     0 6px 24px rgba(13,31,25,.08);
    --mf-sh-lg:  0 24px 60px rgba(13,31,25,.20);
    --mf-nav-h:  70px;
}

/* ---------- Base ---------- */
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--mf-body);
    background: var(--mf-surface);
    -webkit-font-smoothing: antialiased;
    padding-top: var(--mf-nav-h);
}
body.mf-home { padding-top: 0; }

h1, h2, h3, h4, h5, .mf-display {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    color: var(--mf-ink);
    font-weight: 800;
    letter-spacing: -.02em;
}
h1, .mf-display { letter-spacing: -.035em; line-height: 1.08; }
p { line-height: 1.65; }
a { color: var(--mf-primary); text-decoration: none; }
a:hover { color: var(--mf-primary-d); }
.text-muted { color: var(--mf-muted) !important; }

/* ---------- Color / button overrides ---------- */
.text-success { color: var(--mf-primary) !important; }
.bg-success, .badge.bg-success { background-color: var(--mf-primary) !important; }
.bg-primary, .badge.bg-primary { background-color: var(--mf-primary-l) !important; }
.link-light { color: #dfeee8 !important; }

.btn { border-radius: var(--mf-pill); font-weight: 600; }
.btn-success {
    background: var(--mf-primary); border-color: var(--mf-primary);
    box-shadow: 0 4px 14px rgba(15,122,86,.28);
}
.btn-success:hover, .btn-success:focus { background: var(--mf-primary-d); border-color: var(--mf-primary-d); }
.btn-outline-success { color: var(--mf-primary); border-color: var(--mf-primary); }
.btn-outline-success:hover { background: var(--mf-primary); border-color: var(--mf-primary); }
.btn-lg { padding: .8rem 1.7rem; font-size: 1rem; }

/* Pagination — emerald pills */
.pagination {
    --bs-pagination-color:            var(--mf-primary-d);
    --bs-pagination-hover-color:      var(--mf-primary-d);
    --bs-pagination-focus-color:      var(--mf-primary-d);
    --bs-pagination-active-color:     #fff;
    --bs-pagination-active-bg:        var(--mf-primary);
    --bs-pagination-active-border-color: var(--mf-primary);
    --bs-pagination-hover-bg:         rgba(15,122,86,.1);
    --bs-pagination-hover-border-color: rgba(15,122,86,.25);
    --bs-pagination-focus-bg:         rgba(15,122,86,.12);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(15,122,86,.2);
    --bs-pagination-border-color:     var(--mf-border, #e6e8ec);
    --bs-pagination-disabled-color:   #adb5bd;
    --bs-pagination-border-radius:    999px;
    gap: .35rem;
}
.pagination .page-link {
    border-radius: 999px;
    min-width: 2.5rem;
    text-align: center;
    font-weight: 600;
    padding: .5rem .85rem;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pagination .page-item.active .page-link {
    box-shadow: 0 4px 12px rgba(15,122,86,.28);
}
.pagination .page-item.disabled .page-link { border-color: transparent; background: transparent; }

.card { border-radius: var(--mf-r-lg); }
.badge { font-weight: 600; }

/* ---------- Navbar ---------- */
.mf-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
    min-height: var(--mf-nav-h);
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(10px);
    box-shadow: var(--mf-sh-sm);
    transition: background .3s ease, box-shadow .3s ease;
}
.mf-nav .navbar-brand { color: var(--mf-ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; }
.mf-nav .navbar-brand .mf-logo { color: var(--mf-primary); }
.mf-nav .nav-link { color: var(--mf-body); font-weight: 500; padding-inline: .85rem; }
.mf-nav .nav-link:hover, .mf-nav .nav-link.active { color: var(--mf-primary); }
/* Language switcher */
.mf-nav .mf-lang {
    color: var(--mf-body); border-color: var(--mf-border);
    border-radius: var(--mf-pill); font-weight: 600; padding: .3rem .85rem;
    display: inline-flex; align-items: center; gap: .35rem;
}
.mf-nav .mf-lang::before { content: "🌐"; font-size: .95em; line-height: 1; }
.mf-nav .mf-lang:hover, .mf-nav .mf-lang.show {
    background: rgba(15,122,86,.08); color: var(--mf-primary-d); border-color: var(--mf-primary-l);
}
.mf-nav .mf-lang.show { background: var(--mf-primary); color: #fff; border-color: var(--mf-primary); }
.mf-lang + .dropdown-menu {
    --bs-dropdown-min-width: 11rem;
    border: 1px solid var(--mf-border); border-radius: var(--mf-r);
    box-shadow: var(--mf-sh); padding: .4rem; margin-top: .4rem;
}
.mf-lang + .dropdown-menu .dropdown-item {
    border-radius: 8px; padding: .5rem .75rem; font-weight: 500;
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.mf-lang + .dropdown-menu .dropdown-item:hover { background: rgba(15,122,86,.08); color: var(--mf-primary-d); }
.mf-lang + .dropdown-menu .dropdown-item.active {
    background: var(--mf-primary); color: #fff;
}
.mf-lang + .dropdown-menu .dropdown-item.active::after { content: "✓"; font-weight: 700; }

/* transparent over the hero (desktop, top of page, JS-added) */
@media (min-width: 992px) {
    body.mf-home .mf-nav.at-top {
        background: transparent; box-shadow: none; backdrop-filter: none;
    }
    body.mf-home .mf-nav.at-top .navbar-brand,
    body.mf-home .mf-nav.at-top .navbar-brand .mf-logo,
    body.mf-home .mf-nav.at-top .nav-link { color: #fff; }
    body.mf-home .mf-nav.at-top .mf-lang { color: #fff; border-color: rgba(255,255,255,.5); }
}

/* ---------- Hero ---------- */
.mf-hero {
    position: relative;
    z-index: 1; /* keep the hero (and its search dropdown) above the next section */
    min-height: 92vh;
    display: flex; align-items: center;
    padding: calc(var(--mf-nav-h) + 3rem) 0 4rem;
    background:
        linear-gradient(180deg, rgba(6,33,26,.62) 0%, rgba(6,33,26,.30) 42%, rgba(6,33,26,.72) 100%),
        url('../images/memotravels-abu-dhabi-4533717_1920.webp') center 30% / cover no-repeat;
    color: #fff;
    text-align: center;
}
.mf-hero::after { /* subtle emerald tint at bottom to blend into content */
    content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
    background: linear-gradient(180deg, transparent, rgba(9,42,33,.55));
    pointer-events: none;
}
.mf-hero-inner { position: relative; z-index: 2; width: 100%; }
.mf-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
    color: #fff; padding: .4rem 1rem; border-radius: var(--mf-pill);
    font-size: .82rem; font-weight: 600; letter-spacing: .01em;
    backdrop-filter: blur(4px); margin-bottom: 1.4rem;
}
.mf-hero-title { color: #fff; font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 1rem; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.mf-hero-sub { font-size: clamp(1.05rem, 1.7vw, 1.35rem); color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto 2rem; }
.mf-hero-stats { display: flex; gap: 2.4rem; justify-content: center; flex-wrap: wrap; margin-top: 2.5rem; }
.mf-hero-stat b { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1; }
.mf-hero-stat span { font-size: .82rem; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Search island ---------- */
.mf-searchbar {
    display: flex; align-items: center; gap: .35rem;
    background: #fff; border-radius: var(--mf-pill);
    padding: .4rem .4rem .4rem 1.25rem;
    box-shadow: var(--mf-sh-lg);
    max-width: 640px; margin: 0 auto;
}
.mf-searchbar input {
    flex: 1; min-width: 0; border: 0; outline: none; font-size: 1.05rem; color: var(--mf-ink);
    background: transparent; padding: .55rem 0;
}
.mf-searchbar input::placeholder { color: #9aa8a1; }
.mf-searchbar .btn { padding: .7rem 1.5rem; white-space: nowrap; }
.mf-search-btn .mf-search-ico { display: none; }
/* Mobile: shrink the field and show a magnifier icon instead of the label */
@media (max-width: 575.98px) {
    .mf-searchbar { padding-left: .85rem; gap: .25rem; }
    .mf-searchbar input { font-size: .95rem; }
    .mf-searchbar .btn { padding: .6rem .8rem; }
    .mf-search-btn .mf-search-label { display: none; }
    .mf-search-btn .mf-search-ico { display: inline; font-size: 1.15rem; line-height: 1; }
}
.mf-near { margin: .9rem auto 0; }
.mf-near .btn { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.10); }
.mf-near .btn:hover { background: #fff; color: var(--mf-primary); border-color: #fff; }
.mf-search { position: relative; max-width: 640px; margin: 0 auto; }
.mf-results {
    position: absolute; left: 0; right: 0; top: calc(100% + .6rem);
    background: #fff; border-radius: var(--mf-r); overflow: hidden auto;
    max-height: 62vh; box-shadow: var(--mf-sh-lg); z-index: 1050; text-align: left;
}
.mf-result { display: block; padding: .7rem 1rem; border-bottom: 1px solid #f1f4f2; color: var(--mf-ink); }
.mf-result:last-child { border-bottom: 0; }
.mf-result:hover { background: #f4faf7; }

/* ---------- Section rhythm ---------- */
.mf-section { padding: 5rem 0; }
.mf-section-sm { padding: 3.5rem 0; }
.mf-kicker { color: var(--mf-primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.mf-section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: .4rem 0 .6rem; }

/* ---------- Stats band ---------- */
.mf-stats {
    background:
        linear-gradient(120deg, rgba(10,92,64,.93), rgba(15,122,86,.87)),
        url('../images/hero-isfahan.webp') center/cover no-repeat;
    color: #fff;
}
.mf-stat { text-align: center; padding: 1rem; }
.mf-stat-ico { font-size: 1.6rem; opacity: .9; }
.mf-stat-num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; line-height: 1; margin: .4rem 0 .2rem; }
.mf-stat-lbl { font-size: .85rem; color: rgba(255,255,255,.82); text-transform: uppercase; letter-spacing: .06em; }
.mf-stat + .mf-stat { position: relative; }

/* ---------- Feature cards ---------- */
.mf-feature { background: var(--mf-surface); border: 1px solid var(--mf-border); border-radius: var(--mf-r-lg); padding: 1.75rem; height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.mf-feature:hover { transform: translateY(-4px); box-shadow: var(--mf-sh); }
.mf-feature-ico {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-size: 1.5rem; background: linear-gradient(135deg, rgba(15,122,86,.12), rgba(21,162,115,.16)); margin-bottom: 1rem;
}

/* ---------- Generic cards (directory / lists) ---------- */
.mf-card {
    display: block; background: #fff; border: 1px solid var(--mf-border); border-radius: var(--mf-r);
    padding: 1rem 1.15rem; transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.mf-card:hover { transform: translateY(-2px); box-shadow: var(--mf-sh); border-color: transparent; }
.list-group-item-action:hover { background: #f4faf7; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--mf-muted); }

/* ---------- Map ---------- */
#mf-map { height: 66vh; min-height: 420px; width: 100%; z-index: 0; background: #e9ecef; }
.mf-map-frame { border-radius: var(--mf-r-lg); overflow: hidden; box-shadow: var(--mf-sh); border: 1px solid var(--mf-border); }
.mf-map-frame #mf-map { border-radius: var(--mf-r-lg); }
.mf-map-count {
    display: inline-block; margin-top: .9rem;
    background: rgba(15,122,86,.1); color: var(--mf-primary-d);
    font-weight: 600; font-size: .9rem; border-radius: var(--mf-pill); padding: .4rem 1.1rem;
}
/* Category filter chips above the world map */
.mf-map-filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.mf-map-filters:empty { display: none; }
.mf-map-filter {
    display: inline-flex; align-items: center; gap: .45rem;
    background: #fff; border: 1px solid var(--mf-border); color: #495057;
    font-weight: 600; font-size: .85rem; line-height: 1;
    padding: .5rem .9rem; border-radius: var(--mf-pill); cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.mf-map-filter:hover { border-color: var(--mf-primary-l); color: var(--mf-primary-d); }
.mf-map-filter.active {
    background: var(--mf-primary); border-color: var(--mf-primary); color: #fff;
    box-shadow: 0 4px 12px rgba(15,122,86,.28);
}
.mf-map-filter-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.mf-map-filter.active .mf-map-filter-dot { box-shadow: 0 0 0 1px rgba(255,255,255,.7); }

/* "Find mosques near me" control on /map */
.mf-locate-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--mf-primary); color: #fff; border: 0;
    font: 600 .9rem/1 inherit; padding: .6rem .9rem; border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; white-space: nowrap;
    margin: 10px;
}
.mf-locate-btn:hover { background: var(--mf-primary-d); }
.mf-locate-btn.is-busy { opacity: .6; cursor: progress; }
.mf-locate-btn .mf-locate-pin { font-size: 1rem; line-height: 1; }

/* Coloured category pin (divIcon) */
.mf-pin { background: none; border: 0; }
.mf-pin-dot {
    display: block; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

#mf-mini-map { height: 320px; width: 100%; border-radius: var(--mf-r); overflow: hidden; z-index: 0; background: #e9ecef; }
#mf-picker { height: 360px; width: 100%; border-radius: var(--mf-r); overflow: hidden; z-index: 0; background: #e9ecef; border: 1px solid var(--mf-border); }
.leaflet-popup-content a { color: var(--mf-primary); text-decoration: none; }

/* ---------- Editorial cocon (guides / data / category intro) ---------- */
.mf-guide-head { max-width: 820px; }
.mf-prose { font-size: 1.05rem; line-height: 1.75; color: #2b3138; }
.mf-prose > :first-child { margin-top: 0; }
.mf-prose h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 1.5rem; margin: 2.2rem 0 .9rem; }
.mf-prose h3 { font-weight: 700; font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
.mf-prose p { margin: 0 0 1.1rem; }
.mf-prose ul, .mf-prose ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.mf-prose li { margin-bottom: .4rem; }
.mf-prose a { color: var(--mf-primary); text-decoration: underline; text-decoration-color: rgba(15,122,86,.35); text-underline-offset: 2px; }
.mf-prose a:hover { text-decoration-color: var(--mf-primary); }
.mf-prose blockquote {
    margin: 1.4rem 0; padding: .8rem 1.2rem; border-left: 4px solid var(--mf-primary-l);
    background: rgba(15,122,86,.06); border-radius: 0 var(--mf-r) var(--mf-r) 0; color: #3a4048;
}
.mf-prose blockquote p:last-child { margin-bottom: 0; }
.mf-prose table { width: 100%; margin: 1.4rem 0; border-collapse: collapse; }
.mf-prose th, .mf-prose td { padding: .55rem .7rem; border-bottom: 1px solid var(--mf-border); text-align: left; }
.mf-prose figure { margin: 1.4rem 0; }
.mf-prose img { max-width: 100%; height: auto; border-radius: var(--mf-r); }

/* Article hero + inline figures */
.mf-article-hero { margin: 0 0 1.8rem; }
.mf-article-hero img {
    width: 100%; height: clamp(220px, 34vw, 380px); object-fit: cover;
    border-radius: var(--mf-r-lg); box-shadow: var(--mf-sh);
}
.mf-figure { margin: 1.6rem 0; }
.mf-figure img { width: 100%; border-radius: var(--mf-r-lg); box-shadow: var(--mf-sh); }
.mf-figure figcaption { margin-top: .5rem; font-size: .85rem; color: #6b7280; text-align: center; font-style: italic; }

.mf-guide-list li { margin-bottom: .35rem; }
.mf-guide-list a { color: #2b3138; }
.mf-guide-list a:hover { color: var(--mf-primary); }

.mf-guide-aside { position: sticky; top: 1.5rem; }
.mf-guide-cta { background: linear-gradient(160deg, rgba(15,122,86,.08), rgba(15,122,86,.02)); }

.mf-faq-item { border: 1px solid var(--mf-border); border-radius: var(--mf-r); padding: .2rem 1rem; margin-bottom: .7rem; background: #fff; }
.mf-faq-item summary { cursor: pointer; font-weight: 600; padding: .8rem 0; list-style: none; }
.mf-faq-item summary::-webkit-details-marker { display: none; }
.mf-faq-item summary::after { content: '+'; float: right; color: var(--mf-primary); font-weight: 700; }
.mf-faq-item[open] summary::after { content: '\2013'; }
.mf-faq-a { padding: 0 0 1rem; color: #3a4048; line-height: 1.7; }

.mf-data-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; border-top: 0; }
.mf-data-table td, .mf-data-table th { padding: .7rem 1rem; }

@media (max-width: 991.98px) { .mf-guide-aside { position: static; margin-top: 2rem; } }

/* Home ecosystem chips */
.mf-eco { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.mf-eco-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.1rem; border-radius: var(--mf-pill);
    background: #fff; border: 1px solid var(--mf-border); color: #2b3138;
    font-weight: 600; text-decoration: none; transition: all .15s ease;
}
.mf-eco-chip:hover { border-color: var(--mf-primary); color: var(--mf-primary-d); box-shadow: 0 6px 16px rgba(15,122,86,.12); transform: translateY(-2px); }
.mf-eco-ico { font-size: 1.2rem; line-height: 1; }

/* Auto-linked glossary term inside prose */
.mf-prose a.mf-term {
    text-decoration: none;
    border-bottom: 1px dotted var(--mf-primary-l);
    color: inherit;
}
.mf-prose a.mf-term:hover { color: var(--mf-primary); border-bottom-style: solid; }

/* Glossary page */
.mf-az { display: flex; flex-wrap: wrap; gap: .3rem; }
.mf-az-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 8px; font-weight: 700; font-size: .85rem;
    background: rgba(15,122,86,.08); color: var(--mf-primary-d); text-decoration: none;
}
.mf-az-link:hover { background: var(--mf-primary); color: #fff; }
.mf-az-head {
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; color: var(--mf-primary);
    border-bottom: 2px solid var(--mf-border); padding-bottom: .3rem; margin-bottom: 1rem;
}
.mf-glossary .mf-gterm { padding: .5rem 0; border-bottom: 1px solid var(--mf-border); scroll-margin-top: 90px; }
.mf-glossary dt { font-weight: 700; color: #1f2937; }
.mf-glossary dd { margin: .15rem 0 0; color: #3a4048; line-height: 1.6; }
.mf-glossary .mf-gmore { margin-left: .4rem; font-size: .85rem; font-weight: 600; color: var(--mf-primary); text-decoration: none; white-space: nowrap; }
.mf-glossary .mf-gterm:target { background: rgba(15,122,86,.06); border-radius: var(--mf-r); padding-left: .6rem; padding-right: .6rem; }

/* ---------- Footer ---------- */
.mf-footer { background: #0b1e18; color: #c7d4ce; }
.mf-footer h6 { color: #fff; }
.mf-footer a { color: #c7d4ce; }
.mf-footer a:hover { color: #fff; }

/* ---------- CTA band ---------- */
.mf-cta {
    position: relative; color: #fff; text-align: center; padding: 4.5rem 0;
    background: linear-gradient(120deg, rgba(10,92,64,.90), rgba(15,122,86,.84)),
        url('../images/mtorrazzina-uzbekistan-4911018_1920.webp') center/cover no-repeat;
}
.mf-cta h2 { color: #fff; }

/* ---------- Mosque detail (fiche) ---------- */
.mf-fiche { background: var(--mf-bg); }
.mf-panel {
    background: #fff; border: 1px solid var(--mf-border); border-radius: var(--mf-r-lg);
    box-shadow: var(--mf-sh-sm); padding: 1.5rem; margin-bottom: 1.25rem;
}
.mf-panel h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.mf-fiche-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .5rem; }
.mf-fiche-loc { color: var(--mf-muted); font-weight: 500; }
.mf-detail { display: flex; align-items: flex-start; gap: .85rem; padding: .7rem 0; border-bottom: 1px solid #f1f4f2; }
.mf-detail:last-child { border-bottom: 0; padding-bottom: 0; }
.mf-detail-ico { flex: none; width: 22px; text-align: center; }
.mf-detail-k { flex: none; width: 108px; color: var(--mf-muted); font-size: .88rem; padding-top: 1px; }
.mf-detail-v { color: var(--mf-ink); font-weight: 500; word-break: break-word; }
.mf-service-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(15,122,86,.09); color: var(--mf-primary-d);
    border-radius: var(--mf-pill); padding: .42rem .9rem; font-size: .85rem; font-weight: 600;
    margin: 0 .4rem .5rem 0;
}
.mf-hours { width: 100%; border-collapse: collapse; }
.mf-hours th, .mf-hours td { padding: .55rem 0; border-bottom: 1px solid #f1f4f2; font-size: .93rem; }
.mf-hours tr:last-child th, .mf-hours tr:last-child td { border-bottom: 0; }
.mf-hours th { text-align: left; font-weight: 500; color: var(--mf-muted); text-transform: capitalize; }
.mf-hours td { text-align: right; color: var(--mf-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.mf-hours td.is-closed { color: var(--mf-muted); font-weight: 400; }
.mf-hours .is-today th, .mf-hours .is-today td { color: var(--mf-primary-d); font-weight: 700; }
.mf-mapcard { padding: 0; overflow: hidden; }
.mf-mapcard #mf-mini-map { border-radius: 0; }
@media (min-width: 992px) { .mf-fiche-side { position: sticky; top: 90px; } }
.mf-nearby-card { display: block; background: #fff; border: 1px solid var(--mf-border); border-radius: var(--mf-r); padding: .9rem 1rem; height: 100%; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mf-nearby-card:hover { transform: translateY(-2px); box-shadow: var(--mf-sh); border-color: transparent; }
.mf-nearby-km { color: var(--mf-primary); font-weight: 700; font-size: .82rem; }

/* ---------- Worship widget (Qibla + prayer times) ---------- */
.mf-worship .mf-hijri { font-size: .8rem; color: var(--mf-muted); font-weight: 500; }
.mf-compass {
    position: relative; width: 120px; height: 120px; margin: 0 auto;
    border-radius: 50%; border: 2px solid var(--mf-border);
    background: radial-gradient(circle at 50% 45%, #fff, #eef5f1);
    box-shadow: inset 0 2px 8px rgba(13,31,25,.06);
}
.mf-compass::before {
    content: 'N'; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
    font-size: .7rem; color: var(--mf-muted); font-weight: 700;
}
.mf-compass-needle { position: absolute; inset: 0; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.mf-compass-kaaba { position: absolute; top: -3px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; }
.mf-prayers { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.mf-prayer { background: #f4f8f6; border: 1px solid var(--mf-border); border-radius: .6rem; padding: .55rem .3rem; text-align: center; }
.mf-prayer.is-next { background: var(--mf-primary); border-color: var(--mf-primary); color: #fff; box-shadow: 0 4px 14px rgba(15,122,86,.28); }
.mf-prayer-n { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.mf-prayer-t { display: block; font-weight: 700; font-size: 1.02rem; }
.mf-countdown { margin-top: .85rem; font-size: .95rem; color: var(--mf-primary-d); }
.mf-month-table { font-size: .82rem; }
.mf-month-table th { color: var(--mf-muted); font-weight: 600; }

/* Wikipedia card */
.mf-wiki { display: flex; gap: 1.1rem; align-items: flex-start; }
.mf-wiki img { width: 150px; height: 150px; object-fit: cover; border-radius: var(--mf-r); flex: none; }
@media (max-width: 575.98px) { .mf-wiki { flex-direction: column; } .mf-wiki img { width: 100%; height: 200px; } }

/* Local info (weather + time) */
.mf-localinfo { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.mf-localinfo-item { display: flex; gap: .6rem; align-items: center; }
.mf-localinfo-item > span { font-size: 1.7rem; line-height: 1; }
.mf-localinfo-item b { display: block; font-size: 1.15rem; line-height: 1.1; color: var(--mf-ink); }
.mf-localinfo-item div span { font-size: .72rem; color: var(--mf-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; color: var(--mf-ink); font-size: .9rem; margin-bottom: .35rem; }
.form-control, .form-select {
    border-radius: .6rem; border-color: var(--mf-border); padding: .6rem .85rem; color: var(--mf-ink);
}
.form-control:focus, .form-select:focus {
    border-color: var(--mf-primary-l); box-shadow: 0 0 0 .2rem rgba(15,122,86,.13);
}
.form-check-input:checked { background-color: var(--mf-primary); border-color: var(--mf-primary); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(15,122,86,.13); }

.mf-form-hero {
    background: linear-gradient(120deg, var(--mf-primary-d), var(--mf-primary));
    color: #fff; text-align: center; padding: 3.5rem 0 5.5rem;
}
.mf-form-hero h1 { color: #fff; }
.mf-form-page { background: var(--mf-bg); }
.mf-form-card {
    background: #fff; border: 1px solid var(--mf-border); border-radius: var(--mf-r-lg);
    box-shadow: var(--mf-sh); padding: 2.25rem;
}
.mf-form-hero + .mf-form-page .mf-form-card { margin-top: -3.25rem; position: relative; z-index: 2; }
.mf-fsec {
    color: var(--mf-primary); font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; font-size: .78rem;
    margin: 1.9rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--mf-border);
}
.mf-fsec-first { border-top: 0; padding-top: 0; margin-top: .5rem; }

/* ---------- Utilities ---------- */
.min-w-0 { min-width: 0; }
.mf-success-ico {
    width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 1rem;
    display: grid; place-items: center; font-size: 2.2rem; color: #fff;
    background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-l));
    box-shadow: 0 10px 26px rgba(15,122,86,.32);
}

/* ---------- RTL ---------- */
[dir="rtl"] .navbar-brand .mf-logo { margin-left: .25rem; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .mf-hero { min-height: 88vh; }
    .mf-hero-stats { gap: 1.6rem; }
    .mf-section { padding: 3.5rem 0; }
}

/* --- Social share buttons (fiche mosquée + réutilisable) --- */
.mf-share-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mf-ink-soft, #6b7280);
    margin-bottom: .6rem;
}
.mf-share-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.mf-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #64748b;
    cursor: pointer;
    transition: transform .12s ease, filter .12s ease, background .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.mf-share-btn svg { width: 19px; height: 19px; }
.mf-share-btn:hover { transform: translateY(-2px); filter: brightness(1.07); color: #fff; }
.mf-share-btn:active { transform: translateY(0); }
.mf-share-btn.is-wa   { background: #25D366; }
.mf-share-btn.is-fb   { background: #1877F2; }
.mf-share-btn.is-x    { background: #000; }
.mf-share-btn.is-tg   { background: #229ED9; }
.mf-share-btn.is-mail { background: var(--mf-emerald, #0f7a56); }
.mf-share-btn.is-copy { background: #eef2f0; color: var(--mf-emerald, #0f7a56); }
.mf-share-btn.is-copy:hover { color: var(--mf-emerald, #0f7a56); }
.mf-share-btn.is-copy.is-copied { background: var(--mf-emerald, #0f7a56); color: #fff; }

/* --- Back-to-top button (global, apparaît au scroll) --- */
.mf-totop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1030;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--mf-emerald, #0f7a56);
    color: #fff;
    box-shadow: 0 6px 18px rgba(15, 122, 86, .35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .15s ease;
}
.mf-totop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.mf-totop:hover { background: var(--mf-emerald-dark, #0b5e42); color: #fff; transform: translateY(-2px); }
.mf-totop:active { transform: translateY(0); }
.mf-totop svg { width: 22px; height: 22px; }
[dir="rtl"] .mf-totop { right: auto; left: 22px; }
@media (max-width: 480px) {
    .mf-totop { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

/* --- Fiche : galerie photos + vidéos + lightbox --- */
.mf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.mf-gallery-item { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #eef2f0; }
.mf-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.mf-gallery-item:hover img { transform: scale(1.05); }
.mf-videos { display: grid; gap: .8rem; }
.mf-video { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.mf-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mf-lb { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 2rem; z-index: 2000; cursor: zoom-out; }
.mf-lb.is-hidden { display: none; }
.mf-lb img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* --- Back-office media manager --- */
.mf-media-grid { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .8rem; }
.mf-media-item { position: relative; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; background: #eef2f0; border: 1px solid #dfe6e2; }
.mf-media-item img { width: 100%; height: 100%; object-fit: cover; }
.mf-media-vid { display: flex; align-items: center; justify-content: center; height: 100%; font-size: .65rem; text-align: center; padding: .3rem; color: #b3261e; word-break: break-all; }
.mf-media-badge { position: absolute; top: 3px; left: 3px; background: #e7c15e; color: #0b2e26; font-size: .6rem; padding: 1px 5px; border-radius: 4px; }
.mf-media-del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; padding: 0; }
.mf-drop { border: 2px dashed #b7c6be; border-radius: 10px; padding: 1.4rem; text-align: center; color: #6b7280; cursor: pointer; transition: background .15s, border-color .15s; }
.mf-drop.is-over, .mf-drop:hover { border-color: var(--mf-emerald, #0f7a56); background: #f2f8f5; }
.mf-crop-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 2100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.mf-crop-modal.is-hidden { display: none; }
.mf-crop-box { background: #fff; border-radius: 12px; padding: 1rem; max-width: 92vw; display: flex; flex-direction: column; gap: .8rem; }
.mf-crop-area { max-width: 80vw; max-height: 68vh; overflow: hidden; }
.mf-crop-area img { max-width: 100%; display: block; }
.mf-crop-actions { display: flex; justify-content: flex-end; gap: .5rem; }

/* --- Fiche : liens réseaux sociaux --- */
.mf-socials { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.4rem 0 1.2rem; }
.mf-social-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; transition: transform .12s ease, filter .12s ease; }
.mf-social-btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: #fff; }
.mf-social-btn svg { width: 18px; height: 18px; }
