/**
 * Brmjh Corporate Premium — Quiet Luxury Design System
 * Platform: برمجة (brmjh.sa)
 * Philosophy: "لا نشرح للعميل كم نحن متطورون؛ نجعله يشعر بذلك من التصميم، الأعمال، والدقة"
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Readex+Pro:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   1. Design Tokens & Variables
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Layout */
  --max-w: 1200px;
  --header-h: 76px;

  /* Color System — Quiet & Balanced */
  --bg-page: #FFFFFF;
  --bg-surface: #F8FAFC;
  --bg-subtle: #F1F5F9;
  --bg-dark: #090D16;
  --bg-dark-surface: #111827;
  --bg-dark-card: #151D2E;

  /* Typography Colors */
  --text-dark: #090D16;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  
  --text-light: #F8FAFC;
  --text-light-muted: #94A3B8;

  /* Single Brand Accent */
  --primary: #1E40AF;          /* Deep Corporate Cobalt */
  --primary-hover: #1D4ED8;
  --primary-dark: #172554;
  --primary-subtle: #EFF6FF;
  --primary-border: rgba(30, 64, 175, 0.15);

  /* Subtle Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-dark-hover: rgba(255, 255, 255, 0.16);

  /* Radii — Moderate & Balanced */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows — Soft & Realistic */
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
  --shadow-preview: 0 20px 40px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --tr-fast: 0.15s ease;
  --tr-base: 0.25s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. Reset & Global Styles
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #DBEAFE;
  color: #1E3A8A;
}

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

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

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-body);
  font-size: 1.05rem;
  line-height: 1.75;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  top: -100px;
  right: 1rem;
  background: var(--text-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 99999;
}
.skip-link:focus {
  top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. Topbar Navigation (Strictly 5 items + Brand)
   ═══════════════════════════════════════════════════════════════════════════ */
.site-topbar {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--tr-base);
}

.site-topbar.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Logo */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}

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

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* Nav Menu */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.topbar-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  position: relative;
  padding: 0.5rem 0;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--text-dark);
  font-weight: 600;
}

/* Actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-client-login {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-body);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--tr-fast);
}

.btn-client-login:hover {
  background: var(--bg-surface);
  border-color: var(--text-dim);
  color: var(--text-dark);
}

.btn-start-project {
  background: var(--text-dark);
  color: #FFFFFF;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--tr-fast);
  border: 1px solid var(--text-dark);
}

.btn-start-project:hover {
  background: #1E293B;
  border-color: #1E293B;
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  font-size: 1.3rem;
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 290px;
  max-width: 85vw;
  background: #FFFFFF;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--tr-base);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-base);
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.mobile-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-drawer-links a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.4rem 0;
}

.mobile-drawer-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. Section Utilities & Typography
   ═══════════════════════════════════════════════════════════════════════════ */
.section {
  padding: 6.5rem 0;
  position: relative;
}

.section-surface {
  background-color: var(--bg-surface);
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #FFFFFF;
}

.section-dark p {
  color: var(--text-light-muted);
}

.section-header {
  margin-bottom: 3.5rem;
  max-width: 680px;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-dark .section-eyebrow {
  color: #93C5FD;
}

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.section-dark .section-title {
  color: #FFFFFF;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.7;
}

.section-dark .section-desc {
  color: var(--text-light-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. Section 1: Hero (نبني البرمجيات التي تدير أعمالك)
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-section {
  padding: 5rem 0 5.5rem;
  background: radial-gradient(circle at 50% -20%, #F1F5F9 0%, #FFFFFF 70%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero-headline {
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}

.hero-subheadline {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.25rem;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary-hero {
  background: var(--text-dark);
  color: #FFFFFF;
  padding: 0.95rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr-fast);
  border: 1px solid var(--text-dark);
  box-shadow: 0 4px 14px rgba(9, 13, 22, 0.12);
}

.btn-primary-hero:hover {
  background: #1E293B;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(9, 13, 22, 0.16);
}

.btn-link-hero {
  color: var(--text-dark);
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
}

.btn-link-hero:hover {
  color: var(--primary);
}

.btn-link-hero i {
  transition: transform var(--tr-fast);
}

.btn-link-hero:hover i {
  transform: translateX(-4px);
}

/* Clean Real UI Preview Frame */
.hero-preview-frame {
  position: relative;
}

.preview-window {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-preview);
  overflow: hidden;
  transition: transform var(--tr-base), box-shadow var(--tr-base);
}

.preview-window:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.preview-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #FAFAFA;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #CBD5E1;
}

.window-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-family: 'Outfit', -apple-system, sans-serif;
  direction: ltr;
}

.preview-media-box {
  background: #F8FAFC;
  line-height: 0;
  display: block;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   6. Section 2: تعريف سريع جدًا (الحلول — من الفكرة إلى نظام يعمل)
   ═══════════════════════════════════════════════════════════════════════════ */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.solution-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: all var(--tr-base);
  display: flex;
  flex-direction: column;
}

.solution-card:hover {
  border-color: var(--text-dim);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.solution-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 1.25rem;
}

.solution-card h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.solution-card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. Section 3: أعمال مختارة (3 مشاريع رئيسية فقط)
   ═══════════════════════════════════════════════════════════════════════════ */
.works-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.work-item {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3.5rem;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--tr-base);
}

.work-item.reverse {
  grid-template-columns: 1fr 1.25fr;
}

.work-item.reverse .work-visual {
  order: 2;
}

.work-item.reverse .work-info {
  order: 1;
}

.work-item:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-card);
}

.work-visual {
  background: #F8FAFC;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.work-window-frame {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
  transition: all 0.35s ease;
}

.work-item:hover .work-window-frame {
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: translateY(-3px);
}

.work-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #FAFAFA;
  border-bottom: 1px solid var(--border);
}

.work-window-url {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
  direction: ltr;
}

.work-img-wrap {
  line-height: 0;
  background: #F8FAFC;
}

.work-screenshot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-info {
  padding: 1rem;
}

.work-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.work-info h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.work-desc {
  font-size: 1.1rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: color var(--tr-fast);
}

.work-link:hover {
  color: var(--primary);
}

.work-link i {
  transition: transform var(--tr-fast);
}

.work-link:hover i {
  transform: translateX(-5px);
}

.works-footer-cta {
  margin-top: 3.5rem;
  text-align: center;
}

.btn-explore-works {
  background: transparent;
  color: var(--text-dark);
  border: 1.5px solid var(--text-dark);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--tr-fast);
}

.btn-explore-works:hover {
  background: var(--text-dark);
  color: #FFFFFF;
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. Section 4: لماذا برمجة؟ (مصممة للعمل. ومبنية للاستمرار)
   ═══════════════════════════════════════════════════════════════════════════ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.why-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all var(--tr-base);
}

.why-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-card);
}

.why-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.why-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.why-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
}

.why-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. Section 5: طريقة العمل (01 نفهم — 02 نبني — 03 نطلق)
   ═══════════════════════════════════════════════════════════════════════════ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
}

.step-card {
  background: transparent;
  padding: 1.5rem 0;
  position: relative;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: #CBD5E1;
  line-height: 1;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. Section 6: نهاية قوية (CTA & Project Start)
   ═══════════════════════════════════════════════════════════════════════════ */
.closing-section {
  padding: 7rem 0 6.5rem;
  background: var(--bg-dark);
  color: #FFFFFF;
  text-align: center;
  position: relative;
}

.closing-content {
  max-width: 720px;
  margin: 0 auto;
}

.closing-title {
  font-size: 3rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.closing-subtitle {
  font-size: 1.35rem;
  color: #94A3B8;
  margin-bottom: 2.75rem;
}

.btn-closing-cta {
  background: #FFFFFF;
  color: var(--text-dark);
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--tr-fast);
  border: 1px solid #FFFFFF;
}

.btn-closing-cta:hover {
  background: #F1F5F9;
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. Quiet Minimalist Footer
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: #060910;
  border-top: 1px solid var(--border-dark);
  padding: 4rem 0 2.5rem;
  color: #94A3B8;
  font-size: 0.95rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-dark);
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.footer-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #94A3B8;
  font-weight: 500;
}

.footer-nav a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  color: #64748B;
}

.footer-legal-links a:hover {
  color: #94A3B8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   12. Dedicated Inner Pages: /works, /contact, /privacy, /terms
   ═══════════════════════════════════════════════════════════════════════════ */
.page-hero {
  padding: 4.5rem 0 3.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.page-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.page-hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Works Portfolio Grid (/works) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.portfolio-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--tr-base);
}

.portfolio-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.portfolio-img-box {
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  line-height: 0;
}

.portfolio-img-box img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.portfolio-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.portfolio-category-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.portfolio-content h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.portfolio-content p {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

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

/* Contact / Start Project Page (/contact) */
.contact-container {
  max-width: 680px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-subtle);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.45rem;
}

.form-required {
  color: #DC2626;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--text-dark);
  transition: all var(--tr-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--text-dark);
  box-shadow: 0 0 0 3px rgba(9, 13, 22, 0.08);
}

.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.captcha-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.captcha-input {
  width: 110px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.btn-form-submit {
  width: 100%;
  background: var(--text-dark);
  color: #FFFFFF;
  border: 1px solid var(--text-dark);
  padding: 0.95rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--tr-fast);
}

.btn-form-submit:hover {
  background: #1E293B;
}

.form-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-alert-success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.form-alert-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* Legal Documents (/privacy, /terms) */
.legal-content-card {
  max-width: 800px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  line-height: 1.85;
}

.legal-content-card h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--text-dark);
}

.legal-content-card h2:first-child {
  margin-top: 0;
}

.legal-content-card p {
  margin-bottom: 1.25rem;
  color: var(--text-body);
}

.legal-content-card ul {
  padding-right: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-content-card li {
  margin-bottom: 0.5rem;
  color: var(--text-body);
}

/* ═══════════════════════════════════════════════════════════════════════════
   13. Client Login Modal (دخول العملاء)
   ═══════════════════════════════════════════════════════════════════════════ */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.login-modal-close {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.login-modal-close:hover {
  color: var(--text-dark);
}

.login-modal-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.login-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.login-modal-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.school-code-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 4px;
  font-weight: 800;
  font-family: 'Outfit', monospace;
  padding: 0.85rem;
}

.login-error-msg {
  color: #DC2626;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   14. Responsive Breakpoints
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .work-item,
  .work-item.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-item.reverse .work-visual,
  .work-item.reverse .work-info {
    order: unset;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 68px;
  }

  .topbar-nav {
    display: none;
  }

  .btn-client-login {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .hero-headline {
    font-size: 2.35rem;
  }

  .hero-subheadline {
    font-size: 1.1rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .closing-title {
    font-size: 2.15rem;
  }

  .form-2col {
    grid-template-columns: 1fr;
  }

  .contact-container,
  .legal-content-card {
    padding: 1.75rem 1.25rem;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Saudi Business Center — شارة التوثيق (متجر موثّق) */
.sbc-verify-seal {
  position: fixed;
  z-index: 9998;
  line-height: 0;
}

.sbc-verify-seal iframe,
.sbc-verify-seal img {
  display: block;
  max-width: none;
}

@media (max-width: 768px) {
  .sbc-verify-seal[data-position="bottom-left"] {
    left: 12px !important;
    bottom: 12px !important;
  }
}
