/* ==========================================================================
   Grand Dimension — Business R&D Lab Design System
   Pure CSS / No Frameworks
   Supports: Dark / Light Themes, English (LTR) / Arabic (RTL), Full Responsiveness
   ========================================================================== */

/* --- CSS Variables / Theme Tokens --- */
:root {
  /* Dark Theme (Default) */
  --bg: #050507;
  --elev: #0C0C10;
  --card: #101014;
  --card-hover: #16161C;
  --card-active: #1D1D24;
  --text: #F4F4F5;
  --muted: #9A9AA3;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass-bg: rgba(16, 16, 20, 0.72);
  --glass-border: rgba(255, 255, 255, 0.10);
  --accent: #FFFFFF;
  --accent-contrast: #050507;
  --pill-border: rgba(255, 255, 255, 0.22);
  --pill-hover: rgba(255, 255, 255, 0.12);
  --input-bg: #0C0C10;
  --tag-bg: rgba(255, 255, 255, 0.05);
  --glow-dot: #FFFFFF;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.45);
  --overlay-bg: rgba(5, 5, 7, 0.85);

  /* Typography */
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-primary: var(--font-en);

  /* Layout */
  --max-w: 1280px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.2s ease;
  --trans-base: 0.3s ease;
}

/* Light Theme Tokens */
html[data-theme="light"] {
  --bg: #F3F3F6;
  --elev: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #F8F8FB;
  --card-active: #EFEFF4;
  --text: #141418;
  --muted: #5C5C68;
  --line: rgba(16, 16, 22, 0.10);
  --line-strong: rgba(16, 16, 22, 0.20);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(16, 16, 22, 0.12);
  --accent: #141418;
  --accent-contrast: #FFFFFF;
  --pill-border: rgba(16, 16, 22, 0.24);
  --pill-hover: rgba(16, 16, 22, 0.08);
  --input-bg: #F9F9FC;
  --tag-bg: rgba(16, 16, 22, 0.05);
  --glow-dot: #141418;
  --shadow-card: 0 12px 32px rgba(16, 16, 22, 0.06);
  --overlay-bg: rgba(243, 243, 246, 0.88);
}

/* Arabic Mode Typography & Alignment */
html[lang="ar"],
html[dir="rtl"] {
  --font-primary: var(--font-ar);
  direction: rtl;
  text-align: right;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color var(--trans-base), color var(--trans-base);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* --- Section Headers & Badges --- */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 640px;
}

/* --- Interactive Buttons --- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid var(--pill-border);
  background-color: transparent;
  color: var(--text);
  transition: all var(--trans-fast);
}

.btn-pill:hover {
  background-color: var(--pill-hover);
  border-color: var(--text);
  transform: translateY(-1px);
}

.btn-pill-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.btn-pill-primary:hover {
  background-color: var(--accent);
  opacity: 0.9;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-arrow {
  transition: transform var(--trans-fast);
  display: inline-block;
}

.btn-pill:hover .btn-arrow {
  transform: translateX(4px);
}

html[dir="rtl"] .btn-pill:hover .btn-arrow {
  transform: translateX(-4px);
}

html[dir="rtl"] .btn-arrow {
  transform: scaleX(-1);
}

/* ==========================================================================
   01 Header Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--glass-bg);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--trans-base), border-color var(--trans-base);
}

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

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

.brand-logo-icon {
  width: 32px;
  height: 32px;
  color: var(--text);
  flex-shrink: 0;
  transition: transform var(--trans-fast), filter var(--trans-fast);
}

.brand-logo:hover .brand-logo-icon {
  transform: scale(1.06);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

[data-theme="light"] .brand-logo:hover .brand-logo-icon {
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-logo-text .title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text);
}

.brand-logo-text .sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* Center guide / decoration if needed */
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--trans-fast);
}

.header-nav-link:hover {
  color: var(--text);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background-color: var(--tag-bg);
  color: var(--text);
  transition: all var(--trans-fast);
}

.header-btn:hover {
  background-color: var(--pill-hover);
  border-color: var(--line-strong);
}

.header-btn svg {
  width: 18px;
  height: 18px;
}

.lang-btn {
  width: auto;
  padding: 0 12px;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Mobile Nav Drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background-color: var(--elev);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
  z-index: 200;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html[dir="rtl"] .nav-drawer {
  right: auto;
  left: -100%;
  border-left: none;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-drawer.active {
  right: 0;
}

html[dir="rtl"] .nav-drawer.active {
  left: 0;
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(8px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-base);
}

.nav-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--trans-fast);
}

.drawer-link:hover {
  color: var(--text);
}

.drawer-footer {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   02 Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 0 90px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-visual-card {
  position: relative;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-card img,
.hero-visual-card svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   03 Stats Section
   ========================================================================== */
.stats-section {
  padding: 20px 0 80px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.stat-item {
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 0;
  height: 60%;
  width: 1px;
  background-color: var(--line);
}

html[dir="rtl"] .stat-item:not(:last-child)::after {
  right: auto;
  left: 0;
}

.stat-icon {
  width: 28px;
  height: 28px;
  color: var(--muted);
  margin-bottom: 16px;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

/* ==========================================================================
   04 About Section
   ========================================================================== */
.about-section {
  padding: 80px 0 100px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 64px;
  align-items: center;
}

.about-visual-card {
  position: relative;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual-card img,
.about-visual-card svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   05 Process Section (How We Work)
   ========================================================================== */
.process-section {
  padding: 80px 0 100px;
}

.process-header {
  margin-bottom: 48px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.process-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--trans-fast);
}

.process-card:hover {
  background-color: var(--card-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.process-step-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.process-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.process-step-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   06 Services Section (What We Do — 36 Cards)
   ========================================================================== */
.services-section {
  padding: 90px 0 100px;
  background-color: var(--elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--trans-base);
}

.services-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--trans-fast);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  background-color: var(--card-hover);
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.service-icon-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: transparent;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 4px;
  overflow: hidden;
  position: relative;
}

[data-theme="light"] .service-icon-box {
  background-color: #0b0c10;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.service-icon-box img.service-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-icon-box img.service-img {
  transform: scale(1.05);
}

.service-icon-box svg {
  width: 90px;
  height: 90px;
  max-width: 100%;
  max-height: 100%;
  transition: transform var(--trans-fast);
}

.service-card:hover .service-icon-box svg {
  transform: scale(1.05);
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.service-card-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.service-card-arrow {
  font-size: 0.9rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: all var(--trans-fast);
}

.service-card:hover .service-card-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

html[dir="rtl"] .service-card:hover .service-card-arrow {
  transform: translate(-2px, -2px);
}


/* ==========================================================================
   07 Specialist Labs Section (Domains)
   ========================================================================== */
.labs-section {
  padding: 90px 0 100px;
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.lab-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--trans-fast);
}

.lab-card:hover {
  background-color: var(--card-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.lab-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}

.lab-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.lab-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ==========================================================================
   08 Why Grand Dimension Section
   ========================================================================== */
.why-section {
  padding: 80px 0 100px;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.why-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.why-card-top {
  margin-bottom: 32px;
}

.why-card .section-title {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.why-card-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 32px;
}

.why-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.why-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.bullet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--glow-dot);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--glow-dot);
}

.artifacts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.artifact-item {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.artifact-item::before {
  content: '—';
  color: var(--muted);
}

/* ==========================================================================
   09 Try App Section
   ========================================================================== */
.app-section {
  padding: 40px 0 100px;
}

.app-box {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 48px 48px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.app-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.app-workspace-card {
  background-color: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 28px;
}

.app-workspace-card .ws-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.app-workspace-card .ws-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.app-workspace-card .ws-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   10 Contact Section & Track List Form
   ========================================================================== */
.contact-section {
  padding: 90px 0 100px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-meta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-meta a {
  color: var(--text);
  font-weight: 600;
  transition: color var(--trans-fast);
}

.contact-meta a:hover {
  color: var(--muted);
}

/* Form Styles */
.contact-form {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--pill-hover);
}

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

.form-feedback {
  padding: 14px;
  border-radius: var(--radius-sm);
  background-color: rgba(72, 223, 159, 0.12);
  border: 1px solid rgba(72, 223, 159, 0.4);
  color: #48DF9F;
  font-size: 0.9rem;
  display: none;
}

.form-feedback.active {
  display: block;
}

/* ==========================================================================
   11 CTA Banner Section
   ========================================================================== */
.cta-section {
  padding: 40px 0 100px;
}

.cta-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  min-height: 240px;
  display: flex;
  align-items: center;
}

.cta-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.cta-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 7, 0.88) 0%, rgba(5, 5, 7, 0.6) 60%, rgba(5, 5, 7, 0.85) 100%);
  z-index: 2;
}

html[data-theme="light"] .cta-banner-overlay {
  background: linear-gradient(90deg, rgba(20, 20, 24, 0.85) 0%, rgba(20, 20, 24, 0.55) 60%, rgba(20, 20, 24, 0.82) 100%);
}

.cta-banner-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.cta-banner-text .cta-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cta-banner-text .cta-desc {
  font-size: 1.05rem;
  color: #D4D4D8;
}

.cta-banner .btn-pill {
  border-color: rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
}

.cta-banner .btn-pill:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

/* ==========================================================================
   12 Footer
   ========================================================================== */
.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background-color: var(--bg);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-tagline {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 320px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--trans-fast);
}

.footer-link:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Service Detail Popup Sheet (Modal)
   ========================================================================== */
.service-popup-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.service-popup-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.service-popup-sheet {
  background-color: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.service-popup-backdrop.active .service-popup-sheet {
  transform: scale(1) translateY(0);
}

.popup-header {
  padding: 24px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

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

.popup-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--tag-bg);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.popup-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.popup-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--trans-fast);
}

.popup-close-btn:hover {
  background-color: var(--pill-hover);
  color: var(--text);
  border-color: var(--line-strong);
}

.popup-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Gallery Showcase within Popup */
.popup-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.popup-gallery-visual {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.popup-gallery-visual svg {
  width: 100%;
  height: 100%;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all var(--trans-fast);
  z-index: 5;
}

.gallery-nav-btn:hover {
  background-color: var(--card-hover);
  border-color: var(--text);
}

.gallery-prev {
  left: 14px;
}

.gallery-next {
  right: 14px;
}

html[dir="rtl"] .gallery-prev {
  left: auto;
  right: 14px;
  transform: translateY(-50%) scaleX(-1);
}

html[dir="rtl"] .gallery-next {
  right: auto;
  left: 14px;
  transform: translateY(-50%) scaleX(-1);
}

/* Brief Block */
.popup-brief-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-brief-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.popup-brief-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

.popup-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

/* ==========================================================================
   Responsive Media Queries
   1440px / 1024px / 768px / 390px
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.2rem;
  }
  .services-grid,
  .labs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2)::after {
    display: none;
  }
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }
  .services-grid,
  .labs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-grid {
    grid-template-columns: 1fr;
  }
  .app-box {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .cta-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-item::after {
    display: none !important;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .services-grid,
  .labs-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .header-nav {
    display: none;
  }
  .popup-footer {
    flex-direction: column-reverse;
  }
  .popup-footer button {
    width: 100%;
  }
}
