:root {
  --ink: #19352f;
  --forest: #123c35;
  --forest-deep: #0c2e29;
  --sand: #f5f8f5;
  --paper: #fffefa;
  --sage: #e8eee8;
  --line: #cfd9d0;
  --muted: #4c6258;
  --gold: #c6a56d;
  --on-gold: #102b25;
  --header-height: 116px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--sand); color: var(--ink); font: 400 16px/1.6 'DM Sans', Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
img { max-width: 100%; }
::selection { background: #d9c094; color: var(--forest-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: -10000px; top: 12px; z-index: 100; padding: 10px 16px; background: white; }
.skip-link:focus { left: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.14; }
h1, h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; letter-spacing: -.03em; }
h1 { font-size: clamp(3.25rem, 6.5vw, 5.7rem); }
h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
h3 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 600; }
.section { padding-block: 96px; scroll-margin-top: 90px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 36px; }
.section-heading h2 { margin-bottom: 12px; }
.section-heading p { color: var(--muted); max-width: 62ch; margin-bottom: 0; }
.section-heading p a { font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 25px; padding: 12px 18px; text-decoration: none; font-weight: 700; border-radius: 3px; min-height: 48px; }
.button-light { background: var(--paper); color: var(--forest); }
.button-light:hover { background: #ead8b7; }
.button-gold { background: var(--gold); color: var(--on-gold); padding: 16px 27px; justify-content: center; }
.button-gold:hover { filter: brightness(1.1); }
.button-outline { border: 1px solid #ffffff80; color: white; padding: 15px 27px; }
.button-outline:hover { background: #ffffff18; }
[hidden] { display: none !important; }
.quiet-link { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

.site-header { position: fixed; z-index: 40; inset: 0 0 auto; color: #fff; transition: background-color .3s ease, box-shadow .3s ease; }
.site-header.is-scrolled, .site-header:has(.main-navigation.is-open) { background: var(--forest-deep); box-shadow: 0 4px 18px #0000001a; }
.site-header.is-scrolled .header-inner { border-bottom-color: #ffffff26; }
.site-header .container, .hero .container { width: min(1880px, calc(100% - 70px)); }
.header-inner { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid #ffffff4a; }
.brand { display: inline-flex; align-items: center; gap: 15px; text-decoration: none; color: #fff; min-width: 0; }
.brand-logo { width: 70px; height: 70px; padding: 13px; border-radius: 50%; background: #f0f3ec; object-fit: contain; flex: none; }
.brand-lockup { display: grid; gap: 2px; }
.brand-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.75rem; line-height: 1; font-weight: 500; letter-spacing: -.015em; }
.brand-name { max-width: 310px; overflow-wrap: anywhere; }
.main-navigation { display: flex; align-items: center; gap: clamp(12px, 1.1vw, 22px); }
.main-navigation > a { font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.main-navigation > a:not(.button) { padding-block: 16px; }
.main-navigation > a:not(.button):hover { color: #ead4a5; }
.nav-toggle { display: none; }
.brand-subtitle { color: #e7d0a3; font-size: .63rem; line-height: 1.4; font-weight: 700; letter-spacing: .23em; }
.header-discover { display: inline-flex; align-items: center; min-height: 48px; padding: 9px 25px; border: 1px solid #ffffff77; border-radius: 999px; color: white; text-decoration: none; text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.header-discover:hover { background: #ffffff26; border-color: white; }

.hero { position: relative; isolation: isolate; min-height: max(690px, 100svh); color: #fff; background: #13252c; overflow: hidden; }
.hero-media, .hero-media::after { position: absolute; inset: 0; }
.hero-media { z-index: -1; }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 54%; }
.hero-media::after { content: ''; background: linear-gradient(90deg, #06100fd9 0%, #0714119c 33%, #07141129 76%), linear-gradient(0deg, #07110ee6 0%, transparent 43%), linear-gradient(180deg, #07121ba6 0%, transparent 38%); }
.hero-inner { min-height: max(800px, 100svh); display: flex; flex-direction: column; justify-content: space-between; gap: 70px; padding-top: clamp(240px, 29svh, 340px); padding-bottom: 38px; }
.hero-content { max-width: 870px; }
.hero h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(6rem, 9.4vw, 11rem); line-height: .86; font-weight: 400; letter-spacing: -.036em; margin: 0 0 42px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 36px; }
.hero-media img { will-change: transform; }
.hero-media::before { content: ''; position: absolute; z-index: 1; inset: 0 0 0 73%; opacity: .1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e3d4ad' stroke-width='.65'%3E%3Cpath d='M60 0 85 35 120 60 85 85 60 120 35 85 0 60 35 35Z'/%3E%3Cpath d='M0 0 120 120M120 0 0 120'/%3E%3Ccircle cx='60' cy='60' r='22'/%3E%3C/g%3E%3C/svg%3E"); }
@keyframes hero-arrive { from { opacity: 0; transform: translateY(26px); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes photo-arrive { from { transform: scale(1.055); } to { transform: scale(1); } }
.motion-enabled .hero-media img { animation: photo-arrive 1.8s cubic-bezier(.16,1,.3,1) both; }
.motion-enabled .hero h1 { animation: hero-arrive 1.1s cubic-bezier(.16,1,.3,1) both; }
.motion-enabled .hero-content > p { animation: hero-arrive 1.1s .15s cubic-bezier(.16,1,.3,1) both; }
.motion-enabled .hero-actions { animation: hero-arrive 1.1s .3s cubic-bezier(.16,1,.3,1) both; }
.footer-bottom { align-items: center; }
.hero h1 em { display: block; font-weight: 400; color: #fff0ca; }
.hero-content > p { max-width: 700px; color: #f5f4eccc; font-size: clamp(1.05rem, 1.3vw, 1.32rem); line-height: 1.85; margin: 0; }
.hero-bottom { display: flex; justify-content: space-between; align-items: end; gap: 24px; border-top: 1px solid #ffffff61; padding-top: 26px; }
.hero-explore { display: inline-flex; align-items: center; gap: 18px; color: #fff; font-size: .78rem; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .15em; }
.explore-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #ffffff99; border-radius: 50%; transition: background .25s ease-out, transform .25s ease-out; }
.explore-icon svg { width: 23px; height: 23px; }
.hero-explore:hover .explore-icon { background: #ffffff2b; transform: translateY(3px); }
.hero-bottom p { margin: 0; color: #efeee5c4; font-size: .83rem; line-height: 1.7; text-align: right; }

.prayer { background: var(--paper); }
.prayer, .about, .services { position: relative; isolation: isolate; }
.prayer::before, .about::before, .services::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: url('assets/islamic-pattern.svg') repeat; background-size: 192px 192px; opacity: .11; mask-image: linear-gradient(90deg, #000, #0004 42%, #0002 64%, #000); }
.about::before { background-size: 240px 240px; background-position: 80px 35px; }
.services::before { background-position: 96px 0; }
.today-panel { background: var(--paper); }
.date-stack { text-align: right; flex: none; line-height: 1.45; }
.date-stack time { display: block; color: var(--ink); font-weight: 700; }
.date-stack span { display: block; color: var(--muted); font-size: .91rem; }
.today-panel { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(430px, 2fr); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.today-label { padding: 20px 25px 20px 0; }
.today-label h3 { margin-bottom: 2px; }
.today-label span { color: var(--muted); font-size: .86rem; }
.today-table { width: 100%; border-collapse: collapse; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.today-table caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.today-table th, .today-table td { padding: 9px 0 9px 12px; }
.today-table th:first-child { padding-left: 28px; text-align: left; }
.today-table th:not(:first-child), .today-table td:not(:first-child) { text-align: right; width: 108px; }
.today-head { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.today-head th { padding-top: 16px; padding-bottom: 11px; }
.timetable-row { border-bottom: 1px solid #e5eae4; font-size: .94rem; }
.timetable-row:last-child { border-bottom: 0; }
.timetable-row th { font-weight: 700; }
.timetable-row td:last-child { color: var(--forest); font-weight: 700; }
.today-table .timetable-status { padding: 30px 12px 30px 28px; color: var(--muted); text-align: left; }
.source-note { color: var(--muted); font-size: .78rem; margin: 14px 0 0; }
.month-section { margin-top: 90px; scroll-margin-top: 90px; }
.month-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; border-top: 1px solid var(--line); padding-top: 33px; }
.month-heading h3 { margin-bottom: 4px; }
.month-heading p { color: var(--muted); margin-bottom: 0; }
.month-controls { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.month-controls button { border: 1px solid var(--line); background: var(--paper); color: var(--forest); width: 35px; height: 35px; font-size: 1.2rem; }
.month-controls button:hover { background: var(--sage); }
#month-label { font-weight: 700; min-width: 135px; text-align: center; }
.month-navigation { display: grid; justify-items: end; gap: 9px; }
.month-heading { margin-bottom: 20px; }
.monthly-poster { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.poster-heading { padding-bottom: 14px; border-bottom: 1px solid var(--gold); margin-bottom: 18px; }
#poster-month { font: 600 clamp(1.6rem, 3vw, 2rem)/1.2 'Playfair Display', Georgia, serif; color: var(--forest); margin: 0 0 6px; }
#poster-hijri { margin: 0; color: var(--muted); font-size: .85rem; text-align: right; }
.poster-details { margin-top: 20px; font-size: .86rem; }
.poster-details:empty { display: none; }
.poster-details p { margin: 6px 0; white-space: pre-line; overflow-wrap: anywhere; }
.poster-details h5 { font: 700 .95rem/1.4 'DM Sans', Arial, sans-serif; margin: 16px 0 6px; }
.poster-contact { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gold); font-size: .85rem; }
.poster-contact p { margin: 3px 0; }
[data-address] { white-space: pre-line; }
[data-contact-links], [data-social-links] { display: flex; flex-wrap: wrap; gap: 8px 20px; }
[data-contact-links] a, [data-social-links] a { overflow-wrap: anywhere; min-width: 0; }
.poster-contact [data-contact-links] { margin-top: 8px; }
.footer-name { overflow-wrap: anywhere; }
.monthly-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: var(--forest) var(--sage); }
.monthly-scroll table { width: 100%; min-width: 1020px; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.monthly-scroll caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.monthly-scroll th, .monthly-scroll td { padding: 9px 5px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.monthly-scroll thead tr:first-child th { color: white; background: var(--forest); font-size: .88rem; font-weight: 600; border-right: 1px solid #ffffff47; padding-block: 12px; }
.monthly-scroll thead tr:last-child th { color: var(--forest-deep); background: var(--sage); font-size: .75rem; font-weight: 700; }
.monthly-scroll tbody tr > * { background: var(--paper); font-weight: 400; }
.monthly-scroll tbody tr:nth-child(even) > * { background: #f2f5ef; }
.monthly-scroll tbody tr.is-friday > * { background: #f4e9d5; }
.monthly-scroll tbody tr.is-today > * { font-weight: 700; color: var(--forest-deep); box-shadow: inset 0 -2px var(--forest); }
.monthly-scroll tbody th:first-child { position: sticky; left: 0; min-width: 42px; }
.monthly-scroll tr:last-child > * { border-bottom: 0; }
.monthly-scroll tr > :is(:nth-child(3), :nth-child(5), :nth-child(6), :nth-child(8), :nth-child(10), :nth-child(12)) { border-right: 1px solid #123c352e; }
.monthly-scroll tbody td:nth-child(3) { min-width: 105px; }

.announcements { background: var(--sage); }
.feed-label { font-size: .8rem; font-weight: 700; color: var(--forest); white-space: nowrap; border: 1px solid #9eb5a7; padding: 6px 11px; }
.announcement-list { border-top: 2px solid var(--forest); }
.announcement-item { display: grid; grid-template-columns: 170px 1fr; gap: 38px; padding: 26px 0 29px; border-bottom: 1px solid #bfcfc2; }
.announcement-item time { color: var(--muted); font-size: .82rem; }
.announcement-item h3 { margin-bottom: 9px; }
.announcement-item p { white-space: pre-line; overflow-wrap: anywhere; max-width: 70ch; color: #3d5148; margin-bottom: 0; }
.announcement-item .priority { display: inline-block; color: #8a4e22; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.feed-status { padding: 28px 0; color: var(--muted); }

.about { background: var(--paper); border-bottom: 1px solid var(--line); }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 10%; }
.about-layout h2 { max-width: 470px; }
.about-layout p { color: var(--muted); font-size: 1.08rem; max-width: 61ch; }
.services { background: var(--paper); }
.services h2 { margin-bottom: 35px; }
.service-list { display: grid; grid-template-columns: repeat(2,1fr); border-top: 2px solid var(--forest); }
.service-list article { padding: 27px 40px 0 0; }
.service-list article + article { border-left: 1px solid var(--line); padding-left: 40px; }
.service-list h3 { margin-bottom: 10px; }
.service-list p { color: var(--muted); max-width: 47ch; }
.service-list a { color: var(--forest); font-weight: 700; text-decoration: none; }
.service-list a:hover { text-decoration: underline; }

.gallery { background: #f0eee7; }
.gallery-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 10px; }
.gallery-item { margin: 0; position: relative; overflow: hidden; height: 230px; background: #d6ddd3; }
.gallery-item:first-child { height: 470px; grid-row: span 2; }
.gallery-item button { width: 100%; height: 100%; padding: 0; border: 0; display: block; background: none; cursor: zoom-in; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease-out; }
.gallery-item button:hover img { transform: scale(1.04); }
.gallery-item button span { position: absolute; left: 0; bottom: 0; right: 0; padding: 26px 14px 10px; color: white; background: linear-gradient(transparent, #08221dbb); text-align: left; font-size: .77rem; font-weight: 700; }
.photo-dialog { max-width: min(94vw, 1100px); max-height: 94vh; border: 0; padding: 12px; background: var(--forest-deep); box-shadow: 0 20px 65px #0006; }
.photo-dialog::backdrop { background: #081c19d9; }
.photo-dialog img { display: block; max-width: 100%; max-height: calc(94vh - 24px); object-fit: contain; }
.photo-close { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border: 0; background: white; color: var(--forest); border-radius: 50%; font-size: 1.7rem; line-height: 1; }

.visit { background: var(--forest); color: white; }
.visit-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14%; align-items: start; }
.visit-layout > *, .footer-main > * { min-width: 0; }
.visit-information { margin-top: 34px; }
.visit-information section + section { margin-top: 28px; }
.visit-information h3 { font-size: 1.4rem; margin-bottom: 12px; }
.visit-information ul { color: #dceae0; padding-left: 20px; }
.visit-information li + li { margin-top: 8px; }
.visit-information p { white-space: pre-line; }
#donation-options > div { display: flex; flex-wrap: wrap; gap: 14px 24px; }
#contact-status { font-size: .9rem; margin: 0; }
.visit-details [data-contact-links], .visit-details [data-social-links] { flex-direction: column; align-items: start; }
.footer-address p { margin: 0 0 10px; }
.footer-address [data-social-links] { margin-top: 10px; }
.visit-layout p { color: #dceae0; max-width: 55ch; font-size: 1.08rem; }
.visit-details { border-top: 2px solid var(--gold); padding-top: 22px; display: grid; justify-items: start; gap: 18px; }
.visit-details address { font-style: normal; font-size: 1.15rem; line-height: 1.5; }
.visit-details > a:not(.button) { font-weight: 700; font-size: 1.1rem; }
.footer { background: var(--forest-deep); color: #d6e3d9; }
.footer-main { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-block: 55px; }
.footer-name { display: block; font-size: 1.35rem; color: white; }
.footer-main p { color: #bacdc0; margin: 16px 0 0; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; align-content: start; }
.footer-links a, .footer-address a { text-decoration: none; }
.footer-address { line-height: 1.9; }
.footer-bottom { border-top: 1px solid #47645a; padding-block: 18px; display: flex; justify-content: space-between; gap: 20px; color: #bacdc0; font-size: .76rem; }

@media (max-width: 1300px) {
  .hero h1 { font-size: clamp(5rem, 10vw, 7.2rem); }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid #ffffff77; color: white; padding: 10px 13px; min-height: 44px; }
  .nav-toggle svg { width: 21px; height: 21px; }
  .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 20px 35px 28px; background: var(--forest-deep); flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--gold); }
  .main-navigation.is-open { display: flex; }
  .main-navigation > a:not(.button) { padding: 11px 0; }
  .main-navigation .button { margin-top: 12px; }
}
@media (max-width: 800px) {
  .site-header .container, .hero .container { width: calc(100% - 64px); }
  .hero h1 { font-size: clamp(4.8rem, 10vw, 6.3rem); }
  .today-panel { grid-template-columns: 145px 1fr; }
}
@media (max-width: 680px) {
  :root { --header-height: 88px; }
  .container { width: min(100% - 36px, 1120px); }
  .section { padding-block: 68px; }
  .site-header .container, .hero .container { width: calc(100% - 36px); }
  .header-inner { min-height: 88px; }
  .brand { gap: 9px; }
  .brand-logo { width: 52px; height: 52px; padding: 9px; }
  .brand-name { font-size: 1.27rem; max-width: 190px; }
  .brand-subtitle { font-size: .46rem; letter-spacing: .16em; }
  .header-discover { padding: 6px 12px; min-height: 37px; font-size: .63rem; letter-spacing: .08em; }
  .hero, .hero-inner { min-height: max(740px, 100svh); }
  .hero-media img { object-position: 57% center; }
  .hero-media::after { background: linear-gradient(90deg, #07130fc7, #07130f62 100%), linear-gradient(0deg, #07120cf0, #07120c22 65%), linear-gradient(180deg, #07131ba6, transparent 35%); }
  .hero-inner { padding-top: 200px; padding-bottom: 31px; gap: 50px; }
  .hero h1 { font-size: clamp(4.2rem, 13.4vw, 6rem); margin-bottom: 26px; }
  .hero-content > p { font-size: 1.02rem; line-height: 1.65; max-width: 42ch; }
  .hero-actions { gap: 12px; margin-top: 28px; }
  .hero-actions .button { padding: 13px 18px; font-size: .85rem; }
  .main-navigation { padding-inline: 18px; }
  .hero-bottom { padding-top: 20px; }
  .hero-bottom p { display: none; }
  .explore-icon { width: 48px; height: 48px; }
  .section-heading { display: block; }
  .date-stack { text-align: left; margin-top: 18px; }
  .prayer::before, .about::before, .services::before { opacity: .075; background-size: 160px 160px; }
  .today-panel { display: block; }
  .today-panel { padding: 12px; }
  .today-label { padding-bottom: 7px; }
  .today-table { border-left: 0; }
  .today-table th:first-child, .today-table .timetable-status { padding-left: 0; }
  .month-section { margin-top: 65px; }
  .month-heading { display: block; }
  .month-controls { margin-top: 18px; }
  .month-navigation { justify-items: start; }
  #poster-hijri { text-align: left; }
  .monthly-poster { padding: 12px; }
  #poster-hijri { font-size: .8rem; }
  .announcement-item { display: block; }
  .announcement-item time { display: block; margin-bottom: 10px; }
  .about-layout, .service-list, .visit-layout { grid-template-columns: 1fr; gap: 25px; }
  .service-list article, .service-list article + article { padding: 22px 0; border-left: 0; }
  .service-list article + article { border-top: 1px solid var(--line); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item:first-child { grid-row: auto; grid-column: span 2; height: 300px; }
  .gallery-item { height: 190px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > div:first-child { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; gap: 5px; }
}
@media (max-width: 420px) {
  .header-inner { gap: 12px; }
  .brand-name { max-width: 142px; font-size: 1.12rem; line-height: .97; }
  .brand-subtitle { max-width: 152px; font-size: .42rem; }
  .header-discover { padding-inline: 9px; }
  .hero h1 { font-size: clamp(3.7rem, 14vw, 4.6rem); }
  .hero-explore { letter-spacing: .09em; font-size: .68rem; }
  .today-table th:not(:first-child), .today-table td:not(:first-child) { width: 78px; }
  .today-table th, .today-table td { padding-left: 7px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: auto; height: 270px; }
  .gallery-item { height: 220px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-main > div:first-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-item img { transition: none; }
  .explore-icon { transition: none; }
}
html.motion-enabled { scroll-behavior: smooth; }
html:not(.motion-enabled) { scroll-behavior: auto; }

/* Distinct, quiet section colours; data tables retain their solid paper surface. */
main > .section { scroll-margin-top: 24px; overflow-x: clip; }
main :is(h1,h2,h3)[tabindex="-1"]:focus { outline: none; }
.prayer, .about, .services, .monthly { --section-background: #d4e2dd; }
.announcements, .facilities, .gallery, .visit { --section-background: #ffffff; }
.visit { color: var(--ink); }
main > .section { background-color: var(--section-background); --muted: #385347; }
.announcements, .gallery, .monthly, .facilities, .visit { position: relative; isolation: isolate; }
.announcements::before, .gallery::before, .monthly::before, .facilities::before, .visit::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: url('assets/islamic-pattern.svg') repeat; background-size: 220px 220px; opacity: .085; mask-image: linear-gradient(90deg, #000, #0003 45%, #0002 65%, #000); }
.monthly .month-heading { border-top: 0; padding-top: 0; }
.monthly .month-heading h2 { margin: 0; font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
#facilities .section-heading { justify-content: center; }
#facility-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; padding: 0; margin: 0; list-style: none; }
.facility-slot { min-width: 0; display: flex; }
.facility-slot > .facility-card { width: 100%; }
.facilities.is-arriving .facility-slot:not([data-facility-animated]) > .facility-card { opacity: 0; }
.facility-card { display: flex; align-items: flex-start; gap: 20px; padding: 24px; background: #fff; border-radius: 16px; box-shadow: 0 7px 22px #00000012; }
.facility-card > svg { flex: none; width: 58px; height: 58px; color: var(--forest); }
.facility-icon-accent { stroke: var(--gold); }
.facility-card > div { min-width: 0; }
.facility-card h3 { font-size: 1.4rem; margin: 0 0 10px; color: var(--ink); }
.facility-card p, .facility-card ul { color: var(--muted); margin: 0; font-size: .94rem; line-height: 1.65; overflow-wrap: anywhere; }
.facility-card ul { padding-left: 20px; }
.facility-card li + li { margin-top: 7px; }
.back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; min-height: 48px; background: var(--forest); color: white; border: 1px solid #ffffff60; border-radius: 999px; font-size: .8rem; font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px #0c2e2926; }
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top:hover { background: var(--forest-deep); }
.visit-layout p, .visit-information ul { color: var(--muted); }
.visit-details { border-top-color: var(--forest); }
.visit .button-light { background: var(--forest); color: #fff; }
.visit .button-light:hover { background: var(--forest-deep); }
.announcements .announcement-item { border-bottom-color: var(--line); }
.announcements .feed-label { background: #ffffff60; }
@media (max-width: 680px) {
  .announcements::before, .gallery::before, .monthly::before, .facilities::before, .visit::before { background-size: 160px 160px; opacity: .065; }
  #facility-list { grid-template-columns: 1fr; }
  .facility-card { padding: 20px 16px; gap: 14px; }
  .facility-card > svg { width: 42px; height: 42px; }
  .back-to-top { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); padding: 11px; }
  .back-to-top span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* Owner's compact desktop reference, without browser zoom or reduced phone text. */
@media (min-width: 681px) {
  :root { --header-height: 92px; }
  .container { width: min(1000px, calc(100% - 64px)); }
  .section { padding-block: 72px; }
  h2, .monthly .month-heading h2 { font-size: clamp(2rem, 3.3vw, 2.9rem); }
  h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
  .header-inner { min-height: 92px; gap: 22px; }
  .brand-logo { width: 56px; height: 56px; padding: 10px; }
  .brand { gap: 12px; }
  .brand-name { font-size: 1.55rem; max-width: 290px; }
  .brand-subtitle { font-size: .55rem; }
  .main-navigation { gap: 16px; }
  .main-navigation > a { font-size: .75rem; }
  .main-navigation .button { padding: 10px 16px; min-height: 44px; }
  .hero h1 { font-size: clamp(4.8rem, 7.5vw, 8.8rem); margin-bottom: 28px; }
  .hero-inner { min-height: max(680px, 100svh); padding-top: clamp(180px, 25svh, 270px); }
  .hero-content > p { font-size: 1rem; max-width: 52ch; }
  .section-heading { margin-bottom: 28px; }
  #facility-list { gap: 20px; }
  .facility-card { padding: 22px; gap: 17px; }
  .facility-card > svg { width: 46px; height: 46px; }
  .facility-card h3 { font-size: 1.25rem; }
  .facility-card p, .facility-card ul { font-size: .9rem; }
  .about-layout p, .visit-layout p { font-size: 1rem; }
  .today-panel { grid-template-columns: minmax(220px, 1fr) minmax(380px, 2fr); }
  .monthly-scroll table { min-width: 920px; font-size: .8rem; }
}
#today-extras { margin-top: 25px; max-width: 28ch; }
#today-extras:empty { display: none; }
#today-extras h4 { font-size: .88rem; margin: 22px 0 9px; color: var(--forest); }
#today-extras p { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .88rem; margin: 5px 0; }
#today-extras strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
#today-extras small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.5; margin-top: 10px; }
.visit-layout { gap: 8%; }
.visit-map { margin-top: 26px; overflow: hidden; border-radius: 12px; background: var(--sage); }
.visit-map iframe { display: block; border: 0; width: 100%; height: 240px; }
.visit-details address { font-size: 1rem; }
.contact-icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }
[data-contact-links] a, [data-social-links] a { display: inline-flex; align-items: flex-start; gap: 12px; line-height: 1.6; }
[data-contact-links] a:hover, [data-social-links] a:hover { text-decoration: underline; }
.footer-main { grid-template-columns: 1.15fr .9fr 1fr; gap: 54px; padding-block: 48px; }
.footer-name { font: 500 1.65rem/1.15 'Cormorant Garamond', Georgia, serif; max-width: 22ch; }
.footer-main p { color: #d6e3d9; font-size: .9rem; margin-top: 14px; }
.footer-main h3 { color: white; font: 700 .86rem/1.5 'DM Sans', Arial, sans-serif; margin: 0 0 16px; }
.footer-links { gap: 10px 22px; font-size: .85rem; }
.footer-links h3 { grid-column: 1/-1; margin-bottom: 6px; }
.footer-address { font-size: .88rem; line-height: 1.7; }
.footer-address [data-contact-links], .footer-address [data-social-links] { display: grid; gap: 13px; margin-top: 16px; }
.footer-location { display: flex; gap: 12px; align-items: flex-start; }
.footer-location p { margin: 0; }
.footer-bottom { color: #d6e3d9; font-size: .75rem; line-height: 1.7; }
/* The photograph owns the fullscreen canvas; controls live in its margins. */
body.gallery-open { overflow: hidden; }
.photo-dialog { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #081310; color: #f2f6f3; box-shadow: none; overflow: hidden; }
.photo-dialog[open] { display: grid; grid-template-rows: 64px minmax(0, 1fr) 82px; }
.photo-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 24px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.photo-stage { margin: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 12px; padding: 0 86px 12px; touch-action: pan-y pinch-zoom; }
.photo-dialog .photo-stage img { width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; }
.photo-stage figcaption { text-align: center; font-size: .85rem; line-height: 1.5; color: #d6e3d9; }
.photo-dialog button { display: inline-flex; align-items: center; justify-content: center; color: #f2f6f3; background: #18372f; border: 1px solid #547b6d; width: 48px; height: 48px; border-radius: 50%; padding: 12px; }
.photo-dialog button:hover { background: #2d5346; }
.photo-dialog button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.photo-dialog .photo-close { position: static; font-size: inherit; }
.photo-arrow { position: absolute; top: calc(50% - 24px); }
.photo-prev { left: 20px; }
.photo-next { right: 20px; }
.photo-filmstrip { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 7px 20px 16px; scrollbar-color: #90b4a4 #081310; }
.photo-dialog .photo-filmstrip button { width: 64px; height: 54px; flex: none; padding: 3px; border-radius: 4px; border-color: transparent; background: transparent; }
.photo-dialog .photo-filmstrip button[aria-pressed="true"] { border-color: #e7d0a3; }
.photo-dialog .photo-filmstrip img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 1100px) and (min-width: 681px) {
  .footer-main { gap: 28px; }
  .today-panel { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .footer-main { grid-template-columns: 1fr; gap: 32px; padding-block: 38px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-name { font-size: 1.8rem; }
  .visit-map iframe { height: 220px; }
  #today-extras { max-width: none; margin: 14px 0; }
  #today-extras h4 { margin-top: 14px; }
  .photo-dialog[open] { grid-template-rows: 64px minmax(0,1fr) 78px; }
  .photo-stage { padding: 0 12px 58px; }
  .photo-stage figcaption { font-size: .8rem; }
  .photo-arrow { top: auto; bottom: 88px; }
  .photo-prev { left: 14px; }
  .photo-next { right: 14px; }
  .photo-toolbar { padding-inline: 14px; }
}
.brand-subtitle { font-size: .6875rem; letter-spacing: .12em; }
@media (max-width: 680px) {
  .brand-subtitle { display: none; }
  .hero-explore { font-size: .75rem; }
}
