﻿/* ==================================================
   MUTTASIL â€” FINAL UNIFIED GOLDEN-WHITE GLASSMORPHISM THEME
   Works on ALL pages:
     â€¢ index.html
     â€¢ prayer_times.html
     â€¢ map_view.html
     â€¢ mosque_detail.html
     â€¢ how_it_works.html
   Features:
     â€¢ Glassmorphism + golden glow
     â€¢ Unified navbar with active state
     â€¢ Responsive grid systems
     â€¢ Animated step cards (how_it_works)
     â€¢ Prayer card highlight
     â€¢ Search dropdown
     â€¢ Modals, buttons, micro-interactions
   ================================================== */

:root {
  --white: #fefefd;
  --gold: #d4af37;
  --gold-light: #e6c258;
  --gray: #6e6e6e;
  --blue: #4a7c8c;
  --light-gray: #f8f9fa;
  --border-gold: rgba(212, 175, 55, 0.15);
  --shadow-gold: rgba(212, 175, 55, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: var(--gray);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;              /* prevent horizontal scroll on small viewports */
  -webkit-text-size-adjust: 100%;  /* iOS text autosizing consistency */
  text-size-adjust: 100%;
}

/* ==================================================
   NAVBAR â€” UNIFIED + ACTIVE STATE
   ================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.2rem 1.5rem;
  box-shadow: 0 4px 20px var(--shadow-gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition);
}

.logo:hover {
  color: #b8932c;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-btn {
  color: var(--blue);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--border-gold);
  color: var(--gold);
}

.nav-btn.active {
  background: var(--gold);
  color: white;
  font-weight: 700;
}

.prayer-time {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  animation: pulse 2s infinite;
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================================================
   HERO TITLE (INDEX ONLY)
   ================================================== */
.hero-title {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1585208798174-6cedd78e0198') center/cover no-repeat;
  color: white;
  margin-bottom: 1rem;
}

.hero-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.hero-title p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ==================================================
   HERO SECTION â€” HOW IT WORKS
   ================================================== */
.hero-section {
  padding: 4rem 1rem 3rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(74, 124, 140, 0.05), rgba(212, 175, 55, 0.05));
  border-bottom: 1px solid var(--border-gold);
}

.hero-section .hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero-section .hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* ==================================================
   SEARCH SECTION â€” INDEX ONLY
   ================================================== */
.search-section {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
}

.search-bar {
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid var(--border-gold);
  transition: var(--transition);
}

.search-bar:focus-within {
  box-shadow: 0 15px 40px rgba(212,175,55,0.25);
  border-color: var(--gold);
}

.search-bar input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-size: 1.1rem;
  outline: none;
  color: #333;
}

.search-bar input::placeholder {
  color: #aaa;
}

.search-bar button {
  background: var(--gold);
  color: white;
  border: none;
  padding: 0 1.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar button:hover {
  background: #b8932c;
  transform: scale(1.05);
}

/* SEARCH RESULTS DROPDOWN */
.search-results {
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  background: white;
  border-radius: 18px;
  margin-top: 0.5rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  border: 1px solid var(--border-gold);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-result-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:hover {
  background: rgba(212,175,55,0.1);
  transform: translateX(4px);
}

.search-result-item h4 {
  margin: 0 0 0.3rem;
  color: var(--blue);
  font-size: 1.1rem;
}

.search-result-item p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.search-result-item .occupancy {
  font-weight: 600;
  color: var(--gold);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.no-results {
  text-align: center;
  color: #888;
  font-style: italic;
  margin: 1rem 0;
  display: none;
}

/* ==================================================
   SECTION & CONTAINER
   ================================================== */
.section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.section h2 {
  color: var(--blue);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ==================================================
   CONTINUE CARD
   ================================================== */
.continue-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid var(--border-gold);
}

.arabic {
  font-size: 3rem;
  color: var(--gold);
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
}

.continue-card h3 {
  color: var(--blue);
  margin: 0.5rem 0;
  font-size: 1.4rem;
}

.verse {
  color: var(--gray);
  margin: 1rem 0;
  font-size: 0.95rem;
}

/* ==================================================
   PRAYER CARD — ELEGANT & HIGHLIGHTED
   ================================================== */
.prayer-card {
  background: var(--white);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(212,175,55,0.15);
  border: 2px solid var(--gold);
  text-align: center;
  margin: 2rem auto;
  max-width: 900px;
  position: relative;
  overflow: hidden;
}

/* Modern header and next banner */
.prayer-header { display:flex; align-items:center; justify-content:center; gap:.6rem; color:var(--blue); margin-bottom:.8rem; }
.prayer-header i { color: var(--gold); }
.next-prayer-banner { display:flex; align-items:center; justify-content:center; gap:.5rem; background:#f8f9fa; border:1px solid var(--border-gold); border-radius:14px; padding:.6rem .9rem; color:var(--blue); font-weight:600; }
.next-prayer-banner .label { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color:#fff; padding:.2rem .5rem; border-radius:999px; font-size:.8rem; }

.prayer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), #f0d878);
}

.prayer-card h2 {
  color: var(--blue);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.prayer-card h2 i {
  color: var(--gold);
  font-size: 1.4rem;
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.prayer-item {
  background: var(--light-gray);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
  font-weight: 600;
  color: var(--gray);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.prayer-item.highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: white;
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(212,175,55,0.4);
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.prayer-item-name {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prayer-item-time {
  font-size: 1.4rem;
  font-weight: 700;
}

.next-prayer {
  background: #f1f3f5;
  padding: 1rem;
  border-radius: 16px;
  font-size: 1.1rem;
  color: var(--blue);
  margin-top: 1rem;
  border: 1px solid var(--gold);
}

/* ==================================================
   MOSQUE GRID & CARD
   ================================================== */
.mosque-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.mosque-card {
  background: white;
  padding: 1.2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border: 1px solid var(--border-gold);
  cursor: pointer;
  transition: var(--transition);
}

.mosque-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(212,175,55,0.2);
}

.mosque-card h4 {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 1.1rem;
}

.mosque-card p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--gray);
}

.capacity-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.capacity-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #f0d878);
  border-radius: 4px;
  transition: width 1s ease;
}

/* ==================================================
   STATS & EXPLORE
   ================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stats-grid > div {
  background: #f8f9fa;
  padding: 1.2rem;
  border-radius: 16px;
  text-align: center;
  font-weight: 600;
  color: var(--gray);
}

.stats-grid strong {
  display: block;
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 0.3rem;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.topic-btn {
  background: white;
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 1rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.topic-btn:hover {
  background: var(--gold);
  color: white;
}

/* ==================================================
   BUTTONS
   ================================================== */
.btn {
  display: block;
  width: 100%;
  padding: 1.1rem;
  margin: 0.8rem 0;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: white;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* ==================================================
   MODALS
   ================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-gold);
  position: relative;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: var(--gold);
}

/* ==================================================
   STEPS SECTION â€” HOW IT WORKS
   ================================================== */
.steps-section {
  padding: 3rem 1rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  background: var(--white);
  padding: 1.8rem;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-gold);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.step-card:hover::before {
  transform: scaleX(1);
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2);
}

.step-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.step-card h3 {
  color: var(--blue);
  margin: 0.8rem 0 0.5rem;
  font-size: 1.25rem;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--gray);
}

/* ==================================================
   FOOTER
   ================================================== */
footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--gray);
  font-size: 0.9rem;
  border-top: 1px solid #dee2e6;
  margin-top: 4rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 992px) {
  .hero-title { font-size: 2.5rem; }
  .stats-grid, .explore-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { gap: 1rem; }
}

@media (max-width: 768px) {
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .prayer-item.highlight { grid-column: 1 / -1; grid-row: auto; transform: none; }
  .hero-section .hero-title { font-size: 2.2rem; }
  .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-container { flex-direction: column; gap: 1rem; }
  .nav-links { order: 3; flex-wrap: wrap; justify-content: center; gap: .5rem; }
  .nav-btn { font-size: .95rem; padding: .4rem .8rem; }
  .prayer-time { order: 2; }
  .prayer-grid { grid-template-columns: 1fr; }
  .prayer-item { padding: 1rem; }
  .prayer-item.highlight { grid-column: 1; grid-row: auto; transform: none; }
  .stats-grid, .explore-grid { grid-template-columns: 1fr; }
  .arabic { font-size: 2.2rem; }
  .hero-title, .hero-section .hero-title { font-size: 2rem; }
  .step-card { padding: 1.5rem; }
}


/* ==================================================
   HERO SECTION â€” HOW IT WORKS
   ================================================== */

    .container {
      max-width: 600px;
      margin: 2rem auto;
      padding: 0 1rem;
    }

    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      background: white;
      border-radius: 15px;
      padding: 2rem;
      max-width: 500px;
      width: 90%;
      position: relative;
      box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }

    .close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      font-size: 1.5rem;
      cursor: pointer;
      color: #999;
    }

    .close:hover {
      color: #000;
    }

    footer {
      text-align: center;
      padding: 2rem 1rem;
      color: #888;
      font-size: 0.9rem;
    }

    .mosque-detail .card {
      background: var(--white);
      border-radius: 20px;
      padding: 2rem;
      margin-bottom: 1.5rem;
      box-shadow: 0 15px 40px rgba(0,0,0,0.1);
      border: 1px solid var(--border-gold);
      position: relative;
      overflow: hidden;
    }

    .mosque-detail .card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 5px;
      background: linear-gradient(90deg, var(--gold), #f0d878);
      border-radius: 20px 20px 0 0;
    }

    .mosque-name {
      font-family: 'Playfair Display', serif;
      font-size: 2.2rem;
      text-align: center;
      color: var(--blue);
      margin: 0 0 0.5rem;
    }

    .mosque-address {
      text-align: center;
      color: var(--gray);
      font-size: 0.95rem;
      margin-bottom: 1.5rem;
    }

    .capacity {
      text-align: center;
      margin: 1.5rem 0;
    }

    .capacity-number {
      font-size: 3.2rem;
      font-weight: 700;
      color: var(--gold);
      text-shadow: 0 2px 8px rgba(212,175,55,0.3);
    }

    .capacity-bar {
      height: 14px;
      background: #e9ecef;
      border-radius: 7px;
      overflow: hidden;
      margin: 1rem 0;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }

    .capacity-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--gold), #f0d878);
      width: 0%;
      border-radius: 7px;
      transition: width 1s ease;
      position: relative;
    }

    .capacity-fill::after {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
      animation: shimmer 2s infinite;
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .status {
      font-weight: 600;
      font-size: 1.1rem;
      color: var(--blue);
      text-align: center;
    }

    .last-updated {
      text-align: center;
      color: #888;
      font-size: 0.9rem;
      margin-top: 0.5rem;
    }

    .rows-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
      gap: 12px;
      margin: 1.5rem 0;
    }

    .row-item {
      background: #f8f9fa;
      padding: 14px 8px;
      border-radius: 12px;
      text-align: center;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--gray);
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      transition: all 0.3s;
    }

    .row-item.full {
      background: linear-gradient(135deg, #dc3545, #c82333);
      color: white;
      transform: scale(1.05);
    }

    .row-item.partial {
      background: linear-gradient(135deg, #ffc107, #e0a800);
      color: #212529;
    }

    .eco {
      text-align: center;
      color: var(--gold);
      font-weight: 600;
      font-size: 1rem;
      margin: 1.2rem 0;
    }

    .btn-group {
      display: flex;
      gap: 1rem;
      margin-top: 1.5rem;
      justify-content: center;
    }

    .btn {
      padding: 0.9rem 1.5rem;
      border: none;
      border-radius: 50px;
      font-weight: 600;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.3s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .btn-directions {
      background: var(--blue);
      color: white;
    }

    .btn-directions:hover {
      background: #3a6b7a;
      transform: translateY(-2px);
    }

    .btn-voice {
      background: var(--gold);
      color: white;
    }

    .btn-voice:hover {
      background: #b8932c;
      transform: translateY(-2px);
    }

    .btn-gold {
      background: var(--gold);
      color: white;
      width: 100%;
      justify-content: center;
    }

    .btn-gold:hover {
      background: #b8932c;
    }

    #directions-map {
      height: 220px;
      border-radius: 12px;
      margin-top: 1rem;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    @media (max-width: 600px) {
      .capacity-number { font-size: 2.4rem; }
      .rows-grid { grid-template-columns: repeat(3, 1fr); }
      .btn-group { flex-direction: column; }
      .btn { justify-content: center; }
    }


    /* ==================================================
   NEAR YOU â€” PERFECTLY CENTERED & NO EMPTY GAPS
   ================================================== */
.near-you-section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.near-you-section h2 {
  color: var(--blue);
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  text-align: center;
  font-weight: 600;
}

.mosque-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-content: center;     /* CENTER THE CARDS */
  padding: 0;                  /* Remove side padding */
  margin: 0 auto;
}

/* Enhanced card (same as before, but optimized) */
.near-you-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 22px;
  padding: 1.6rem 1.4rem;
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.08),
    0 5px 16px rgba(212, 175, 55, 0.14);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.near-you-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), #f0d878);
  border-radius: 22px 22px 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.near-you-card:hover::before {
  transform: scaleX(1);
}

.near-you-card:hover {
  transform: translateY(-10px);
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.14),
    0 10px 28px rgba(212, 175, 55, 0.28);
}

.arabic-name {
  font-size: 1.48rem;
  font-weight: 400;
  color: var(--gold);
  margin: 0 0 0.4rem;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(212, 175, 55, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-optical-sizing: auto;
}

.near-you-card .mosque-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.26rem;
  color: var(--blue);
  margin: 0.2rem 0 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mosque-status {
  font-size: 0.94rem;
  color: var(--gray);
  margin: 0.6rem 0 1rem;
  font-weight: 500;
  flex-grow: 1;
}

.near-you-card .btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: white;
  border: none;
  padding: 0.78rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.96rem;
  width: 100%;
  box-shadow: 0 5px 16px rgba(212, 175, 55, 0.38);
  transition: all 0.3s ease;
  margin-top: auto;
}

.near-you-card .btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.5);
}

/* Shimmer effect on status */
.mosque-status {
  position: relative;
  overflow: hidden;
}

.mosque-status::after {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2.5s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { left: -150%; }
  100% { left: 150%; }
}

/* Responsive */
@media (max-width: 992px) {
  .mosque-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.3rem;
  }
}

@media (max-width: 768px) {
  .mosque-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.1rem;
  }
  .arabic-name { font-size: 1.35rem; }
  .near-you-card .mosque-name { font-size: 1.18rem; }
}

@media (max-width: 480px) {
  .mosque-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .near-you-card {
    min-height: 200px;
    padding: 1.4rem;
  }
}


/* Global media defaults */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

.logo-image {
  height: 48px;
  max-height: 10vh;
  width: auto;
  margin-right: 1rem;
}

@media (max-width: 600px) {
  .logo-image {
    height: 40px;
    margin-right: 0;
  }
}

/* ===============================================
   Roadmap component styles (scoped by #roadmap)
   =============================================== */
:root {
  --rm-primary: var(--color-primary, currentColor);
  --rm-bg: var(--surface, transparent);
  --rm-card: color-mix(in oklab, Canvas 90%, currentColor 5%);
  --rm-card-border: color-mix(in oklab, currentColor 30%, transparent);
  --rm-text: var(--color-text, CanvasText);
  --rm-muted: color-mix(in oklab, var(--rm-text) 50%, transparent);
  --rm-accent: var(--rm-primary);
  --rm-good: #2e7d32;
  --rm-info: #1565c0;
  --rm-warn: #ef6c00;
  --rm-shadow: 0 6px 20px rgba(0,0,0,.08);
  --rm-radius: 14px;
  --rm-gap: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --rm-card: color-mix(in oklab, Canvas 75%, currentColor 8%);
    --rm-card-border: color-mix(in oklab, currentColor 20%, transparent);
    --rm-shadow: 0 8px 28px rgba(0,0,0,.25);
  }
}

#roadmap { font: inherit; color: var(--rm-text); background: var(--rm-bg); display: grid; gap: 18px; container-type: inline-size; }
#roadmap .rm-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; justify-content: space-between; }
#roadmap .rm-title { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; font-size: clamp(1.1rem, 2.2cqi, 1.6rem); }
#roadmap .rm-title svg { color: var(--rm-accent); }
#roadmap .rm-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#roadmap .rm-chip { border: 1px solid var(--rm-card-border); background: var(--rm-card); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: .92rem; user-select: none; transition: transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease; }
#roadmap .rm-chip[data-active="true"] { background: color-mix(in oklab, var(--rm-accent) 18%, transparent); border-color: var(--rm-accent); color: var(--rm-accent); }
#roadmap .rm-chip:focus-visible { outline: 2px solid var(--rm-accent); outline-offset: 2px; }
#roadmap .rm-view-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--rm-card-border); border-radius: 999px; overflow: hidden; }
#roadmap .rm-view-toggle button { all: unset; padding: 8px 12px; cursor: pointer; background: var(--rm-card); }
#roadmap .rm-view-toggle button[data-active="true"] { background: color-mix(in oklab, var(--rm-accent) 18%, transparent); color: var(--rm-accent); }

#roadmap .rm-board { display: grid; gap: var(--rm-gap); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container (max-width: 900px) { #roadmap .rm-board { grid-template-columns: 1fr; } }
#roadmap .rm-col { display: grid; grid-template-rows: auto 1fr; gap: 10px; min-width: 0; }
#roadmap .rm-col h3 { font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; color: var(--rm-muted); display: flex; align-items: center; gap: 8px; }
#roadmap .rm-lane { display: grid; gap: var(--rm-gap); align-content: start; }

#roadmap .rm-carditem { background: var(--rm-card); border: 1px solid var(--rm-card-border); border-radius: var(--rm-radius); box-shadow: var(--rm-shadow); padding: 12px 12px; display: grid; gap: 8px; position: relative; transition: transform .08s ease, border-color .2s ease, background .2s ease; }
#roadmap .rm-carditem:hover { transform: translateY(-2px); }
#roadmap .rm-carditem .rm-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--rm-muted); }
#roadmap .rm-carditem .rm-titleline { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
#roadmap .rm-carditem .rm-titleline h4 { margin: 0; font-size: 1rem; line-height: 1.2; font-weight: 650; }
#roadmap .rm-carditem .rm-status { font-size: .75rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--rm-card-border); color: var(--rm-muted); }
#roadmap .rm-carditem[data-status="in-progress"] .rm-status { color: var(--rm-info); border-color: color-mix(in oklab, var(--rm-info) 50%, transparent); }
#roadmap .rm-carditem[data-status="planned"] .rm-status { color: var(--rm-warn); border-color: color-mix(in oklab, var(--rm-warn) 50%, transparent); }
#roadmap .rm-carditem[data-status="done"] .rm-status { color: var(--rm-good); border-color: color-mix(in oklab, var(--rm-good) 50%, transparent); }
#roadmap .rm-carditem button.rm-expand { all: unset; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--rm-muted); }
#roadmap .rm-carditem button.rm-expand:hover { background: color-mix(in oklab, currentColor 10%, transparent); color: var(--rm-accent); }
#roadmap .rm-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#roadmap .rm-pill { font-size: .75rem; padding: 4px 8px; border-radius: 999px; background: color-mix(in oklab, currentColor 8%, transparent); color: var(--rm-muted); border: 1px solid var(--rm-card-border); }
#roadmap .rm-details { display: grid; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--rm-card-border); max-height: 0; overflow: clip; transition: grid-template-rows .25s ease, max-height .25s ease, opacity .25s ease; opacity: 0; }
#roadmap .rm-carditem[aria-expanded="true"] .rm-details { max-height: 500px; opacity: 1; }
#roadmap .rm-details h5 { margin: 0; font-size: .88rem; color: var(--rm-accent); }
#roadmap .rm-details p { margin: 0; color: var(--rm-text); font-size: .92rem; }
#roadmap .rm-empty { color: var(--rm-muted); font-style: italic; padding: 18px; border: 1px dashed var(--rm-card-border); border-radius: var(--rm-radius); }

/* Swimlane view */
#roadmap[data-view="swimlanes"] .rm-board { grid-template-columns: 1fr; }
#roadmap[data-view="swimlanes"] .rm-col + .rm-col { border-top: 1px dashed var(--rm-card-border); padding-top: 16px; }
#roadmap .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ===============================================
   Curved road style roadmap (scoped by #roadmap-road)
   =============================================== */
#roadmap-road { position: relative; max-width: 1100px; margin: 2rem auto; padding: 0 1rem 3rem; z-index: 0; }
#roadmap-road .rmr-scroll { position: relative; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
#roadmap-road .rmr-stage { position: relative; width: 1200px; aspect-ratio: 12/7; margin: 0 auto; }
#roadmap-road .rmr-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#roadmap-road .rmr-road { fill: none; stroke: #2f3541; stroke-width: 70; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 10px 30px rgba(0,0,0,.25)); }
#roadmap-road .rmr-edge { fill: none; stroke: #4a4f5b; stroke-width: 74; stroke-linecap: round; stroke-linejoin: round; opacity: .4; }
#roadmap-road .rmr-dash { fill: none; stroke: #ffffff; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 20 22; opacity: .9; animation: dashMove 6s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -200; } }

#roadmap-road .rmr-node { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; z-index: 2; }
#roadmap-road .rmr-pin { width: 64px; height: 64px; border-radius: 50%; border: 4px solid #fff; background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px rgba(212,175,55,.35); cursor: pointer; transition: transform .12s ease, box-shadow .2s ease; z-index: 3; position: relative; }
#roadmap-road .rmr-pin::after { content:""; position:absolute; inset:-6px; border-radius:50%; box-shadow:0 0 0 0 rgba(212,175,55,.35); animation: pulseRing 2.2s ease-out infinite; }
@keyframes pulseRing { 0%{ box-shadow:0 0 0 0 rgba(212,175,55,.35);} 70%{ box-shadow:0 0 0 14px rgba(212,175,55,0);} 100%{ box-shadow:0 0 0 0 rgba(212,175,55,0);} }
#roadmap-road .rmr-pin:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 16px 36px rgba(212,175,55,.45); }
#roadmap-road .rmr-label { background: rgba(255,255,255,.9); border: 1px solid var(--border-gold); padding: 6px 10px; border-radius: 999px; font-weight: 600; color: var(--blue); box-shadow: 0 4px 12px rgba(0,0,0,.08); white-space: nowrap; z-index: 1; }
#roadmap-road .rmr-num { color: var(--gold); font-weight: 800; margin-right: 6px; }

#roadmap-road .rmr-popover { position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%); width: min(340px, 70vw); background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--border-gold); border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(0,0,0,.22); display: none; z-index: 50; }
#roadmap-road .rmr-popover::before { content:""; position:absolute; top:-8px; left:50%; transform:translateX(-50%) rotate(45deg); width:16px; height:16px; background: inherit; border-left:1px solid var(--border-gold); border-top:1px solid var(--border-gold); }
#roadmap-road .rmr-popover.above { top:auto; bottom: calc(100% + 12px); }
#roadmap-road .rmr-popover.above::before { top:auto; bottom:-8px; transform:translateX(-50%) rotate(225deg); }
#roadmap-road .rmr-popover h4 { margin: 0 0 6px; font-size: 1rem; color: var(--blue); }
#roadmap-road .rmr-popover p { margin: 0; font-size: .95rem; color: var(--gray); }
#roadmap-road .rmr-node[data-open="true"] { z-index: 200; }
#roadmap-road .rmr-node[data-open="true"] .rmr-popover { display: block; animation: popIn .16s ease-out; }
@keyframes popIn { from { transform: translateX(-50%) scale(.96); opacity:.8; } to { transform: translateX(-50%) scale(1); opacity:1; } }

#roadmap-road .rmr-legend { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 1rem; color: var(--gray); }
#roadmap-road .rmr-legend .pill { border: 1px solid var(--border-gold); padding: 6px 10px; border-radius: 999px; background: #fff; }

/* Next/Prev controls */
#roadmap-road .rmr-nav { display:flex; justify-content:center; gap:10px; margin-top:8px; }
#roadmap-road .rmr-nav button { all:unset; background: var(--gold); color:#fff; padding:10px 14px; border-radius:12px; font-weight:700; cursor:pointer; box-shadow:0 8px 22px rgba(212,175,55,.35); }
#roadmap-road .rmr-nav button:hover { background:#b8932c; }

/* Drag-to-pan affordance */
#roadmap-road .rmr-scroll.is-dragging { cursor: grabbing; }

@media (max-width: 900px) {
  #roadmap-road .rmr-stage { width: 1600px; margin: 0; }
  #roadmap-road .rmr-label { font-size: .9rem; }
}
@media (max-width: 600px) {
  #roadmap-road .rmr-pin { width: 56px; height: 56px; }
  #roadmap-road .rmr-popover { width: min(260px, 88vw); }
}

/* Roadmap page-specific tweaks to remove extra space */
.page-roadmap .hero-title { padding: .9rem 1rem; margin-bottom: .25rem; }
.page-roadmap #roadmap-road { margin-top: 0; padding-top: 0; }
.page-roadmap #roadmap-road .rmr-stage { aspect-ratio: 12/4; }

/* ===============================================
   Problem & Solution page styles
   =============================================== */
.page-ps .hero-title { padding: 2.2rem 1rem; margin-bottom: 1rem; }

.ps-toggle { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.ps-chip { border: 1px solid var(--border-gold); background: white; color: var(--blue); padding: 10px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.ps-chip[aria-selected="true"] { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; border-color: var(--gold); box-shadow: 0 8px 20px rgba(212,175,55,.3); }

.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .ps-grid { grid-template-columns: 1fr; } }

/* hide/show columns based on view */
#ps-grid[data-view="problem"] #ps-solution { display: none; }
#ps-grid[data-view="solution"] #ps-problem { display: none; }

.ps-card, .ps-impact { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border-gold); border-radius: 20px; padding: 1.5rem; box-shadow: 0 10px 30px rgba(212,175,55,0.15); }

.ps-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: .6rem; }
.ps-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ff6b6b, #ffa8a8); color: #fff; box-shadow: 0 6px 16px rgba(255,107,107,.35); }
.ps-icon.ok { background: linear-gradient(135deg, var(--gold), var(--gold-light)); box-shadow: 0 6px 16px rgba(212,175,55,.35); }
.ps-icon.globe { background: linear-gradient(135deg, #4dabf7, #74c0fc); box-shadow: 0 6px 16px rgba(77,171,247,.35); }

.ps-list { list-style: none; display: grid; gap: .6rem; margin: .6rem 0 1rem; }
.ps-list li { display: flex; align-items: start; gap: .6rem; background: #f8f9fa; border: 1px solid var(--border-gold); border-radius: 14px; padding: .6rem .8rem; }
.ps-list i { color: var(--gold); margin-top: 2px; }

.ps-note { background: #fff8e1; border: 1px solid var(--border-gold); border-left: 4px solid var(--gold); border-radius: 12px; padding: .8rem 1rem; color: #7b6a2a; margin: .6rem 0 1rem; }
.ps-note.ok { background: #eefcf3; color: #1b5e20; border-left-color: #2e7d32; }

/* Accordion */
.ps-accordion { margin-top: .4rem; }
.ps-acc-btn { width: 100%; background: #ffffff; border: 1px solid var(--border-gold); border-radius: 12px; padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-weight: 600; color: var(--blue); cursor: pointer; transition: var(--transition); }
.ps-acc-btn:hover { background: #fff7e6; }
.ps-acc-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.ps-acc-btn i { transition: transform .2s ease; }
.ps-acc-panel { padding: .8rem 1rem .2rem; }
.ps-mini { list-style: disc; margin-left: 1.2rem; color: var(--gray); display: grid; gap: .4rem; }

/* Impact metrics */
.ps-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: .8rem; }
.metric { background: #f8f9fa; border: 1px solid var(--border-gold); border-radius: 14px; padding: .9rem; text-align: center; }
.metric .val { display: block; font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--blue); transition: transform .3s ease; }
.metric .val.play { transform: scale(1.06); }
.metric .label { display: block; color: var(--gray); font-size: .9rem; margin-top: .2rem; }

@media (max-width: 700px) { .ps-metrics { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 480px) { .ps-metrics { grid-template-columns: 1fr; } }

