:root {
  --navy: #183868;
  --navy-dark: #112a50;
  --navy-soft: rgba(24, 56, 104, 0.1);
  --gold: #d8b058;
  --gold-dark: #b8923e;
  --gold-soft: rgba(216, 176, 88, 0.18);
  --whatsapp: #25d366;
  --night: #0d1b33;
  --night-2: #142848;
  --ink: #16213a;
  --text: #4b5468;
  --muted: #6f778a;
  --cream: #faf7f0;
  --line: #e6e2d8;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -30px rgba(13, 27, 51, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
a { color: var(--navy-dark); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; color: var(--ink); margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(28px, 3.6vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
[lang="ar"] { font-family: "Amiri", "Noto Naskh Arabic", serif; direction: rtl; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 12px; z-index: 100; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-dark); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); }
.lede { font-size: 17px; color: var(--muted); max-width: 620px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1; transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s; }
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-dark { background: var(--night); color: var(--white); }
.btn-dark:hover { background: var(--night-2); }
.btn-light { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.55); }
.btn-light:hover { background: var(--white); color: var(--night); border-color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: #1fb85a; }
.btn svg.wa { fill: currentColor; }

/* Pattern used on dark bands */
.pattern { background-color: var(--night); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M36 4l32 32-32 32L4 36z'/%3E%3Cpath d='M36 20l16 16-16 16-16-16z'/%3E%3Cpath d='M0 36h72M36 0v72'/%3E%3C/g%3E%3C/svg%3E"); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 90px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.logo img { height: 66px; width: auto; flex: 0 0 auto; }
.logo .site-title { font-family: "Playfair Display", Georgia, serif; font-size: 19px; font-weight: 700; margin: 0; line-height: 1.15; color: var(--navy); }
.logo .site-title-ar { font-size: 17px; margin: 0; line-height: 1.2; color: var(--gold-dark); }
.header-right { display: flex; align-items: center; gap: 22px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.main-nav a { font-weight: 500; font-size: 15px; color: var(--text); text-decoration: none; transition: color 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy-dark); }
.header-right .btn { padding: 10px 18px; font-size: 14px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); cursor: pointer; place-items: center; }
.menu-toggle svg { width: 22px; height: 22px; }

/* Hero */
.hero { position: relative; min-height: 640px; display: flex; align-items: center; color: var(--white); padding: 120px 0; overflow: hidden; isolation: isolate; }
.hero .bg { position: absolute; inset: 0; z-index: -2; }
.hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(15,31,25,0.94) 0%, rgba(15,31,25,0.78) 45%, rgba(15,31,25,0.3) 100%); }
.hero-inner { max-width: 680px; }
.hero .bismillah { font-size: 30px; color: var(--gold); margin: 0 0 18px; line-height: 1.5; }
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero h1 span { color: var(--gold); }
.hero .lede { color: rgba(255,255,255,0.86); margin-bottom: 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Quick links */
.quick { margin-top: -56px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quick-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; gap: 18px; align-items: flex-start; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform 0.25s, border-color 0.25s; }
.quick-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.quick-card .ic { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px; background: var(--navy-soft); color: var(--navy-dark); display: grid; place-items: center; }
.quick-card .ic svg { width: 24px; height: 24px; }
.quick-card .ic.gold { background: var(--gold-soft); color: var(--gold-dark); }
.quick-card h3 { font-size: 18px; margin-bottom: 4px; }
.quick-card p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* Iqama */
.iqama { padding: 100px 0 90px; }
.iqama .container { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.iqama figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.iqama .note { display: flex; gap: 14px; align-items: flex-start; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 26px 0 0; font-size: 15px; }
.iqama .note svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--gold); margin-top: 3px; }

/* Events */
.events { background: var(--cream); padding: 100px 0; }
.events .head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.event:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event img { width: 100%; aspect-ratio: 481 / 238; object-fit: cover; }
.event .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.event .date { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy-dark); margin-bottom: 8px; }
.event h3 { font-size: 20px; margin-bottom: 10px; }
.event h3 a { color: var(--ink); text-decoration: none; }
.event h3 a:hover { color: var(--navy-dark); }
.event p { flex: 1; font-size: 15px; color: var(--muted); }
.event .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.event .actions .btn { padding: 10px 18px; font-size: 14px; }

/* Inside the masjid */
.inside { padding: 100px 0; }
.inside .container { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.inside figure { margin: 0; position: relative; }
.inside figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.inside figure::after { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 2px solid var(--gold); border-radius: var(--radius); opacity: 0.6; z-index: -1; }

/* Community band */
.community { padding: 90px 0; color: var(--white); }
.community .band { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.community h2 { color: var(--white); margin-bottom: 8px; }
.community p { margin: 0; color: rgba(255,255,255,0.8); max-width: 560px; }
.community .arabic { font-size: 26px; color: var(--gold); margin-bottom: 10px; text-align: left; }

/* Inner pages */
.page-hero { color: var(--white); padding: 80px 0 70px; }
.page-hero h1 { color: var(--white); }
.page-hero .eyebrow { color: var(--gold); }
.page-hero .eyebrow::before { background: var(--gold); }
.breadcrumb { font-size: 14px; margin: 14px 0 0; color: rgba(255,255,255,0.7); }
.breadcrumb a { color: rgba(255,255,255,0.9); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.page-content { padding: 70px 0 90px; }
.page-content .narrow { max-width: 820px; margin: 0 auto; }
.page-content .lede { max-width: none; font-size: 18px; color: var(--text); }
.page-content figure { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.page-content figure img { width: 100%; }
.page-content ul { padding-left: 20px; }
.page-content code { background: var(--cream); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 14px; }
.post-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.post-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.post-nav a:hover { color: var(--navy-dark); }
.post-nav span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* Footer */
.site-footer { color: rgba(255,255,255,0.82); padding: 70px 0 28px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 0.8fr 1fr; gap: 48px; align-items: start; }
.site-footer .brand img { width: 150px; height: auto; background: var(--white); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 18px; }
.site-footer .brand p { max-width: 420px; margin: 0; font-size: 15px; }
.site-footer h2 { font-family: "Inter", sans-serif; font-size: 13px; color: var(--gold); margin-bottom: 18px; letter-spacing: 0.1em; text-transform: uppercase; }
.site-footer .links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer .links a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 15px; }
.site-footer .links a:hover { color: var(--gold); }
.site-footer .join p { margin: 0 0 16px; font-size: 15px; }
.copyright { margin: 56px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: rgba(255,255,255,0.6); }

@media (max-width: 960px) {
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 90px; background: var(--white); border-bottom: 1px solid var(--line); padding: 16px 24px 20px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 14px; }
  .menu-toggle { display: grid; }
  .header-right .btn-whatsapp span { display: none; }
  .header-right .btn-whatsapp { padding: 10px 12px; }
  .quick-grid, .event-grid { grid-template-columns: 1fr; }
  .quick { margin-top: 40px; }
  .iqama .container, .inside .container { grid-template-columns: 1fr; gap: 36px; }
  .inside figure { order: -1; }
  .events .head { flex-direction: column; align-items: flex-start; }
  .community .band { flex-direction: column; align-items: flex-start; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .site-header .container { height: 76px; }
  .main-nav { top: 76px; }
  .logo img { height: 54px; }
  .logo .site-title { font-size: 16px; }
  .logo .site-title-ar { font-size: 15px; }
  .hero { min-height: 0; padding: 80px 0 90px; }
  .hero .bismillah { font-size: 24px; }
  .iqama, .events, .inside, .community { padding: 70px 0; }
  .page-hero { padding: 60px 0 50px; }
  .page-content { padding: 50px 0 70px; }
  .copyright { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .event, .quick-card { transition: none; }
}

/* Masjidal widget */
.widget-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-height: 200px; }
.page-content .widget-card { margin-bottom: 32px; }
.announcements { background: var(--cream); padding: 100px 0; }
.announcements .head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
@media (max-width: 960px) { .announcements .head { flex-direction: column; align-items: flex-start; } }
@media (max-width: 560px) { .announcements { padding: 70px 0; } }
