/* ============================================================
   DESIGN SYSTEM — Atlanta World Cup Legacy
   ============================================================ */
:root {
  --forest-green: #005710;
  --navy:         #081F3A;
  --gold:         #C5A251;
  --charcoal:     #171212;
  --slate:        #414554;
  --surface:      #F7F7F5;
  --white:        #FFFFFF;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.16);

  --font-display: Georgia, 'Times New Roman', serif;
  --font-heading: 'Montserrat', Arial, sans-serif;
  --font-body:    Arial, Helvetica, sans-serif;
  --font-accent:  'Archivo Black', Impact, sans-serif;

  --header-h:     60px;
  --bottom-nav-h: 68px;
  --radius:       8px;
  --radius-lg:    14px;
  --max-w:        1160px;
  --gap:          1.25rem;

  /* Page transition */
  --page-transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  background: #f0f2f5;
  line-height: 1.6;
  overscroll-behavior-y: none;
}

a { color: var(--forest-green); text-decoration: underline; }
a:hover { color: var(--navy); }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ============================================================
   PAGE TRANSITIONS
   ============================================================ */
#page-root {
  animation: pageFadeIn var(--page-transition) both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-transitioning #page-root {
  animation: none;
  opacity: 0;
}

/* ============================================================
   STICKY HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--forest-green);
  height: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Wordmark */
.wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(.6rem, 1.5vw, .875rem);
  letter-spacing: .16em;
  color: var(--white);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.wordmark:hover { color: var(--gold); }

/* Desktop Nav */
#primary-nav { margin-left: auto; }
#primary-nav ul {
  display: flex;
  list-style: none;
  gap: .1rem;
  flex-wrap: nowrap;
}
.nav-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: .45rem .55rem;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  display: block;
}
.nav-link:hover   { color: var(--white); border-bottom-color: rgba(197,162,81,.5); }
.nav-link.active  { color: var(--white); border-bottom-color: var(--gold); }

/* ============================================================
   BOTTOM TAB BAR (mobile only)
   ============================================================ */
.bottom-nav {
  display: none;
}

/* ============================================================
   FOOTER (desktop only)
   ============================================================ */
.site-footer {
  background: var(--forest-green);
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 2rem;
}
.footer-tagline {
  font-size: .875rem;
  color: rgba(255,255,255,.75);
}
.footer-email {
  color: var(--gold);
  font-size: .9rem;
  margin-left: auto;
}
.footer-email:hover { color: var(--white); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section       { padding: 2.5rem 0; }
.section + .section { padding-top: 0; }

/* ============================================================
   HOME — HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.hero-color-side {
  background: linear-gradient(135deg, var(--forest-green) 0%, var(--navy) 100%);
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
  min-height: 320px;
}
.hero-text-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2.5rem 3rem 4rem;
  background: var(--navy);
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: .75rem;
}
.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: rgba(255,255,255,.82);
  max-width: 38ch;
}
.hero-accent {
  display: inline-block;
  width: 48px;
  height: 4px;
  background: var(--gold);
  margin-bottom: 1rem;
  border-radius: 2px;
}

/* ── Nav Cards ── */
.nav-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
  margin: 2rem 0;
}
.nav-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--charcoal);
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
  display: block;
}
.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--charcoal);
}
.nav-card-header {
  background: var(--gold);
  padding: .7rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--charcoal);
}
.nav-card-body { padding: 1rem 1.1rem 1.2rem; }
.nav-card-count {
  font-family: var(--font-accent);
  font-size: 2rem;
  color: var(--forest-green);
  line-height: 1;
  margin-bottom: .3rem;
}
.nav-card-desc { font-size: 1rem; color: var(--slate); }

/* ── Events Strip ── */
.events-strip {
  background: var(--white);
  border-left: 5px solid var(--gold);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.events-strip p { color: var(--slate); font-size: 1rem; max-width: 55ch; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .03em;
  text-decoration: none;
  padding: .75rem 1.5rem;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
  min-height: 48px;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--forest-green); color: var(--white); box-shadow: 0 2px 8px rgba(0,87,16,.3); }
.btn-primary:hover { background: #004a0e; color: var(--white); }
.btn-gold { background: var(--gold); color: var(--charcoal); box-shadow: 0 2px 8px rgba(197,162,81,.35); }
.btn-gold:hover { background: #b3923f; color: var(--charcoal); }

/* ============================================================
   PAGE HEADERS
   ============================================================ */
.page-header {
  background: var(--navy);
  padding: 2rem 1.25rem;
  margin-bottom: 1.5rem;
}
.page-header .container { max-width: var(--max-w); margin: 0 auto; }
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2.25rem);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.page-header p { color: rgba(255,255,255,.75); margin-top: .35rem; font-size: 1rem; }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 1.25rem;
  padding-bottom: .4rem;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}

/* ============================================================
   DIRECTORY CONTROLS
   ============================================================ */
.dir-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1rem;
}
.search-wrap {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
}
.search-wrap svg {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate);
  pointer-events: none;
}
/* 16px font prevents iOS zoom-on-focus */
.search-input, .filter-select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--white);
  border: 1.5px solid #d0d0d0;
  border-radius: 99px;
  padding: .72rem 1rem .72rem 2.6rem;
  width: 100%;
  min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.search-input:focus, .filter-select:focus {
  border-color: var(--forest-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,87,16,.18);
}
.filter-select {
  padding-left: 1rem;
  flex: 0 1 220px;
  width: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23414554' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.25rem;
}
.result-count {
  font-size: 1rem;
  color: var(--slate);
  margin-bottom: .85rem;
}

/* ============================================================
   MASJID TABLE
   ============================================================ */
.dir-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e8e8e8;
  background: var(--white);
  margin-bottom: 2rem;
}
.dir-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 1rem;
}
.dir-table thead tr { background: var(--navy); color: var(--white); }
.dir-table thead th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .9rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.dir-table thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.dir-table thead th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }
.dir-table tbody tr {
  background: var(--white);
  border-bottom: 1px solid #f0f0f0;
  transition: background .1s;
}
.dir-table tbody tr:nth-child(even) { background: var(--surface); }
.dir-table tbody tr:hover { background: #ecf4ed; }
.dir-table td {
  padding: .85rem 1rem;
  vertical-align: top;
  font-size: 1rem;
  line-height: 1.45;
}
.dir-table td.name-cell { font-weight: 600; color: var(--charcoal); }
.dir-link {
  font-size: .9rem;
  white-space: nowrap;
  color: var(--forest-green);
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
}
.dir-link:hover { text-decoration: underline; }

/* ── Empty states ── */
.no-results {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.6;
}
.no-results strong { color: var(--charcoal); }
.no-results-hint {
  display: block;
  margin-top: .4rem;
  font-size: .9rem;
  color: var(--slate);
}

/* ============================================================
   CARD GRID (Markets / Restaurants)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.listing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.listing-card-header {
  background: var(--gold);
  height: 5px;
  flex-shrink: 0;
}
.listing-card-body {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.listing-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.35;
}
.listing-card-link {
  font-size: .9rem;
  color: var(--forest-green);
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  padding-top: .25rem;
}
.listing-card-link:hover { text-decoration: underline; color: var(--navy); }

/* ── External guide banner ── */
.external-guide-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
  transition: background .15s, box-shadow .15s, transform .15s;
}
.external-guide-banner:hover {
  background: #0d2d52;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--white);
}
.external-guide-icon { font-size: 1.5rem; flex-shrink: 0; }
.external-guide-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.external-guide-text strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold);
}
.external-guide-text span {
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  line-height: 1.45;
}
.external-guide-arrow {
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  font-weight: 700;
}

.caption-note {
  font-size: 1rem;
  color: var(--slate);
  margin-bottom: 1rem;
  font-style: italic;
  line-height: 1.55;
  background: var(--white);
  padding: .85rem 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
}

/* ============================================================
   MAP PAGE
   ============================================================ */
.map-page { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem 2rem; }
.map-intro {
  font-size: 1rem;
  color: var(--slate);
  margin-bottom: 1.25rem;
  max-width: 70ch;
  line-height: 1.65;
}
.map-iframe-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--gold);
  margin-bottom: 1rem;
  line-height: 0;
  box-shadow: var(--shadow-md);
}
.map-iframe-wrap iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}
.map-cta { margin-bottom: .75rem; }
.map-fallback-note { font-size: .95rem; color: var(--slate); margin-bottom: 1.5rem; }
.map-fallback-note a { color: var(--forest-green); }
.map-iframe-error {
  display: none;
  background: var(--white);
  border: 2px dashed var(--gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.map-iframe-error p { color: var(--slate); font-size: 1rem; margin-bottom: 1.25rem; }

/* ============================================================
   EVENTS PAGE
   ============================================================ */
.events-grid {
  display: grid;
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.event-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.event-card-header { background: var(--gold); height: 6px; }
.event-card-body   { padding: 1.75rem 2rem; }
.event-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--charcoal);
  text-transform: uppercase;
  margin-bottom: .3rem;
}
.event-tagline {
  font-style: italic;
  color: var(--gold);
  font-size: 1rem;
  font-variant: small-caps;
  letter-spacing: .03em;
  margin-bottom: .6rem;
}
.event-date {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  padding: .35rem .85rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.event-body { display: flex; flex-direction: column; gap: .85rem; }
.event-body p { color: var(--charcoal); font-size: 1rem; line-height: 1.75; }
.event-cta { margin-top: 1.25rem; }

/* ── Event flyer ── */
.event-location {
  font-size: .95rem;
  color: var(--slate);
  margin-bottom: .75rem;
  line-height: 1.5;
}
.event-flyer-wrap {
  margin-top: 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  line-height: 0;
}
.event-flyer {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  transition: opacity .2s;
}
.event-flyer-wrap:hover .event-flyer { opacity: .92; }

/* ── Watch-party flyers grid ── */
.watch-party-flyers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.watch-party-flyers a {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  line-height: 0;
  transition: box-shadow .18s, transform .18s;
}
.watch-party-flyers a:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.watch-party-flyers img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Hospitality ── */
.hospitality {
  background: var(--navy);
  padding: 3rem 1.25rem;
  margin-top: 2.5rem;
}
.hospitality .container { max-width: var(--max-w); margin: 0 auto; }
.hospitality h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.hospitality .hosp-tagline { font-style: italic; color: var(--gold); font-size: 1rem; margin-bottom: 1.5rem; }
.hospitality-body { display: flex; flex-direction: column; gap: .85rem; }
.hospitality-body p { color: rgba(255,255,255,.87); font-size: 1rem; line-height: 1.8; max-width: 80ch; }
.hospitality-contact { margin-top: 1.5rem; color: rgba(255,255,255,.7); font-size: 1rem; }
.hospitality-contact a { color: var(--gold); }
.hospitality-contact a:hover { color: var(--white); }

/* Loading */
.loading {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--slate);
  font-family: var(--font-heading);
  font-size: 1rem;
}

/* ============================================================
   RESPONSIVE — TABLET 900px
   ============================================================ */
@media (max-width: 900px) {
  .nav-link { font-size: .7rem; padding: .45rem .45rem; }
}

/* ============================================================
   RESPONSIVE — MOBILE ≤700px
   Full mobile-app experience
   ============================================================ */
@media (max-width: 700px) {

  /* Body: reserve space for bottom tab bar */
  body {
    background: #f0f2f5;
    padding-bottom: var(--bottom-nav-h);
  }

  /* ── Header: tighter, wordmark only ── */
  .site-header { height: 52px; }
  :root { --header-h: 52px; }
  .wordmark { font-size: .62rem; letter-spacing: .14em; }
  #primary-nav { display: none; }  /* hidden — bottom tab replaces it */

  /* ── Footer: hidden on mobile ── */
  .site-footer { display: none; }

  /* ── Bottom tab bar ── */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: var(--forest-green);
    border-top: 1px solid rgba(255,255,255,.12);
    z-index: 400;
    box-shadow: 0 -4px 20px rgba(0,0,0,.25);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: rgba(255,255,255,.55);
    padding: .4rem .25rem;
    min-height: 48px;
    transition: color .15s;
    position: relative;
  }
  .bottom-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--gold);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity .15s;
  }
  .bottom-tab.active {
    color: var(--gold);
  }
  .bottom-tab.active::before { opacity: 1; }
  .tab-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .tab-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .6rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 1;
  }

  /* ── Container padding ── */
  .container { padding: 0 1rem; }

  /* ── Home hero: full-width navy panel ── */
  .hero {
    grid-template-columns: 1fr;
    min-height: 220px;
  }
  .hero-color-side { display: none; }
  .hero-text-side {
    padding: 2rem 1.25rem 2rem;
    min-height: 220px;
    background: linear-gradient(135deg, var(--navy) 0%, #0d2d52 100%);
  }
  .hero-headline { font-size: 1.75rem; }
  .hero-tagline  { font-size: 1rem; }

  /* ── Nav cards: 2×2 on mobile ── */
  .nav-cards-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
  .nav-card-count { font-size: 1.75rem; }
  .nav-card-desc  { font-size: .9rem; }

  /* ── Events strip ── */
  .events-strip { flex-direction: column; align-items: stretch; padding: 1.25rem 1rem; gap: 1rem; }
  .events-strip .btn { width: 100%; }

  /* ── Section ── */
  .section { padding: 1.5rem 0; }

  /* ── Page header ── */
  .page-header { padding: 1.5rem 1rem; margin-bottom: 1.25rem; }

  /* ── Directory controls ── */
  .dir-controls { flex-direction: column; gap: .6rem; }
  .search-wrap  { max-width: 100%; flex: none; }
  .filter-select { width: 100%; flex: none; }

  /* ── Masjid table: horizontal scroll ── */
  .dir-table-wrap { border-radius: var(--radius); }

  /* ── Card grid: 2 columns then 1 on narrow ── */
  .card-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }

  /* ── Map ── */
  .map-page { padding: 0 1rem 2rem; }
  .map-iframe-wrap iframe { height: 340px; }

  /* ── Events ── */
  .events-grid { padding: 0 1rem; gap: 1rem; }
  .event-card-body { padding: 1.25rem 1rem; }
  .hospitality { padding: 2rem 1rem; }
  .hospitality-body p { font-size: 1rem; }

  /* ── Caption note ── */
  .caption-note { font-size: .95rem; }
}

/* ============================================================
   NARROW PHONES ≤420px
   ============================================================ */
@media (max-width: 420px) {
  .card-grid { grid-template-columns: 1fr; }
  .nav-cards-grid { grid-template-columns: 1fr; }
  .hero-headline { font-size: 1.5rem; }
  .events-grid { padding: 0 .875rem; }
  .container { padding: 0 .875rem; }

  /* Tab labels shorter */
  .tab-label { font-size: .55rem; }
  .tab-icon  { width: 20px; height: 20px; }
}

/* ============================================================
   SAFE AREA INSETS — iPhone X+ notch
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 700px) {
    body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  }
}
