/**
 * ReperHub — Modern Premium Business & IT Solutions Design System
 * Architecture: Clean Vanilla CSS, CSS Custom Properties, Fluid Layouts
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

:root {
  --font-en: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;

  /* Color Palette */
  --primary: #1657e0;
  --primary-hover: #0e44b8;
  --primary-light: #eef4ff;
  --primary-glow: rgba(22, 87, 224, 0.28);

  --secondary: #0a1120;
  --secondary-card: #131f37;
  --secondary-border: rgba(255, 255, 255, 0.08);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  --border-light: rgba(15, 23, 42, 0.08);
  --border-focus: #1657e0;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 10px 30px rgba(22, 87, 224, 0.25);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

[dir="rtl"] body {
  font-family: var(--font-ar);
}

/* تباعد الحروف يفكك اتصال الحروف العربية — للاتجاه الإنجليزي فقط */
[dir="rtl"] .hero-title,
[dir="rtl"] .section-tag,
[dir="rtl"] .section-title,
[dir="rtl"] .contact-item-text h4 {
  letter-spacing: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header & Navigation */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  direction: ltr; /* الشعار ReperHub لا ينعكس في العربية */
}

.brand-text .reper {
  color: var(--text-main);
}

.brand-text .hub {
  color: var(--primary);
  margin-inline-start: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* رابط عرض السعر في القائمة — يظهر على الجوال فقط (responsive.css) */
.nav-link.nav-cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.lang-switch:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0d44b8 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 87, 224, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1c61f2 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22, 87, 224, 0.45);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--secondary);
  border-color: #ffffff;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #09101f 0%, #0f1c35 100%);
  color: #ffffff;
  padding: 85px 0 100px;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  inset-inline-end: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 87, 224, 0.25) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(60px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 87, 224, 0.18);
  border: 1px solid rgba(22, 87, 224, 0.35);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #94a3b8;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item .stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

.hero-visual {
  position: relative;
}

.hero-card-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform var(--transition-smooth);
}

.hero-card-frame:hover {
  transform: translateY(-4px);
}

.hero-card-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.floating-hub-tag {
  position: absolute;
  bottom: 24px;
  inset-inline-start: 24px;
  background: rgba(10, 17, 32, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

.floating-hub-tag i {
  font-size: 1.8rem;
  color: #38bdf8;
}

.floating-hub-tag strong {
  display: block;
  font-size: 0.95rem;
}

.floating-hub-tag span {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Sections Global */
.section-py {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-header.text-start {
  text-align: start;
  margin-inline: 0;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Services Grid & Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  position: relative;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(22, 87, 224, 0.25);
}

.service-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card-media img {
  transform: scale(1.06);
}

.service-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: rgba(10, 17, 32, 0.85);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
  transition: all var(--transition-fast);
}

.service-card:hover .service-icon-bubble {
  background: var(--primary);
  color: #ffffff;
  transform: rotate(-5deg);
}

.service-title {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.35;
}

.service-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.service-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.service-link:hover {
  gap: 10px;
}

/* Service Detail View */
.service-detail-header {
  background: linear-gradient(135deg, #0a1120 0%, #152238 100%);
  color: #ffffff;
  padding: 70px 0 80px;
  position: relative;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.service-article {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.service-article-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.service-article-img img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.service-article-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 18px;
}

.service-article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.features-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 28px 0;
}

.features-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-subtle);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.features-list-item i {
  color: var(--primary);
  font-size: 1.3rem;
  margin-top: 2px;
}

.service-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

/* Why Partner Section */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.trust-card {
  background: #ffffff;
  padding: 32px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.trust-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.trust-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 18px;
}

.trust-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.trust-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* صف نموذج بعمودين يتحول لعمود واحد على الجوال (يُستخدم في الموقع ولوحة التحكم) */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* حقل خفي لاصطياد البرامج الآلية — خارج الشاشة لا display:none (بعضها يتجاهل المخفي) */
.hp-field {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* About Page Specifics */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-vision-card {
  background: linear-gradient(135deg, #0a1120 0%, #152238 100%);
  color: #ffffff;
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.about-vision-card h3 {
  color: #38bdf8;
  font-size: 1.35rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-vision-card p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.7;
}

/* Contact & Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}

.contact-info-card {
  background: linear-gradient(135deg, #0a1120 0%, #152238 100%);
  color: #ffffff;
  padding: 44px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  height: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(22, 87, 224, 0.25);
  border: 1px solid rgba(22, 87, 224, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #60a5fa;
  flex-shrink: 0;
}

.contact-item-text h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.contact-item-text a,
.contact-item-text p {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

.contact-form-card {
  background: #ffffff;
  padding: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Interactive Filter / Finder */
.filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-tab-btn {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab-btn:hover,
.filter-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(22, 87, 224, 0.25);
}

/* Footer */
.footer-wrapper {
  background: #080d19;
  color: #ffffff;
  padding-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 60px;
}

.footer-brand img {
  height: 38px;
  margin-bottom: 20px;
}

.footer-desc {
  font-size: 0.925rem;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link-item {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.social-link-item:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  color: #ffffff;
}

.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 22px;
  position: relative;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  font-size: 0.925rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.footer-nav a:hover {
  color: #60a5fa;
  transform: translateX(4px);
}

[dir="rtl"] .footer-nav a:hover {
  transform: translateX(-4px);
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
