/* ============================================
   UmmahSpace — Project Landing (home.html)
   Extends styles.css with home-page components
   ============================================ */

/* ── RTL support ── */
[dir="rtl"] .nav-inner  { flex-direction: row-reverse; }
[dir="rtl"] .nav-links  { flex-direction: row-reverse; }
[dir="rtl"] .nav-right  { flex-direction: row-reverse; }
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .section-header { flex-direction: row-reverse; }
[dir="rtl"] .feat-card  { text-align: right; }
[dir="rtl"] .step-card  { text-align: right; }
[dir="rtl"] .mosque-meta { flex-direction: row-reverse; }
[dir="rtl"] .imam-card-h { flex-direction: row-reverse; }
[dir="rtl"] .lecture-author { flex-direction: row-reverse; }
[dir="rtl"] .footer-inner { flex-direction: row-reverse; }
[dir="rtl"] body { font-family: 'Segoe UI', Tahoma, 'Inter', system-ui, sans-serif; }

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.lang-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s;
  letter-spacing: .3px;
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* ── Hero (project) ── */
.home-hero {
  padding: 80px 0 64px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(34,197,94,.12) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.home-hero .container { max-width: 760px; }
.hero-tagline {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .hero-tagline {
  background: linear-gradient(135deg, #111 0%, #444 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(34,197,94,.25);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(34,197,94,.35); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, transform .15s, background .2s;
}
.btn-secondary:hover { border-color: rgba(34,197,94,.5); transform: translateY(-2px); background: var(--bg-card-hover); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  padding: 12px 4px;
  text-decoration: none;
  transition: opacity .2s;
}
.btn-ghost:hover { opacity: .75; }

/* ── Stats bar ── */
.stats-bar {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
[dir="rtl"] .stat-item { border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .stat-item:last-child { border-left: none; }
.stat-num {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── About / Features ── */
.home-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-muted);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 16px;
  letter-spacing: .3px;
}
.home-section-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.home-section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 520px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color .2s, transform .2s;
}
.feat-card:hover { border-color: rgba(34,197,94,.4); transform: translateY(-3px); }
.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.feat-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feat-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* ── Mosques grid ── */
.mosques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mosque-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.mosque-card:hover { border-color: rgba(34,197,94,.4); transform: translateY(-3px); }
.mosque-thumb {
  width: 100%;
  aspect-ratio: 16/8;
  object-fit: cover;
  background: var(--bg-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}
.mosque-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mosque-body { padding: 16px; flex: 1; }
.mosque-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.mosque-city { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }
.mosque-meta {
  display: flex;
  gap: 12px;
}
.mosque-meta-item {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.mosque-meta-item strong { color: var(--accent); font-weight: 700; }

/* ── Imams horizontal cards ── */
.imams-hgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.imam-card-h {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.imam-card-h:hover { border-color: rgba(34,197,94,.4); transform: translateX(3px); }
[dir="rtl"] .imam-card-h:hover { transform: translateX(-3px); }
.imam-avatar-h {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.imam-avatar-h img { width: 100%; height: 100%; object-fit: cover; }
.imam-info-h { min-width: 0; }
.imam-name-h { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.imam-role-h {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.imam-mosque-h { font-size: 11px; color: var(--accent); margin-top: 3px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Join steps ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-muted);
  border: 1.5px solid rgba(34,197,94,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.step-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.join-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Download section ── */
.download-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(34,197,94,.07) 0%, transparent 70%);
}
.download-section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.download-text { max-width: 440px; }
.download-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: border-color .2s, transform .15s, background .2s;
  min-width: 180px;
}
.store-btn:hover { border-color: rgba(34,197,94,.5); transform: translateY(-2px); background: var(--bg-card-hover); }
.store-btn-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-btn-text { display: flex; flex-direction: column; }
.store-btn-label { font-size: 10px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.store-btn-name { font-size: 15px; font-weight: 700; margin-top: 1px; }
.download-mockup {
  flex-shrink: 0;
  width: 240px;
}
.phone-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 20px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.phone-screen {
  background: var(--bg-card-2);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 9/17;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}
.phone-screen-logo {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-screen-logo svg { fill: white; }
.phone-screen-name { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.phone-screen-sub { font-size: 11px; color: var(--text-muted); }
.phone-screen-dots { display: flex; gap: 6px; margin-top: 6px; }
.phone-screen-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .4; }
.phone-screen-dots span:nth-child(2) { opacity: 1; }

/* ── Lecture list on home (compact) ── */
.home-lectures { display: flex; flex-direction: column; gap: 10px; }
.home-lecture-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .15s;
}
.home-lecture-item:hover { border-color: rgba(34,197,94,.4); transform: translateX(3px); }
[dir="rtl"] .home-lecture-item:hover { transform: translateX(-3px); }

/* ── Page hero (for policy/terms pages) ── */
.page-hero {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -.6px;
  margin-bottom: 10px;
}
.page-hero-meta { font-size: 13px; color: var(--text-muted); }

/* ── Policy / Terms body ── */
.legal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.legal-body h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-primary);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal-body ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
[dir="rtl"] .legal-body ul { padding-left: 0; padding-right: 20px; }
.legal-body ul li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-body a { color: var(--accent); text-decoration: underline; }
.legal-body a:hover { opacity: .8; }
.legal-divider { height: 1px; background: var(--border); margin: 32px 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .download-section .container { flex-direction: column; align-items: flex-start; }
  .download-mockup { display: none; }
}
@media (max-width: 768px) {
  .home-hero { padding: 52px 0 44px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) { border-bottom: 1px solid var(--border); }
  [dir="rtl"] .stat-item:nth-child(2) { border-left: none; }
  .mosques-grid { grid-template-columns: 1fr; }
  .imams-hgrid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .home-section { padding: 44px 0; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 480px) {
  .imams-hgrid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
