/* Masjide Noorul Islam — site styles
   Layout: white brand header, prayer-times band, cream menu bar; content column + live-broadcast sidebar; deep brown footer.
   Keeps the current site's brown / cream / green palette, modernised. One light theme by choice (the embeds are light). */
:root {
  --brown: #954200;          /* primary — menu text, links, buttons (from the current site) */
  --brown-deep: #5c2a06;     /* footer, hover */
  --cream: #f7f6ea;          /* menu bar and panels (from the current site) */
  --sand: #ece7d3;           /* page ground, borders */
  --green: #196644;          /* page headings (from the current site) */
  --ink: #2b2219;            /* body text */
  --muted: #6d6150;          /* secondary text */
  --white: #ffffff;
  --live: #c0392b;
  --font-display: "Marcellus", "Palatino Linotype", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --radius: 10px;
  --step--1: .875rem; --step-0: 1rem; --step-1: 1.2rem; --step-2: 1.5rem; --step-3: 2rem; --step-4: 2.6rem;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--sand); color: var(--ink); font: 400 var(--step-0)/1.65 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); text-underline-offset: 3px; }
a:hover { color: var(--brown-deep); }
:focus-visible { outline: 3px solid var(--brown); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { color: var(--green); font-size: clamp(1.8rem, 1.4rem + 1.6vw, var(--step-4)); margin-bottom: 1.25rem; }
h2 { color: var(--brown); font-size: var(--step-2); margin: 2rem 0 .75rem; }
p { margin: 0 0 1rem; }
.wrap { max-width: 1200px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- top bar ---------- */
.topbar { background: var(--brown-deep); color: var(--cream); font-size: var(--step--1); }
.topbar .wrap { display: flex; gap: 1.25rem; align-items: center; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: var(--cream); text-decoration: none; }
.topbar a:hover { color: var(--white); }
.tb-label { opacity: .7; letter-spacing: .04em; text-transform: uppercase; font-size: .75rem; margin-right: .25rem; }
.tb-social { margin-left: auto; display: flex; gap: .75rem; }
.tb-social a { display: inline-flex; padding: 4px; }

/* ---------- header ---------- */
.site-header { background: var(--white); }
.brand-row { display: flex; align-items: center; gap: 1rem; padding-block: .75rem; }
.logo img { width: 160px; }
.family { margin-left: auto; }
.family img { width: 360px; }
.live-pill, .menu-btn { display: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); display: inline-block; margin-right: .5rem; box-shadow: 0 0 0 0 rgba(192,57,43,.6); animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(192,57,43,.55); } 70% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); } }

/* prayer-times band (MasjidBox widget) */
.banner { background: var(--white); }
.masjidbox { padding-block: .5rem; min-height: 80px; }
.masjidbox > a[data-masjidbox-widget] { display: block; text-align: center; padding: 1.5rem; color: var(--brown); text-decoration: none; }
.masjidbox iframe { width: 100% !important; border: 0; display: block; }

/* ---------- main menu ---------- */
.mainnav { background: var(--cream); border-block: 1px solid var(--sand); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--cream); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.nav-top { display: flex; align-items: center; gap: .4rem; padding: .95rem 1.05rem; font: 600 .875rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--brown); text-decoration: none; background: none; border: 0; cursor: pointer; transition: background .25s, color .25s; }
.menu > li:hover > .nav-top, .menu > li:focus-within > .nav-top, .menu > li.is-active > .nav-top { background: var(--brown); color: var(--white); }
.nav-top svg { transition: transform .2s; }
.sub { list-style: none; margin: 0; padding: .4rem 0; position: absolute; left: 0; top: 100%; min-width: 250px; background: var(--brown); box-shadow: 0 12px 30px rgba(60,25,0,.25); border-radius: 0 0 var(--radius) var(--radius); visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility .2s; }
.menu > li:hover > .sub, .menu > li:focus-within > .sub, .has-sub.open > .sub { visibility: visible; opacity: 1; transform: none; }
.sub a { display: block; padding: .55rem 1.1rem; color: var(--white); text-decoration: none; font-size: .925rem; }
.sub a:hover, .sub a[aria-current="page"] { background: var(--brown-deep); color: var(--white); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; padding-block: 1.5rem 2.5rem; align-items: start; }
.content { background: var(--cream); border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem); min-width: 0; }
.prose { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.lead { font-size: var(--step-1); line-height: 1.55; }
hr { border: 0; border-top: 1px dotted #c9bfa3; margin: 2rem 0; }
.fine { color: var(--muted); font-size: var(--step--1); }
.url { color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; }
.salaam { font-family: var(--font-display); font-size: var(--step-2); color: var(--brown); }

.btn { display: inline-block; background: var(--brown); color: var(--white); padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--brown); cursor: pointer; font-family: var(--font-body); font-size: var(--step-0); transition: background .2s; }
.btn:hover { background: var(--brown-deep); border-color: var(--brown-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--brown); }
.btn-ghost:hover { color: var(--white); }

.callout { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; font-style: normal; }
.callout p:last-child { margin-bottom: 0; }

/* home */
.home-photo { float: right; width: min(46%, 400px); margin: .3rem 0 1rem 1.75rem; }
.home-photo img { width: 100%; border-radius: var(--radius); }
.home-photo figcaption { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.home-intro { max-width: none; }
.goals { clear: both; }
.hero { margin: calc(-1 * clamp(1.25rem, 1rem + 1.5vw, 2.5rem)); margin-bottom: 2rem; position: relative; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.hero img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.hero figcaption { position: absolute; inset: auto 0 0 0; padding: 4rem clamp(1.25rem, 1rem + 1.5vw, 2.5rem) 1.5rem; background: linear-gradient(transparent, rgba(30,14,2,.82)); color: var(--white); }
.hero h1 { color: var(--white); margin: .25rem 0 0; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #f3dfc4; }
.goals { margin-top: 2rem; }
.goals ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; counter-reset: g; }
.goals li { counter-increment: g; background: var(--white); border-radius: var(--radius); padding: 1rem; font-weight: 600; border-top: 3px solid var(--green); }
.goals li::before { content: counter(g); display: block; font-family: var(--font-display); font-size: var(--step-3); color: var(--green); line-height: 1; margin-bottom: .4rem; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 2rem; }
.quick a { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid #ddd3b8; text-decoration: none; color: var(--ink); background: var(--cream); transition: border-color .2s, background .2s; }
.quick a:hover { border-color: var(--brown); background: var(--white); }
.quick strong { color: var(--brown); font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
.quick span { color: var(--muted); font-size: var(--step--1); }

/* documents */
.doclist { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; max-width: 720px; }
.doclist li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius); padding: .85rem 1.1rem; }
.doclist a { font-weight: 600; text-decoration: none; }
.doclist a:hover { text-decoration: underline; }
.doclist span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--sand); border-radius: 4px; padding: .1rem .4rem; flex: none; }
.doc-img { margin: 1.5rem 0; }
.doc-img img { border-radius: 6px; border: 1px solid var(--sand); background: var(--white); }
.doc-img figcaption { margin-top: .5rem; font-weight: 600; }
.timetable img { max-width: 520px; width: 100%; }

/* split image + text */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem; align-items: start; }
.split img { border-radius: var(--radius); width: 100%; }

/* history timeline */
.timeline { list-style: none; padding: 0; margin: 0 0 2rem; border-left: 2px solid #d9ccaa; }
.timeline > li { position: relative; padding: 0 0 2rem 1.5rem; }
.timeline > li::before { content: ""; position: absolute; left: -8px; top: .35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--cream); border: 3px solid var(--green); }
.year { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--green); margin-bottom: .5rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; transition: transform .3s; }
.gallery a { display: block; overflow: hidden; border-radius: 8px; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .4rem; }
.gallery-natural img { aspect-ratio: auto; }

/* services */
.services { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.service { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.25rem; background: var(--white); border-radius: var(--radius); padding: 1.25rem; }
.service img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.service h2 { margin-top: 0; font-size: var(--step-1); }

/* salaah */
.jumuah { background: var(--green); color: var(--white); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.jumuah h2 { color: var(--white); margin: 0 0 .75rem; }
.jumuah dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.jumuah dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.jumuah dd { margin: 0; font-family: var(--font-display); font-size: var(--step-3); font-variant-numeric: tabular-nums; }
.jumuah small { display: block; font-family: var(--font-body); font-size: var(--step--1); opacity: .85; }
.badges { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.badges img { width: 150px; }
.app-callout { text-align: center; }

/* donation */
.donate { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.donate a { display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem; border-radius: var(--radius); background: var(--brown); color: var(--white); text-decoration: none; transition: background .2s, transform .2s; }
.donate a:hover { background: var(--brown-deep); transform: translateY(-2px); color: var(--white); }
.donate strong { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); }
.donate span { font-size: .75rem; letter-spacing: .08em; opacity: .85; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem; }
.addr { font-style: normal; margin-bottom: 1rem; }
.phones { margin: 0; display: grid; gap: .5rem; }
.phones div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; border-bottom: 1px dotted #d3c7a8; padding-bottom: .4rem; }
.phones dt { color: var(--muted); }
.phones dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; border-radius: var(--radius); }
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.visit-grid .callout { margin: 0 0 1.5rem; }


/* ---------- sidebar ---------- */
.sidebar { display: grid; gap: 1rem; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); min-width: 0; }
.panel { background: var(--white); border-radius: var(--radius); padding: 1.1rem; border: 1px solid #e3dcc6; }
.panel h2 { margin: 0 0 .8rem; font-size: var(--step-1); padding-bottom: .5rem; border-bottom: 1px dotted #cfc3a3; text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; display: flex; align-items: center; }
.panel-live { border-top: 3px solid var(--live); }
.player { border-radius: 8px; overflow: hidden; min-height: 172px; background: var(--cream); }
.freq { text-align: center; margin: .75rem 0 .5rem; font-size: var(--step--1); color: var(--muted); }
.freq strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.yt-watch img { margin: 0 auto; width: 170px; }
.wa { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; padding: .7rem .9rem; background: #e8f5ec; color: #14532d; border-radius: 8px; text-decoration: none; font-size: var(--step--1); line-height: 1.35; }
.wa svg { flex: none; width: 26px; height: 26px; color: #1f8a4c; }
.wa strong { display: block; font-size: var(--step-0); }
.wa:hover { background: #d9efe0; color: #14532d; }

/* embed placeholders (preview only) */
.embed-ph { display: flex; flex-direction: column; gap: .25rem; align-items: center; justify-content: center; text-align: center; min-height: 172px; padding: 1rem; border: 2px dashed #d3c7a8; border-radius: 8px; background: var(--cream); font-size: var(--step--1); color: var(--muted); }
.embed-ph strong { color: var(--ink); font-size: var(--step-0); }
.embed-ph a { font-weight: 600; margin-top: .25rem; }
.embed-ph-wide { min-height: 120px; }
.embed-ph-map { height: 100%; min-height: 300px; }

/* ---------- footer ---------- */
.site-footer { background: var(--brown-deep); color: #f1e6d2; font-size: var(--step--1); }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 2rem; padding-block: 2.5rem 1.5rem; }
.site-footer h2 { color: #f3dfc4; font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .75rem; }
.site-footer address { font-style: normal; }
.footer-logo { width: 130px; border-radius: 6px; margin-bottom: .75rem; }
.charity { font-size: 1.1rem; font-weight: 700; color: #ffffff; }
.charity span { font-weight: 400; color: #f3dfc4; }
.footer-social { display: grid; gap: .4rem; }
.footer-social a { display: inline-flex; gap: .5rem; align-items: center; text-decoration: none; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; border-top: 1px solid rgba(255,255,255,.15); padding-block: 1rem 1.5rem; color: #d8c8ad; font-size: .8rem; }
.footer-base a { color: #f3dfc4; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-top { padding: .9rem .75rem; font-size: .8rem; }
  .family img { width: 300px; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family { display: none; }
  .live-pill { display: inline-flex; align-items: center; margin-left: auto; padding: .5rem .9rem; border-radius: 999px; border: 1px solid #e7cfc9; color: var(--live); font-weight: 600; font-size: var(--step--1); text-decoration: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border: 1px solid var(--sand); background: var(--cream); color: var(--brown); border-radius: 999px; font: 600 var(--step--1) var(--font-body); cursor: pointer; }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .menu-btn[aria-expanded="true"] .bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .mainnav { display: none; position: static; }
  .mainnav.open { display: block; }
  .menu { flex-direction: column; padding-block: .25rem; }
  .menu > li { border-bottom: 1px solid var(--sand); }
  .menu > li:last-child { border-bottom: 0; }
  .nav-top { width: 100%; justify-content: space-between; padding: 1rem .25rem; font-size: .9rem; }
  .menu > li:hover > .nav-top, .menu > li:focus-within > .nav-top { background: none; color: var(--brown); }
  .menu > li.is-active > .nav-top { background: none; color: var(--green); }
  .sub { position: static; visibility: visible; opacity: 1; transform: none; display: none; box-shadow: none; border-radius: 8px; margin-bottom: .75rem; min-width: 0; }
  .menu > li:hover > .sub, .menu > li:focus-within > .sub { display: none; }
  .menu > li.has-sub.open > .sub { display: block; }
  .has-sub.open .nav-top svg { transform: rotate(180deg); }
  .sub a { padding: .75rem 1rem; }
}
@media (max-width: 1240px) { .goals ol { grid-template-columns: minmax(0, 1fr); gap: .5rem; } .goals li { display: flex; align-items: center; gap: 1rem; border-top: 0; border-left: 3px solid var(--green); } .goals li::before { margin: 0; min-width: 1.5rem; } }
@media (max-width: 640px) {
  .home-photo { float: none; width: 100%; margin: 0 0 1.25rem; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .logo img { width: 112px; }
  .split, .service, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .service img { aspect-ratio: 16 / 9; }
  .hero img { aspect-ratio: 4 / 3; }
  .hero figcaption { padding-top: 3rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .live-pill { padding: .45rem .7rem; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
