:root {
  --primary-green: #0d3b2e;
  --secondary-green: #145241;
  --accent-gold: #c5a059;
  --accent-gold-light: #e5cb93;
  --bg-cream: #faf7f2;
  --card-bg: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #666666;
  --border-gold: rgba(197, 160, 89, 0.3);
  --shadow-soft: 0 10px 30px rgba(13, 59, 46, 0.08);
  --shadow-hover: 0 15px 35px rgba(13, 59, 46, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.8;
  position: relative;
  min-height: 100vh;
}

body {
  padding-top: 75px !important;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

.bg-pattern {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: radial-gradient(var(--border-gold) 0.8px, transparent 0.8px);
  background-size: 24px 24px;
  opacity: 0.4; z-index: -1; pointer-events: none;
}

/* ==========================================
   شريط التنقل العلوي (النافبار)
   ========================================== */
.main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--primary-green);
  border-bottom: 3px solid var(--accent-gold) !important;
  border-top: none !important;
  margin: 0 !important;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-container {
  width: 90%; 
  max-width: 1100px;
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
}

.nav-logo-right {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 3px;
  border: 1px solid var(--accent-gold);
}

.nav-badge-left {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.nav-logo {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-link-part {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.nav-link-part:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-links li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--accent-gold);
  color: var(--primary-green);
}

/* ==========================================
   الهيدر الرئيسي
   ========================================== */
.main-header {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: #ffffff;
  text-align: center;
  padding: 40px 20px 60px;
  border-bottom: 5px solid var(--accent-gold);
  border-top: none !important;
  margin-top: 0 !important;
  position: relative !important;
}

.header-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-text-center {
  flex: 1;
  text-align: center;
}

.header-side-img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.header-img-right {
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
  border-radius: 12px;
  border: 2px solid var(--accent-gold);
}

.header-img-left {
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
}

.header-decoration {
  font-family: 'Amiri', serif;
  color: var(--accent-gold-light);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.main-title {
  font-family: 'Amiri', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.header-subtitle {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  max-width: 750px;
  margin: 0 auto;
  color: #e2ede8;
}

/* ==========================================
   الأقسام والكروت
   ========================================== */
.writer-section {
  margin-top: 25px;
  margin-bottom: 40px;
}

.writer-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 2px solid var(--accent-gold);
  cursor: pointer;
  transition: all 0.4s ease;
}

.writer-card.mini-writer .writer-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  object-fit: cover;
  margin-bottom: 15px;
}

.writer-card.mini-writer .writer-info h2 {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  color: var(--primary-green);
  margin-bottom: 5px;
}

.writer-card.mini-writer .writer-tag {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.writer-card.mini-writer .writer-sub-tag {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.writer-card.mini-writer .writer-batch {
  display: inline-block;
  background: rgba(197, 160, 89, 0.15);
  color: var(--primary-green);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.date-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.content-section {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 30px;
  margin-top: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-gold);
  position: relative;
  z-index: 10;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 30px;
}

.section-title {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  color: var(--primary-green);
  font-weight: 700;
}

.title-line {
  width: 80px;
  height: 3px;
  background: var(--accent-gold);
  margin: 8px auto 0;
  border-radius: 2px;
}

.text-content p {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: justify;
  color: #2c3e50;
  line-height: 2;
}

.grid-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.section-intro-text {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 15px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.person-card {
  background: #ffffff;
  border: 2px solid var(--accent-gold);
  border-radius: 16px;
  padding: 15px 20px;
  width: calc(33.333% - 15px);
  min-width: 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 20px rgba(13, 59, 46, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.person-card.expanded {
  width: 100% !important;
  max-width: 650px !important;
  padding: 20px !important;
}

.person-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(13, 59, 46, 0.18);
}

.person-name {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 12px;
}

.card-preview-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 15px;
  text-align: right;
}

.card-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
  flex-shrink: 0;
}

.card-snippet {
  font-family: 'Amiri', serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-full-text {
  display: none;
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  color: #2c3e50;
  line-height: 1.8;
  text-align: justify;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--border-gold);
  white-space: pre-line;
  width: 100%;
}

.person-card.expanded .card-preview-content {
  display: none !important;
}

.person-card.expanded .card-full-text {
  display: block !important;
}

.read-more-btn {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: #ffffff;
  border: 1px solid var(--accent-gold);
  padding: 8px 20px;
  border-radius: 25px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: auto;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-green);
}

/* ==========================================
   قسم النشيد والقصيدة (شاشات الكمبيوتر)
   ========================================== */
.poem-container {
  max-width: 750px;
  margin: 0 auto;
  background-color: var(--bg-cream);
  padding: 35px 25px;
  border-radius: 12px;
  border-right: 4px solid var(--accent-gold);
  border-left: 4px solid var(--accent-gold);
}

.poem-verse {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px;
  margin-bottom: 20px;
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: var(--primary-green);
  border-bottom: 1px dashed rgba(197, 160, 89, 0.4);
  padding-bottom: 15px;
  position: relative;
}

.bayt-first { 
  width: 44% !important; 
  text-align: center !important; 
  order: 1 !important;
}

.bayt-second { 
  width: 44% !important; 
  text-align: center !important; 
  order: 3 !important;
}

/* ضبط الفاصل *** بين الشطرين في منتصف الكمبيوتر بالضبط */
.poem-verse::after {
  content: "***" !important;
  color: var(--accent-gold) !important;
  font-size: 1.1rem !important;
  font-weight: bold !important;
  text-align: center !important;
  width: 12% !important;
  order: 2 !important;
  position: static !important;
  transform: none !important;
}

.closing-dua {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  text-align: center;
  color: var(--primary-green);
  background: var(--bg-cream);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--accent-gold);
  margin-bottom: 25px;
  line-height: 2;
}

.signature-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sign-title { font-size: 0.95rem; color: var(--text-muted); }
.sign-name { font-family: 'Amiri', serif; font-size: 2rem; font-weight: bold; color: var(--accent-gold); }
.sign-date { font-size: 0.9rem; color: var(--text-muted); }

.counter-section { margin-bottom: 40px; }
.counter-card {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: #ffffff;
  border-radius: 16px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 2px solid var(--accent-gold);
  max-width: 400px;
  margin: 0 auto;
}
.counter-icon { font-size: 2.2rem; }
.counter-info h4 { font-size: 1rem; color: var(--accent-gold-light); }
.counter-number { 
  font-size: 2.5rem !important; 
  font-weight: 800 !important; 
  direction: ltr !important; 
  unicode-bidi: isolate !important; 
  display: inline-block !important; 
  color: #ffffff !important; 
}

.main-footer {
  background: var(--primary-green);
  color: #ffffff;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
  border-top: 3px solid var(--accent-gold);
}

/* ==========================================
   صفحة التواصل
   ========================================== */
.contact-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 30px;
  width: 100%;
  max-width: 750px;
  margin: 40px auto;
  box-shadow: 0 10px 30px rgba(13, 59, 46, 0.08);
  border: 2px solid var(--accent-gold);
  text-align: right;
}

.contact-main-title {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  color: var(--primary-green);
  text-align: center;
  margin-bottom: 10px;
}

.contact-title-divider {
  width: 80px;
  height: 3px;
  background: var(--accent-gold);
  margin: 0 auto 30px auto;
  border-radius: 2px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 700;
  color: var(--primary-green);
  font-size: 1rem;
}

.form-group input, 
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border-gold);
  border-radius: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  background-color: #faf9f6;
  text-align: right;
  color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-green);
  outline: none;
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(13, 59, 46, 0.15);
}

.submit-btn {
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: #ffffff;
  border: 1px solid var(--accent-gold);
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 700;
  cursor: pointer;
  display: block;
  margin: 25px auto;
  transition: 0.3s;
}

.submit-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-green);
}

.box-section {
  margin-top: 35px;
  padding-top: 25px;
  border-top: 2px dashed rgba(197, 160, 89, 0.3);
  text-align: center;
}

.box-section h3 {
  font-family: 'Amiri', serif;
  color: var(--primary-green);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.box-section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.buttons-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-btn-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  margin: 8px;
  transition: 0.3s;
}

.whatsapp-btn { background: #25d366; color: white; }
.call-btn { background: var(--primary-green); color: var(--accent-gold-light); border: 1px solid var(--accent-gold); }

.cash-box {
  background: #fff8f6;
  border: 2px dashed #e74c3c;
  border-radius: 15px;
  padding: 20px;
  margin-top: 25px;
  text-align: center;
}

.cash-box h4 { color: #e74c3c; font-size: 1.2rem; margin-bottom: 8px; }
.cash-box p { font-size: 0.9rem; color: #555; margin-bottom: 10px; }
.cash-number-wrapper { font-weight: 800; font-size: 1.25rem; color: #2c3e50; direction: ltr; }
.cash-digits { color: #e74c3c; font-size: 1.4rem; }

/* ==========================================
   تعديلات الموبايل القطعية (Media Query)
   ========================================== */
@media (max-width: 992px) {
  
  /* 1. إزالة الفراغ الأبيض نهائياً وتثبيت المسافة */
  html, body {
    padding-top: 90px !important;
    margin-top: 0 !important;
  }

  .main-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
  }

  /* 2. الهيدر الرئيسي وتكبير الصور في الموبايل */
  .main-header {
    margin-top: 0 !important;
    padding-top: 15px !important;
  }

  .header-content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
  }

  /* تكبير صوري الهيدر الرئيسي في الموبايل (اللوجو وشعار الألفية) */
  .header-side-img {
    width: 130px !important;
    height: 130px !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .header-img-right {
    order: 1 !important;
  }

  .header-text-center {
    order: 2 !important;
    width: 100% !important;
  }

  .header-img-left {
    order: 3 !important;
  }

  /* 3. ترتيب وتكبير لوجوهات الشريط العلوي النافبار */
  .nav-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 6px 10px !important;
    position: relative !important;
    min-height: 90px !important;
  }

  .nav-logo-right {
    position: absolute !important;
    right: 12px !important;
    top: 8px !important;
    width: 50px !important;
    height: 50px !important;
  }

  .nav-badge-left {
    position: absolute !important;
    left: 12px !important;
    top: 8px !important;
    width: 50px !important;
    height: 50px !important;
  }

  .nav-logo {
    width: 100% !important;
    text-align: center !important;
    font-size: 0.82rem !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    white-space: nowrap !important;
    margin-top: 2px !important;
  }

  .nav-links {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 3px !important;
  }

  .nav-links li a {
    font-size: 0.8rem !important;
    padding: 3px 12px !important;
  }

  /* 4. النشيد أفقياً للموبايل مع الـ *** في المنتصف */
  .poem-verse {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 5px !important;
    margin-bottom: 18px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px dashed rgba(197, 160, 89, 0.4) !important;
    position: relative !important;
  }

  .bayt-first, 
  .bayt-second {
    width: 44% !important;
    text-align: center !important;
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    white-space: normal !important;
  }

  .poem-verse::after {
    content: "***" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: var(--accent-gold) !important;
    font-size: 0.75rem !important;
    font-weight: bold !important;
    background: var(--bg-cream) !important;
    padding: 0 3px !important;
    width: auto !important;
    order: unset !important;
  }
}

@media (max-width: 992px) {
  .main-header {
    margin-top: -87px !important;
  }
}
