/* ===================================================
   🕌 خطوط المشروع - islam-kama-huwa
   =================================================== */
@font-face {
  font-family: 'Somar';
  src: url('assets/fonts/somar.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Naskh';
  src: url('assets/fonts/naskh.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'DroidArabic';
  src: url('assets/fonts/droid-sans.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'AlJazeera';
  src: url('assets/fonts/aljazeera.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'AhManalHigh';
  src: url('assets/fonts/ah-manal-high.ttf') format('truetype');
  font-display: swap;
}

/* ===================================================
   🎨 الثيم الذهبي المطوّر
   =================================================== */
:root {
  --primary-start: #C6A15B;  /* ذهبي رئيسي */
  --primary-end:   #8C6A29;  /* ذهبي غامق للتدرج */
  --accent:        #B98E42;  /* لون مكمّل للأزرار والعناوين */

  --bg:            #F9F7F2;  /* خلفية عامة عاجية */
  --bg-soft:       #FBFAF6;  /* خلفية ثانوية ناعمة */
  --card:          #FFFFFF;  /* بطاقات بيضاء أنيقة */

  --text:          #2E2410;  /* نص غامق بني مائل للكحلي */
  --muted:         #7B6B45;  /* نص باهت ذهبي رملي */

  --shadow:        0 8px 20px rgba(0, 0, 0, 0.08);
  --border-light:  #E4D6B8;
  --highlight:     #E7C97C; /* لتسليط الضوء عند المرور */

  --radius-lg: 20px;
  --max-width: 1200px;
}

/* ===================================================
   ⚙️ الأساس
   =================================================== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  font-family: 'DroidArabic', sans-serif;
  min-height: 100vh;
  height: 100%;
  scroll-behavior: smooth;
}

/* ===================================================
   📱 التطبيق العام
   =================================================== */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* ===================================================
   🟤 الهيدر بزخرفة هندسية
   =================================================== */
.app-header {
  background: linear-gradient(135deg, var(--primary-end), var(--primary-start));
  color: #fff;
  padding: 30px 24px;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* الزخرفة الهندسية */
.app-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20px 20px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.3;
}

/* زخرفة إضافية شفافة */
.app-header::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.18) 0%, transparent 70%);
  opacity: 0.4;
}

.app-header .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: center;
  position: relative;
  z-index: 2;
}

.app-header .app-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  background: white;
  padding: 6px;
}

.brand-text h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  font-family: 'Somar';
}
.brand-text .subtitle {
  margin: 6px 0 0;
  font-size: 15px;
  opacity: 0.95;
  font-family: 'AlJazeera';
}

/* ===================================================
   📦 المحتوى
   =================================================== */
.app-content {
  flex: 1;
  padding: 32px 20px 100px; /* 100px لترك مساحة أسفل للشريط */
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  transition: all .3s ease;
  line-height: 1.8;
}

/* ===================================================
   🧭 البطاقات
   =================================================== */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: all 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--highlight);
  box-shadow: 0 12px 24px rgba(185,142,66,0.25);
}
.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F9E9C5, #EAD6A1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-end);
  font-size: 24px;
}
.card-body { flex: 1; margin-right: 12px; }
.card-title {
  margin: 0;
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-end);
  font-family: 'Somar';
}
.card-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-family: 'DroidArabic';
}
.chev { color: #b6a86f; font-size: 15px; }

/* ===================================================
   ✨ بطاقة اسأل سؤالًا المميزة
   =================================================== */
.card.ask .card-icon {
  background: linear-gradient(135deg, #FAE9B6, #EED28C);
  color: #7A5A18;
  box-shadow: 0 4px 12px rgba(185,142,66,0.3);
}
.card.ask:hover {
  background: linear-gradient(180deg, #FFF8E5, #FFF3CF);
  transform: translateY(-3px);
}

/* ===================================================
   ⚙️ شريط التنقل (ثابت في الأسفل دائمًا)
   =================================================== */
.tabbar {
  background: white;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;

  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;

  z-index: 9999;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.05);
}

.tab {
  background: none;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease;
  font-family: 'Somar';
}
.tab i { font-size: 18px; margin-bottom: 3px; }
.tab.active { color: var(--accent); }

/* ===================================================
   🌙 نصوص قرآنية
   =================================================== */
.quran {
  font-family: 'Naskh';
  font-size: 18px;
  color: #2C1F08;
  line-height: 2;
}

/* ===================================================
   💻 التجاوب (تابلت)
   =================================================== */
@media (min-width: 768px) {
  .app-header h1 { font-size: 34px; }
  .app-header .subtitle { font-size: 17px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
  .app-content { padding: 40px 40px 120px; } /* زيادة المسافة أسفل المحتوى */
}

/* ===================================================
   🖥️ تنسيق سطح المكتب
   =================================================== */
@media (min-width: 1024px) {
  body { 
    background: linear-gradient(180deg, #F8F7F3 0%, #FFFFFF 100%); 
  }

  .app {
    max-width: var(--max-width);
    margin: 40px auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  }

  .app-header {
    text-align: right;
    padding: 50px 60px;
  }
  .app-header .brand { justify-content: flex-start; }
  .app-header .app-logo { width: 90px; height: 90px; }
  .brand-text h1 { font-size: 38px; }

  .app-content { padding: 50px 60px 120px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .card { border-radius: 24px; padding: 24px; }

  /* شريط التنقل ثابت أيضًا على سطح المكتب ومتمركز بعرض التطبيق */
  .tabbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: var(--max-width);
    justify-content: center;
    gap: 50px;
    padding: 14px 0;
  }

  .tab { 
    flex-direction: row; 
    font-size: 15px; 
    gap: 8px; 
  }
  .tab i { 
    margin: 0; 
    font-size: 20px; 
  }
}
