/* ===========================================
   style.css - Halal Seikatsu Main Styles
   =========================================== */

/* ----- Reset & Base ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ── Parchment Light — Islamic Design System ── */
  --primary:        #1a5c3a;
  --primary-dark:   #0d3d26;
  --primary-light:  #2d8a5a;
  --accent-gold:    #c8952a;
  --accent-gold-light: #e8b84b;
  --accent-rust:    #8b3a2a;
  --secondary:      #5b7fa6;
  --danger:         #c0392b;
  --warning:        #c8952a;
  --success:        #1a5c3a;

  /* Backgrounds — warm parchment palette */
  --bg-base:        #f5efe0;
  --bg-surface:     #faf6ee;
  --bg-card:        #ffffff;
  --bg-card-warm:   #fdf8f0;
  --bg-elevated:    #f0e8d5;
  --bg-dark:        #1c1208;

  /* Text */
  --text-primary:   #1c1208;
  --text-secondary: #4a3728;
  --text-muted:     #8a7060;
  --text-inverse:   #faf6ee;

  /* Borders */
  --border-color:   rgba(139, 100, 60, 0.18);
  --border-strong:  rgba(139, 100, 60, 0.35);
  --border-gold:    rgba(200, 149, 42, 0.4);

  /* Category colors */
  --cat-food:       #1a5c3a;
  --cat-food-bg:    rgba(26, 92, 58, 0.08);
  --cat-prayer:     #5b4fa6;
  --cat-prayer-bg:  rgba(91, 79, 166, 0.08);
  --cat-health:     #8b3a2a;
  --cat-health-bg:  rgba(139, 58, 42, 0.08);
  --cat-community:  #c8952a;
  --cat-community-bg: rgba(200, 149, 42, 0.08);
  --cat-tools:      #2a6b8b;
  --cat-tools-bg:   rgba(42, 107, 139, 0.08);
  --cat-learn:      #6b4a1a;
  --cat-learn-bg:   rgba(107, 74, 26, 0.08);

  --nav-height: 70px;
  --header-height: 60px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 4px rgba(139,100,60,0.1);
  --shadow-md: 0 3px 12px rgba(139,100,60,0.15);
  --shadow-lg: 0 6px 24px rgba(139,100,60,0.2);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Noto Sans JP', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ----- Loading Screen ----- */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #2d6a4f 0%, #1a3d2b 50%, #0d2618 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  text-align: center;
}

.loader-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-text {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.loader-subtext {
  font-size: 14px;
  color: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* ----- Header ----- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(245, 239, 224, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.header-nav {
  display: flex;
  gap: 10px;
}

/* ----- Buttons ----- */
.btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(46, 204, 113, 0.1);
}

/* ----- Main App ----- */
#main-app {
  padding-top: var(--header-height);
  padding-bottom: calc(var(--nav-height) + 20px);
}

/* ----- Hero Section ----- */
.hero {
  background: linear-gradient(160deg, #1a5c3a 0%, #2d8a5a 40%, #f5efe0 100%);
  padding: 40px 20px;
  text-align: center;
}

.hero h1, .hero h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.hero p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ----- Sections ----- */
section {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h2, .section-header h3 {
  font-size: 18px;
  font-weight: 600;
}

/* ----- Quick Actions ----- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-radius: 16px;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-card:hover {
  background: rgba(46, 204, 113, 0.1);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.action-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.action-label {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ----- Feature Grid ----- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-radius: 16px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.feature-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.feature-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.feature-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ----- Prayer Widget ----- */
.prayer-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin: 20px;
  padding: 20px;
}

.prayer-widget .section-header {
  margin-bottom: 20px;
}

.prayer-widget .section-header span {
  font-size: 12px;
  color: var(--text-muted);
}

.prayer-times {
  display: flex;
  justify-content: space-between;
}

.prayer-time {
  text-align: center;
  flex: 1;
}

.prayer-name {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.prayer-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

/* ----- Bottom Navigation ----- */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(30, 30, 45, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 22px;
  padding: 8px;
  display: flex;
  justify-content: space-around;
  border: 1px solid var(--border-color);
  z-index: 100;
}

.nav-item {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.nav-item.active {
  background: rgba(46, 204, 113, 0.15);
  color: var(--primary);
}

.nav-icon {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

.nav-label {
  font-size: 10px;
}

/* ----- Responsive ----- */
@media (max-width: 600px) {
  .action-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .action-card {
    padding: 15px 5px;
  }
  
  .action-icon {
    font-size: 24px;
  }
  
  .action-label {
    font-size: 9px;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-stats {
    gap: 20px;
  }
  
  .stat-number {
    font-size: 20px;
  }
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .bottom-nav {
    max-width: 400px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ===========================================
   ACCESSIBILITY & FOCUS STYLES
   =========================================== */

/* Visible focus outline for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
}

/* Screen reader only utility */
.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;
}

/* ===========================================
   TOUCH TARGETS (min 44x44px)
   =========================================== */

.nav-item {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
}

.action-card,
.feature-card {
  min-height: 72px;
}

.btn {
  min-height: 44px;
  min-width: 44px;
}

/* Heart/favorite button touch target */
button[id^=heart-] {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

/* ===========================================
   SKELETON LOADING SCREENS
   =========================================== */

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-title {
  height: 16px;
  width: 70%;
}

.skeleton-sub {
  height: 12px;
  width: 50%;
}

.skeleton-addr {
  height: 12px;
  width: 90%;
}

/* ===========================================
   EMPTY STATES
   =========================================== */

.empty-state-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 16px;
}

.empty-state-full .empty-emoji {
  font-size: 64px;
  line-height: 1;
}

.empty-state-full h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.empty-state-full p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0;
}

.empty-state-full .btn-add {
  margin-top: 8px;
  background: rgba(46, 204, 113, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}

/* ===========================================
   PULL-TO-REFRESH
   =========================================== */

.ptr-indicator {
  display: none;
  justify-content: center;
  align-items: center;
  height: 50px;
  color: var(--text-secondary);
  font-size: 13px;
  gap: 8px;
}

.ptr-indicator.active {
  display: flex;
}

.ptr-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===========================================
   COLOR CONTRAST FIXES (WCAG AA)
   =========================================== */

/* Lighten verified badge text for contrast */
.verified-badge {
  background: #2d6a4f;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Halal status badge colors - ensure readable contrast */
.badge-halal { background: #1a5c45; color: #7fff7f; }
.badge-haram { background: #7f1d1d; color: #fca5a5; }
.badge-doubtful { background: #78350f; color: #fde68a; }
.badge-unknown { background: #1e3a5f; color: #93c5fd; }

/* Prayer time values - ensure good contrast on dark bg */
.prayer-value {
  color: #4ade80;
  font-weight: 600;
}

/* ===========================================
   MODAL ACCESSIBILITY
   =========================================== */

/* Ensure modals trap focus visually */
[role=dialog] {
  position: fixed;
  z-index: 1000;
}

[role=dialog]:focus {
  outline: none;
}


/* ===== PARCHMENT LIGHT — DEFAULT THEME ===== */
/* Light mode IS the default — dark mode is the override */
html.dark-mode {
  --bg-base:        #0f1208;
  --bg-surface:     #161a0e;
  --bg-card:        rgba(255,255,255,0.06);
  --bg-card-warm:   rgba(255,255,255,0.04);
  --bg-elevated:    rgba(255,255,255,0.09);
  --text-primary:   #f0e8d5;
  --text-secondary: #c8b89a;
  --text-muted:     #8a7a62;
  --text-inverse:   #1c1208;
  --border-color:   rgba(200,149,42,0.15);
  --border-strong:  rgba(200,149,42,0.3);
  --border-gold:    rgba(200,149,42,0.25);
  --primary:        #3aaa6e;
  --primary-dark:   #1a5c3a;
  --primary-light:  #5acc8a;
  --cat-food-bg:    rgba(58,170,110,0.12);
  --cat-prayer-bg:  rgba(120,100,200,0.12);
  --cat-health-bg:  rgba(180,80,60,0.12);
  --cat-community-bg: rgba(210,160,50,0.12);
  --cat-tools-bg:   rgba(60,130,170,0.12);
  --cat-learn-bg:   rgba(140,100,40,0.12);
}
html.dark-mode body { background: var(--bg-base); }
html.dark-mode .app-header { background: rgba(15,18,8,0.97); border-bottom-color: var(--border-gold); }
html.dark-mode .bottom-nav { background: rgba(15,18,8,0.97); border-top-color: var(--border-gold); }
html.dark-mode .feature-card, html.dark-mode .action-card { background: var(--bg-card); box-shadow: none; }
html.dark-mode input, html.dark-mode textarea, html.dark-mode select { background: var(--bg-card); border-color: var(--border-color); color: var(--text-primary); }
html.dark-mode .list-item { background: var(--bg-card); border-bottom-color: var(--border-color); }
html.dark-mode .page-header { background: rgba(15,18,8,0.98); }
html.dark-mode .hero { background: linear-gradient(160deg, #0d3d26 0%, #1a5c3a 40%, #0f1208 100%); }

/* Legacy light-mode class support */
html.light-mode body { background: var(--bg-base); color: var(--text-primary); }
html.light-mode .app-header { background: rgba(245,239,224,0.97); border-bottom: 1px solid var(--border-gold); }
html.light-mode .bottom-nav { background: rgba(250,246,238,0.97); border-top: 1px solid var(--border-gold); }

/* ===== MICRO-ANIMATIONS ===== */
.feature-card { transition: transform 150ms ease, box-shadow 150ms ease; }
.feature-card:hover, .feature-card:active { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.modal { animation: slideUp 250ms ease-out; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.page-content { animation: fadeIn 200ms ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Prayer check button bounce */
@keyframes prayerCheck { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.prayer-check-done { animation: prayerCheck 300ms cubic-bezier(.36,.07,.19,.97); }

/* Streak fire pulse */
@keyframes firePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.streak-fire { animation: firePulse 1.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .feature-card, .modal, .page-content, .streak-fire { animation: none; transition: none; }
}

/* ===========================================
   BLOG STYLES
   =========================================== */

/* Blog List Page */
.blog-hero {
  text-align: center;
  padding: 40px 20px 30px;
  background: linear-gradient(135deg, rgba(46,204,113,0.1) 0%, rgba(26,92,69,0.2) 100%);
  border-radius: 20px;
  margin-bottom: 30px;
  border: 1px solid rgba(46,204,113,0.2);
}
.blog-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.blog-hero p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Featured Post */
.blog-featured {
  background: var(--bg-card);
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  gap: 20px;
  align-items: center;
}
.blog-featured:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(46,204,113,0.15);
}
.blog-featured-emoji {
  font-size: 60px;
  min-width: 80px;
  text-align: center;
  background: rgba(46,204,113,0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-featured-body { flex: 1; }
.blog-featured-label {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.blog-featured-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.blog-featured-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-featured-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
}

/* Blog Grid */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}
@media (max-width: 768px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-featured { flex-direction: column; }
  .blog-featured-emoji { min-width: unset; width: 100%; padding: 20px; font-size: 48px; }
}

/* Post Card */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 14px;
}
.blog-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  background: rgba(46,204,113,0.05);
}
.blog-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.blog-card-emoji { font-size: 24px; }
.blog-category-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(46,204,113,0.15);
  color: var(--primary);
  font-weight: 600;
}
.blog-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  display: flex;
  gap: 10px;
}
.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}
.blog-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-tags {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Sidebar */
.blog-sidebar { display: flex; flex-direction: column; gap: 16px; }
.blog-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
}
.blog-sidebar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.blog-category-item:hover {
  background: rgba(46,204,113,0.1);
  color: var(--primary);
}
.blog-category-item.active {
  background: rgba(46,204,113,0.15);
  color: var(--primary);
  font-weight: 600;
}
.blog-cat-count {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}

/* Article Page */
.blog-article-container {
  max-width: 100%;
  animation: fadeIn 0.4s ease;
}
.blog-article-header {
  margin-bottom: 28px;
}
.blog-article-cover {
  font-size: 80px;
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(46,204,113,0.1), rgba(26,92,69,0.2));
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(46,204,113,0.2);
}
.blog-article-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}
.blog-article-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(46,204,113,0.05);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}
.blog-article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.blog-article-meta span { display: flex; align-items: center; gap: 5px; }

/* Article Layout */
.blog-article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 768px) {
  .blog-article-layout { grid-template-columns: 1fr; }
  .blog-article-toc-sticky { position: static !important; }
  .blog-article-title { font-size: 1.3rem; }
  .blog-article-cover { font-size: 60px; padding: 30px; }
}

/* TOC */
.blog-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 24px;
}
.blog-toc h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.blog-toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}
.blog-toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 8px;
}
.blog-toc ol li a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: color 0.2s;
  line-height: 1.4;
}
.blog-toc ol li a::before {
  content: counter(toc-counter);
  min-width: 20px;
  height: 20px;
  background: rgba(46,204,113,0.15);
  color: var(--primary);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.blog-toc ol li a:hover { color: var(--primary); }

/* Article sticky sidebar */
.blog-article-toc-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Article Body Content */
.blog-content { color: var(--text-secondary); line-height: 1.8; }
.blog-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 10px;
}
.blog-content p { margin-bottom: 14px; }
.blog-content ul, .blog-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.blog-content li { margin-bottom: 6px; }
.blog-content strong { color: var(--text-primary); font-weight: 600; }
.blog-content a { color: var(--primary); text-decoration: none; }
.blog-content a:hover { text-decoration: underline; }

/* Content Callout Boxes */
.blog-box {
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
}
.blog-box-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-box ul { padding-left: 16px; }
.blog-box li { font-size: 0.9rem; margin-bottom: 5px; }
.blog-box p { font-size: 0.9rem; margin: 0; }

.blog-box-green { background: rgba(46,204,113,0.08); border: 1px solid rgba(46,204,113,0.25); }
.blog-box-green .blog-box-title { color: #2ecc71; }
.blog-box-green li, .blog-box-green p { color: rgba(46,204,113,0.85); }

.blog-box-blue { background: rgba(52,152,219,0.08); border: 1px solid rgba(52,152,219,0.25); }
.blog-box-blue .blog-box-title { color: #3498db; }
.blog-box-blue li, .blog-box-blue p { color: rgba(52,152,219,0.85); }

.blog-box-yellow { background: rgba(243,156,18,0.08); border: 1px solid rgba(243,156,18,0.25); }
.blog-box-yellow .blog-box-title { color: #f39c12; }
.blog-box-yellow li, .blog-box-yellow p { color: rgba(243,156,18,0.85); }

.blog-box-red { background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.25); }
.blog-box-red .blog-box-title { color: #e74c3c; }
.blog-box-red li, .blog-box-red p { color: rgba(231,76,60,0.85); }

/* Section numbering */
.blog-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Summary box */
.blog-summary {
  background: linear-gradient(135deg, rgba(46,204,113,0.1), rgba(26,92,69,0.15));
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: 16px;
  padding: 24px;
  margin-top: 32px;
}
.blog-summary h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}
.blog-summary ul { list-style: none; padding: 0; }
.blog-summary ul li {
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
}
.blog-summary ul li::before { content: '✅'; flex-shrink: 0; }

/* Related posts */
.blog-related { margin-top: 32px; }
.blog-related h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.blog-related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.blog-related-card:hover {
  border-color: var(--primary);
  background: rgba(46,204,113,0.05);
}
.blog-related-emoji { font-size: 28px; margin-bottom: 8px; }
.blog-related-title { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.blog-related-meta { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* Back button */
.blog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 20px;
  transition: color 0.2s;
  background: none;
  border: none;
  font-family: inherit;
}
.blog-back-btn:hover { color: var(--primary); }

/* Breadcrumb */
.blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.blog-breadcrumb span { color: var(--text-muted); }
.blog-breadcrumb a { color: var(--primary); cursor: pointer; text-decoration: none; }
.blog-breadcrumb a:hover { text-decoration: underline; }

/* Search bar */
.blog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.blog-search:focus-within { border-color: var(--primary); }
.blog-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
}
.blog-search input::placeholder { color: var(--text-muted); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================
   PARCHMENT LIGHT — ISLAMIC DESIGN ADDITIONS
   =========================================== */

/* ── Base refinements ── */
body { background: var(--bg-base); }

input, textarea, select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,58,0.12);
}

/* ── Header ── */
.app-header {
  background: rgba(245,239,224,0.97);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
}

.logo {
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ctext y='20' x='4' font-size='18' fill='white'%3E🕌%3C/text%3E%3C/svg%3E");
  background-size: cover;
}

/* ── Hero — Parchment Islamic ── */
.hero {
  background: linear-gradient(160deg, #1a5c3a 0%, #2d8a5a 45%, #f5efe0 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('/images/hero-banner.png');
  background-size: cover;
  background-position: center top;
  opacity: 0.18;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  padding: 28px 20px 32px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-family: 'Amiri', serif;
}

.hero h1, .hero h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
}

.hero-hijri {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
  font-family: 'Amiri', serif;
}

/* Hero stats — pill cards */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 0;
}

.stat {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.stat-number {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

/* Hero prayer strip */
.hero-prayer-strip {
  background: rgba(255,255,255,0.12);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.hero-prayer-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.hero-prayer-time {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hero-prayer-countdown {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
}

/* ── Global search ── */
#global-search-input {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#global-search-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(26,92,58,0.12) !important;
}

#global-search-results {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* ── Section headers ── */
.section-header {
  padding: 6px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h2, .section-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h2::before, .section-header h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--accent-gold);
  border-radius: 2px;
}

/* ── Quick action cards ── */
.action-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.action-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.action-card:hover::after, .action-card:active::after {
  transform: scaleX(1);
}

.action-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-card-warm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.action-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* ── Category group headers ── */
.feature-category-group {
  margin-bottom: 6px;
}

.feature-category-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 20px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-category-label.cat-food    { color: var(--cat-food); }
.feature-category-label.cat-prayer  { color: var(--cat-prayer); }
.feature-category-label.cat-health  { color: var(--cat-health); }
.feature-category-label.cat-community { color: var(--cat-community); }
.feature-category-label.cat-tools   { color: var(--cat-tools); }
.feature-category-label.cat-learn   { color: var(--cat-learn); }

/* ── Feature cards ── */
.feature-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

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

.feature-card.cat-food    { border-left: 3px solid var(--cat-food);      background: linear-gradient(to right, var(--cat-food-bg), var(--bg-card)); }
.feature-card.cat-prayer  { border-left: 3px solid var(--cat-prayer);    background: linear-gradient(to right, var(--cat-prayer-bg), var(--bg-card)); }
.feature-card.cat-health  { border-left: 3px solid var(--cat-health);    background: linear-gradient(to right, var(--cat-health-bg), var(--bg-card)); }
.feature-card.cat-community { border-left: 3px solid var(--cat-community); background: linear-gradient(to right, var(--cat-community-bg), var(--bg-card)); }
.feature-card.cat-tools   { border-left: 3px solid var(--cat-tools);     background: linear-gradient(to right, var(--cat-tools-bg), var(--bg-card)); }
.feature-card.cat-learn   { border-left: 3px solid var(--cat-learn);     background: linear-gradient(to right, var(--cat-learn-bg), var(--bg-card)); }

.feature-card:hover.cat-food    { border-left-color: var(--cat-food);    box-shadow: 0 4px 16px rgba(26,92,58,0.15); }
.feature-card:hover.cat-prayer  { border-left-color: var(--cat-prayer);  box-shadow: 0 4px 16px rgba(91,79,166,0.15); }
.feature-card:hover.cat-health  { border-left-color: var(--cat-health);  box-shadow: 0 4px 16px rgba(139,58,42,0.15); }
.feature-card:hover.cat-community { border-left-color: var(--cat-community); box-shadow: 0 4px 16px rgba(200,149,42,0.15); }
.feature-card:hover.cat-tools   { border-left-color: var(--cat-tools);   box-shadow: 0 4px 16px rgba(42,107,139,0.15); }
.feature-card:hover.cat-learn   { border-left-color: var(--cat-learn);   box-shadow: 0 4px 16px rgba(107,74,26,0.15); }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.feature-icon.cat-food      { background: var(--cat-food-bg);      border: 1px solid rgba(26,92,58,0.2); }
.feature-icon.cat-prayer    { background: var(--cat-prayer-bg);    border: 1px solid rgba(91,79,166,0.2); }
.feature-icon.cat-health    { background: var(--cat-health-bg);    border: 1px solid rgba(139,58,42,0.2); }
.feature-icon.cat-community { background: var(--cat-community-bg); border: 1px solid rgba(200,149,42,0.2); }
.feature-icon.cat-tools     { background: var(--cat-tools-bg);     border: 1px solid rgba(42,107,139,0.2); }
.feature-icon.cat-learn     { background: var(--cat-learn-bg);     border: 1px solid rgba(107,74,26,0.2); }

.feature-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.feature-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

/* ── Bottom nav ── */
.bottom-nav {
  background: rgba(250,246,238,0.97);
  border-top: 1px solid var(--border-gold);
  box-shadow: 0 -2px 12px rgba(139,100,60,0.1);
}

.nav-item { color: var(--text-muted); }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { color: var(--primary); }
.nav-label { color: inherit; }

/* Active indicator */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 0 0 2px 2px;
}

.nav-item { position: relative; }

/* ── List items ── */
.list-item {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.list-item:hover { background: var(--bg-card-warm); }

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 3px 12px rgba(26,92,58,0.3);
}

.btn-primary:hover {
  box-shadow: 0 5px 18px rgba(26,92,58,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(26,92,58,0.08);
}

/* ── Prayer widget ── */
.prayer-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin: 0 16px 16px;
}

/* ── Geometric bismillah banner ── */
.bismillah-banner {
  text-align: center;
  padding: 16px 20px 8px;
  font-family: 'Amiri', serif;
  font-size: 22px;
  color: var(--accent-gold);
  letter-spacing: 2px;
  opacity: 0.85;
}

/* ── Islamic pattern divider ── */
.islamic-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.islamic-divider::before,
.islamic-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-gold), transparent);
}

/* ── Loading screen ── */
#loading-screen {
  background-image: url('/images/loading-screen.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-color: #0d3d26 !important;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 10;
}

.loader-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
}

.loader-icon img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(200,149,42,0.5);
}

.loader-bismillah {
  font-family: 'Amiri', serif;
  font-size: 22px;
  color: rgba(232,184,75,0.95);
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.loader-text {
  font-size: 22px;
  font-weight: 700;
  color: #f0e8d5;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.loader-subtext {
  font-size: 13px;
  color: rgba(240,232,213,0.6);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* ── Cards & modals ── */
.card, [class*="-card"]:not(.feature-card):not(.action-card):not(.blog-card):not(.blog-featured):not(.blog-related-card):not(.blog-sidebar-card) {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ── Page headers in sub-pages ── */
.page-header {
  background: rgba(245,239,224,0.98) !important;
  border-bottom: 1px solid var(--border-gold) !important;
  box-shadow: var(--shadow-sm);
}

.page-header h1 { color: var(--text-primary); }

.back-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.back-btn:hover { background: var(--bg-card); border-color: var(--primary); }

/* ── Search bars in sub-pages ── */
.search-bar input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,58,0.1);
}

/* ── Verified badge ── */
.verified-badge {
  background: rgba(26,92,58,0.12);
  color: var(--primary);
  border: 1px solid rgba(26,92,58,0.25);
  border-radius: 20px;
  font-size: 11px;
  padding: 2px 8px;
  font-weight: 600;
}

/* ── Status indicators ── */
.status-halal     { color: var(--primary); }
.status-certified { color: var(--accent-gold); }
.status-haram     { color: var(--danger); }

/* ── Responsive ── */
@media (max-width: 480px) {
  .hero h1, .hero h2 { font-size: 18px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .feature-grid { grid-template-columns: 1fr; padding: 0 12px; }
  .action-grid { gap: 8px; }
  .action-icon { width: 36px; height: 36px; font-size: 18px; }
}

@media (min-width: 768px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .action-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Blog breadcrumb enhanced ── */
.blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.blog-breadcrumb a {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.blog-breadcrumb a:hover { color: var(--primary-light); text-decoration: underline; }
.blog-breadcrumb span { color: var(--text-muted); }
.dark-mode .blog-breadcrumb { background: var(--bg-card); border-color: var(--border-color); }

/* ── Konbini product image ── */
.k-product-img {
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}
.k-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.k-ing-found {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ============================================
   MOBILE RESPONSIVENESS FIX — June 2026
   ============================================ */
@media (max-width: 480px) {
  /* Global */
  body { font-size: 14px; }
  .page-content { padding: 12px !important; }
  
  /* Hero section */
  .hero-section { padding: 16px 12px !important; }
  .hero-title { font-size: 22px !important; }
  .hero-subtitle { font-size: 13px !important; }
  .hero-stats { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
  .stat-number { font-size: 18px !important; }
  .stat-label { font-size: 10px !important; }

  /* Quick access / action grid — 5 items in 1 row is too small, use 3+2 */
  .action-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .action-card { padding: 12px 4px !important; }
  .action-icon { font-size: 22px !important; }
  .action-label { font-size: 10px !important; }

  /* Feature grid */
  .feature-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 0 4px !important; }
  .feature-card { padding: 14px 10px !important; }
  .feature-icon { font-size: 28px !important; }
  .feature-title { font-size: 12px !important; }

  /* Nav bar */
  .bottom-nav { padding: 6px 0 !important; }
  .nav-item { font-size: 9px !important; gap: 2px !important; }
  .nav-icon { font-size: 20px !important; }

  /* Cards */
  .card { padding: 14px !important; }
  .card-title { font-size: 15px !important; }

  /* Buttons */
  .btn { padding: 10px 16px !important; font-size: 13px !important; }
  
  /* Blog layout — remove sidebar on mobile */
  .blog-layout { grid-template-columns: 1fr !important; }
  .blog-sidebar { display: none !important; }
  .blog-article-layout { grid-template-columns: 1fr !important; }
  
  /* Prayer strip on hero */
  .hero-prayer-strip { font-size: 12px !important; padding: 8px 12px !important; }
  
  /* Search bar */
  .search-bar input { font-size: 14px !important; }
  
  /* Filter bar — scrollable on mobile */
  .filter-bar { overflow-x: auto !important; flex-wrap: nowrap !important; padding-bottom: 4px !important; -webkit-overflow-scrolling: touch !important; }
  .filter-btn { white-space: nowrap !important; flex-shrink: 0 !important; }
  
  /* Location cards */
  .location-card { padding: 12px !important; }
  .location-name { font-size: 14px !important; }
  .location-address { font-size: 12px !important; }
  
  /* Modal */
  .modal-content { padding: 16px !important; border-radius: 16px 16px 0 0 !important; max-height: 90vh !important; }
  .modal-stat-row { grid-template-columns: repeat(2, 1fr) !important; }
  
  /* Konbini cards */
  .konbini-card { padding: 10px !important; }
  .k-ing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 360px) {
  /* Extra small phones */
  .action-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .feature-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-title { font-size: 18px !important; }
  .stat-number { font-size: 16px !important; }
}
