/* Servigo.space Blog Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --color-navy-dark: #081226;
  --color-navy: #0d1b3a;
  --color-navy-light: #13254d;
  --color-navy-surface: #172a56;
  --color-orange: #f97316;
  --color-orange-light: #fb923c;
  --color-orange-dark: #ea580c;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[dir="rtl"] {
  font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #081226;
}
::-webkit-scrollbar-thumb {
  background: #1e3a6d;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #fb923c, #f59e0b);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Article Body Typography */
.article-body {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.85;
}

.article-body h2 {
  color: #ffffff;
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 2.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  scroll-margin-top: 6.5rem;
}

.article-body h2::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.5rem;
  background: linear-gradient(to bottom, #f97316, #fb923c);
  border-radius: 4px;
}

.article-body h3 {
  color: #f1f5f9;
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 6.5rem;
}

.article-body p {
  margin-bottom: 1.35rem;
  color: #cbd5e1;
}

.article-body strong {
  color: #ffffff;
  font-weight: 600;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-inline-start: 1.5rem;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ol {
  list-style-type: decimal;
}

.article-body li {
  margin-bottom: 0.55rem;
  color: #cbd5e1;
}

.article-body blockquote {
  border-inline-start: 4px solid #f97316;
  background: rgba(249, 115, 22, 0.07);
  padding: 1.25rem 1.5rem;
  border-radius: 0 1rem 1rem 0;
  margin: 1.75rem 0;
  font-style: italic;
  color: #f8fafc;
}

[dir="rtl"] .article-body blockquote {
  border-radius: 1rem 0 0 1rem;
}

/* Callout Boxes */
.article-callout {
  background: linear-gradient(135deg, rgba(13, 27, 58, 0.95), rgba(19, 37, 77, 0.95));
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* Tables inside articles */
.article-body table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 27, 58, 0.6);
}

.article-body th {
  background: rgba(249, 115, 22, 0.15);
  color: #f8fafc;
  font-weight: 600;
  padding: 0.9rem 1.1rem;
  text-align: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-body td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Floating WhatsApp Pulse */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.btn-whatsapp-pulse {
  animation: whatsapp-pulse 2.2s infinite;
}

/* Table of contents link active state */
.toc-link.active {
  color: #f97316 !important;
  font-weight: 600;
  border-inline-start-color: #f97316 !important;
  background: rgba(249, 115, 22, 0.08);
}

/* Line clamps */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
