/* Masjid Bilal: deep teal, brass, Amiri headings, geometric tile pattern */
:root{
  --teal:#0e3b43; --teal-2:#165560; --teal-deep:#0a2c32;
  --brass:#c8962e; --brass-dark:#8f6812; --brass-light:#e8c46f;
  --paper:#f6f7f4; --white:#fff; --ink:#1b2528; --muted:#4f6268;
  --mist:#e3ece9; --line:#cfdad6;
  --serif:'Amiri', Georgia, 'Times New Roman', serif;
  --sans:'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tile:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23c8962e' stroke-opacity='.3' stroke-width='1'%3E%3Crect x='22' y='22' width='44' height='44'/%3E%3Crect x='22' y='22' width='44' height='44' transform='rotate(45 44 44)'/%3E%3Ccircle cx='44' cy='44' r='9'/%3E%3C/g%3E%3C/svg%3E");
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:1.0625rem;line-height:1.65}
img{max-width:100%;height:auto}
a{color:var(--teal-2);text-underline-offset:.15em}
a:hover{color:var(--teal)}
:focus-visible{outline:3px solid var(--brass);outline-offset:3px}
.wrap{width:100%;max-width:1120px;margin:0 auto;padding:0 1.25rem}
.skip-link{position:absolute;left:-999px;top:0;background:var(--brass);color:#000;padding:.6rem 1rem;z-index:100}
.skip-link:focus{left:0}

h1,h2,h3,h4{font-family:var(--serif);color:var(--teal);line-height:1.2;font-weight:700}
h1{font-size:clamp(2rem,4.5vw,3rem);margin:0 0 .5rem}
h2{font-size:clamp(1.6rem,3vw,2.1rem);margin:2.2rem 0 .75rem}
h3{font-size:1.4rem;margin:1.8rem 0 .5rem}

/* Buttons */
.btn{display:inline-block;font:inherit;font-weight:700;text-decoration:none;border-radius:6px;padding:.7rem 1.3rem;border:2px solid transparent;cursor:pointer;line-height:1.2}
.btn-lg{padding:.9rem 1.8rem;font-size:1.1rem}
.btn-brass{background:var(--brass);color:#1a1405;border-color:var(--brass)}
.btn-brass:hover{background:var(--brass-light);border-color:var(--brass-light);color:#1a1405}
.btn-teal{background:var(--teal);color:#fff;border-color:var(--teal)}
.btn-teal:hover{background:var(--teal-2);border-color:var(--teal-2);color:#fff}
.btn-ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.65)}
.btn-ghost:hover{background:rgba(255,255,255,.12);color:#fff}

/* Top bar and header */
.topbar{background:var(--teal-deep);color:#cfe0de;font-size:.9rem}
.topbar-inner{display:flex;gap:1.5rem;flex-wrap:wrap;justify-content:flex-end;padding-top:.4rem;padding-bottom:.4rem}
.topbar a{color:#e8f1ef;text-decoration:none}
.topbar a:hover{text-decoration:underline}
.site-header{background:var(--white);border-bottom:3px solid var(--brass);position:relative;z-index:20}
.site-header .wrap{max-width:1280px}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1.75rem;padding-top:.6rem;padding-bottom:.6rem}
.brand{display:flex;align-items:center;gap:.8rem;text-decoration:none}
.brand img{display:block;height:60px;width:auto;flex:none}
.brand-text{display:block}
.brand-name{display:block;font-family:var(--serif);font-weight:700;font-size:1.65rem;color:var(--teal);line-height:1}
.brand-sub{display:block;color:var(--muted);font-size:.85rem;white-space:nowrap}
.site-nav{display:flex;align-items:center;gap:.75rem}
.menu,.submenu{list-style:none;margin:0;padding:0}
.menu{display:flex;gap:.1rem;align-items:center}
.menu>li{position:relative}
.menu a{display:block;white-space:nowrap;padding:.65rem .65rem;color:var(--ink);text-decoration:none;font-weight:600;font-size:1rem;border-radius:4px}
.menu a:hover{background:var(--mist);color:var(--teal)}
.menu li.is-active>a{color:var(--teal);box-shadow:inset 0 -3px 0 var(--brass);border-radius:4px 4px 0 0}
.menu>li.has-sub>a::after{content:"";display:inline-block;margin-left:.4rem;border:4px solid transparent;border-top-color:currentColor;border-bottom:0;vertical-align:middle}
.submenu{position:absolute;left:0;top:100%;min-width:230px;background:var(--white);border:1px solid var(--line);border-top:3px solid var(--brass);box-shadow:0 12px 28px rgba(10,44,50,.18);display:none;z-index:30}
.submenu .submenu{left:100%;top:-3px}
.has-sub:hover>.submenu,.has-sub:focus-within>.submenu{display:block}
.submenu li{position:relative}
.submenu a{padding:.6rem 1rem;font-weight:500;border-radius:0}
.nav-toggle{display:none;background:var(--teal);color:#fff;border:0;border-radius:6px;padding:.6rem 1rem;font:inherit;font-weight:700;cursor:pointer}

/* Announcement */
.announce{background:var(--brass-light);color:#2b2208;text-align:center;padding:.6rem 0;font-weight:600}
.announce a{color:#2b2208}

/* Hero: the tile pattern is the one decorative flourish */
.hero{background-color:var(--teal);background-image:var(--tile),linear-gradient(160deg,var(--teal-2),var(--teal-deep) 70%);background-size:88px 88px,cover;color:#fff;padding:3.5rem 0 4rem}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:3rem;align-items:center}
.bismillah{font-family:var(--serif);font-size:clamp(1.8rem,3.5vw,2.6rem);color:var(--brass-light);margin:0 0 1rem;line-height:1.4;text-align:left;direction:rtl}
.hero h1{color:#fff;font-size:clamp(3rem,7vw,5.2rem);letter-spacing:-.01em;margin:0}
.hero-sub{font-family:var(--serif);font-size:clamp(1.3rem,2.5vw,1.8rem);margin:.25rem 0 1.25rem;color:#d7e7e4}
.hero-lead{max-width:34rem;color:#dbe8e6;font-size:1.15rem}
.hero-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1.75rem}
.hero-times{display:flex;justify-content:center}
.times-card{width:100%;background:var(--paper);color:var(--ink);border-radius:10px;padding:1.1rem 1.25rem 1rem;border-top:5px solid var(--brass);box-shadow:0 18px 40px rgba(0,0,0,.28)}
.times-card h2{margin:0 0 .5rem;font-size:1.6rem}
.times-link{margin:.5rem 0 0;font-size:.95rem}
iframe.widget{display:block;width:100%;height:440px;margin:0 auto;border:0;background:transparent}
.prayer-embed iframe.widget{max-width:640px}

/* Sections */
.section{padding:3.5rem 0}
.section-mist{background:var(--mist)}
.section h2:first-child{margin-top:0}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:3rem}
.about-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:3rem;align-items:center}
.about-photo{margin:0}
.about-photo img{display:block;width:100%;border-radius:6px;border:6px solid var(--white)}
.link-list{list-style:none;padding:0;margin:1.25rem 0 0;display:grid;gap:.4rem}
.link-list a{font-weight:600}
.more-link{font-weight:700}

/* Jumu'ah schedule + content tables */
table{border-collapse:collapse;width:100%;background:var(--white)}
th,td{padding:.7rem .9rem;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
thead th{background:var(--teal);color:#fff;font-weight:600}
tbody th{font-weight:700;color:var(--teal)}
.prose table{margin:1.25rem 0;border:1px solid var(--line)}
.schedule{border:1px solid var(--line)}
.schedule-note{margin:.6rem 0 0;color:var(--muted);font-size:.95rem}

/* Events */
.event-list{list-style:none;margin:0;padding:0}
.event-row{display:grid;grid-template-columns:72px 1fr;gap:1rem;padding:1rem 0;border-bottom:1px solid var(--line)}
.event-list-full .event-row{grid-template-columns:72px 1fr 180px}
.event-row.is-featured .event-date{background:var(--teal);color:#fff}
.event-date{display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--mist);color:var(--teal);border-radius:6px;text-decoration:none;height:72px;line-height:1}
.event-month{font-size:.85rem;font-weight:700;text-transform:none}
.event-day{font-family:var(--serif);font-size:2rem;font-weight:700;margin-top:.15rem}
.event-body h3{margin:0 0 .25rem;font-size:1.3rem}
.event-body h3 a{text-decoration:none}
.event-body h3 a:hover{text-decoration:underline}
.event-body p{margin:.1rem 0}
.event-when{color:var(--brass-dark);font-weight:700}
.event-when-lg{font-size:1.2rem;margin:.25rem 0 0}
.event-where{color:var(--muted);font-size:.95rem}
.event-excerpt{margin-top:.5rem !important}
.event-thumb img{display:block;width:100%;height:120px;object-fit:cover;border-radius:6px}
.events-tools{display:flex;gap:1.5rem;flex-wrap:wrap;font-weight:600}
.event-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:3rem}
.event-image{border-radius:6px;display:block}
.event-side{background:var(--white);border:1px solid var(--line);border-top:4px solid var(--brass);border-radius:6px;padding:1rem 1.25rem;align-self:start}
.event-side h2{font-size:1.3rem;margin:.5rem 0}
.event-side dl{margin:0 0 1rem}
.event-side dt{font-weight:700;color:var(--teal);margin-top:.6rem}
.event-side dd{margin:0}

/* Social widgets */
.social-section{background:var(--paper)}
.social-grid{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:start}
.social-grid.is-single{grid-template-columns:minmax(0,640px)}
.social-card{min-width:0}
.social-card h2{margin-top:0}
.video-frame{position:relative;aspect-ratio:16/9;background:var(--teal-deep);border-radius:8px;overflow:hidden}
.video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.social-title{font-weight:700;margin:.8rem 0 .1rem;line-height:1.35}
.social-meta{margin:0 0 .5rem;color:var(--muted);font-size:.95rem}
.x-embed{max-width:520px;min-height:120px;border:1px solid var(--line);border-radius:8px;background:var(--white);padding:.5rem .75rem}
.x-embed .twitter-timeline{display:inline-block;padding:.5rem 0}

/* Donate band */
.donate-band{background:var(--teal);background-image:var(--tile);background-size:88px 88px;color:#fff;padding:2.75rem 0}
.donate-inner{display:flex;gap:2rem;align-items:center;justify-content:space-between;flex-wrap:wrap}
.donate-band h2{color:#fff;margin:0 0 .4rem}
.donate-band p{margin:0;color:#dbe8e6}
.donate-band a:not(.btn){color:var(--brass-light)}

/* Inner pages */
.page-head{background:var(--mist);border-bottom:1px solid var(--line);padding:2.25rem 0 1.75rem}
.page-head h1{margin:0}
.page-meta{margin:0 0 .4rem;color:var(--muted);font-size:.95rem}
.draft-flag{background:#fff4d6;border:1px solid #e3c36b;padding:.4rem .8rem;border-radius:4px;display:inline-block;font-weight:600}
.page-body{padding-top:2.25rem;padding-bottom:4rem}
.prose{max-width:46rem}
.event-layout .prose,.page-body > .prose{max-width:none}
.page-body .prose>*{max-width:46rem}
.page-body .prose>table,.page-body .prose>.gallery,.page-body .prose>.contact-grid,.page-body .prose>.figure-pair,.page-body .prose>.form-wrap,.page-body .prose>.prayer-embed,.page-body .prose>.embed{max-width:none}
.prose img{border-radius:4px}
.prose ul,.prose ol{padding-left:1.4rem}
.prose li{margin:.3rem 0}
.prose h2{border-top:1px solid var(--line);padding-top:1.5rem}
.prose h2:first-child{border-top:0;padding-top:0;margin-top:0}
.news-list{list-style:none;padding:0;margin:0;max-width:46rem}
.news-list li{padding:1.25rem 0;border-bottom:1px solid var(--line)}
.news-list h2{margin:0 0 .2rem;font-size:1.5rem}
.news-list h2 a{text-decoration:none}
.news-list p{margin:.3rem 0}
.news-list li.has-thumb{display:grid;grid-template-columns:160px 1fr;gap:1.25rem;align-items:start}
.news-thumb img{display:block;width:100%;height:110px;object-fit:cover;border-radius:6px}
.featured-image{margin:0 0 1.75rem}
.featured-image img{display:block;width:100%;max-height:420px;object-fit:cover;border-radius:8px}

.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.9rem;margin:1.25rem 0}
.gallery-wide{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.gallery a{display:block;overflow:hidden;border-radius:4px;background:var(--mist)}
.gallery img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:7/5}
.gallery-wide img{aspect-ratio:auto}
.figure-pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.25rem;margin:1.5rem 0}
.figure-pair figure{margin:0}
.figure-pair figcaption{color:var(--muted);font-size:.95rem;margin-top:.3rem}
.contact-grid{display:grid;grid-template-columns:1fr 1.3fr;gap:2.5rem;margin-bottom:1rem}
iframe.map{width:100%;height:320px;border:1px solid var(--line);border-radius:6px}
dl.people{display:grid;grid-template-columns:200px 1fr;gap:.35rem 1rem;margin:.5rem 0 1rem}
dl.people dt{font-weight:700;color:var(--teal)}
dl.people dd{margin:0}
.embed{margin-top:2rem}

/* Forms */
.form-wrap{margin:1rem 0 2rem;max-width:50rem}
.field-grid{display:flex;flex-wrap:wrap;gap:0 1.25rem}
.field{flex:1 1 100%;margin-bottom:1rem}
.field-half{flex:1 1 calc(50% - .65rem);min-width:230px}
.field label{display:block;font-weight:600;margin-bottom:.3rem}
.field input[type=text],.field input[type=email],.field input[type=tel],.field input[type=date],.field input[type=time],.field select,.field textarea,.field input[type=file]{width:100%;font:inherit;padding:.65rem .75rem;border:1px solid #8fa6a1;border-radius:5px;background:#fff;color:var(--ink)}
.field textarea{min-height:130px}
.field-check .check{display:flex;gap:.6rem;align-items:flex-start;font-weight:500}
.field-check input{margin-top:.35rem;width:1.1rem;height:1.1rem;flex:none}
.req{color:#b3261e}
.field-help{display:block;margin-top:.25rem;color:var(--muted);font-size:.92rem}
.form-heading{flex:1 1 100%;margin:1.25rem 0 .5rem;font-size:1.25rem}
.form-note{flex:1 1 100%;color:var(--muted);font-size:.95rem;margin:.25rem 0 1rem}
.hp{position:absolute;left:-5000px;height:0;overflow:hidden}
.notice{padding:.8rem 1rem;border-radius:6px;margin:1rem 0;border:1px solid}
.notice-ok{background:#e8f5ee;border-color:#9fd0b4}
.notice-error{background:#fdecea;border-color:#f1b0ab}
.notice ul{margin:.4rem 0 0 1.2rem;padding:0}

/* Footer */
.site-footer{background:var(--teal-deep);color:#cfe0de;margin-top:0}
.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:2rem;padding-top:3rem;padding-bottom:2rem}
.footer-title{font-family:var(--serif);color:#fff;font-size:1.3rem;margin:0 0 .6rem}
.site-footer p{margin:.3rem 0}
.site-footer a:not(.btn){color:var(--brass-light)}
.footer-base{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;border-top:1px solid rgba(255,255,255,.15);padding-top:1rem;padding-bottom:1.5rem;font-size:.92rem}

/* Lightbox */
.lightbox{position:fixed;inset:0;background:rgba(5,20,24,.92);display:flex;align-items:center;justify-content:center;z-index:200;padding:1rem;cursor:zoom-out}
.lightbox img{max-width:100%;max-height:100%;border-radius:4px}

/* Responsive */
@media (max-width:980px){
  .hero-grid,.two-col,.about-grid,.event-layout,.contact-grid,.social-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  .event-list-full .event-row{grid-template-columns:72px 1fr}
  .event-thumb{display:none}
}
@media (max-width:1240px){
  .nav-toggle{display:block}
  .site-nav{display:none;position:absolute;left:0;right:0;top:100%;background:var(--white);border-bottom:3px solid var(--brass);flex-direction:column;align-items:stretch;padding:.75rem 1.25rem 1.25rem;max-height:80vh;overflow:auto;box-shadow:0 16px 30px rgba(10,44,50,.2)}
  .site-nav.open{display:flex}
  .menu{flex-direction:column;align-items:stretch}
  .menu a{white-space:normal}
  .submenu,.submenu .submenu{position:static;display:block;border:0;box-shadow:none;min-width:0;padding-left:1rem;background:transparent}
  .menu>li.has-sub>a::after{display:none}
  .nav-donate{text-align:center}
}
@media (max-width:900px){
  dl.people{grid-template-columns:1fr}
  .hero{padding:2.5rem 0 3rem}
}
@media (max-width:560px){
  .news-list li.has-thumb{grid-template-columns:1fr}
  .news-thumb img{height:180px}
  .brand img{height:48px}
  .brand-name{font-size:1.45rem}
  .brand-sub{font-size:.8rem}
  .footer-grid{grid-template-columns:1fr}
  .topbar-inner{justify-content:flex-start;gap:.9rem}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto !important;transition:none !important;animation:none !important}}
@media print{.topbar,.site-header,.site-footer,.donate-band{display:none}}
