:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --gold-600: #b45309;
  --gold-500: #c9962b;
  --gold-400: #eab308;
  --gold-100: #fef3c7;
  --bg-surface: #f7faf8;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-soft: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(6, 78, 59, 0.06);
  --shadow-md: 0 10px 28px -6px rgba(6, 78, 59, 0.12);
  --shadow-lg: 0 22px 45px -12px rgba(6, 78, 59, 0.18);
  --radius-md: 14px;
  --radius-lg: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Noto Sans JP', 'Noto Naskh Arabic', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-surface);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body {
  font-family: 'Noto Naskh Arabic', 'Plus Jakarta Sans', system-ui, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Subtle Islamic Geometric Pattern */
.islamic-pattern {
  background-color: var(--bg-surface);
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23059669' stroke-opacity='0.055' stroke-width='1'%3E%3Cpath d='M40 0L49.5 30.5L80 40L49.5 49.5L40 80L30.5 49.5L0 40L30.5 30.5Z'/%3E%3Ccircle cx='40' cy='40' r='14'/%3E%3C/g%3E%3C/svg%3E");
}

.islamic-pattern-dark {
  background-color: var(--emerald-950);
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='0.09' stroke-width='1'%3E%3Cpath d='M40 0L49.5 30.5L80 40L49.5 49.5L40 80L30.5 49.5L0 40L30.5 30.5Z'/%3E%3Ccircle cx='40' cy='40' r='14'/%3E%3C/g%3E%3C/svg%3E");
}

/* Top Pinned Announcement Ticker */
.top-ticker {
  background: linear-gradient(90deg, var(--emerald-900), var(--emerald-800));
  color: #ffffff;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--gold-500);
}

.top-ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-500);
  color: #111827;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ticker-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-link {
  color: #fde68a;
  font-weight: 600;
  flex-shrink: 0;
}

.ticker-link:hover {
  text-decoration: underline;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--emerald-50);
  padding: 3px;
  border: 1px solid var(--emerald-100);
  flex-shrink: 0;
}

.brand-title {
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--emerald-900);
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-links a {
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--emerald-50);
  color: var(--emerald-800);
}

.nav-links a.nav-tv-pill {
  color: var(--gold-600);
  background: #fffbeb;
  border: 1px solid #fde68a;
  margin-inline-start: 4px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s;
}

.lang-btn.active {
  background: var(--emerald-700);
  color: #ffffff;
}

.flag-svg {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.mobile-lang-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}

.lang-btn-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-btn-mobile.active {
  background: var(--emerald-700);
  color: #ffffff;
  border-color: var(--emerald-700);
}

.pill-toggle {
  border: 1px solid var(--border-soft);
  background: #ffffff;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--emerald-800);
  cursor: pointer;
  white-space: nowrap;
}

.pill-toggle:hover {
  background: var(--emerald-50);
}

.mobile-menu-btn {
  display: none;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.15rem;
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--border-soft);
  background: #ffffff;
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer a {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text-main);
}

.mobile-drawer a:hover {
  background: var(--emerald-50);
  color: var(--emerald-800);
}

/* Preview Banner */
.preview-banner {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 16px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  border-bottom: 1px solid #fcd34d;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(5, 150, 105, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-gold {
  background: linear-gradient(135deg, #d4a12a, #b78114);
  color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  color: var(--emerald-800);
  border-color: var(--emerald-700);
}

.btn-outline:hover {
  background: var(--emerald-50);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.82rem;
  border-radius: 9px;
}

/* Hero Section */
.hero-section {
  padding: 46px 0 56px;
  background: linear-gradient(160deg, #022c22 0%, #064e3b 55%, #0f766e 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='90' height='90' viewBox='0 0 90 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23fde68a' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M45 0L55 35L90 45L55 55L45 90L35 55L0 45L35 35Z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.3);
  color: #fde68a;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #d1fae5;
  font-weight: 600;
  margin: 0 0 12px;
}

.hero-desc {
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 24px;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Countdown Card */
.countdown-card {
  background: rgba(2, 44, 34, 0.68);
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
}

.clock-box .clock-time {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.clock-box .clock-dates {
  font-size: 0.84rem;
  color: #a7f3d0;
}

.countdown-box {
  text-align: end;
}

.countdown-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde68a;
  font-weight: 700;
}

.countdown-prayer {
  font-size: 1.15rem;
  font-weight: 800;
}

.countdown-timer {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fde68a;
  font-variant-numeric: tabular-nums;
}

/* Hero Right: Masjid Photo + Digital Jamaat Board */
.hero-board-card {
  background: #ffffff;
  color: var(--text-main);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(253, 230, 138, 0.35);
}

.hero-photo-wrap {
  position: relative;
  height: 190px;
  background: var(--emerald-900);
}

.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 44, 34, 0.88), rgba(2, 44, 34, 0.1));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 20px;
  color: #ffffff;
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.board-header h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.board-header span {
  font-size: 0.76rem;
  color: #fde68a;
  font-weight: 600;
}

.mini-board-list {
  padding: 14px 18px 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.mini-board-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
}

.mini-board-item.is-next {
  background: var(--emerald-50);
  border-color: var(--emerald-600);
}

.mini-board-item.is-jummah {
  background: #fffbeb;
  border-color: #f59e0b;
}

.mini-board-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.mini-board-time {
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--emerald-800);
  font-variant-numeric: tabular-nums;
}

.board-footer {
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Section Layout */
.section {
  padding: 64px 0;
}

.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 38px;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  color: var(--emerald-900);
  margin: 0 0 10px;
}

.section-subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.02rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  padding: 26px;
}

/* Prayer Times Full Grid */
.prayer-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.prayer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field-inline select {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  font-family: inherit;
  font-size: 0.86rem;
  background: #ffffff;
}

.prayer-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.prayer-table th {
  text-align: start;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 14px 4px;
}

.prayer-table td {
  padding: 14px;
  background: #f8fafc;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}

.prayer-table td:first-child {
  border-inline-start: 1px solid var(--border-soft);
  border-start-start-radius: 12px;
  border-end-start-radius: 12px;
  font-weight: 700;
}

.prayer-table td:last-child {
  border-inline-end: 1px solid var(--border-soft);
  border-start-end-radius: 12px;
  border-end-end-radius: 12px;
}

.prayer-table tr.row-next td {
  background: var(--emerald-50);
  border-color: var(--emerald-600);
}

.jamaat-pill {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--emerald-800);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-next {
  background: var(--emerald-700);
  color: #ffffff;
}

.status-upcoming {
  background: #e0f2fe;
  color: #0369a1;
}

.status-passed {
  background: #e2e8f0;
  color: #64748b;
}

.sunrise-strip {
  margin-top: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #92400e;
}

.jummah-card {
  background: linear-gradient(155deg, var(--emerald-900), var(--emerald-700));
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(253, 230, 138, 0.35);
}

.jummah-card h3 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  color: #fde68a;
}

.jummah-times-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.jummah-time-box {
  background: rgba(255, 255, 255, 0.12);
  padding: 12px;
  border-radius: 12px;
}

.jummah-time-box span {
  display: block;
  font-size: 0.78rem;
  color: #d1fae5;
}

.jummah-time-box strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.info-note-card {
  margin-top: 18px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* Announcements */
.filter-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.filter-pill {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
}

.filter-pill.active {
  background: var(--emerald-700);
  color: #ffffff;
  border-color: var(--emerald-700);
}

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.announcement-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcement-card.is-pinned {
  border-inline-start: 4px solid var(--gold-500);
  background: linear-gradient(to bottom right, #ffffff, #fffdf7);
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cat-urgent { background: #fee2e2; color: #991b1b; }
.cat-prayer { background: #d1fae5; color: #065f46; }
.cat-community { background: #e0f2fe; color: #075985; }
.cat-ramadan { background: #fef3c7; color: #92400e; }

/* Events */
.event-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.event-img-wrap {
  height: 185px;
  background: var(--emerald-900);
  position: relative;
}

.event-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-tag {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: rgba(2, 44, 34, 0.85);
  color: #fde68a;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.event-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-meta {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 12px;
}

.event-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--emerald-950);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(2, 44, 34, 0.9), transparent);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
}

.lightbox-panel {
  background: #022c22;
  color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(253, 230, 138, 0.35);
}

.lightbox-img-wrap {
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 70vh;
}

.lightbox-img-wrap img {
  max-height: 70vh;
  width: auto;
  object-fit: contain;
}

.lightbox-foot {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Donations */
.donation-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

.progress-track {
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald-700), var(--gold-500));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.alloc-item {
  margin-bottom: 12px;
}

.alloc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.alloc-bar {
  height: 7px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.alloc-bar > div {
  height: 100%;
  background: var(--emerald-600);
}

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.bank-row:last-child {
  border-bottom: none;
}

/* Qibla & Resources */
.resources-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.compass-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.compass-dial {
  position: relative;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #ffffff 62%, #ecfdf5 100%);
  border: 6px solid var(--emerald-800);
  box-shadow: var(--shadow-md);
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-cardinal {
  position: absolute;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--emerald-900);
}

.c-n { top: 8px; }
.c-s { bottom: 8px; }
.c-e { right: 10px; }
.c-w { left: 10px; }

.compass-needle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: transform 0.35s ease;
}

.needle-pointer {
  margin-top: 22px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 66px solid var(--gold-500);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.compass-center-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--emerald-900);
  border: 3px solid #ffffff;
  z-index: 2;
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.facility-box {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 15px;
}

.facility-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #ffffff;
}

.faq-q {
  width: 100%;
  text-align: start;
  background: none;
  border: none;
  padding: 14px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
}

.faq-a {
  padding: 0 16px 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: none;
}

.faq-item.open .faq-a {
  display: block;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--emerald-600);
  border-color: transparent;
}

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  margin-top: 16px;
  height: 230px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 44, 34, 0.65);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.monthly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.monthly-table th,
.monthly-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}

.monthly-table th {
  background: var(--emerald-50);
  color: var(--emerald-900);
  position: sticky;
  top: 0;
}

/* Footer */
.site-footer {
  background: var(--emerald-950);
  color: #e2e8f0;
  padding: 48px 0 26px;
  border-top: 4px solid var(--gold-500);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #fde68a;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 18px;
  text-align: center;
  font-size: 0.84rem;
  color: #94a3b8;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  background: var(--emerald-900);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  border-inline-start: 4px solid var(--gold-500);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Page Banner for Subpages */
.page-hero {
  background: linear-gradient(155deg, #022c22 0%, #064e3b 65%, #0f766e 100%);
  color: #ffffff;
  padding: 40px 0;
  border-bottom: 3px solid var(--gold-500);
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
}

.page-hero p {
  margin: 0;
  color: #d1fae5;
  max-width: 65ch;
}

/* Home Quick Explore Cards */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--emerald-600);
}

.quick-icon {
  font-size: 1.8rem;
}

/* Halal Shop Storefront */
.shop-hero {
  background: linear-gradient(155deg, #022c22 0%, #064e3b 60%, #0f766e 100%);
  color: #ffffff;
  padding: 36px 0;
  border-bottom: 3px solid var(--gold-500);
}

.shop-hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.shop-brand-box {
  display: flex;
  align-items: center;
  gap: 18px;
}

.shop-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  border: 3px solid var(--gold-500);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.shop-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.shop-step {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(253, 230, 138, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.86rem;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.shop-search {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.94rem;
}

.shop-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 22px;
}

.shop-cats .filter-pill {
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card.is-out {
  opacity: 0.72;
}

.product-img-box {
  height: 175px;
  position: relative;
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--emerald-800);
  text-align: center;
  padding: 12px;
}

.product-placeholder .p-emoji {
  font-size: 2.6rem;
}

.product-item-no {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: rgba(2, 44, 34, 0.85);
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.stock-pill {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.stock-in { background: #dcfce7; color: #166534; }
.stock-low { background: #fef3c7; color: #92400e; }
.stock-out { background: #fee2e2; color: #991b1b; }

.product-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.product-cat {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--emerald-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.product-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.product-weight {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.product-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--emerald-900);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-50);
  border: 1px solid var(--emerald-600);
  border-radius: 9px;
  padding: 3px 6px;
}

.qty-stepper button {
  border: none;
  background: var(--emerald-700);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.qty-stepper span {
  min-width: 20px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Floating Cart Button & Slide Drawer */
.floating-cart-btn {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  z-index: 80;
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  color: #ffffff;
  border: 2px solid #fde68a;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  font-size: 0.96rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 44, 34, 0.55);
  z-index: 110;
  display: none;
  justify-content: flex-end;
}

.cart-drawer-backdrop.open {
  display: flex;
}

.cart-drawer {
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.cart-head {
  padding: 18px 20px;
  background: var(--emerald-900);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--gold-500);
}

.cart-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.cart-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
  background: #f8fafc;
}

.btn-whatsapp {
  background: #16a34a;
  color: #ffffff;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 13px 18px;
}

.btn-whatsapp:hover {
  background: #15803d;
}

/* Responsive */
@media (max-width: 1140px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  .shop-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .prayer-layout,
  .donation-grid,
  .resources-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text .brand-sub {
    display: none;
  }
  .lang-btn .lang-code {
    display: none;
  }
  .lang-btn {
    padding: 5px 6px;
  }
  .mini-board-list,
  .facility-grid,
  .jummah-times-grid {
    grid-template-columns: 1fr;
  }
  .countdown-box {
    text-align: start;
  }
}

/* Print Stylesheet */
@media print {
  .top-ticker,
  .site-header,
  .hero-actions,
  .prayer-toolbar,
  .event-actions,
  .site-footer,
  .modal-head button,
  #contact form {
    display: none !important;
  }
  body {
    background: #ffffff;
  }
  .card {
    box-shadow: none;
    border: 1px solid #cbd5e1;
  }
}
