/* ============================================
   Widgety — Home page styles
   ============================================ */

/* ===== Bilingual visibility ===== */
body.lang-ar .en-only { display: none !important; }
body.lang-en .ar-only { display: none !important; }
body.lang-en { font-family: var(--font-en); }
body.lang-en .logo-ar { font-family: var(--font-ar); } /* keep logo Arabic */

/* ============== HERO ============== */
.hero {
  padding: 80px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  inset-inline-end: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(200,168,75,0.18), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

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

.hero-copy h1 { margin: 22px 0 22px; }
.hero-copy .lead { margin-bottom: 36px; }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-ctas .btn svg {
  transform: rotate(180deg);
}
body.lang-en .hero-ctas .btn svg { transform: none; }

.hero-meta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.hero-meta-item strong { font-size: 18px; font-weight: 700; }
.meta-divider {
  width: 1px; height: 18px; background: var(--border-strong);
}

/* ============== iPhone widget content ============== */
.hero-phone-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 620px;
}
.hero-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,168,75,0.25) 0%, transparent 65%);
  filter: blur(40px);
  z-index: 0;
}

.hero-phone-wrap .iphone {
  --w: 320px;
  position: relative;
  z-index: 1;
}

/* Home screen widget stack */
.home-screen {
  background:
    radial-gradient(ellipse at top, rgba(200,168,75,0.08), transparent 50%),
    linear-gradient(180deg, #1a1410 0%, #0a0a0a 100%);
}
.widget-stack {
  position: absolute;
  inset: 56px 14px 90px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Prayer widget */
.widget-prayer {
  background: linear-gradient(155deg, #1f1810 0%, #0d0a06 100%);
  border: 1px solid rgba(200, 168, 75, 0.2);
  flex-shrink: 0;
}
.prayer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.prayer-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-top: 4px;
}
.prayer-countdown { text-align: end; }
.cd-time {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-en);
  color: var(--gold);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.cd-time.small { font-size: 24px; margin: 6px 0 10px; }
.prayer-times-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.prayer-times-row.mini { grid-template-columns: repeat(4, 1fr); }
.pt-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border-radius: 7px;
}
.pt-cell span { font-size: 9px; color: var(--text-dim); }
.pt-cell b { font-size: 11px; font-weight: 600; font-family: var(--font-en); }
.pt-cell.active { background: rgba(200,168,75,0.12); }
.pt-cell.active span { color: var(--gold-bright); }
.pt-cell.active b { color: var(--gold-bright); }

/* Mini prayer (in feature card) */
.widget-prayer.small { padding: 16px; }
.widget-prayer.small .prayer-name { font-size: 28px; margin: 8px 0; }
.mini-times {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-dim);
}
.mini-times .active { color: var(--gold); font-weight: 600; }

/* Two-up row */
.widget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Hijri widget */
.widget-hijri {
  background: linear-gradient(160deg, #15110a 0%, #0a0805 100%);
  border-color: rgba(200, 168, 75, 0.15);
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.hijri-day {
  font-size: 38px;
  font-weight: 800;
  color: var(--gold-bright);
  line-height: 1;
  margin-top: 8px;
}
.hijri-month {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}
.hijri-year {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Dhikr (gold) */
.widget-dhikr {
  display: flex; flex-direction: column; justify-content: space-between;
}
.dhikr-text {
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
}
.dhikr-counter { margin-top: 8px; }
.dhikr-num {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-en);
  letter-spacing: -0.02em;
}
.dhikr-bar {
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.dhikr-bar span {
  display: block; height: 100%;
  background: rgba(0,0,0,0.55);
  border-radius: 999px;
}

/* AI Imam widget */
.widget-ai {
  background: linear-gradient(155deg, #0f1a14 0%, #0a0a0a 100%);
  border: 1px solid rgba(29, 106, 74, 0.4);
}
.ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ai-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-soft), var(--green));
  display: grid; place-items: center;
  color: #fff;
}
.ai-avatar svg { width: 16px; height: 16px; }
.ai-avatar.small { width: 24px; height: 24px; }
.ai-avatar.small svg { width: 14px; height: 14px; }
.ai-name { font-size: 13px; font-weight: 700; }
.ai-status {
  font-size: 10px;
  color: var(--green-soft);
  display: flex; align-items: center; gap: 4px;
}
.ai-status .pulse {
  width: 6px; height: 6px;
  background: var(--green-soft);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ai-msg {
  font-size: 13px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 8px 10px;
}

/* Dock */
.dock {
  position: absolute;
  bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.04);
}
.dock-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(200,168,75,0.4), rgba(168,138,55,0.2));
  border: 1px solid rgba(255,255,255,0.05);
}
.dock-icon:nth-child(2) { background: linear-gradient(135deg, #2a8a62, #1D6A4A); }
.dock-icon:nth-child(3) { background: linear-gradient(135deg, #5a5a6a, #2a2a3a); }
.dock-icon:nth-child(4) { background: linear-gradient(135deg, #4a3a2a, #2a1a0a); }

/* Floating tags */
.floating-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(20,20,20,0.85);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
}
.floating-tag svg { width: 14px; height: 14px; color: var(--gold); }
.tag-1 {
  top: 60px;
  inset-inline-start: -20px;
}
.tag-2 {
  bottom: 80px;
  inset-inline-end: -10px;
}
.gold-tag {
  background: var(--gold-gradient);
  color: #1a1408;
  border-color: rgba(0,0,0,0.1);
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-phone-wrap { height: 580px; }
  .hero { padding: 60px 0 80px; }
  .floating-tag { font-size: 12px; }
}

/* ============== SOCIAL PROOF ============== */
.social-proof {
  padding: 60px 0 80px;
}
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 56px;
}
.proof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.proof-stat .stars { margin-bottom: 4px; }
.proof-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-en);
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.proof-stat .dim { font-size: 13px; }

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial { padding: 28px; }
.testimonial .stars { margin-bottom: 16px; }
.testimonial p {
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 22px;
  color: var(--text);
}
.testimonial footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.testimonial footer strong { display: block; font-size: 14px; font-weight: 700; }
.testimonial footer .dim { font-size: 12px; }
.t-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #1a1408;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 18px;
}

@media (max-width: 980px) {
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .testimonials { grid-template-columns: 1fr; }
}

/* ============== FEATURES PREVIEW ============== */
.features-preview { padding: 80px 0; }
.feature-cards .card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.feature-card.highlighted {
  border-color: rgba(200,168,75,0.3);
  background: linear-gradient(160deg, rgba(200,168,75,0.05), var(--bg-card));
}
.feature-card .tag { position: absolute; top: 24px; inset-inline-end: 24px; }
.feature-card h3 { line-height: 1.25; }
.feature-card p { font-size: 15px; }
.feature-visual {
  height: 280px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #050505, #0d0d0d);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.feature-visual .widget { width: 100%; max-width: 230px; }
.feature-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* AI chat preview inside feature card */
.ai-chat-preview {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
}
.chat-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.45;
}
.chat-bubble.user {
  background: rgba(200,168,75,0.14);
  color: var(--gold-bright);
  align-self: flex-start;
  border: 1px solid rgba(200,168,75,0.2);
  max-width: 80%;
}
.chat-bubble.assistant {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.chat-bubble.assistant p { margin: 0; }
.chat-source {
  margin-top: 6px;
  font-size: 10px;
  color: var(--gold);
  font-weight: 600;
}

/* Hijri large */
.widget-hijri.large {
  text-align: center;
  width: 100%;
  max-width: 180px;
  padding: 18px;
}
.hijri-banner {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px solid rgba(200,168,75,0.2);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.hijri-day-big {
  font-size: 56px;
  font-weight: 800;
  color: var(--gold-bright);
  line-height: 1;
  font-family: var(--font-ar);
}
.hijri-month-big {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}
.dual-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ============== GALLERY STRIP ============== */
.gallery-strip { padding: 80px 0; overflow: hidden; }
.gallery-track-wrap {
  overflow-x: auto;
  padding: 20px 0 40px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.gallery-track-wrap::-webkit-scrollbar { height: 6px; }
.gallery-track-wrap::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

.gallery-track {
  display: flex;
  gap: 24px;
  padding: 0 28px;
  width: max-content;
}
[dir="rtl"] .gallery-track { flex-direction: row-reverse; }

.gallery-phone {
  scroll-snap-align: center;
  flex-shrink: 0;
}
.gallery-phone .iphone {
  --w: 240px;
}
.gallery-cap {
  margin-top: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-ar);
}
.gallery-cap strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.gallery-cap span {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-en);
  letter-spacing: 0.02em;
}

/* Quran widget */
.widget-quran {
  background: linear-gradient(160deg, #18120a, #0a0805);
  text-align: center;
  border-color: rgba(200,168,75,0.18);
}
.quran-ayah {
  font-family: 'Noto Naskh Arabic', var(--font-ar);
  font-size: 22px;
  line-height: 1.7;
  color: var(--gold-bright);
  font-weight: 600;
  margin: 12px 0 10px;
}
.quran-ref {
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Hadith */
.widget-hadith {
  background: linear-gradient(160deg, #0f1a14, #060a08);
  border-color: rgba(29,106,74,0.3);
}
.hadith-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  margin: 10px 0 10px;
  color: #d6e8df;
}
.hadith-ref {
  font-size: 10px;
  color: var(--green-soft);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.widget-dhikr.large {
  text-align: center;
  padding: 18px;
}
.widget-dhikr.large .dhikr-text { font-size: 22px; margin: 10px 0; }

/* Countdown */
.widget-countdown {
  background: linear-gradient(160deg, #1f1810, #0d0a06);
  text-align: center;
  border-color: rgba(200,168,75,0.2);
}
.cd-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.cd-big {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--font-en);
  color: var(--gold-bright);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cd-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Weather */
.widget-weather {
  background: linear-gradient(160deg, #102030, #050a0f);
}
.weather-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.weather-temp {
  font-size: 36px;
  font-weight: 700;
  font-family: var(--font-en);
  margin-top: 4px;
}
.weather-icon { font-size: 30px; }
.weather-prayer {
  font-size: 12px;
  color: var(--gold-bright);
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Clock */
.widget-clock {
  background: linear-gradient(160deg, #1a1a1a, #050505);
  text-align: center;
}
.clock-arabic {
  font-size: 42px;
  font-weight: 800;
  color: var(--gold-bright);
  font-family: var(--font-ar);
  line-height: 1;
  margin-top: 6px;
}
.clock-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}
.clock-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 0;
}
.clock-hijri {
  font-size: 14px;
  font-weight: 600;
}

/* Double date */
.widget-double-date {
  padding: 16px;
}
.dd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 6px 0;
}
.dd-row span { opacity: 0.55; }
.dd-row b { font-weight: 700; }
.dd-divider {
  height: 1px;
  background: rgba(0,0,0,0.1);
  margin: 4px 0;
}
.dd-day {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ============== PRIVACY PROMISE ============== */
.privacy-promise { padding: 80px 0; }
.promise-card {
  background:
    radial-gradient(ellipse at top right, rgba(29,106,74,0.12), transparent 50%),
    linear-gradient(160deg, var(--bg-card), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.promise-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%23C8A84B' stroke-width='0.5' opacity='0.4'><path d='M40 4 L52 16 L64 16 L64 28 L76 40 L64 52 L64 64 L52 64 L40 76 L28 64 L16 64 L16 52 L4 40 L16 28 L16 16 L28 16 Z'/></g></svg>");
  background-size: 160px 160px;
  opacity: 0.08;
  pointer-events: none;
}
.promise-icon {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(29,106,74,0.2), rgba(29,106,74,0.05));
  border: 1px solid rgba(29,106,74,0.4);
  display: grid; place-items: center;
  color: var(--green-soft);
  flex-shrink: 0;
}
.promise-icon svg { width: 72px; height: 72px; }
.promise-content { position: relative; z-index: 1; }
.promise-content h2 { margin: 18px 0; line-height: 1.2; }
.promise-content .lead { margin-bottom: 32px; max-width: 540px; }

.promise-pillars {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.pillar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.pillar-num {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-en);
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.pillar-text { font-size: 14px; font-weight: 600; }

@media (max-width: 880px) {
  .promise-card { grid-template-columns: 1fr; padding: 40px 28px; gap: 28px; text-align: center; }
  .promise-icon { margin: 0 auto; width: 100px; height: 100px; }
  .promise-icon svg { width: 52px; height: 52px; }
  .promise-pillars { justify-content: center; }
}

/* ============== FINAL CTA ============== */
.final-cta { padding: 80px 0 120px; }
.final-card {
  background:
    radial-gradient(ellipse at center, rgba(200,168,75,0.18), transparent 70%),
    linear-gradient(160deg, #1a1408, #0a0805);
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: var(--radius-xl);
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23C8A84B' stroke-width='0.6' opacity='0.4'><path d='M60 6 L78 24 L96 24 L96 42 L114 60 L96 78 L96 96 L78 96 L60 114 L42 96 L24 96 L24 78 L6 60 L24 42 L24 24 L42 24 Z'/></g></svg>");
  background-size: 200px 200px;
  opacity: 0.18;
  pointer-events: none;
}
.final-card > * { position: relative; z-index: 1; }
.final-card .eyebrow { margin-bottom: 24px; }
.final-card h2 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 18px; }
.final-card .lead { margin: 0 auto 36px; }
.final-card .hero-ctas { justify-content: center; }
.final-meta {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 880px) {
  .final-card { padding: 56px 24px; }
}
