/* ═══════════════════════════════════════════════════════════
   وِرْدِي - ملف التنسيقات الكامل
   ═══════════════════════════════════════════════════════════ */

/* ===== متغيرات عامة ===== */
:root {
  --green: #1F4E3D;
  --green-2: #2d6b4f;
  --gold: #C9A227;
  --gold-light: #E4CC6E;
  --white: #FFFFFF;
  --line: #EAE6DD;
  --radius: 20px;
  --ink-soft: #6B6B6B;
}

/* ===== إخفاء سلسلة الأيام ===== */
#streakSlot, .streak-card, .streak-container, .streak-widget, .streak-section {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ===== لوحة المتابعة ===== */
.dashboard-unified {
  max-width: 900px;
  margin: 18px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(31,78,61,.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  padding: 22px;
  align-items: stretch;
}

.dash-resume-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(31, 78, 61, 0.05) 0%, rgba(201, 162, 39, 0.09) 100%);
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
  color: inherit;
  transition: background .25s ease;
  cursor: pointer;
}

.dash-resume-header:hover {
  background: linear-gradient(135deg, rgba(31, 78, 61, 0.09) 0%, rgba(201, 162, 39, 0.14) 100%);
}

.drh-ico {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #E4CC6E, #C9A227);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  box-shadow: 0 3px 10px rgba(201, 162, 39, 0.28);
  flex-shrink: 0;
}

.drh-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.drh-lbl {
  font-size: 12px; color: var(--ink-soft);
  font-family: 'Tajawal', sans-serif; font-weight: 500;
}

.drh-val {
  font-size: 16px; color: var(--green);
  font-family: 'Amiri', serif; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.drh-btn {
  background: var(--green); color: #fff;
  padding: 8px 18px; border-radius: 999px;
  font-family: 'Tajawal', sans-serif; font-size: 13px; font-weight: 700;
  white-space: nowrap; transition: all .22s ease;
  flex-shrink: 0; box-shadow: 0 3px 10px rgba(31, 78, 61, 0.2);
}

.dash-resume-header:hover .drh-btn {
  background: var(--gold); color: var(--green);
  transform: translateY(-1px);
}

body.dark .dash-resume-header { background: linear-gradient(135deg, rgba(228, 204, 110, 0.08), rgba(201, 162, 39, 0.05)); }
body.dark .drh-lbl { color: #A8A8A8; }
body.dark .drh-val { color: var(--gold-light); }
body.dark .drh-btn { background: var(--gold); color: var(--green); }

@media (max-width: 700px) {
  .dash-body { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .dash-resume-header { padding: 14px 18px; gap: 10px; }
  .drh-ico { width: 40px; height: 40px; font-size: 20px; }
  .drh-val { font-size: 14px; }
  .drh-btn { padding: 7px 14px; font-size: 12px; }
}

.dash-panel { display: flex; flex-direction: column; min-width: 0; }

.dash-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--line) 15%, var(--gold-light) 50%, var(--line) 85%, transparent 100%);
  opacity: .85;
}

.dash-hr {
  border: none; height: 1px;
  background: linear-gradient(to right, transparent, var(--line) 20%, var(--line) 80%, transparent);
  margin: 14px 0 12px;
}

body.dark .dashboard-unified { background: #1F2B26; border-color: rgba(255,255,255,.08); }
body.dark .dash-divider { background: linear-gradient(to bottom, transparent, rgba(255,255,255,.08) 15%, rgba(228,204,110,.4) 50%, rgba(255,255,255,.08) 85%, transparent); }

/* ===== مجموعات الأقسام ===== */
.section-group {
  margin: 32px auto 24px;
  max-width: 900px;
  padding: 0 16px;
}

.group-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-inline-start: 4px;
}

.group-title {
  margin: 0; font-family: 'Amiri', serif; font-size: 22px;
  font-weight: 700; color: var(--green);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}

.group-ico { font-size: 24px; filter: drop-shadow(0 2px 6px rgba(201,162,39,.35)); }

.group-line {
  flex: 1; height: 2px;
  background: linear-gradient(to left, transparent, var(--gold-light) 30%, var(--gold) 50%, var(--gold-light) 70%, transparent);
  border-radius: 999px; opacity: .55;
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* ===== بطاقات الأقسام ===== */
.sec-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(160deg, #FBF8F1 0%, #F5F1E8 100%) !important;
  border: 2px solid var(--gold) !important;
  border-radius: 18px !important;
  min-height: 160px;
  padding: 22px 14px 18px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .3s ease;
  box-shadow: 0 4px 14px rgba(201,162,39,.08);
}

.sec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(201,162,39,.28);
}

.sec-card .bg { display: none !important; }

.sec-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/logo.png') center / 55% no-repeat;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.sec-card::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  pointer-events: none;
  z-index: 3;
}

.sec-card .overlay {
  position: relative !important;
  inset: auto !important;
  background: rgba(251, 248, 241, 0.55) !important;
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  border-radius: 12px;
  padding: 14px 10px !important;
  margin: 12px 14px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  z-index: 2;
  width: calc(100% - 28px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sec-card .overlay h4 {
  font-family: 'Amiri', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--green) !important;
  margin: 0 !important;
  padding: 0;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: transparent !important;
}

.sec-card .overlay .underline {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  margin-top: 2px;
  opacity: .85;
}

.sec-card.amin-card { min-height: 140px; padding: 26px 20px !important; }
.sec-card.amin-card .overlay h4 { font-size: 22px; }
.amin-desc {
  margin: 6px 0 0; font-size: 12.5px;
  color: var(--ink-soft) !important;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
}

body.dark .sec-card {
  background: linear-gradient(160deg, #1F2B26 0%, #14201C 100%) !important;
  border-color: var(--gold) !important;
}
body.dark .sec-card .overlay { background: rgba(31, 43, 38, 0.6) !important; }
body.dark .sec-card .overlay h4 { color: var(--gold-light) !important; }

/* ===== بطاقات قريباً ===== */
.sec-card.soon {
  pointer-events: none !important;
  cursor: default !important;
  opacity: 0.7 !important;
}

.sec-card.soon::after {
  content: 'قريبًا' !important;
  position: absolute !important;
  top: 10px !important;
  inset-inline-start: 10px !important;
  background: linear-gradient(135deg, #E4CC6E, #C9A227) !important;
  color: #1F4E3D !important;
  font-family: 'Tajawal', sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  z-index: 5 !important;
}

/* ===== fade-in ===== */
.fade-in {
  opacity: 0; transform: translateY(10px);
  animation: fadeInUp .55s ease forwards;
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* ===== الفوتر ===== */
.site-footer {
  width: 100%;
  background: linear-gradient(180deg, #1F4E3D 0%, #0F2A20 100%);
  color: #E8E8E8;
  font-family: 'Tajawal', sans-serif;
  padding: 36px 20px 22px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  border-top: 3px solid var(--gold);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(228, 204, 110, 0.18);
  width: 100%; max-width: 380px;
  justify-content: center;
}

.footer-logo {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #E4CC6E, #C9A227);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 22px; font-weight: 700;
  color: #0F2A20; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
}

.footer-brand-text { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }

.footer-title {
  font-family: 'Amiri', serif; font-size: 22px;
  font-weight: 700; color: #F5E5A0;
}

.footer-tagline { font-size: 11px; color: #A8C4B8; margin-top: 2px; }

.footer-nav {
  display: flex; flex-direction: row; flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: 10px 20px; padding: 0; max-width: 900px;
}

.footer-nav a {
  display: inline-block; color: #D4E0DC;
  text-decoration: none; font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: all 0.2s;
  padding: 5px 10px; border-radius: 8px;
  border: 1px solid transparent;
}

.footer-nav a:hover {
  color: #F5E5A0;
  background: rgba(228, 204, 110, 0.1);
  border-color: rgba(228, 204, 110, 0.25);
  transform: translateY(-2px);
}

.footer-social {
  display: flex; flex-direction: row;
  justify-content: center; align-items: center;
  gap: 10px; padding: 12px 0;
}

.footer-social a {
  display: inline-flex; width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(228, 204, 110, 0.1);
  border: 1px solid rgba(228, 204, 110, 0.25);
  color: #E4CC6E; align-items: center; justify-content: center;
  font-size: 17px; text-decoration: none;
  transition: all 0.25s;
}

.footer-social a:hover {
  background: rgba(228, 204, 110, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(201, 162, 39, 0.3);
}

.footer-divider {
  width: 260px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 204, 110, 0.45) 50%, transparent);
  margin: 4px auto;
}

.footer-bottom {
  display: flex; flex-direction: row; flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: 8px 18px; font-size: 12px; padding-top: 6px;
}

.footer-copy { color: #E4CC6E; font-weight: 600; }
.footer-sep { color: rgba(228, 204, 110, 0.35); }
.footer-supervisor { color: #A8C4B8; }
.footer-supervisor strong { color: #E4CC6E; font-family: 'Amiri', serif; font-size: 14px; }

@media (max-width: 767px) {
  .site-footer { padding: 28px 16px 18px; margin-top: 32px; }
  .footer-nav { gap: 8px 14px; }
  .footer-nav a { font-size: 12px; }
  .footer-title { font-size: 19px; }
  .footer-logo { width: 40px; height: 40px; font-size: 19px; }
  .footer-social a { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
  .site-footer { padding: 22px 12px 14px; margin-top: 24px; }
  .footer-nav { gap: 6px 10px; }
  .footer-nav a { font-size: 11px; padding: 4px 7px; }
  .footer-bottom { font-size: 10.5px; gap: 6px 10px; }
  .footer-social a { width: 34px; height: 34px; font-size: 15px; }
}

body.dark .site-footer { background: linear-gradient(180deg, #0F1A15 0%, #070D0A 100%); }

/* ===== إصلاحات عامة ===== */
html, body { margin: 0 !important; padding: 0 !important; min-height: auto !important; }
.app { min-height: auto !important; padding-bottom: 0 !important; }
[hidden] { display: none !important; }

/* ===== إخفاء زر الموقع + تحويل رابط المتابعة لزر ذهبي ===== */
#smartHero .location-btn,
#smartHero button[onclick*="location"],
#smartHero .set-location-btn,
#smartHero .location-link,
#smartHero .location-text {
  display: none !important;
}

#smartHero a[href*="athkar"],
#smartHero .smart-continue-btn,
#smartHero .continue-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px !important;
  background: linear-gradient(135deg, #E4CC6E, #C9A227) !important;
  color: #1F4E3D !important;
  border-radius: 999px !important;
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35) !important;
  transition: all 0.25s !important;
  border: none !important;
}

#smartHero a[href*="athkar"]:hover,
#smartHero .smart-continue-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(201, 162, 39, 0.5) !important;
}

/* إخفاء زر تحديد الموقع */
#smartHero button[onclick*="location"],
#smartHero .location-btn,
#smartHero .set-location-btn {
  display: none !important;
}

/* تحويل رابط المتابعة لزر ذهبي */
#smartHero a[href*="athkar"] {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 14px 32px !important;
  background: linear-gradient(135deg, #E4CC6E, #C9A227) !important;
  color: #1F4E3D !important;
  border-radius: 999px !important;
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35) !important;
}

/* إخفاء زر تحديد الموقع */
#smartHero button[onclick*="location"],
#smartHero .location-btn,
#smartHero .set-location-btn {
  display: none !important;
}

/* تحويل رابط المتابعة لزر ذهبي */
#smartHero a[href*="athkar"] {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 14px 32px !important;
  background: linear-gradient(135deg, #E4CC6E, #C9A227) !important;
  color: #1F4E3D !important;
  border-radius: 999px !important;
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35) !important;
}

/* إخفاء زر تحديد الموقع نهائياً */
#smartHero button,
#smartHero .location-btn,
#smartHero .set-location-btn,
#smartHero [onclick*="location"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* إظهار زر المتابعة فقط */
#smartHero a[href*="athkar"] {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center;
  gap: 8px;
  padding: 14px 32px !important;
  background: linear-gradient(135deg, #E4CC6E, #C9A227) !important;
  color: #1F4E3D !important;
  border-radius: 999px !important;
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35) !important;
}

/* إخفاء زر الموقع */
.location-btn-hidden,
.set-location-btn-hidden,
#smartHero button {
  display: none !important;
}



/* ===== بطاقة الأذكار: شفافة + مؤشر تمرير ===== */
#smartHero {
  background: linear-gradient(135deg,
    rgba(40, 26, 70, 0.6) 0%,
    rgba(110, 55, 90, 0.52) 55%,
    rgba(180, 100, 55, 0.46) 100%) !important;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  max-height: 540px !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #C9A227 rgba(255,255,255,0.06) !important;
}

#smartHero::-webkit-scrollbar { width: 9px; }
#smartHero::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
}
#smartHero::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #E4CC6E, #C9A227);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
#smartHero::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #F5E5A0, #E4CC6E);
  background-clip: padding-box;
}

/* تكبير طفيف ليظهر المؤشر بوضوح */
#smartHero .adhkar-item,
#smartHero .dhikr-item,
#smartHero .sa-item,
#smartHero li {
  padding: 15px 18px !important;
  font-size: 17px !important;
  line-height: 1.9 !important;
}

#smartHero .adhkar-text,
#smartHero .dhikr-text {
  font-size: 17px !important;
  line-height: 1.9 !important;
}

/* ===== زر "أكمل متابعة الأذكار" — صلب وبارز ===== */
#smartHero a[href*="athkar"],
#smartHero .smart-continue-btn,
#smartHero .continue-link {
  background: linear-gradient(135deg, #E4CC6E 0%, #C9A227 100%) !important;
  color: #1F4E3D !important;
  border: 2px solid #F5E5A0 !important;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35), 0 0 0 4px rgba(228,204,110,0.25) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  padding: 14px 36px !important;
  text-shadow: none !important;
  position: relative !important;
  z-index: 10 !important;
}

#smartHero a[href*="athkar"]:hover,
#smartHero .smart-continue-btn:hover {
  background: linear-gradient(135deg, #F5E5A0 0%, #E4CC6E 100%) !important;
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 0 6px rgba(228,204,110,0.35) !important;
}

/* ===== تكبير بطاقات الأقسام للشاشات الكبيرة ===== */
.sections-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 18px !important;
}

.sec-card {
  min-height: 190px !important;
  padding: 28px 18px 22px !important;
}

.sec-card .overlay h4 {
  font-size: 21px !important;
}

.sec-card .overlay h4 .card-emoji {
  width: 60px !important;
  height: 60px !important;
  font-size: 30px !important;
}

.sec-card .overlay h4 .card-title {
  font-size: 20px !important;
}

/* بطاقة "طريقة الصلاة" العريضة — أكبر وأجمل */
.sec-card.amin-card {
  min-height: 175px !important;
  padding: 34px 28px !important;
}

.sec-card.amin-card .overlay {
  padding: 26px 30px !important;
}

.sec-card.amin-card .overlay h4 {
  font-size: 27px !important;
}

.sec-card.amin-card .overlay h4 .card-emoji {
  width: 70px !important;
  height: 70px !important;
  font-size: 36px !important;
}

.sec-card.amin-card .overlay h4 .card-title {
  font-size: 26px !important;
}

.sec-card.amin-card .amin-desc {
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin-top: 8px !important;
}

/* عناوين المجموعات أكبر */
.group-title {
  font-size: 26px !important;
}

.group-ico {
  font-size: 28px !important;
}

/* على الشاشات الكبيرة جداً — 4 أعمدة عريضة */
@media (min-width: 1200px) {
  .sections-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
  }
  .sec-card { min-height: 210px !important; }
  .sec-card.amin-card { min-height: 190px !important; }
}

/* على الشاشات المتوسطة — 3 أعمدة */
@media (min-width: 768px) and (max-width: 1199px) {
  .sections-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ===== بطاقة "طريقة صلاة النبي ﷺ" — عرض كامل + تكبير ===== */
.sec-card.amin-card.wirdi-span-full,
a.sec-card.amin-card.wirdi-span-full {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-height: 220px !important;
  padding: 40px 36px !important;
}

.sec-card.amin-card.wirdi-span-full .overlay {
  padding: 30px 34px !important;
  width: 100% !important;
}

.sec-card.amin-card.wirdi-span-full .overlay h4 {
  font-size: 30px !important;
  gap: 12px !important;
}

.sec-card.amin-card.wirdi-span-full .overlay h4 .card-emoji {
  width: 78px !important;
  height: 78px !important;
  font-size: 40px !important;
}

.sec-card.amin-card.wirdi-span-full .overlay h4 .card-title {
  font-size: 28px !important;
}

.sec-card.amin-card.wirdi-span-full .amin-desc {
  font-size: 17px !important;
  line-height: 1.8 !important;
  margin-top: 10px !important;
  max-width: 760px !important;
  margin-inline: auto !important;
}

/* الجوال — تبقى عريضة لكن بخط أصغر */
@media (max-width: 700px) {
  .sec-card.amin-card.wirdi-span-full {
    min-height: 170px !important;
    padding: 26px 18px !important;
  }
  .sec-card.amin-card.wirdi-span-full .overlay h4 {
    font-size: 22px !important;
  }
  .sec-card.amin-card.wirdi-span-full .overlay h4 .card-title {
    font-size: 21px !important;
  }
  .sec-card.amin-card.wirdi-span-full .amin-desc {
    font-size: 14px !important;
  }
}
