/**
 * Startup Growth - Main Layout & Components
 * RTL • Mobile-First • Dark Mode
 */

/* ==========================================================================
   Mobile Base - منع التجاوز وتحسين اللمس
   ========================================================================== */

.sg-header-inner,
.sg-container {
  min-width: 0;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* كسر الكلمات الطويلة (روابط، نصوص) */
.sg-entry-content a,
.sg-footer a,
.sg-contact-card-value {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ==========================================================================
   Header
   ========================================================================== */

.sg-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.sg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 56px;
}

.sg-logo {
  min-width: 0;
  flex-shrink: 1;
}

.sg-logo a,
.sg-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.sg-logo img {
  max-height: 40px;
  width: auto;
  max-width: 100%;
}

@media (min-width: 480px) {
  .sg-header-inner {
    min-height: 64px;
  }
  .sg-logo a,
  .sg-logo-text {
    font-size: 1.25rem;
    max-width: 220px;
  }
  .sg-logo img {
    max-height: 48px;
  }
}

.sg-nav {
  display: none;
}

.sg-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  width: 100%;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}

.sg-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sg-menu a {
  display: block;
  padding: 0.75rem 0;
  min-height: 44px;
  line-height: 1.4;
  color: var(--text);
  font-weight: 600;
  transition: color var(--transition);
}

.sg-menu a:hover {
  color: var(--primary-hover);
}

.sg-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sg-icon-btn,
.sg-menu-toggle {
  padding: 0.6rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.sg-icon-btn:hover,
.sg-menu-toggle:hover {
  background: var(--bg-alt);
  color: var(--primary-hover);
}

.sg-icon-btn svg {
  display: block;
}

@media (min-width: 768px) {
  .sg-nav {
    display: block;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .sg-menu {
    flex-direction: row;
    gap: 1.5rem;
  }

  .sg-menu-toggle {
    display: none;
  }
}

/* ==========================================================================
   Hero (v2: premium, conversion-focused, motion bottom-only)
   ========================================================================== */

.sg-hero {
  position: relative;
  min-height: 50vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sg-hero-v2 {
  padding: 2.5rem 0 0;
  min-height: 60vh;
}

@media (min-width: 768px) {
  .sg-hero-v2 {
    padding: 4rem 0 0;
    min-height: 72vh;
  }
}

/* ----- Layer 1: Background ----- */
.sg-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sg-hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
  z-index: 1;
}

.sg-hero__bg-tint {
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0.05;
  z-index: 2;
}

[dir="rtl"] .sg-hero__bg-tint {
  transform: scaleX(-1);
}

.sg-hero__bg-glow {
  position: absolute;
  inset: -15%;
  background: radial-gradient(ellipse 70% 50% at 50% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 55%);
  pointer-events: none;
  z-index: 3;
}

.sg-hero--has-bg-image .sg-hero__bg-tint {
  opacity: 0.03;
}

/* ----- Layer 2: Motion (يغطي كامل الهيرو، خلف المحتوى) ----- */
.sg-hero__motion {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.45;
}

.sg-hero__chart {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.sg-hero__chart-area {
  opacity: 0;
  animation: sg-hero-chart-area 1.2s ease-out 0.5s forwards;
}

.sg-hero__chart-line {
  stroke-dasharray: 650;
  stroke-dashoffset: 650;
  animation: sg-hero-chart-line 2s ease-out 0.2s forwards;
}

.sg-hero__chart-dot {
  opacity: 0;
  animation: sg-hero-chart-dot 0.4s ease-out forwards;
}

.sg-hero__chart-dot--1 { animation-delay: 0.6s; }
.sg-hero__chart-dot--2 { animation-delay: 1s; }
.sg-hero__chart-dot--3 { animation-delay: 1.4s; }

@keyframes sg-hero-chart-line {
  to { stroke-dashoffset: 0; }
}

@keyframes sg-hero-chart-area {
  to { opacity: 1; }
}

@keyframes sg-hero-chart-dot {
  to { opacity: 0.7; }
}

/* ----- Layer 3: Content (always on top) ----- */
.sg-hero__content-wrap {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  padding-bottom: 4rem;
}

.sg-hero__inner {
  width: 100%;
}

.sg-hero__content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.sg-hero__title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1rem;
}

.sg-hero__subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.sg-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

.sg-hero__btn {
  flex: 0 1 auto;
  min-width: 148px;
  min-height: 48px;
}

.sg-hero__btn--secondary {
  color: var(--bg);
  border-color: var(--primary);
}

.sg-hero__btn--secondary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

@media (max-width: 380px) {
  .sg-hero__cta {
    flex-direction: column;
  }
  .sg-hero__btn {
    width: 100%;
    min-width: 0;
  }
}

/* ----- Trust indicators ----- */
.sg-hero__stats {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sg-hero__stat-num {
  color: var(--primary);
}

@media (max-width: 767px) {
  .sg-hero__content-wrap {
    padding-bottom: 3rem;
  }
  .sg-hero__stats {
    bottom: 1rem;
    gap: 0.875rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .sg-hero__stats {
    padding: 0 0.5rem;
  }
}

/* Hero v2 - Dark mode */
body.dark-mode .sg-hero__bg-tint {
  opacity: 0.08;
}

body.dark-mode .sg-hero__stats {
  color: var(--text-muted);
}

body.dark-mode .sg-hero__stat-num {
  color: var(--primary-light);
}

/* Legacy hero classes (fallback if old template part used) */
.sg-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0.06;
  z-index: 0;
}

.sg-hero-inner { position: relative; z-index: 2; }
.sg-hero-content { text-align: center; max-width: 720px; margin: 0 auto; }
.sg-hero-title { font-size: clamp(1.75rem, 5vw, 3rem); color: var(--text); margin-bottom: 1rem; line-height: 1.2; }
.sg-hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.6; }
.sg-hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.sg-hero-cta .sg-btn { flex: 1 1 auto; min-width: 140px; }
.sg-hero-cta .sg-btn-outline { color: var(--bg); border-color: var(--primary); }
.sg-hero-cta .sg-btn-outline:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

/* Hero Enhanced - Gradient • Glow • SVG • Parallax */
.sg-hero-enhanced {
  isolation: isolate;
}

.sg-hero-gradient-dynamic {
  background: var(--primary);
  opacity: 0.08;
}

.sg-hero-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.sg-hero-parallax-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

.sg-hero-svg-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --- تسلسل الظهور (منظم، غير عشوائي) --- */
.sg-hero-reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: sg-hero-reveal 0.5s ease-out forwards;
}

.sg-hero-reveal[data-reveal="0"] { animation-delay: 0s; }
.sg-hero-reveal[data-reveal="1"] { animation-delay: 0.35s; }
.sg-hero-reveal[data-reveal="2"] { animation-delay: 0.5s; }
.sg-hero-reveal[data-reveal="3"] { animation-delay: 0.65s; }
.sg-hero-reveal[data-reveal="4"] { animation-delay: 0.5s; }
.sg-hero-reveal[data-reveal="5"] { animation-delay: 0.7s; }
.sg-hero-reveal[data-reveal="6"] { animation-delay: 0.25s; }

@keyframes sg-hero-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* الرسم يظهر فوراً ثم يرسم الخط */
.sg-hero-trend-chart.sg-hero-reveal {
  transform: translateY(0);
}
.sg-hero-trend-chart.sg-hero-reveal[data-reveal="0"] {
  animation: sg-hero-reveal 0.4s ease-out 0s forwards;
}

/* --- رسم بياني ترند (أسفل فقط - لا يغطي النص أو الأزرار) --- */
.sg-hero-trend-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28%;
  max-height: 140px;
  opacity: 0.45;
  overflow: hidden;
  z-index: 0;
}

.sg-hero-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: bottom center;
}

.sg-hero-chart-line {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: sg-hero-chart-draw 1.6s ease-out 0.4s forwards;
}

.sg-hero-chart-area {
  opacity: 0;
  animation: sg-hero-chart-area-in 1s ease-out 0.9s forwards;
}

@keyframes sg-hero-chart-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes sg-hero-chart-area-in {
  to { opacity: 1; }
}

/* --- صف الشارات (موضع واحد منظم) --- */
.sg-hero-stats-row {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 90%;
  padding: 0 0.5rem;
}

.sg-hero-stats-badges .sg-hero-trend-badge {
  position: static;
  transform: none;
}

.sg-hero-stats-badges .sg-hero-float {
  animation: sg-hero-float 3.5s ease-in-out infinite;
}
.sg-hero-stats-badges .sg-hero-trend-badge:nth-child(1) { animation-delay: 0s; }
.sg-hero-stats-badges .sg-hero-trend-badge:nth-child(2) { animation-delay: 0.4s; }
.sg-hero-stats-badges .sg-hero-trend-badge:nth-child(3) { animation-delay: 0.8s; }

.sg-hero-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.sg-hero-trend-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

[dir="rtl"] .sg-hero-trend-arrow {
  transform: rotate(180deg);
}

.sg-hero-trend-value {
  line-height: 1;
}

.sg-hero-trend-label {
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.9;
}

/* --- عدادات (زاويتان ثابتتان، لا تغطي المحتوى) --- */
.sg-hero-float {
  animation: sg-hero-float 3.5s ease-in-out infinite;
  will-change: transform;
}

.sg-hero-counter {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
}

.sg-hero-counter-num,
.sg-hero-counter-suffix {
  display: inline;
}

.sg-hero-counter-num {
  font-size: 1.1rem;
  line-height: 1.2;
}

.sg-hero-counter-suffix {
  font-size: 0.8rem;
  margin-right: 0.05em;
}

.sg-hero-counter-desc {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.sg-hero-counter-1 {
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  animation: sg-hero-float 3.5s ease-in-out 0.2s infinite;
  animation-name: sg-hero-float-center;
}
.sg-hero-counter-2 {
  bottom: 22%;
  left: 0.5rem;
  animation-delay: 0.5s;
}

@keyframes sg-hero-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

@keyframes sg-hero-float-center {
  0%, 100% { transform: translateY(-50%) translate3d(0, 0, 0); }
  50% { transform: translateY(-50%) translate3d(0, -6px, 0); }
}

/* RTL: تبادل المواقع */
[dir="rtl"] .sg-hero-counter-1 {
  right: auto;
  left: 0.5rem;
}
[dir="rtl"] .sg-hero-counter-2 {
  left: auto;
  right: 0.5rem;
}

@media (min-width: 768px) {
  .sg-hero-trend-chart {
    height: 48%;
    max-height: 260px;
    opacity: 0.55;
  }
  .sg-hero-stats-row {
    top: 1.25rem;
    gap: 0.6rem;
  }
  .sg-hero-trend-badge {
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
  }
  .sg-hero-counter-num {
    font-size: 1.35rem;
  }
  .sg-hero-counter {
    padding: 0.5rem 0.75rem;
  }
  .sg-hero-counter-1 {
    right: 1rem;
  }
  .sg-hero-counter-2 {
    left: 1rem;
    bottom: 24%;
  }
  [dir="rtl"] .sg-hero-counter-1 {
    left: 1rem;
    right: auto;
  }
  [dir="rtl"] .sg-hero-counter-2 {
    right: 1rem;
    left: auto;
  }
}

@media (max-width: 767px) {
  .sg-hero-stats-row {
    top: 0.75rem;
    gap: 0.4rem;
  }
  .sg-hero-trend-badge {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }
  .sg-hero-trend-label {
    font-size: 0.55rem;
  }
  .sg-hero-counter-1,
  .sg-hero-counter-2 {
    padding: 0.35rem 0.5rem;
  }
  .sg-hero-counter-num {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .sg-hero-trend-chart {
    height: 24%;
    max-height: 100px;
  }
  .sg-hero-stats-row {
    max-width: 100%;
    padding: 0 0.25rem;
  }
  .sg-hero-content {
    padding-top: 2.25rem;
  }
  .sg-hero-counter-1 {
    top: auto;
    bottom: 18%;
    right: 0.35rem;
    transform: none;
    animation-name: sg-hero-float;
  }
  .sg-hero-counter-2 {
    bottom: 18%;
    left: 0.35rem;
    animation-name: sg-hero-float;
  }
  [dir="rtl"] .sg-hero-counter-1 {
    left: 0.35rem;
    right: auto;
  }
  [dir="rtl"] .sg-hero-counter-2 {
    right: 0.35rem;
    left: auto;
  }
}

/* Hero motion - الوضع الليلي */
body.dark-mode .sg-hero-trend-badge,
body.dark-mode .sg-hero-counter {
  background: rgba(15, 23, 42, 0.92);
  border-color: var(--border);
  color: var(--primary-light);
}

body.dark-mode .sg-hero-counter-desc {
  color: var(--text-muted);
}

/* ==========================================================================
   Sections common
   ========================================================================== */

.sg-section {
  padding: 2.5rem 0;
}

@media (min-width: 768px) {
  .sg-section {
    padding: 4rem 0;
  }
}

.sg-section:nth-child(even) {
  background: var(--bg-alt);
}

/* ==========================================================================
   Services
   ========================================================================== */

.sg-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.sg-services-grid > * {
  min-width: 0;
}

.sg-service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.sg-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-hover);
}

.sg-service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: background var(--transition);
}

.sg-service-card:hover .sg-service-icon {
  background: var(--primary-hover);
}

.sg-service-icon svg {
  width: 28px;
  height: 28px;
}

.sg-service-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.sg-service-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.sg-service-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition);
}

.sg-service-link:hover {
  color: var(--primary-hover);
}

@media (min-width: 600px) {
  .sg-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .sg-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sg-services-cols-2 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .sg-services-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.sg-services-cols-3 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .sg-services-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .sg-services-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.sg-services-cols-4 { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .sg-services-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .sg-services-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.sg-services-style-minimal .sg-service-icon {
  width: 40px;
  height: 40px;
}

.sg-services-style-minimal .sg-service-icon svg {
  width: 22px;
  height: 22px;
}

.sg-services-style-grid .sg-service-card {
  text-align: center;
}

/* ==========================================================================
   Process
   ========================================================================== */

.sg-process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.sg-process-step {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.sg-process-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.sg-process-num {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 50%;
  transition: background var(--transition);
}

.sg-process-step:hover .sg-process-num {
  background: var(--primary-hover);
}

.sg-process-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.sg-process-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

@media (min-width: 768px) {
  .sg-process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .sg-process-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.sg-pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.sg-pricing-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.sg-pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.sg-pricing-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.sg-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.sg-pricing-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.sg-pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1.5rem;
}

.sg-pricing-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.sg-pricing-features li {
  padding: 0.5rem 0;
  padding-right: 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sg-pricing-features li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.sg-btn-block {
  width: 100%;
}

@media (min-width: 768px) {
  .sg-pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .sg-pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

.sg-portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.sg-filter-btn {
  padding: 0.5rem 0.75rem;
  min-height: 44px;
}

@media (min-width: 480px) {
  .sg-filter-btn {
    padding: 0.5rem 1rem;
  }
}

.sg-filter-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.sg-filter-btn:hover,
.sg-filter-btn.active {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #fff;
}

.sg-portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.sg-portfolio-grid > * {
  min-width: 0;
}

.sg-portfolio-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.sg-portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.sg-portfolio-thumb {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.sg-portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.sg-portfolio-card:hover .sg-portfolio-thumb img {
  transform: scale(1.05);
}

.sg-portfolio-body {
  padding: 1.25rem;
}

.sg-portfolio-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sg-portfolio-cat {
  font-size: 0.8rem;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.sg-portfolio-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.sg-portfolio-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.sg-portfolio-results {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.sg-portfolio-results li {
  padding: 0.2rem 0;
}

@media (min-width: 600px) {
  .sg-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .sg-portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Stats
   ========================================================================== */

.sg-stats {
  position: relative;
  padding: 4rem 0;
}

.sg-stats-bg {
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0.1;
  z-index: 0;
}

.sg-stats .sg-container {
  position: relative;
  z-index: 1;
}

.sg-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  text-align: center;
}

.sg-stats-grid > * {
  min-width: 0;
}

@media (min-width: 480px) {
  .sg-stats-grid {
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .sg-stats-grid {
    gap: 2rem;
  }
}

.sg-stat-item {
  padding: 1rem;
}

.sg-stat-number {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--primary);
}

.sg-stat-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .sg-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Contact Cards (واتساب / جوال / إيميل)
   ========================================================================== */

.sg-contact-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}

.sg-contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  width: 100%;
  min-width: 0;
  max-width: 320px;
  flex: 1 1 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

@media (min-width: 400px) {
  .sg-contact-card {
    flex: 1 1 200px;
    min-width: 200px;
    max-width: 280px;
    padding: 1.5rem;
  }
}

.sg-contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-hover);
  color: var(--text);
}

.sg-contact-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.sg-contact-card-icon svg {
  width: 28px;
  height: 28px;
}

.sg-contact-whatsapp .sg-contact-card-icon {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
}

.sg-contact-phone .sg-contact-card-icon {
  background: var(--primary);
  color: #fff;
}

.sg-contact-phone .sg-contact-card:hover .sg-contact-card-icon {
  background: var(--primary-hover);
}

.sg-contact-email .sg-contact-card-icon {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary);
}

.sg-contact-email .sg-contact-card:hover .sg-contact-card-icon {
  background: var(--primary);
  color: #fff;
}

.sg-contact-card-title {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}

.sg-contact-card-value {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sg-contact-card-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: color var(--transition);
}

.sg-contact-card:hover .sg-contact-card-action {
  color: var(--primary-hover);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.sg-contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.sg-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sg-input,
.sg-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.sg-input:focus,
.sg-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.sg-textarea {
  resize: vertical;
  min-height: 120px;
}

.sg-form-message {
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.sg-form-message.success {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}

body.dark-mode .sg-form-message.success {
  color: #86efac;
}

.sg-form-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

body.dark-mode .sg-form-message.error {
  color: #fca5a5;
}

/* ==========================================================================
   Archive / Blog
   ========================================================================== */

.sg-archive-header {
  margin-bottom: 2rem;
  text-align: center;
}

.sg-archive-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.sg-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .sg-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sg-post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.sg-post-card:hover {
  box-shadow: var(--shadow-lg);
}

.sg-card-thumb {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.sg-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-card-body {
  padding: 1.25rem;
}

.sg-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.sg-card-title a {
  color: var(--text);
}

.sg-card-title a:hover {
  color: var(--primary-hover);
}

.sg-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sg-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.sg-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   Single Service - صفحة الخدمة الاحترافية
   ========================================================================== */

.sg-single-service-pro {
  padding-bottom: 0;
}

.sg-service-breadcrumb {
  padding: 0.75rem 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.sg-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

@media (min-width: 480px) {
  .sg-breadcrumb ol {
    font-size: 0.9rem;
  }
}

.sg-breadcrumb a {
  color: var(--text-muted);
}

.sg-breadcrumb a:hover {
  color: var(--primary-hover);
}

.sg-breadcrumb li:not(:last-child)::after {
  content: '\203A';
  margin-right: 0.35rem;
  color: var(--text-muted);
}

.sg-breadcrumb li[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sg-service-hero {
  position: relative;
  padding: 2rem 0 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

@media (min-width: 768px) {
  .sg-service-hero {
    padding: 3rem 0 4rem;
  }
}

.sg-service-hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.12);
  border-radius: 20px;
}

.sg-service-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.sg-service-hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 auto 1.5rem;
  max-width: 560px;
}

.sg-service-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.sg-service-hero-cta .sg-btn {
  flex: 1 1 auto;
  min-width: 140px;
}

@media (max-width: 380px) {
  .sg-service-hero-cta {
    flex-direction: column;
  }
  .sg-service-hero-cta .sg-btn {
    width: 100%;
    min-width: 0;
  }
}

.sg-service-hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: transform var(--transition);
}

.sg-service-hero-scroll:hover {
  color: var(--primary-hover);
  transform: translateY(3px);
}

.sg-service-why {
  padding: 2.5rem 0;
}

@media (min-width: 768px) {
  .sg-service-why {
    padding: 4rem 0;
  }
}

.sg-service-why-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  text-align: center;
  margin: 0 0 1.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.sg-service-why-content {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.8;
}

.sg-service-why-content p {
  margin-bottom: 1rem;
}

.sg-section-title-heading {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  text-align: center;
  margin: 0 0 0.5rem;
}

.sg-section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.sg-service-features {
  background: var(--bg-alt);
}

.sg-service-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.sg-service-feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.sg-service-feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-hover);
}

.sg-service-feature-num {
  display: inline-block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.sg-service-feature-title {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.sg-service-feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.sg-service-details-content {
  max-width: 72ch;
  margin: 0 auto;
}

.sg-service-details-content p {
  margin-bottom: 1rem;
}

.sg-service-portfolio-link {
  text-align: center;
  margin: 2rem 0 0;
}

.sg-service-others .sg-services-grid {
  margin-top: 1.5rem;
}

.sg-service-cta {
  position: relative;
  padding: 4rem 0;
  text-align: center;
  overflow: hidden;
}

.sg-service-cta-bg {
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0.08;
}

.sg-service-cta .sg-container {
  position: relative;
  z-index: 1;
}

.sg-service-cta-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  color: var(--text);
}

.sg-service-cta-text {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.sg-service-cta-buttons {
  margin-bottom: 1rem;
}

.sg-service-cta-phone {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

@media (min-width: 768px) {
  .sg-service-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .sg-service-features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Single / Page
   ========================================================================== */

.sg-entry-header {
  margin-bottom: 1.5rem;
}

.sg-entry-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.sg-entry-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sg-entry-meta .sg-meta-date::after {
  content: ' • ';
}

.sg-entry-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.sg-entry-content {
  max-width: 72ch;
}

.sg-entry-content p {
  margin-bottom: 1rem;
}

.sg-service-icon-inline {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.sg-service-icon-inline svg {
  width: 100%;
  height: 100%;
  color: var(--primary);
}

.sg-portfolio-results-block {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.sg-portfolio-results-block h3 {
  margin-bottom: 0.75rem;
}

.sg-portfolio-results-block ul {
  margin: 0;
  padding-right: 1.5rem;
}

/* ==========================================================================
   404
   ========================================================================== */

.sg-404-main {
  padding: 4rem 0;
  text-align: center;
}

.sg-404-title {
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.sg-404-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Scroll animation (visibility)
   ========================================================================== */

.sg-animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.sg-animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Footer - 4 columns + Bottom bar
   ========================================================================== */

.sg-footer {
  margin-top: 4rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.sg-footer-main {
  padding: 2.5rem 0;
}

.sg-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.sg-footer-grid > * {
  min-width: 0;
}

.sg-footer-col {
  min-width: 0;
}

.sg-footer-brand .custom-logo-link {
  display: inline-block;
}

.sg-footer-logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.sg-footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}

.sg-footer-social {
  margin-top: 1rem;
}

.sg-footer-social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sg-footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.sg-footer-social-link:hover {
  color: #fff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.sg-footer-social-link svg {
  width: 20px;
  height: 20px;
}

.sg-footer-widget-title {
  font-size: 1rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.sg-footer-menu,
.sg-footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sg-footer-menu li,
.sg-footer-contact-list li {
  margin-bottom: 0.5rem;
}

.sg-footer-menu a,
.sg-footer-contact-list a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.sg-footer-menu a:hover,
.sg-footer-contact-list a:hover {
  color: var(--primary-hover);
}

.sg-footer-bottom {
  background: #0f172a;
  padding: 1rem 0;
}

body.dark-mode .sg-footer-bottom {
  background: #020617;
}

.sg-footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.sg-copyright,
.sg-footer-privacy {
  width: 100%;
}

@media (min-width: 480px) {
  .sg-footer-bottom-inner .sg-copyright,
  .sg-footer-bottom-inner .sg-footer-privacy {
    width: auto;
  }
}

.sg-copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.sg-footer-privacy {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}

.sg-footer-privacy:hover {
  color: #fff;
}

@media (min-width: 768px) {
  .sg-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sg-footer-bottom-inner {
    justify-content: space-between;
  }
}

@media (min-width: 992px) {
  .sg-footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.sg-main .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.sg-main .nav-links a,
.sg-main .nav-links span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--transition);
}

.sg-main .nav-links a:hover {
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

.sg-main .nav-links .current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
