/* RESET & BASE STYLES */
:root {
  --bg-dark: #0B0F19;        /* Deep SaaS Navy Background */
  --surface: #111827;        /* Card Background */
  --surface-hover: #1F2937;  
  --primary: #2563EB;        /* Vibrant Blue */
  --primary-hover: #1D4ED8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  --text-main: #F8FAFC;      /* Crisp White Text */
  --text-muted: #94A3B8;     /* Light Grey for subtitles */
  --border: rgba(255, 255, 255, 0.08);
  --gold: #FBBF24;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 40%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* TYPOGRAPHY HELPERS */
.highlight-blue { color: #60A5FA; }
.hidden { display: none !important; }

/* SCROLL PROGRESS BAR */
.scroll-progress-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 10000; pointer-events: none;
}
.scroll-progress-bar {
  height: 100%; width: 100%; background: var(--primary); transform: scaleX(0); transform-origin: right; will-change: transform;
  box-shadow: 0 0 10px var(--primary);
}

/* NAVIGATION BAR */
header {
  position: sticky; top: 0; 
  background: rgba(11, 15, 25, 0.85); 
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  z-index: 1000; border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 5%; max-width: 1400px; margin: 0 auto;
}

/* BRAND LOGOS (HIMA & BIZRI) */
.brand-group {
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; text-decoration: none; gap: 15px; }
.logo-box {
  font-weight: 900; letter-spacing: 1px;
}
.hima-logo {
  font-size: 1.3rem; color: #FFFFFF; font-style: italic;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.mosque-logo {
  font-size: 1.1rem; color: var(--text-main);
  border: 1px solid var(--border); padding: 4px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.03);
}
.logo-divider { width: 1px; height: 24px; background: var(--border); }

nav { display: flex; gap: 30px; }
nav a { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: color 0.3s; }
nav a:hover, nav a.active { color: var(--text-main); }

/* GLOBAL SECTION STYLES */
.section-container { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; text-align: center; }
.section-desc { font-size: 1.1rem; color: var(--text-muted); text-align: center; margin-bottom: 50px; }

/* 1. HERO SECTION */
.hero-section { min-height: 85vh; padding: 60px 5%; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; max-width: 1400px; margin: 0 auto; align-items: center; }

/* Hero Text Side */
.badge { display: inline-block; background: rgba(37, 99, 235, 0.15); color: #60A5FA; border: 1px solid rgba(37, 99, 235, 0.3); padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; margin-bottom: 25px; }
.hero-title { font-size: 3.8rem; font-weight: 900; color: var(--text-main); line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px; }
.hero-subtitle { font-size: 1.25rem; font-weight: 600; color: var(--text-muted); margin-bottom: 40px; line-height: 1.6; max-width: 90%; }

/* SaaS Input Block */
.search-block { margin-bottom: 30px; }
.search-label { display: block; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.saas-input-group {
  display: flex; align-items: center;
  /* Brighter background for the search box container */
  background: #1E293B; 
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 6px 6px 16px; 
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.saas-input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.input-icon { color: var(--text-muted); display: flex; align-items: center; margin-left: 12px; }
.saas-input-group input {
  flex: 1; background: transparent; border: none; color: var(--text-main);
  font-size: 1.05rem; padding: 12px 0; outline: none; font-family: 'Cairo', sans-serif;
}
.saas-input-group input::placeholder { color: #64748B; }

.saas-btn-primary {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  border: none; padding: 12px 24px; border-radius: 8px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all 0.3s ease; box-shadow: 0 4px 15px var(--primary-glow);
}
.saas-btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 20px var(--primary-glow); }

/* Result Area */
.result-area { margin-top: 15px; animation: fadeIn 0.4s ease; }
.result-card { background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.2); padding: 16px 20px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; }
.result-info h3 { color: #E2E8F0; font-size: 1.2rem; margin-bottom: 2px; }
.result-info p { color: var(--text-muted); font-size: 0.9rem; }
.status-badge { background: var(--primary); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }

/* Stacked Action Links */
.hero-links { 
  display: flex; 
  flex-direction: column; /* Stacks items vertically */
  gap: 12px; 
  margin-top: 25px; 
  max-width: 300px;
}

.action-btn {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 12px 20px; border-radius: 8px;
  font-size: 0.95rem; font-weight: 700; text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.masjidi-btn {
  background: rgba(255, 255, 255, 0.05); color: var(--text-main);
}
.masjidi-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--text-muted); }

.whatsapp-btn {
  background: rgba(37, 211, 102, 0.1); /* Subtle WhatsApp green tint */
  color: #25D366; 
  border-color: rgba(37, 211, 102, 0.2);
}
.whatsapp-btn:hover { background: rgba(37, 211, 102, 0.2); border-color: #25D366; }

/* Hero Visual (Image Cropping Magic) */
.hero-visual { position: relative; width: 100%; display: flex; justify-content: center; }
.hero-image-wrapper {
  width: 100%; max-width: 500px;
  aspect-ratio: 4/4.8; 
  border-radius: 24px;
  overflow: hidden; 
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px var(--primary-glow);
}
.hero-image-wrapper img {
  width: 100%;
  height: 118%; 
  object-fit: cover;
  object-position: center top; 
}

/* Floating Glass Stat */
.glass-panel {
  position: absolute; bottom: 30px; right: -20px;
  background: rgba(17, 24, 39, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 24px; display: flex; align-items: center; gap: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.stat-icon { background: rgba(37, 99, 235, 0.2); color: #60A5FA; width: 40px; height: 40px; border-radius: 10px; display: flex; justify-content: center; align-items: center; }
.stat-text { display: flex; flex-direction: column; }
.stat-text strong { color: var(--text-main); font-size: 0.95rem; }
.stat-text span { color: var(--text-muted); font-size: 0.8rem; }

/* DARK CARDS */
.dark-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: all 0.4s ease; }

/* 2. AHADITH SECTION */
.ahadith-section { padding: 80px 5%; position: relative; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.hadith-card { padding: 40px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hadith-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 10px 30px var(--primary-glow); }
.glow-blue { background: rgba(37, 99, 235, 0.15); color: #60A5FA; border: 1px solid rgba(37, 99, 235, 0.3); width: 48px; height: 48px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 1.2rem; margin-bottom: 25px; box-shadow: 0 0 15px var(--primary-glow); }
.hadith-text { font-size: 1.25rem; font-weight: 700; color: var(--text-main); line-height: 1.7; margin-bottom: 20px; }
.hadith-source { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--primary); background: rgba(37, 99, 235, 0.1); padding: 6px 16px; border-radius: 8px; margin-bottom: 15px; }
.hadith-explain { font-size: 0.95rem; color: var(--text-muted); }

/* 3. ABOUT SYSTEM SECTION */
.about-section { padding: 100px 5%; background: rgba(17, 24, 39, 0.4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-text { text-align: right; }
.about-text .section-title { text-align: right; margin-bottom: 20px; }
.about-text p { font-size: 1.15rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 30px; }
.features-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.features-list li { position: relative; padding-right: 30px; font-size: 1.05rem; color: #CBD5E1; }
.features-list li::before { content: '✓'; position: absolute; right: 0; color: var(--primary); font-weight: 800; font-size: 1.2rem; background: rgba(37, 99, 235, 0.15); width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; border-radius: 4px; }
.features-list li strong { color: var(--text-main); }
.tech-graphic { padding: 60px; text-align: center; border-radius: 24px; display: flex; flex-direction: column; align-items: center; }
.glow-border { border: 1px solid rgba(37, 99, 235, 0.4); box-shadow: inset 0 0 40px rgba(37, 99, 235, 0.1), 0 0 30px rgba(37, 99, 235, 0.1); }
.tech-graphic svg { width: 100px; height: 100px; margin-bottom: 25px; filter: drop-shadow(0 0 10px var(--primary)); }
.tech-label { color: #60A5FA; font-weight: 800; letter-spacing: 2px; font-family: monospace; font-size: 1.1rem; }

/* 4. LEADERBOARD SECTION */
.leaderboard-section { padding: 100px 5%; }
.leaderboard-card { padding: 0; overflow: hidden; }
.leaderboard-table { width: 100%; border-collapse: collapse; text-align: right; }
.leaderboard-table th { background: rgba(255,255,255,0.02); color: var(--text-muted); padding: 20px 30px; font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); }
.leaderboard-table td { padding: 20px 30px; border-bottom: 1px solid var(--border); font-size: 1.05rem; font-weight: 600; color: var(--text-main); }
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.rank { display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 28px; border-radius: 6px; font-weight: 800; font-size: 0.9rem; }
.gold-rank { background: rgba(251, 191, 36, 0.15); color: var(--gold); border: 1px solid rgba(251, 191, 36, 0.3); }
.silver-rank { background: rgba(226, 232, 240, 0.15); color: #E2E8F0; border: 1px solid rgba(226, 232, 240, 0.3); }
.bronze-rank { background: rgba(253, 186, 116, 0.15); color: #FDBA74; border: 1px solid rgba(253, 186, 116, 0.3); }
.outline-rank { color: var(--text-muted); border: 1px solid var(--border); }

.badge { background: rgba(37, 99, 235, 0.15); color: #60A5FA; padding: 6px 14px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; border: 1px solid rgba(37, 99, 235, 0.3); }
.badge-glow { box-shadow: 0 0 10px rgba(37, 99, 235, 0.3); }
.badge-outline { border: 1px solid var(--border); color: var(--text-muted); padding: 6px 14px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }

/* FOOTER */
.site-footer { background: #070A11; color: var(--text-muted); padding: 60px 5% 30px; border-top: 1px solid var(--border); }
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top { border-bottom: 1px solid var(--border); padding-bottom: 40px; margin-bottom: 30px; text-align: center; }
.footer-brand p { max-width: 500px; margin: 15px auto 0; line-height: 1.8; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 0.9rem; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-subtitle { margin: 0 auto 40px; }
  .search-block { text-align: right; }
  .hero-links { margin: 25px auto 0; }
  .hero-visual { order: -1; } 
  .glass-panel { right: auto; left: 50%; transform: translateX(-50%); bottom: -20px; width: 90%; justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-text .section-title { text-align: center; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .saas-input-group { flex-direction: column; padding: 12px; gap: 10px; }
  .input-icon { display: none; }
  .saas-btn-primary { width: 100%; justify-content: center; }
  nav { display: none; }
  .leaderboard-table th, .leaderboard-table td { padding: 15px 10px; font-size: 0.9rem; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 10px; }
}