/* Khairway — shared site styles */
:root {
  color-scheme: dark;
  --bg: #171a17;
  --panel: #222720;
  --panel-2: #292d25;
  --gold: #c5a66b;
  --gold-light: #e1c78f;
  --cream: #f5f2e9;
  --muted: #b9b9ae;
  --line: #414238;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-light); }
button, input { font: inherit; }
img, video { max-width: 100%; }
.container { width: min(1100px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--bg); padding: 8px 12px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
.gold { color: var(--gold); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; }
h1 { font-size: clamp(48px, 8vw, 88px); letter-spacing: -2px; }
h2 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -1px; }
h3 { font-size: 24px; }
p { color: var(--muted); margin: 18px 0; }
.eyebrow { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin: 0 0 16px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 1px solid var(--gold); padding: 11px 17px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; transition: background .2s, color .2s; }
.button-gold { background: var(--gold); color: var(--bg); font-weight: 700; }
.button-gold:hover { background: var(--gold-light); color: var(--bg); }
.button-outline { background: transparent; color: var(--cream); }
.button-outline:hover { background: var(--gold); color: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(23, 26, 23, .97); border-bottom: 1px solid #3b3d34; backdrop-filter: blur(10px); }
.nav-wrap { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-block; flex-shrink: 0; font: 25px/1.1 var(--serif); letter-spacing: 2px; }
.brand span { display: block; margin-top: 7px; color: var(--gold); font: 9px/1.3 var(--sans); letter-spacing: 2px; }
.primary-nav { display: flex; align-items: center; gap: 20px; font-size: 12px; }
.primary-nav > a, .nav-dropdown > summary { padding-block: 10px; }
.nav-dropdown { position: relative; }
.nav-dropdown summary { cursor: pointer; list-style: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; top: calc(100% + 7px); right: 0; width: 235px; padding: 8px; background: #242720; border: 1px solid #55503e; box-shadow: 0 12px 28px #0005; }
.dropdown-panel a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #3b3d34; font-size: 13px; }
.dropdown-panel a:last-child { border-bottom: 0; }
.dropdown-panel a:hover { background: #30332b; color: var(--gold-light); }
.menu-toggle { display: none; border: 1px solid #666; background: transparent; color: var(--cream); padding: 7px 11px; }
.hero { min-height: 520px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 35px; padding-block: 65px; }
.hero-description { max-width: 520px; font-size: 15px; }
.tagline { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 3px; margin: 12px 0; }
.hero-art { min-height: 380px; position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid #55503e; background: radial-gradient(ellipse at 50% 45%, #34372d, #1b1e19 70%); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid #a58a55; border-radius: 50%; opacity: .45; }
.hero-art::after { width: 220px; height: 220px; }
.hero-monogram { z-index: 1; color: var(--gold); font: 130px var(--serif); }
.hero-art-caption { position: absolute; bottom: 20px; color: #c7b58a; font-size: 10px; letter-spacing: 3px; text-align: center; }
.pillars { border-block: 1px solid #3b3d34; padding: 19px 0; }
.pillars-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #d4d0c3; font-size: 12px; letter-spacing: .5px; }
.pillars i { color: var(--gold); font-style: normal; }
.section { padding-block: 85px; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 45px; }
.section-copy h2 { margin: 0 0 20px; }
.section-copy > p:not(.eyebrow) { max-width: 590px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.fact { border-top: 1px solid #776343; padding-top: 12px; }
.fact strong { display: block; color: var(--gold); font: 24px var(--serif); }
.fact span { color: var(--muted); font-size: 11px; }
.hadith { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold); }
.hadith blockquote { margin: 0; color: #e1d5b8; font: italic 23px/1.5 var(--serif); }
.hadith figcaption { margin-top: 11px; color: #c7c3b7; font-size: 11px; }
.hadith figcaption span { display: block; color: #96958a; margin-top: 3px; }
.long-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 25px; padding: 20px; border: 1px solid #5a503c; background: #20231d; }
.long-card .eyebrow { margin-bottom: 8px; }
.long-card h3 { font-size: 23px; }
.long-card p { margin: 7px 0 0; font-size: 13px; }
.media-column { min-width: 0; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot { position: relative; display: grid; place-items: center; min-height: 175px; overflow: hidden; border: 1px solid #4c4b3c; background: #292c25; padding: 14px; text-align: center; color: #c0b18c; font-size: 11px; letter-spacing: 1px; }
.photo-slot.photo-tall { grid-row: span 2; min-height: 360px; }
.photo-slot img, .photo-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot span { position: relative; z-index: 1; padding: 7px 10px; background: #171a17c9; }
.photo-slot span small { color: #aaa99f; font-size: 10px; }
.photo-slot.has-media span { display: none; }
.upload-control { display: inline-block; margin-top: 12px; color: var(--gold); font-size: 12px; text-decoration: underline; cursor: pointer; }
.upload-control input { display: block; width: 100%; max-width: 100%; margin-top: 8px; color: var(--muted); font-size: 12px; }
.small-note { color: #8e8e82; font-size: 11px; }
code { color: #e0d2ae; }
.section-dark { background: #20231f; border-block: 1px solid #3b3d34; }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.event-card { min-height: 150px; padding: 20px; border: 1px solid #44463b; }
.event-number { color: var(--gold); font: 26px var(--serif); }
.event-card h3 { margin: 12px 0; font-size: 21px; }
.event-card p { margin: 0; font-size: 13px; }
.community-section { padding-block: 80px; background: var(--cream); color: #20231f; }
.community-section h2 { color: #20231f; }
.community-section p:not(.eyebrow) { color: #606157; }
.join-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 35px; }
.join-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.qr-card { padding: 20px; border: 1px solid #ded6c5; background: #fff; color: #242720; text-align: center; }
.qr-card .eyebrow { margin-bottom: 5px; }
.qr-card h3 { font-size: 20px; }
.qr-card p:not(.eyebrow) { margin: 8px 0; font-size: 12px; }
.qr-card .button { margin-top: 10px; width: 100%; }
.qr-image { display: block; width: min(100%, 240px); height: auto; margin: 15px auto; border: 1px solid #ded6c5; background: #fff; }
.group-list { padding: 20px; background: #ebe7dc; }
.group-list .eyebrow { margin-bottom: 10px; }
.group-list ul { list-style: none; margin: 0; padding: 0; }
.group-list li { border-bottom: 1px solid #d4cebf; }
.group-list li a { display: flex; justify-content: space-between; padding: 8px 0; color: #33362e; font-size: 12px; }
.group-list li a:hover { color: #8d6b2e; }
.text-link { display: inline-block; margin-top: 15px; color: #5b4a2d; font-size: 12px; text-decoration: underline; }
.long-section { background: linear-gradient(120deg, #20231e, #171a17); }
.long-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hadith-large { margin: 0; }
.hadith-large blockquote { font-size: 22px; }
.hadith-large hr { border: 0; border-top: 1px solid #49483c; margin: 25px 0; }
.site-footer { border-top: 1px solid #414238; padding: 30px 0 18px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 15px; color: #c1bfb3; font-size: 12px; }
.back-to-top { padding: 9px 13px; border: 1px solid #68634f; background: transparent; color: var(--cream); font-size: 11px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 15px; margin-top: 22px; padding-top: 14px; border-top: 1px solid #383a32; color: #8e8e82; font-size: 11px; }
.long-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 35px; padding-block: 70px; }
.long-hero-copy > p:not(.eyebrow):not(.tagline) { max-width: 550px; }
.long-hero-art { min-height: 340px; }
.section-heading { max-width: 650px; margin-bottom: 35px; }
.hadith-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hadith-list .hadith { margin: 0; }
.hadith-list blockquote { font-size: 20px; }
.long-photo-placeholder { display: grid; place-items: center; min-height: 330px; padding: 20px; border: 1px solid #4c4b3c; background: #292c25; color: #c0b18c; text-align: center; font-size: 12px; letter-spacing: 1px; }
.long-photo-placeholder small { color: #aaa99f; font-size: 10px; }
.long-note { padding: 25px; border: 1px solid #4b4b3c; }
.long-note h3 { margin-bottom: 15px; }
.check-list { margin: 0; padding-left: 20px; color: var(--muted); }
.check-list li { padding: 6px 0; }

@media (max-width: 850px) {
  .primary-nav { gap: 12px; }
  .join-side { grid-template-columns: 1fr; }
  .pillars-inner { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 30px); }
  .nav-wrap { min-height: 66px; flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
  .primary-nav.is-open { display: flex; }
  .primary-nav > a, .nav-dropdown > summary { padding: 11px 3px; border-bottom: 1px solid #393a32; }
  .dropdown-panel { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .hero, .long-hero { grid-template-columns: 1fr; padding-block: 48px; gap: 25px; }
  .hero-art { min-height: 260px; }
  .section { padding-block: 65px; }
  .split-layout, .join-layout, .long-preview { grid-template-columns: 1fr; gap: 28px; }
  .photo-slot.photo-tall { min-height: 260px; }
  .event-grid { grid-template-columns: 1fr 1fr; }
  .long-card { align-items: flex-start; flex-direction: column; }
  .hadith-list { grid-template-columns: 1fr; gap: 20px; }
  .community-section { padding-block: 60px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 430px) {
  .event-grid { grid-template-columns: 1fr; }
  .photo-grid { gap: 7px; }
  .photo-slot { min-height: 145px; padding: 8px; font-size: 10px; }
  .photo-slot.photo-tall { min-height: 230px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hadith blockquote { font-size: 20px; }
  .footer-nav { gap: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 2026-09 Khairway content refresh */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 58px; height: 44px; object-fit: contain; flex: 0 0 auto; }
.brand-copy { display: block; }
.brand-copy strong { display: block; font: 25px/1.05 var(--serif); letter-spacing: 2px; font-weight: 400; }
.brand-copy small { display: block; margin-top: 5px; color: var(--gold); font: 8px/1.3 var(--sans); letter-spacing: 1.6px; white-space: nowrap; }
.hero-art { padding: 45px; }
.hero-logo { position: relative; z-index: 1; width: min(86%, 380px); height: auto; object-fit: contain; }
.hero-art::before, .hero-art::after { opacity: .23; }
.medina-gallery .photo-wide { grid-column: 1 / -1; min-height: 190px; }
.brand-footer { min-width: 170px; }
.footer-logo { display: block; width: 180px; height: 86px; object-fit: contain; object-position: left center; }

@media (max-width: 900px) {
  .brand-copy small { display: none; }
  .brand-logo { width: 52px; }
}
@media (max-width: 760px) {
  .brand-copy strong { font-size: 21px; }
  .hero-art { padding: 30px; }
}
@media (max-width: 430px) {
  .brand-logo { width: 44px; height: 38px; }
  .brand-copy strong { font-size: 19px; }
  .medina-gallery .photo-wide { min-height: 160px; }
}
.brand .brand-copy { margin: 0; color: inherit; font: inherit; letter-spacing: normal; }
.community-logo { display: block; width: 170px; height: auto; margin: 0 0 18px; }

/* 2026-09-13 refinement pass */
html { scroll-padding-top: 104px; }
.section-anchor { display: block; position: relative; top: -2px; scroll-margin-top: 104px; }
#join-qr { scroll-margin-top: 118px; }

/* Larger, more readable Khairway marks */
.nav-wrap { min-height: 86px; }
.brand-header { gap: 12px; }
.brand-logo { width: 78px; height: 58px; }
.hero-art { min-height: 430px; padding: 34px; background-image: url("/images/sports-pattern.svg"), radial-gradient(ellipse at 50% 45%, #34372d, #1b1e19 70%); background-size: cover, auto; background-position: center, center; background-repeat: no-repeat; }
.hero-art::before, .hero-art::after { display: none; }
.hero-logo { width: min(94%, 470px); }
.hero-art-caption { z-index: 2; }
.community-logo { width: 225px; margin-bottom: 20px; }

/* Let the Madinah imagery feel fuller while keeping copy on the left. */
#medina .split-layout { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 30px; }
.medina-gallery { grid-template-columns: 1.12fr .88fr; gap: 7px; }
.medina-gallery .photo-slot { min-height: 245px; padding: 0; }
.medina-gallery .photo-tall { min-height: 500px; }
.medina-gallery .photo-wide { min-height: 255px; }
.medina-gallery img { object-position: center; }

/* Single-video NYC carousel. */
.video-carousel { position: relative; width: min(100%, 560px); margin-inline: auto; }
.video-viewport { overflow: hidden; border: 1px solid #555446; background: #111; box-shadow: 0 18px 42px #0004; }
.video-track { display: flex; width: 100%; transition: transform .48s ease; }
.video-slide { flex: 0 0 100%; min-width: 100%; aspect-ratio: 1 / 1; background: #111; }
.video-slide video { display: block; width: 100%; height: 100%; object-fit: cover; background: #111; }
.carousel-button { position: absolute; top: 50%; z-index: 4; width: 42px; height: 42px; display: grid; place-items: center; transform: translateY(-50%); border: 1px solid #b89d68; border-radius: 50%; background: rgba(23,26,23,.88); color: var(--cream); cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.carousel-button:hover { background: var(--gold); color: var(--bg); transform: translateY(-50%) scale(1.05); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-status { position: absolute; right: 14px; bottom: 14px; z-index: 4; padding: 5px 9px; border: 1px solid #766849; background: rgba(23,26,23,.82); color: #e5dcc8; font-size: 11px; letter-spacing: 1.3px; }

@media (max-width: 900px) {
  .brand-logo { width: 68px; height: 52px; }
  #medina .split-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; }
  .medina-gallery .photo-slot { min-height: 210px; }
  .medina-gallery .photo-tall { min-height: 427px; }
  .medina-gallery .photo-wide { min-height: 220px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 80px; }
  .nav-wrap { min-height: 72px; }
  .brand-logo { width: 60px; height: 46px; }
  .hero-art { min-height: 320px; padding: 24px; }
  .hero-logo { width: min(92%, 410px); }
  #medina .split-layout { grid-template-columns: 1fr; }
  .medina-gallery .photo-slot { min-height: 190px; }
  .medina-gallery .photo-tall { min-height: 387px; }
  .medina-gallery .photo-wide { min-height: 215px; }
  .community-logo { width: 205px; }
  #join-qr { scroll-margin-top: 88px; }
}
@media (max-width: 430px) {
  .brand-logo { width: 52px; height: 42px; }
  .hero-art { min-height: 285px; }
  .medina-gallery { gap: 5px; }
  .medina-gallery .photo-slot { min-height: 150px; }
  .medina-gallery .photo-tall { min-height: 305px; }
  .medina-gallery .photo-wide { min-height: 175px; }
  .carousel-button { width: 38px; height: 38px; }
}

/* 2026-09-13 hero/gallery polish pass */
/* Keep the sports motif clean and extremely faint while making the Khairway mark the focal point. */
.hero-art {
  isolation: isolate;
  background-image: url("/images/sports-pattern.svg"), radial-gradient(ellipse at 50% 46%, #35382f 0%, #242820 48%, #1b1e19 78%);
  background-size: 100% 100%, auto;
  background-position: center, center;
  background-repeat: no-repeat;
}
.hero-art::before {
  content: "";
  display: block;
  position: absolute;
  inset: 12% 13%;
  z-index: 0;
  border: 0;
  border-radius: 50%;
  width: auto;
  height: auto;
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(23,26,23,.72) 0%, rgba(23,26,23,.38) 48%, rgba(23,26,23,0) 76%);
  pointer-events: none;
}
.hero-art::after { display: none; }
.hero-logo {
  z-index: 2;
  width: min(96%, 500px);
  filter: drop-shadow(0 7px 22px rgba(0,0,0,.58));
}
.hero-art-caption { z-index: 3; }

/* Give the Madinah media substantially more horizontal room and remove dead space. */
#medina.container { width: min(1380px, calc(100% - 40px)); }
#medina .split-layout {
  grid-template-columns: minmax(360px, .68fr) minmax(0, 1.32fr);
  gap: 20px;
  align-items: stretch;
}
#medina .media-column { min-width: 0; align-self: stretch; display: flex; }
.medina-gallery {
  width: 100%;
  flex: 1 1 auto;
  grid-template-columns: 1.12fr .88fr;
  grid-template-rows: minmax(250px, 1fr) minmax(250px, 1fr) minmax(255px, .95fr);
  gap: 3px;
}
.medina-gallery .photo-slot,
.medina-gallery .photo-tall,
.medina-gallery .photo-wide {
  min-height: 0;
}
.medina-gallery .photo-tall { grid-row: 1 / span 2; }
.medina-gallery .photo-wide { grid-column: 1 / -1; grid-row: 3; }
.medina-gallery img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

@media (max-width: 1100px) {
  #medina.container { width: min(1180px, calc(100% - 36px)); }
  #medina .split-layout { grid-template-columns: minmax(330px, .8fr) minmax(0, 1.2fr); gap: 16px; }
  .medina-gallery { grid-template-rows: minmax(215px, 1fr) minmax(215px, 1fr) minmax(220px, .92fr); }
}

@media (max-width: 760px) {
  #medina.container { width: calc(100% - 30px); }
  #medina .split-layout { grid-template-columns: 1fr; gap: 28px; }
  #medina .media-column { display: block; }
  .medina-gallery {
    grid-template-columns: 1.12fr .88fr;
    grid-template-rows: 190px 190px 215px;
    gap: 3px;
  }
}

@media (max-width: 430px) {
  .medina-gallery { grid-template-rows: 150px 150px 175px; gap: 2px; }
}
