@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700;800&display=swap");

:root {
  --profile-font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --profile-accent: #34a853;
  --profile-accent-deep: #1e6b38;
  --profile-accent-muted: rgba(52, 168, 83, 0.12);
  --profile-bg: #ffffff;
  --profile-surface: #eef5f0;
  --profile-card: #f8fbf9;
  --profile-text: #1a2e22;
  --profile-muted: #5a7363;
  --profile-border: rgba(26, 46, 34, 0.1);
  --profile-glow: rgba(52, 168, 83, 0.14);
  --profile-canvas: #f4faf6;
  --profile-page-w: 210mm;
  --profile-page-h: 297mm;
  --profile-pad-x: 18mm;
  --profile-pad-y: 16mm;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.page-profile {
  margin: 0;
  font-family: var(--profile-font);
  color: var(--profile-text);
  background: var(--profile-canvas);
  line-height: 1.65;
}

/* ── Toolbar (screen only) ── */
.profile-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--profile-border);
  backdrop-filter: blur(12px);
}

.profile-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.profile-toolbar-brand img {
  height: 2rem;
  width: auto;
}

.profile-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.profile-print-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--profile-muted);
  text-align: end;
}

.profile-print-site {
  display: none;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--profile-text);
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.profile-btn:hover {
  background: var(--profile-surface);
  border-color: rgba(52, 168, 83, 0.35);
}

.profile-btn--primary {
  color: #ffffff;
  background: var(--profile-accent);
  border-color: transparent;
}

.profile-btn--primary:hover {
  background: #2d9649;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 999px;
  gap: 2px;
}

.lang-switch-btn {
  min-width: 2.5rem;
  min-height: 2rem;
  padding: 0 0.55rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--profile-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch-btn.is-active {
  color: #ffffff;
  background: var(--profile-accent);
}

/* ── Document wrapper ── */
.profile-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1rem 4rem;
}

/* ── A4 Sheet ── */
.profile-sheet {
  position: relative;
  width: min(100%, var(--profile-page-w));
  min-height: var(--profile-page-h);
  padding: var(--profile-pad-y) var(--profile-pad-x);
  background: var(--profile-bg);
  border: 1px solid var(--profile-border);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(26, 46, 34, 0.04),
    0 16px 48px rgba(26, 46, 34, 0.08);
  overflow: hidden;
  page-break-after: always;
  break-after: page;
}

.profile-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, var(--profile-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(52, 168, 83, 0.06), transparent 50%);
  pointer-events: none;
}

.profile-sheet--cover {
  padding: 0;
}

.profile-sheet--cover::before {
  display: none;
}

.profile-sheet-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(var(--profile-page-h) - var(--profile-pad-y) * 2);
}

.profile-page-num {
  position: absolute;
  inset-block-end: 10mm;
  inset-inline-start: var(--profile-pad-x);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--profile-muted);
  letter-spacing: 0.05em;
}

.profile-footer-line {
  margin-block-start: auto;
  padding-block-start: 1rem;
  border-top: 1px solid var(--profile-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--profile-muted);
}

.profile-footer-line strong {
  color: var(--profile-accent);
  font-weight: 700;
}

/* ── Cover hero (نفس أسلوب ababeelqa.com) ── */
.profile-cover-hero {
  position: relative;
  height: 72mm;
  overflow: hidden;
  background: linear-gradient(180deg, #f0faf4 0%, #eef5f0 55%, #ffffff 100%);
}

.profile-cover-hero > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.profile-cover-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(240, 250, 244, 0.15) 0%, rgba(255, 255, 255, 0.35) 62%, var(--profile-bg) 100%);
}

.profile-sheet--cover .profile-sheet-inner {
  padding: 0 var(--profile-pad-x) var(--profile-pad-y);
  margin-block-start: -1rem;
}

.profile-logo-frame {
  padding: 0.85rem 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(52, 168, 83, 0.28);
  border-radius: 0.75rem;
  box-shadow:
    0 0 0 1px rgba(26, 46, 34, 0.04),
    0 12px 32px rgba(26, 46, 34, 0.1);
  backdrop-filter: blur(8px);
}

.profile-cover {
  justify-content: space-between;
  text-align: center;
}

.profile-cover-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.profile-cover-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--profile-muted);
  letter-spacing: 0.12em;
}

.profile-cover-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-block: 1.25rem;
}

.profile-cover-logo {
  width: min(200px, 50vw);
  height: auto;
  display: block;
}

.profile-cover-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--profile-accent);
  background: var(--profile-accent-muted);
  border: 1px solid rgba(52, 168, 83, 0.28);
  border-radius: 999px;
}

.profile-cover-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #1a2e22, var(--profile-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.profile-cover-subtitle {
  margin: 0;
  max-width: 28ch;
  font-size: 1.05rem;
  color: var(--profile-muted);
}

.profile-cover-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 360px;
  margin-block-start: 1rem;
}

.profile-cover-stat {
  padding: 0.85rem 0.5rem;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.5rem;
}

.profile-cover-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--profile-accent);
  line-height: 1.2;
}

.profile-cover-stat span {
  font-size: 0.68rem;
  color: var(--profile-muted);
}

.profile-cover-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--profile-muted);
}

.profile-cover-contact a {
  color: var(--profile-accent);
  text-decoration: none;
}

/* ── Section headers ── */
.profile-section-head {
  margin-block-end: 1.25rem;
}

.profile-section-tag {
  display: inline-block;
  margin-block-end: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--profile-accent);
}

.profile-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
}

.profile-section-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--profile-muted);
  max-width: 52ch;
}

.profile-section-head--compact {
  margin-block-end: 0.85rem;
}

/* ── Unified media frames ── */
.profile-media {
  position: relative;
  margin: 0 0 1rem;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid rgba(52, 168, 83, 0.18);
  background: linear-gradient(180deg, #f0faf4 0%, #ffffff 100%);
  box-shadow: 0 8px 24px rgba(26, 46, 34, 0.06);
}

.profile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.profile-media--wide {
  aspect-ratio: 3 / 2;
  max-height: 50mm;
}

.profile-media--short {
  max-height: 38mm;
}

.profile-media--ceo {
  aspect-ratio: 3 / 2;
  margin: 0;
  border-radius: 0.65rem 0.65rem 0 0;
  border: none;
  border-block-end: 1px solid rgba(52, 168, 83, 0.15);
  box-shadow: none;
}

/* ── Overview page ── */
.profile-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block-end: 1rem;
}

.profile-info-card {
  padding: 1rem;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.6rem;
}

.profile-info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--profile-accent);
}

.profile-info-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--profile-muted);
}

.profile-about-text {
  margin-block-end: 1rem;
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
  color: var(--profile-text);
  background: linear-gradient(135deg, rgba(52, 168, 83, 0.08), rgba(52, 168, 83, 0.04));
  border: 1px solid rgba(52, 168, 83, 0.18);
  border-radius: 0.6rem;
  border-inline-start: 3px solid var(--profile-accent);
}

.profile-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.profile-value {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: 0.45rem;
}

.profile-value-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--profile-accent);
}

.profile-value strong {
  display: block;
  margin-block-end: 0.15rem;
  font-size: 0.78rem;
}

.profile-value span {
  color: var(--profile-muted);
  font-size: 0.7rem;
}

/* ── Services ── */
.profile-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.profile-service {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 0.65rem;
  row-gap: 0.1rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.55rem;
  overflow: hidden;
}

.profile-service::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--profile-accent), rgba(52, 168, 83, 0.45));
  opacity: 0.55;
}

.profile-service-icon {
  grid-row: 1 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  align-self: center;
  color: var(--profile-accent);
  background: rgba(52, 168, 83, 0.1);
  border: 1px solid rgba(52, 168, 83, 0.22);
  border-radius: 0.45rem;
}

.profile-service-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.profile-service-num {
  grid-column: 2;
  grid-row: 1;
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--profile-accent);
  opacity: 0.8;
}

.profile-service h3 {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-service p {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  font-size: 0.72rem;
  color: var(--profile-muted);
  line-height: 1.55;
}

/* ── Why + CEO ── */
.profile-two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  flex: 1;
}

.profile-why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.profile-why-item {
  display: flex;
  gap: 0.55rem;
  padding: 0.6rem 0.7rem;
  font-size: 0.74rem;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.45rem;
}

.profile-why-check {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-block-start: 0.1rem;
  color: var(--profile-accent);
}

.profile-why-item strong {
  display: block;
  margin-block-end: 0.1rem;
  font-size: 0.78rem;
}

.profile-why-item span {
  color: var(--profile-muted);
  font-size: 0.7rem;
}

.profile-ceo {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: linear-gradient(160deg, var(--profile-card), var(--profile-surface));
  border: 1px solid rgba(52, 168, 83, 0.22);
  border-radius: 0.65rem;
  overflow: hidden;
}

.profile-ceo-body {
  padding: 0 1rem 1rem;
  margin-block-start: -1.25rem;
  position: relative;
  z-index: 1;
}

.profile-ceo-avatar {
  width: 3.25rem;
  height: 3.25rem;
  margin-block-end: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--profile-accent);
  background: var(--profile-card);
  border: 2px solid rgba(52, 168, 83, 0.35);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(26, 46, 34, 0.08);
}

.profile-ceo-name {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 800;
}

.profile-ceo-role {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--profile-accent);
  font-weight: 600;
}

.profile-ceo-quote {
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--profile-muted);
  border: none;
}

.profile-ceo-bio {
  margin: 0;
  font-size: 0.7rem;
  color: var(--profile-muted);
  line-height: 1.6;
}

/* ── Portfolio ── */
.profile-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.profile-project {
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(26, 46, 34, 0.1);
}

.profile-sheet--portfolio .profile-project-img {
  position: relative;
}

.profile-sheet--portfolio .profile-project-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(26, 46, 34, 0.08) 100%);
  pointer-events: none;
}

.profile-project-img {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  aspect-ratio: 3 / 4;
  padding: 0.4rem 0.4rem 0;
  overflow: hidden;
  background: linear-gradient(180deg, #eef5f0 0%, #f8fbf9 100%);
}

.profile-project-img img {
  width: auto;
  max-width: 78%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  border-radius: 0.4rem 0.4rem 0 0;
  box-shadow: 0 6px 20px rgba(26, 46, 34, 0.12);
}

.profile-project-body {
  padding: 0.55rem 0.65rem 0.65rem;
}

.profile-project-tag {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--profile-accent);
}

.profile-project h3 {
  margin: 0.15rem 0 0.1rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-project p {
  margin: 0;
  font-size: 0.64rem;
  color: var(--profile-muted);
  line-height: 1.45;
}

.profile-projects-note {
  margin-block-start: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  text-align: center;
  color: var(--profile-muted);
  background: var(--profile-surface);
  border-radius: 0.4rem;
}

/* Portfolio — صفحة تسويقية واحدة (6 مشاريع في شبكة 3×2) */
.profile-sheet--portfolio .profile-sheet-inner {
  min-height: 0;
  gap: 0.65rem;
}

.profile-sheet--portfolio .profile-footer-line,
.profile-sheet--portfolio .profile-projects-note {
  margin-block-start: 0.5rem;
}

.profile-sheet--portfolio .profile-project-img {
  aspect-ratio: 3 / 3.4;
  max-height: 54mm;
}

/* ── Process ── */
.profile-process {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.profile-step {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.45rem;
}

.profile-step-num {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--profile-accent);
  border-radius: 50%;
}

.profile-step h3 {
  margin: 0 0 0.1rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.profile-step p {
  margin: 0;
  font-size: 0.68rem;
  color: var(--profile-muted);
}

.profile-step-duration {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--profile-accent);
  white-space: nowrap;
}

/* ── Tech + Contact closing ── */
.profile-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-end: 1rem;
}

.profile-tech-pill {
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--profile-text);
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 999px;
}

.profile-closing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block-start: auto;
}

.profile-closing-card {
  padding: 1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--profile-border);
}

.profile-closing-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.profile-closing-card-copy {
  flex: 1;
  min-width: 0;
}

.profile-closing-qr {
  flex-shrink: 0;
  margin: 0;
  padding: 0.3rem;
  background: #fff;
  border-radius: 0.4rem;
  border: 1px solid rgba(26, 46, 34, 0.1);
  box-shadow: 0 1px 4px rgba(26, 46, 34, 0.06);
}

.profile-closing-qr img {
  display: block;
  width: 72px;
  height: 72px;
}

.profile-closing-card--games {
  background: linear-gradient(135deg, rgba(255, 210, 63, 0.1), rgba(52, 168, 83, 0.08));
  border-color: rgba(52, 168, 83, 0.22);
}

.profile-closing-card--contact {
  background: linear-gradient(135deg, rgba(52, 168, 83, 0.12), rgba(52, 168, 83, 0.05));
  border-color: rgba(52, 168, 83, 0.28);
}

.profile-closing-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 800;
}

.profile-closing-card p {
  margin: 0 0 0.5rem;
  font-size: 0.74rem;
  color: var(--profile-muted);
}

.profile-closing-card a {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--profile-accent);
  text-decoration: none;
}

/* ── End page (contact & closing) ── */
.profile-sheet--end::before {
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, var(--profile-glow), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(52, 168, 83, 0.07), transparent 50%);
}

.profile-end {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.profile-end-brandbar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-end-logo {
  flex-shrink: 0;
  width: 5.5rem;
  height: auto;
}

.profile-end-brandcopy {
  flex: 1;
  min-width: 0;
}

.profile-end-title {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.profile-end-lead {
  margin: 0;
  font-size: 0.78rem;
  color: var(--profile-muted);
  max-width: 42ch;
}

.profile-end-banner {
  margin: 0;
  height: 46mm;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.5rem 0.75rem 0;
  border-radius: 0.65rem;
  border: 1px solid rgba(52, 168, 83, 0.2);
  background: linear-gradient(180deg, #f0faf4 0%, #ffffff 100%);
  overflow: hidden;
}

.profile-end-banner img {
  display: block;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.profile-end-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.profile-end-channel {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: inherit;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 0.55rem;
}

.profile-end-channel--primary {
  background: linear-gradient(135deg, rgba(52, 168, 83, 0.14), rgba(52, 168, 83, 0.05));
  border-color: rgba(52, 168, 83, 0.3);
}

.profile-end-channel-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--profile-muted);
}

.profile-end-channel-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--profile-accent);
  direction: ltr;
  unicode-bidi: isolate;
  word-break: break-word;
}

.profile-end-channel-note {
  font-size: 0.66rem;
  line-height: 1.45;
  color: var(--profile-muted);
}

.profile-closing--end {
  margin-block-start: 0;
}

.profile-end-footer {
  margin-block-start: auto;
  padding-block-start: 0.75rem;
  border-top: 1px solid var(--profile-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--profile-muted);
}

.profile-end-brand strong {
  color: var(--profile-accent);
  font-weight: 800;
  font-size: 0.95rem;
}

/* ── Print: نفس ما على الشاشة — ألوان وصور كاملة (مثل ababeelqa.com) ── */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 10mm 18mm;
  }

  html {
    color-scheme: light;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body.page-profile {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--profile-canvas) !important;
    color: var(--profile-text) !important;
  }

  .profile-toolbar {
    display: none !important;
  }

  .profile-print-hint {
    display: none !important;
  }

  .profile-print-site {
    display: block !important;
    position: fixed;
    bottom: 3mm;
    left: 0;
    right: 0;
    z-index: 10000;
    text-align: center;
    font-family: var(--profile-font);
    font-size: 7.5pt;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #5a7363 !important;
    pointer-events: none;
  }

  .profile-doc {
    display: block;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .profile-sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    background: var(--profile-bg) !important;
    color: var(--profile-text) !important;
    box-sizing: border-box;
  }

  .profile-sheet-inner {
    flex: 0 1 auto;
    min-height: 0 !important;
    height: auto;
    padding: 4mm 8mm 2mm;
  }

  .profile-sheet--cover .profile-sheet-inner {
    padding: 0 var(--profile-pad-x) 3mm;
  }

  /* صفحة الخدمات: بدون بانر + شبكة 3 أعمدة */
  .profile-sheet--services .profile-media {
    display: none !important;
  }

  .profile-sheet--services .profile-section-desc {
    margin-block-end: 0.25rem !important;
  }

  .profile-sheet--services .profile-services {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
  }

  .profile-sheet--services .profile-service {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto;
    padding: 0.38rem 0.45rem !important;
  }

  .profile-sheet--services .profile-service-icon {
    display: none !important;
  }

  .profile-sheet--services .profile-service-num {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .profile-sheet--services .profile-service h3 {
    grid-column: 1 !important;
    grid-row: 2 !important;
    font-size: 0.7rem !important;
  }

  .profile-sheet--services .profile-service p {
    grid-column: 1 !important;
    grid-row: 3 !important;
    font-size: 0.58rem !important;
    line-height: 1.35 !important;
  }

  .profile-sheet--end .profile-sheet-inner {
    gap: 0.55rem;
    padding-block: 2mm 3mm;
  }

  .profile-end-brandbar {
    gap: 0.65rem !important;
  }

  .profile-end-logo {
    width: 4.2rem !important;
  }

  .profile-end-title {
    font-size: 1.05rem !important;
  }

  .profile-end-lead {
    font-size: 0.68rem !important;
  }

  .profile-end-banner {
    height: 30mm !important;
    padding: 0.3rem 0.45rem 0 !important;
  }

  .profile-end-channels {
    gap: 0.45rem !important;
  }

  .profile-end-channel {
    padding: 0.55rem 0.65rem !important;
  }

  .profile-end-channel-value {
    font-size: 0.74rem !important;
  }

  .profile-end-channel-note {
    font-size: 0.6rem !important;
  }

  .profile-closing--end {
    gap: 0.45rem !important;
  }

  .profile-end-footer {
    margin-block-start: 0.35rem !important;
    padding-block-start: 0.5rem !important;
  }

  /* ضغط الصفحات الداخلية لتبقى كل ورقة = صفحة واحدة */
  .profile-section-head {
    margin-block-end: 0.55rem !important;
  }

  .profile-section-title {
    font-size: 1.1rem !important;
  }

  .profile-section-desc {
    font-size: 0.68rem !important;
  }

  .profile-media--wide {
    aspect-ratio: 3 / 2 !important;
    max-height: 32mm !important;
    height: 32mm !important;
    margin-block-end: 0.4rem !important;
  }

  .profile-media--short {
    max-height: 32mm !important;
    height: 32mm !important;
  }

  .profile-media--ceo {
    aspect-ratio: 3 / 2 !important;
    height: 32mm !important;
    max-height: 32mm !important;
  }

  .profile-about-text {
    font-size: 0.68rem !important;
    margin-block-end: 0.5rem !important;
  }

  .profile-overview-grid {
    gap: 0.45rem !important;
    margin-block-end: 0.5rem !important;
  }

  .profile-info-card {
    padding: 0.5rem 0.6rem !important;
  }

  .profile-info-card h3 {
    font-size: 0.75rem !important;
  }

  .profile-info-card p {
    font-size: 0.64rem !important;
  }

  .profile-values {
    gap: 0.35rem !important;
  }

  .profile-value {
    padding: 0.4rem 0.5rem !important;
  }

  .profile-services {
    gap: 0.4rem !important;
  }

  .profile-service {
    padding: 0.45rem 0.55rem !important;
  }

  .profile-service h3 {
    font-size: 0.76rem !important;
  }

  .profile-service p {
    font-size: 0.62rem !important;
    line-height: 1.4 !important;
  }

  .profile-two-col {
    gap: 0.55rem !important;
  }

  .profile-why-item {
    padding: 0.4rem 0.5rem !important;
  }

  .profile-why-item strong {
    font-size: 0.7rem !important;
  }

  .profile-why-item span {
    font-size: 0.62rem !important;
  }

  .profile-media--ceo {
    height: 32mm !important;
    max-height: 32mm !important;
  }

  .profile-ceo-body {
    padding: 0 0.65rem 0.65rem !important;
    margin-block-start: -0.75rem !important;
  }

  .profile-ceo-quote,
  .profile-ceo-bio {
    font-size: 0.62rem !important;
  }

  .profile-footer-line {
    margin-block-start: 0.65rem !important;
    padding-block-start: 0.55rem !important;
    padding-block-end: 0;
    flex-shrink: 0;
  }

  .profile-page-num {
    position: static !important;
    display: block;
    flex-shrink: 0;
    margin: 0.35rem 8mm 0;
    padding-block-end: 0;
    inset: auto !important;
  }

  /* ضغط المحتوى الكثيف ليتسع في صفحة A4 واحدة */
  .profile-process {
    gap: 0.45rem !important;
  }

  .profile-step {
    padding: 0.5rem 0.65rem !important;
  }

  .profile-step h3 {
    font-size: 0.82rem !important;
  }

  .profile-step p {
    font-size: 0.68rem !important;
    line-height: 1.45 !important;
  }

  .profile-tech-row {
    gap: 0.35rem !important;
    margin-block-end: 0.75rem !important;
  }

  .profile-tech-pill {
    font-size: 0.62rem !important;
    padding: 0.2rem 0.5rem !important;
  }

  .profile-closing {
    gap: 0.65rem !important;
    margin-block-end: 0 !important;
  }

  .profile-closing-card {
    padding: 0.65rem 0.75rem !important;
  }

  .profile-closing-card h3 {
    font-size: 0.88rem !important;
  }

  .profile-closing-card a {
    color: var(--profile-accent) !important;
    text-decoration: none !important;
    pointer-events: none;
  }

  .profile-end-channel {
    text-decoration: none !important;
    color: inherit !important;
  }

  .profile-closing-card p {
    font-size: 0.68rem !important;
  }

  .profile-closing-qr {
    padding: 0.2rem !important;
  }

  .profile-closing-qr img {
    width: 58px !important;
    height: 58px !important;
  }

  .profile-section-head {
    margin-block-end: 0.75rem !important;
  }

  .profile-section-title {
    font-size: 1.2rem !important;
  }

  .profile-sheet::before,
  .profile-cover-hero-overlay,
  .profile-cover-hero > img,
  .profile-media img,
  .profile-project-img img,
  .profile-about-text,
  .profile-info-card,
  .profile-value,
  .profile-service,
  .profile-why-item,
  .profile-ceo,
  .profile-project,
  .profile-step,
  .profile-tech-pill,
  .profile-closing-card,
  .profile-end-channel,
  .profile-end-banner,
  .profile-end-footer,
  .profile-cover-stat,
  .profile-logo-frame,
  .profile-service-icon,
  .profile-step-num,
  .profile-cover-badge {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .profile-closing-card,
  .profile-end-channel,
  .profile-end-banner,
  .profile-end-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .profile-sheet--cover {
    padding: 0;
  }

  .profile-sheet--cover .profile-sheet-inner {
    padding-inline: var(--profile-pad-x);
    padding-block-end: 4mm;
  }

  .profile-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .profile-logo-frame {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.96) !important;
  }

  .profile-cover-title {
    background: linear-gradient(135deg, #1a2e22, #34a853) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
  }

  /* ── الصور: نفس الأبعاد والقص كما على الشاشة ── */
  .profile-cover-hero {
    display: block !important;
    height: 72mm !important;
    min-height: 72mm !important;
    max-height: 72mm !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, #f0faf4 0%, #eef5f0 55%, #ffffff 100%) !important;
  }

  .profile-cover-hero > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center bottom !important;
  }

  .profile-cover-hero-overlay {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
  }

  .profile-cover-logo,
  .profile-toolbar-brand img {
    height: auto !important;
    max-width: 100% !important;
  }

  .profile-media {
    display: block !important;
    overflow: hidden !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .profile-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .profile-project-img {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: hidden !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .profile-project-img img {
    display: block !important;
    width: auto !important;
    max-width: 78% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: top center !important;
    box-shadow: 0 4px 14px rgba(26, 46, 34, 0.1) !important;
  }

  /* أعمالنا: صفحة تسويقية واحدة — 6 مشاريع في شبكة 3×2 */
  .profile-sheet--portfolio .profile-sheet-inner {
    min-height: 0 !important;
    gap: 0.35rem !important;
  }

  .profile-sheet--portfolio .profile-section-head {
    margin-block-end: 0.3rem !important;
  }

  .profile-sheet--portfolio .profile-section-title {
    font-size: 1rem !important;
  }

  .profile-sheet--portfolio .profile-section-desc {
    font-size: 0.64rem !important;
    line-height: 1.35 !important;
    max-width: none !important;
  }

  .profile-sheet--portfolio .profile-projects {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
  }

  .profile-sheet--portfolio .profile-project-img {
    aspect-ratio: auto !important;
    height: 44mm !important;
    max-height: 44mm !important;
    padding: 0.2rem 0.2rem 0 !important;
  }

  .profile-sheet--portfolio .profile-project-img img {
    max-width: 82% !important;
  }

  .profile-sheet--portfolio .profile-project-body {
    padding: 0.28rem 0.35rem 0.32rem !important;
  }

  .profile-sheet--portfolio .profile-project-tag {
    font-size: 0.52rem !important;
  }

  .profile-sheet--portfolio .profile-project h3 {
    font-size: 0.66rem !important;
  }

  .profile-sheet--portfolio .profile-project p {
    font-size: 0.54rem !important;
    line-height: 1.32 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .profile-sheet--portfolio .profile-projects-note {
    margin-block-start: 0.28rem !important;
    padding: 0.28rem 0.4rem !important;
    font-size: 0.56rem !important;
  }

  .profile-sheet--portfolio .profile-footer-line {
    margin-block-start: 0.3rem !important;
    padding-block-start: 0.35rem !important;
  }

  figure,
  .profile-project,
  .profile-footer-line,
  .profile-end-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  img {
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    -webkit-filter: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a[href]::after {
    content: none !important;
  }
}

@media (max-width: 48rem) {
  .profile-overview-grid,
  .profile-two-col,
  .profile-closing,
  .profile-services,
  .profile-end-channels {
    grid-template-columns: 1fr;
  }

  .profile-end-brandbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-end-banner {
    height: auto;
    min-height: 12rem;
  }

  .profile-media--wide {
    max-height: 40vw;
  }

  .profile-cover-hero {
    height: 38vw;
    max-height: 62mm;
  }

  .profile-projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-cover-stats {
    grid-template-columns: 1fr;
  }
}
