/* ============================================================
   Musulman Redesign — Shared Design System
   Light mode first; dark mode via prefers-color-scheme + [data-theme]
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Scheherazade+New:wght@400;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --color-background:         #FAFAF8;
  --color-surface:            #FFFFFF;
  --color-warm-accent:        #F5E6D3;
  --color-teal:               #2A9D8F;
  --color-teal-dark:          #1D7A6F;
  --color-coral:              #E07A5F;
  --color-text-primary:       #1A1A1A;
  --color-text-secondary:     #6B6B6B;
  --color-text-muted:         #999999;
  --color-border:             #EDE6DC;
  --color-divider:            #F0EBE4;
  --color-prayer-active-bg:   #F5E6D3;
  --color-prayer-active-border: #2A9D8F;
  --color-prayer-active-text: #2A9D8F;
  --color-icon-gold:          #C9A84C;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-arabic:  "Scheherazade New", serif;

  --radius-card:  16px;
  --radius-hero:  20px;
  --radius-bar:   12px;

  --container-max: 1140px;
  --space-screen-h: 24px;

  /* Header */
  --header-bg:      #FFFFFF;
  --header-border:  var(--color-divider);
  --header-height:  64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-background:         #121212;
    --color-surface:            #1E1E1E;
    --color-warm-accent:        #221708;
    --color-teal:               #3DB8A9;
    --color-teal-dark:          #2A9D8F;
    --color-coral:              #E8927A;
    --color-text-primary:       #E8E8E8;
    --color-text-secondary:     #A0A0A0;
    --color-text-muted:         #666666;
    --color-border:             #2C2C2C;
    --color-divider:            #262626;
    --color-prayer-active-text: #C9A84C;
    --header-bg:                #1A1A1A;
    --header-border:            #2C2C2C;
  }
}
:root[data-theme="dark"] {
  --color-background:         #121212;
  --color-surface:            #1E1E1E;
  --color-warm-accent:        #221708;
  --color-teal:               #3DB8A9;
  --color-teal-dark:          #2A9D8F;
  --color-coral:              #E8927A;
  --color-text-primary:       #E8E8E8;
  --color-text-secondary:     #A0A0A0;
  --color-text-muted:         #666666;
  --color-border:             #2C2C2C;
  --color-divider:            #262626;
  --color-prayer-active-text: #C9A84C;
  --header-bg:                #1A1A1A;
  --header-border:            #2C2C2C;
}

/* ── Base Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-primary);
  background: var(--color-background);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; }

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

a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ── Header (shared overrides for all pages) ──────────────── */
.site-header {
  background-color: var(--header-bg) !important;
  border-bottom: 1px solid var(--header-border) !important;
}

.site-header .logo-text {
  color: var(--color-text-primary) !important;
}

.site-header .nav-menu a,
.site-header .nav-menu button {
  color: var(--color-text-secondary) !important;
}

.site-header .nav-menu a:hover {
  color: var(--color-teal) !important;
}
.site-header .nav-menu a.active {
  color: #fff !important;
}

.site-header .settings-icon,
.site-header .mobile-menu-toggle {
  color: var(--color-text-secondary) !important;
  background: transparent !important;
  border-color: var(--color-border) !important;
}

/* ── Layout Utilities ─────────────────────────────────────── */
.page-band {
  width: 100%;
  background: linear-gradient(180deg, var(--color-warm-accent) 0%, var(--color-background) 100%);
  padding: 48px var(--space-screen-h) 40px;
}

.contained {
  max-width: var(--container-max);
  margin: 0 auto;
}

.page-main {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px var(--space-screen-h) 80px;
}

.page-wrapper-new {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-background);
}

/* ── Section Headings ─────────────────────────────────────── */
.section-heading {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-text-primary);
}

.section-heading.spaced { margin-top: 48px; }

/* ── Page Band Headings ───────────────────────────────────── */
.page-band h1 {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--color-text-primary);
}
.page-band p.sub {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin: 0;
  max-width: 68ch;
}

/* ── Hero Card (SkyState) ─────────────────────────────────── */
.hero-card {
  border-radius: var(--radius-hero);
  padding: 32px 28px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: background 500ms ease, color 500ms ease, opacity 300ms ease;
  margin-bottom: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-card { transition: none; }
}

.hero-card.fajr       { background: linear-gradient(180deg, #0C111A 0%, #1A2D42 100%); }
.hero-card.dhuhr      { background: linear-gradient(180deg, #E8CE60 0%, #F5EAA0 100%); color: rgba(26,26,26,0.85); }
.hero-card.asr        { background: linear-gradient(135deg, #8A4010 0%, #C87820 100%); }
.hero-card.preMaghrib { background: linear-gradient(180deg, #6A2010 0%, #CC5428 100%); }
.hero-card.maghrib    { background: linear-gradient(180deg, #1A0A28 0%, #C04020 100%); }
.hero-card.isha       { background: linear-gradient(180deg, #05080F 0%, #0D1428 100%); }

/* Stars overlay — only on dark sky states */
.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease;
}
.hero-card.fajr .hero-stars,
.hero-card.isha .hero-stars,
.hero-card.maghrib .hero-stars { opacity: 1; }

@keyframes twinkle {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 0.15; transform: scale(0.7); }
}

.hero-card .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: twinkle 2.8s ease-in-out infinite;
}

/* Hero card content layout */
.hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0 0 8px;
}

.hero-prayer-name {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.2;
}

.hero-countdown {
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
  margin: 0 0 16px;
  letter-spacing: -1px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  opacity: 0.8;
  flex-wrap: wrap;
}

.hero-meta .separator { opacity: 0.4; }

.hero-location-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 200ms;
}
.hero-location-link:hover { opacity: 1; }

/* ── Hero card two-state elements ──────────────────────────── */
.hero-window-start {
  font-size: 15px;
  opacity: 0.75;
  margin: 0 0 16px;
  font-weight: 400;
}
.hero-sublabel {
  font-size: 15px;
  opacity: 0.65;
  margin: -8px 0 16px;
  font-weight: 400;
}
.hero-progress-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 8px;
  overflow: hidden;
}
.hero-card.dhuhr .hero-progress-bar {
  background: rgba(26,26,26,0.12);
}
.hero-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: rgba(255,255,255,0.55);
  transition: width 1s linear;
}
.hero-card.dhuhr .hero-progress-fill {
  background: rgba(26,26,26,0.40);
}
.hero-caption {
  font-size: 12px;
  opacity: 0.65;
  margin: 0 0 4px;
  letter-spacing: 0.3px;
}
.hero-next-hint {
  font-size: 13px;
  opacity: 0.75;
  margin: 8px 0 0;
}

/* ── Prayer Rows (Today's row / prayer table) ─────────────── */
.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--radius-bar);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 8px;
  transition: background 200ms;
}

.prayer-row.active {
  background: var(--color-prayer-active-bg);
  border-color: var(--color-prayer-active-border);
}

.prayer-row-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.prayer-row-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.prayer-row.active .prayer-row-name,
.prayer-row.active .prayer-row-time {
  color: var(--color-prayer-active-text);
}

/* ── Explore Grid (homepage) ──────────────────────────────── */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}

@media (max-width: 900px) { .explore-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .explore-grid { grid-template-columns: 1fr 1fr; } }

.explore-card {
  border-radius: var(--radius-card);
  padding: 20px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 150ms ease, box-shadow 150ms ease;
  border: 1px solid transparent;
}

.explore-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.explore-card-icon {
  font-size: 22px;
  line-height: 1;
}

.explore-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.explore-card-desc {
  font-size: 12.5px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.4;
}

.explore-card.teal {
  background: var(--color-teal);
  color: #fff;
}
.explore-card.teal .explore-card-title,
.explore-card.teal .explore-card-desc { color: rgba(255,255,255,0.9); }
.explore-card.teal .explore-card-desc { opacity: 0.8; }

.explore-card.coral {
  background: var(--color-coral);
  color: #fff;
}
.explore-card.coral .explore-card-title,
.explore-card.coral .explore-card-desc { color: rgba(255,255,255,0.9); }
.explore-card.coral .explore-card-desc { opacity: 0.8; }

.explore-card.warm {
  background: var(--color-warm-accent);
  border-color: var(--color-border);
}

.explore-card.surface {
  background: var(--color-surface);
  border-color: var(--color-border);
}

/* ── Dua Card ─────────────────────────────────────────────── */
.dua-featured-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal);
  border-radius: var(--radius-card);
  padding: 28px;
}

.dua-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-teal);
  margin: 0 0 14px;
  letter-spacing: 0.5px;
}

.dua-arabic-text {
  font-family: var(--font-arabic);
  font-size: 28px;
  line-height: 2.0;
  text-align: right;
  direction: rtl;
  margin: 0 0 16px;
  color: var(--color-text-primary);
}

.dua-translation-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 60ch;
}

.dua-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.dua-card-link {
  color: #fff;
  background: var(--color-teal);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background 200ms;
}
.dua-card-link:hover { background: var(--color-teal-dark); }

.dua-card-ref {
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Special Days — Next-Up Hero ──────────────────────────── */
.next-up-hero {
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
  border-radius: var(--radius-card);
  padding: 26px 28px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.next-up-hero .hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 6px;
}

.next-up-hero h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.next-up-hero p {
  font-size: 14px;
  opacity: 0.85;
  margin: 0;
  max-width: 50ch;
}

.next-up-countdown {
  font-size: 32px;
  font-weight: 300;
  white-space: nowrap;
  text-align: right;
}

.next-up-countdown span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 2px;
}

/* ── Special Days — Day Cards ─────────────────────────────── */
.days-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) { .days-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .days-grid { grid-template-columns: 1fr; } }

.day-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  gap: 16px;
}

.day-date-block {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  border-right: 1px solid var(--color-divider);
  padding-right: 16px;
}

.day-date-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.day-date-mon {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  margin-top: 4px;
  display: block;
}

.day-body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.day-body p {
  margin: 0;
  font-size: 12.5px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.day-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 8px;
}

.day-tag.major { background: var(--color-warm-accent); color: var(--color-icon-gold); }
.day-tag.minor { background: var(--color-divider); color: var(--color-text-muted); }

/* ── Calendar ─────────────────────────────────────────────── */
.cal-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 860px) { .cal-layout { grid-template-columns: 1fr; } }

.cal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.cal-card-head {
  padding: 20px 22px 16px;
}

.cal-card-head h2 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 700;
}

.cal-card-head .cal-range {
  font-size: 13px;
  color: var(--color-text-muted);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-dow {
  background: var(--color-teal);
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1 / 0.82;
  border: 1px solid var(--color-divider);
  border-top: none;
  border-left: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.cal-day .g {
  font-size: 15px;
  font-weight: 600;
}

.cal-day .h {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.cal-day.today { background: var(--color-warm-accent); }

.cal-day.today .g {
  background: var(--color-teal);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.cal-day.today .h { color: var(--color-teal); font-weight: 600; }
.cal-day.empty { background: var(--color-background); }

.cal-nav {
  display: flex;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid var(--color-divider);
}

.cal-nav a, .cal-nav button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-teal);
  background: var(--color-warm-accent);
  border: none;
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 150ms;
}

.cal-nav a:hover, .cal-nav button:hover { background: var(--color-border); }

/* Today hero (right column) */
.today-hero {
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
  border-radius: var(--radius-card);
  padding: 26px;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}

.today-hero .today-label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 8px;
}

.today-hero .hijri-big {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px;
  color: #fff;
}

.today-hero .greg-date {
  font-size: 13.5px;
  opacity: 0.85;
  margin: 0;
}

.events-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
}

.events-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
  text-decoration: none;
  color: inherit;
}

.event-row:last-child { border-bottom: none; padding-bottom: 0; }

.event-date-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-warm-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.event-date-badge .n {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-icon-gold);
}

.event-date-badge .m {
  font-size: 8.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: 1px;
}

.event-name {
  font-size: 14px;
  font-weight: 500;
}

/* ── Category Grid (Duas) ─────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

.cat-card {
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 150ms, box-shadow 150ms;
}

.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.cat-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.cat-card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.cat-card p  { margin: 0; font-size: 12.5px; }

.cat-card.teal  { background: var(--color-teal); color: #fff; }
.cat-card.teal  .cat-badge { background: rgba(255,255,255,0.2); }
.cat-card.teal  p { color: rgba(255,255,255,0.75); }

.cat-card.coral { background: var(--color-coral); color: #fff; }
.cat-card.coral .cat-badge { background: rgba(255,255,255,0.2); }
.cat-card.coral p { color: rgba(255,255,255,0.75); }

.cat-card.gold  { background: var(--color-icon-gold); color: var(--color-text-primary); }
.cat-card.gold  .cat-badge { background: rgba(0,0,0,0.12); }
.cat-card.gold  p { color: rgba(26,26,26,0.65); }

.cat-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--color-text-secondary);
}

.cat-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Prayer Times Table ───────────────────────────────────── */
.prayer-table-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.prayer-table-head {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, 1fr);
  background: var(--color-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.prayer-table-head div,
.prayer-table-row div {
  padding: 12px 10px;
  text-align: center;
}

.prayer-table-head div:first-child,
.prayer-table-row div:first-child { text-align: left; padding-left: 16px; }

.prayer-table-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, 1fr);
  font-size: 13.5px;
  border-top: 1px solid var(--color-divider);
}

.prayer-table-row.today-row {
  background: var(--color-prayer-active-bg);
  box-shadow: inset 3px 0 0 var(--color-prayer-active-border);
  font-weight: 600;
  color: var(--color-prayer-active-text);
}

.prayer-table-row .date-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.prayer-table-row .date-cell .hijri-small {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 400;
}

.prayer-table-row.today-row .date-cell { color: var(--color-prayer-active-text); }
.prayer-table-row.today-row .date-cell .hijri-small { color: var(--color-prayer-active-text); opacity: 0.7; }
.prayer-table-row.today-row div { color: var(--color-prayer-active-text); }

/* ── Location row (Prayer Times page band) ──────────────────── */
.loc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.loc-row h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
.loc-row .hijri { font-size: 14px; color: var(--color-text-secondary); }
.loc-row .change { font-size: 13px; color: var(--color-teal); text-decoration: none; font-weight: 600; white-space: nowrap; }
.loc-row .change:hover { color: var(--color-teal-dark); }

/* ── Status Hero (Prayer Times page — two-column NOW / NEXT) ── */
.status-hero {
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
  border-radius: var(--radius-card);
  padding: 22px 26px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.status-hero .now-label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  margin: 0 0 4px;
}
.status-hero .now-val { font-size: 20px; font-weight: 700; margin: 0; }
.status-hero .status-divider { width: 1px; height: 34px; background: rgba(255,255,255,0.3); flex-shrink: 0; }
.status-hero .next-time { font-size: 28px; font-weight: 300; margin: 0; }

/* legacy single-column labels (keep for JS updates) */
.status-hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 6px;
}
.status-hero-name { font-size: 28px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.status-hero-time { font-size: 16px; opacity: 0.85; margin: 0 0 16px; }
.status-hero-next { font-size: 13.5px; opacity: 0.75; }

/* ── Highlights row (Prayer Times: dua + event card) ────────── */
.highlights-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
@media (max-width: 720px) { .highlights-row { grid-template-columns: 1fr; } }

.dua-mini {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal);
  border-radius: var(--radius-card);
  padding: 20px 22px;
}
.dua-mini .arabic {
  font-family: var(--font-arabic, "Scheherazade New", serif);
  font-size: 22px;
  line-height: 1.9;
  text-align: right;
  direction: rtl;
  margin: 0 0 10px;
  color: var(--color-text-primary);
}
.dua-mini p.tr { font-size: 13px; color: var(--color-text-secondary); margin: 0 0 10px; line-height: 1.5; }
.dua-mini a { font-size: 12.5px; color: var(--color-teal); font-weight: 600; text-decoration: none; }
.dua-mini a:hover { color: var(--color-teal-dark); }

.ramadan-card {
  background: var(--color-warm-accent);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ramadan-card .icon { font-size: 22px; margin-bottom: 8px; }
.ramadan-card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--color-text-primary); }
.ramadan-card .days { font-size: 22px; font-weight: 700; color: var(--color-icon-gold); }
.ramadan-card p { margin: 4px 0 0; font-size: 12px; color: var(--color-text-secondary); }

/* ── Prayer table expand toggle ──────────────────────────────── */
#more-rows { display: none; }
#more-rows.open { display: block; }
.expand-btn {
  width: 100%;
  text-align: center;
  padding: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-teal);
  background: var(--color-surface);
  border: none;
  border-top: 1px solid var(--color-divider);
  cursor: pointer;
  font-family: inherit;
}
.expand-btn:hover { background: var(--color-background); }

/* ── Dua card (left-border style, used on duas library + home) ── */
.dua-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 20px;
}
.dua-card .dua-eyebrow { font-size: 13px; font-weight: 600; color: var(--color-teal); margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.dua-card .dua-arabic {
  font-family: var(--font-arabic, "Scheherazade New", serif);
  font-size: 28px;
  line-height: 2.0;
  text-align: right;
  direction: rtl;
  margin: 0 0 16px;
  color: var(--color-text-primary);
}
.dua-card .dua-translation { font-size: 15px; color: var(--color-text-secondary); line-height: 1.6; margin: 0 0 16px; }
.dua-card .dua-footer { display: flex; justify-content: space-between; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 10px; }
.dua-card .dua-footer a { color: #fff; background: var(--color-teal); text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 100px; }
.dua-card .dua-footer a:hover { background: var(--color-teal-dark); }
.dua-card .dua-footer span { color: var(--color-text-muted); font-style: italic; }

/* ── Category cards — color-filled (Duas Library) ────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 0;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

.cat-card {
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: opacity 0.15s;
}
.cat-card:hover { opacity: 0.9; transform: translateY(-1px); }
.cat-badge {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.cat-card h3, .cat-title { margin: 0; font-size: 15px; font-weight: 600; }
.cat-card p, .cat-count { margin: 0; font-size: 12.5px; }

.cat-card.teal { background: var(--color-teal); color: #fff; }
.cat-card.teal .cat-badge { background: rgba(255,255,255,0.2); }
.cat-card.teal p, .cat-card.teal .cat-count { color: rgba(255,255,255,0.75); }

.cat-card.coral { background: var(--color-coral); color: #fff; }
.cat-card.coral .cat-badge { background: rgba(255,255,255,0.2); }
.cat-card.coral p, .cat-card.coral .cat-count { color: rgba(255,255,255,0.75); }

.cat-card.gold { background: var(--color-icon-gold); color: var(--color-text-primary); }
.cat-card.gold .cat-badge { background: rgba(0,0,0,0.12); }
.cat-card.gold p, .cat-card.gold .cat-count { color: rgba(26,26,26,0.65); }

.cat-legend { display: flex; gap: 20px; margin-top: 18px; font-size: 12.5px; color: var(--color-text-muted); flex-wrap: wrap; }
.cat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cat-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ── Prayer list (simple rows — homepage) ─────────────────────── */
.prayer-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 32px;
}
.prayer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-divider);
  font-size: 15px;
}
.prayer-row:last-child { border-bottom: none; }
.prayer-row .name { color: var(--color-text-primary); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.prayer-row .time { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

/* Prayer row icon */
.prayer-row-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  opacity: 0.55;
  flex-shrink: 0;
}
.prayer-row .name {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* NOW/NEXT badges — hidden by default, shown via .now/.next class on row */
.prayer-badge {
  display: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.5;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* NOW row — teal text, left bar, no background change */
.prayer-row.now { box-shadow: inset 3px 0 0 var(--color-teal); }
.prayer-row.now .name,
.prayer-row.now .time { color: var(--color-teal); font-weight: 600; }
.prayer-row.now .prayer-row-icon { opacity: 1; }
.prayer-row.now .now-badge { display: inline-block; background: var(--color-teal); color: #fff; }
.prayer-row.now .next-badge { display: none; }

/* Sunrise row — reference time, not a prayer; muted styling, no badges */
.prayer-row.sunrise-row .name,
.prayer-row.sunrise-row .time { color: var(--color-text-secondary); font-weight: 400; }
.prayer-row.sunrise-row .prayer-row-icon { opacity: 0.35; }

/* NEXT row — coral/salmon text, left bar, no background change */
.prayer-row.next { box-shadow: inset 3px 0 0 var(--color-coral); }
.prayer-row.next .name,
.prayer-row.next .time { color: var(--color-coral); font-weight: 500; }
.prayer-row.next .prayer-row-icon { opacity: 1; }
.prayer-row.next .next-badge { display: inline-block; background: transparent; color: var(--color-coral); border: 1px solid var(--color-coral); }
.prayer-row.next .now-badge { display: none; }

/* ── Homepage hero wrap (2-column layout) ─────────────────────── */
.hero-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}
@media (max-width: 780px) { .hero-wrap { grid-template-columns: 1fr; } }

.hero-intro h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin: 0 0 12px;
  color: var(--color-text-primary);
}
.hero-intro p.sub {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 46ch;
}
.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-warm-accent);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ── Accessibility ────────────────────────────────────────── */
.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;
}

a:focus, button:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: 24px var(--space-screen-h, 24px);
  margin-top: auto;
}
.footer-content { max-width: var(--container-max, 1140px); margin: 0 auto; }
.footer-top { margin-bottom: 16px; }
.footer-explore__title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.footer-explore__links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-explore__links a { font-size: 13.5px; color: var(--color-teal); text-decoration: none; font-weight: 500; }
.footer-explore__links a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--color-divider);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom .copyright { font-size: 13px; color: var(--color-text-secondary); }
.site-footer .social-media { display: flex; gap: 12px; align-items: center; }
.site-footer .social-media a {
  color: var(--color-text-secondary); font-size: 1.1rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-warm-accent);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: color 150ms, background 150ms;
}
.site-footer .social-media a:hover { color: var(--color-teal); background: var(--color-border); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--color-teal); text-decoration: none; font-size: 13px; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }
