/* contact (theme contact-2 sec-1-contact + contact-1 sec-4-about + contact-2 moving gallery), /contact/ and
   /en/contact/. One file for both directions: logical properties (inline-start/end) and [dir] where a side matters. */

/* ---------------------------------------------------------------- panel 1: head */
.shf-ct { padding: 100px 0 110px; }
.shf-ct__tag { margin-bottom: 14px; }
html[dir="rtl"] .shf-ct h1.fz-ds-1 { line-height: 1.2 !important; }
.shf-ct__title { padding-bottom: 6px; }
.shf-ct__star { color: var(--at-neutral-900); line-height: 0; margin-bottom: 26px; }
.shf-ct__star .icon { line-height: 0; }
.shf-ct__star svg { width: 84px; height: 84px; }
.shf-ct__lead { max-width: 440px; line-height: 1.6 !important; color: var(--at-neutral-900); text-wrap: pretty; }

/* ---------------------------------------------------------------- panel 1: the ways in (contact-2 office blocks) */
.shf-ct__body { margin-top: 64px; }
.shf-ct-ways { gap: 30px 40px !important; }
@media (min-width: 768px) { .shf-ct-ways > .shf-ct-way { flex: 1 1 0; min-width: 0; } }
.shf-ct-way__icon { flex: 0 0 auto; color: var(--at-neutral-900); line-height: 0; }
.shf-ct-way__icon svg { width: 40px; height: 40px; }
.shf-ct-way__body { min-width: 0; }
.shf-ct-way__title { margin: 0 0 10px; font-size: 19px !important; line-height: 1.35; color: var(--at-neutral-900); }
.shf-ct-way__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.shf-ct-way__value {
  display: inline-block; font-size: clamp(20px, 1.6vw, 24px); font-weight: 500; line-height: 1.35; color: var(--at-neutral-900);
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: .28em;
  transition: text-decoration-color .25s ease;
}
.shf-ct-way__value:hover, .shf-ct-way__value:focus-visible { color: var(--at-neutral-900); text-decoration-color: currentColor; }
.shf-ct-way__value:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 4px; border-radius: 4px; }
html[lang="en"] .shf-ct-way__value { letter-spacing: -0.02em; }
.shf-ct-way__cta { padding-top: 18px; }

/* the address: the home's dark service card (.at-service-card.card-1). It keeps its own height and ends level with the
   send button (the row is contact-2's align-items-end): stretched to the form's height, the dark picture outweighed the
   form. The picture's point of light sits in the card's upper part, clear of the text at its foot. */
.shf-ct__side { display: flex; flex-direction: column; }
.shf-ct-place.at-service-card { flex: 0 0 auto; isolation: isolate; height: clamp(440px, 34vw, 540px); max-height: none; border-radius: 24px !important; background: #0b0d10; }
.shf-ct-place .shf-ct-place__img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 92%; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.shf-ct-place.card-1::before { opacity: 1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .58) 60%, rgba(0, 0, 0, .88) 100%); }
.shf-ct-place__title, .shf-ct-place__addr, .shf-ct-place__map { text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }
.shf-ct-place .shf-ct-place__body { z-index: 1; }
.shf-ct-place__icon { line-height: 0; color: #fff; }
.shf-ct-place__icon svg { width: 34px; height: 34px; }
.shf-ct-place__title { font-size: 22px !important; line-height: 1.3; }
.shf-ct-place__addr { font-size: 17px; line-height: 1.8; color: rgba(255, 255, 255, .86) !important; text-wrap: pretty; }
.shf-ct-place__map { gap: 10px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .55); }
.shf-ct-place__map:hover, .shf-ct-place__map:focus-visible { color: #fff; border-bottom-color: #fff; }
.shf-ct-place__map:focus-visible { outline-color: #fff; }
@media (hover: hover) and (pointer: fine) { .shf-ct-place:hover .shf-ct-place__img { transform: scale(1.04); } }

/* copy button: the language pill's shape; both labels share one grid cell, so the pill keeps its width when it says
   «تم النسخ» / "Copied" (no jump of the line) */
.shf-ct-copy {
  display: inline-grid; place-items: center; height: 34px; padding: 0 14px; border-radius: 50px;
  border: 1px solid rgba(127, 127, 127, .35); background: transparent; color: var(--at-neutral-900);
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; transition: border-color .25s ease;
}
.shf-ct-copy[hidden] { display: none; }
/* its place is kept from the first paint (no shift); it shows once js/contact.js has found the clipboard */
.shf-ct-copy:not(.is-ready) { visibility: hidden; }
.shf-ct-copy > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.shf-ct-copy:hover { border-color: rgba(127, 127, 127, .7); }
.shf-ct-copy:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 3px; }
.shf-ct-copy .shf-ct-copy__done, .shf-ct-copy.is-done .shf-ct-copy__idle { visibility: hidden; }
.shf-ct-copy.is-done { border-color: var(--at-neutral-900); }
.shf-ct-copy.is-done .shf-ct-copy__done { visibility: visible; }
/* 992-1199px: the head's left column is 8 of 12 columns; the two blocks share a line only where both fit at their own
   width, else the phone block goes under the email block (the English WhatsApp pill ran 12px from the lead column) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .shf-ct-ways { flex-wrap: wrap; }
  .shf-ct-ways > .shf-ct-way { flex: 1 0 auto; }
}
/* from 1200px the email block takes the width of its content (the address and its pill on one line) and the phone block
   the rest of the row, so the phone block starts next to it and its WhatsApp pill ends well clear of the lead column */
@media (min-width: 1200px) {
  .shf-ct-ways > .shf-ct-way:first-child { flex: 0 0 auto; }
  .shf-ct-ways > .shf-ct-way:last-child { flex: 1 1 0; }
}

/* the theme's dark pill (WhatsApp, as on the current page) and the round send button.
   Focus: the theme's `a:focus { color: inherit }` (0,1,1) beats `.at-btn { color: #FEFEFE }` (0,1,0), so a focused
   WhatsApp pill (keyboard, or a click that opened WhatsApp in a new tab and the visitor came back) drew its dark label on
   its dark fill: an empty black capsule. The label keeps its colour in every state.
   Dark mode: the theme's #1D1D1D pills all but vanished on the #0C0C0C panel (1.16:1). They turn light with a dark label,
   as the home's work deck does with its pills (sections.css), and stay the strongest marks on the page in both modes.
   (The dark rules carry .shf-ct, 0,4,0: site.css's focus rule for the dark pills weighs 0,1,1, so they win focused too.) */
.shf-ct-wa:focus { color: #FEFEFE; }
[data-bs-theme=dark] .shf-ct .shf-ct-wa, [data-bs-theme=dark] .shf-ct .shf-ct-wa:hover, [data-bs-theme=dark] .shf-ct .shf-ct-wa:focus,
[data-bs-theme=dark] .shf-ct .shf-ct-send, [data-bs-theme=dark] .shf-ct .shf-ct-send:hover, [data-bs-theme=dark] .shf-ct .shf-ct-send:focus { background-color: #FEFEFE; color: #1D1D1D; }
.shf-ct-wa { padding: 15px 22px; font-size: 15px; gap: 10px; white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1399.98px) { .shf-ct-wa { padding: 14px 18px; font-size: 14px; gap: 8px; } }
.shf-ct-wa__ico { display: inline-flex; line-height: 0; }
.shf-ct-wa__ico .shf-ico { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- panel 1: the form (theme sec-4-about-form) */
.shf-ct-form__title { margin: 0 0 34px; font-size: clamp(28px, 2.3vw, 40px); font-weight: 600; line-height: 1.2; color: var(--at-neutral-900); }
html[lang="en"] .shf-ct-form__title { letter-spacing: -0.03em; }
/* the header's «ابدأ مشروعك» brings the visitor here (js/contact.js) and moves the focus to this title (tabindex=-1): no
   ring for a mouse click, a quiet one after the keyboard */
.shf-ct-form-wrap { scroll-margin-top: 110px; }
.shf-ct-form__title:focus { outline: none; }
.shf-ct-form__title:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 8px; border-radius: 4px; }
#formError.shf-form-error { margin-bottom: 30px; }
/* the resting line of a field is its only outline (the brief alone has a placeholder): 3.4:1 on the panel in light mode,
   3.7:1 in dark (WCAG 1.4.11 asks 3:1; the theme's neutral-300 gave 2:1 and 1.9:1). Hover darkens it, focus doubles it
   in the text colour. */
.shf-ct-form { --shf-ct-gap-y: 34px; --shf-ct-line: #8A8A8A; }
[data-bs-theme=dark] .shf-ct-form { --shf-ct-line: #6B6B6B; }
.shf-ct-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--shf-ct-gap-y) 36px; align-items: start; }
.shf-ct-field { display: flex; flex-direction: column; min-width: 0; }
.shf-ct-field--full { grid-column: 1 / -1; }
.shf-ct-field__label { display: block; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--at-neutral-900); cursor: pointer; }
html[lang="en"] .shf-ct-field__label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.shf-ct-field__req { margin-inline-start: 2px; color: var(--at-neutral-500); }
/* the theme's underlined field: the value in full colour, the line darker on hover, two pixels on focus */
.shf-ct-form .sec-4-about-form__input {
  padding: 12px 0 14px; font-size: 18px; line-height: 1.5; color: var(--at-neutral-900); letter-spacing: 0;
  border-bottom: 1px solid var(--shf-ct-line); transition: border-color .25s ease, box-shadow .25s ease;
}
html[lang="en"] .shf-ct-form .sec-4-about-form__input { letter-spacing: -0.01em; }
.shf-ct-form .sec-4-about-form__input:hover { border-bottom-color: var(--at-neutral-500); }
.shf-ct-form .sec-4-about-form__input:focus { border-bottom-color: var(--at-neutral-900); box-shadow: 0 1px 0 0 var(--at-neutral-900); }
/* the theme sets every placeholder to 14px (*::placeholder); here it reads like the field, a step smaller */
.shf-ct-form .sec-4-about-form__input::placeholder { font-size: 16px; color: var(--at-neutral-500); opacity: 1; }
.shf-ct-form .sec-4-about-form__textarea { min-height: 150px; resize: vertical; padding-top: 12px; line-height: 1.65; }
/* error: the line turns red (site.css .shf-invalid for fields lead.php sent back) and a line of text says why */
.shf-ct-form .sec-4-about-form__input[aria-invalid="true"] { border-bottom-color: #dc2626; box-shadow: 0 1px 0 0 #dc2626; }
.shf-ct-field__err { margin: 9px 0 0; font-size: 14px; font-weight: 500; line-height: 1.5; color: #b91c1c; }
.shf-ct-field__err[hidden] { display: none; }
[data-bs-theme=dark] .shf-ct-field__err { color: #fca5a5; }
[data-bs-theme=dark] .shf-ct-form .sec-4-about-form__input[aria-invalid="true"] { border-bottom-color: #f87171; box-shadow: 0 1px 0 0 #f87171; }

/* the two selects: no native arrow, the theme's chevron at the end of the line */
.shf-ct-select { position: relative; }
.shf-ct-select__input { -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; padding-inline-end: 30px !important; background: transparent; border-radius: 0; text-overflow: ellipsis; }
.shf-ct-select__input option { color: var(--at-neutral-900); background-color: var(--at-neutral-0); }
.shf-ct-select__chev { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); display: inline-flex; line-height: 0; color: var(--at-neutral-900); pointer-events: none; }
.shf-ct-select__chev svg { width: 18px; height: 18px; }

/* the Hawih note under the selects (aria-live slot; with the note hidden the slot takes no room, not even its gap) */
.shf-ct-nudge-slot:has(> .shf-ct-nudge[hidden]) { margin-top: calc(-1 * var(--shf-ct-gap-y)); }
.shf-ct-nudge { padding: 18px 20px; border-radius: 18px; background: var(--at-neutral-50); border: 1px solid var(--at-neutral-100); }
.shf-ct-nudge[hidden] { display: none; }
.shf-ct-nudge__txt { margin: 0 0 10px; font-size: 16px; line-height: 1.7; color: var(--at-neutral-900); }
.shf-ct-nudge__link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--at-neutral-900); text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1px; }
.shf-ct-nudge__link:hover { color: var(--at-neutral-900); }
.shf-ct-nudge__link span { display: inline-flex; line-height: 0; }

.shf-ct-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 46px 0 0; }
/* the page's main action: a step larger than the header's pill */
.shf-ct-send { padding: 22px 38px; font-size: 18px; gap: 10px; }
.shf-ct-form.is-sending .shf-ct-send { opacity: .6; cursor: progress; }
.shf-ct-form__note { margin: 0; font-size: 15px; }

/* ---------------------------------------------------------------- panel 2: the products strip (contact-2 moving gallery) */
.shf-ct-work { padding: 100px 0 90px; }
.shf-ct-work__bar { margin-bottom: 40px; }
.shf-ct-work__bar > span { font-size: 16px; letter-spacing: .04em; }
html[dir="rtl"] .shf-ct-work__bar > span { letter-spacing: 0; }
.shf-ct-work__title { font-size: clamp(34px, 4.2vw, 68px); font-weight: 600; line-height: 1.15 !important; }
html[lang="en"] .shf-ct-work__title { letter-spacing: -0.04em; }
.shf-ct-gallery { margin-top: 60px; overflow: hidden; }
.shf-ct-gallery .shf-ct-gallery__list { display: flex; align-items: flex-end; width: max-content; margin: 0; padding: 0 6px; list-style: none; }
.shf-ct-gallery .shf-ct-gallery__item { flex: 0 0 auto; }
.shf-ct-gallery__link { position: relative; display: block; overflow: hidden; border-radius: 18px; background: var(--at-neutral-50); }
.shf-ct-gallery .shf-ct-gallery__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.shf-ct-gallery__chip {
  position: absolute; inset-inline-start: 12px; bottom: 12px; display: inline-flex; align-items: baseline; gap: 6px; max-width: calc(100% - 24px);
  padding: 7px 14px; border-radius: 50px; background: rgba(254, 254, 254, .92); color: #1D1D1D;
  font-size: 14px; line-height: 1.3; white-space: nowrap; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .45);
}
.shf-ct-gallery__name { font-weight: 700; }
.shf-ct-gallery__meta { color: #585959; overflow: hidden; text-overflow: ellipsis; }
.shf-ct-gallery__link:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 3px; }
/* where the page scrolls natively, the browser brings a focused picture in clear of the 80px bottom blur strip */
.shf-ct-gallery__link { scroll-margin-block: 96px; }
@media (hover: hover) and (pointer: fine) {
  .shf-ct-gallery__link:hover .shf-ct-gallery__img { transform: scale(1.045); }
}
/* touch screens (main.js: html.shf-native-scroll): a strip you swipe, tiles of one size */
.shf-native-scroll .shf-ct-gallery { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shf-native-scroll .shf-ct-gallery::-webkit-scrollbar { display: none; }
.shf-native-scroll .shf-ct-gallery .shf-ct-gallery__list { padding: 0 10px; }
.shf-native-scroll .shf-ct-gallery .shf-ct-gallery__item { width: 46vw; padding: 0 6px; scroll-snap-align: start; }
/* the still grid: for reduced motion, and while a keyboard user is inside the strip (js/contact.js .is-still), so a
   focused picture is never carried off the screen (the home's product wall does the same) */
.shf-ct-gallery.is-still { overflow: visible; }
.shf-ct-gallery.is-still .shf-ct-gallery__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 20px; width: auto; padding: 0 12px; transform: none !important; }
.shf-ct-gallery.is-still .shf-ct-gallery__item { width: auto !important; padding: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  .shf-ct-gallery, .shf-native-scroll .shf-ct-gallery { overflow: visible; scroll-snap-type: none; }
  .shf-ct-gallery .shf-ct-gallery__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 20px; width: auto; padding: 0 12px; transform: none !important; }
  .shf-ct-gallery .shf-ct-gallery__item, .shf-native-scroll .shf-ct-gallery .shf-ct-gallery__item { width: auto !important; padding: 0 !important; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767.98px) {
  .shf-ct-gallery .shf-ct-gallery__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* two tiles to a row leave the chip room for the name only ("Kanaf EdTech · 2…" was cut) */
  .shf-ct-gallery .shf-ct-gallery__meta { display: none; }
}

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1199.98px) {
  .shf-ct__body { margin-top: 56px; }
}
@media (max-width: 991.98px) {
  .shf-ct { padding: 76px 0 80px; }
  .shf-ct__body { margin-top: 40px; }
  .shf-ct-place.at-service-card { min-height: 440px; }
  .shf-ct-work { padding: 76px 0 70px; }
}
@media (max-width: 767.98px) {
  .shf-ct { padding: 60px 0 56px; }
  .shf-ct__lead { font-size: 18px !important; }
  .shf-ct-way.gap-4 { gap: 18px !important; }
  .shf-ct-place .shf-ct-place__img { object-position: 50% 100%; }
  .shf-ct-place.card-1::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, .62) 48%, rgba(0, 0, 0, .9) 100%); }
  .shf-ct-way__icon svg { width: 32px; height: 32px; }
  .shf-ct-form__title { margin-bottom: 26px; }
  .shf-ct-work { padding: 60px 0 50px; }
  .shf-ct-work__bar { margin-bottom: 28px !important; }
  .shf-ct-gallery { margin-top: 36px; }
  .shf-native-scroll .shf-ct-gallery .shf-ct-gallery__item { width: 74vw; }
}
@media (max-width: 575.98px) {
  .shf-ct-form { --shf-ct-gap-y: 26px; }
  .shf-ct-form__grid { grid-template-columns: 1fr; }
  .shf-ct-form__actions { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 36px; }
  .shf-ct-send { width: 100%; }
  .shf-ct-form__note { text-align: center; }
  .shf-ct-gallery__chip { font-size: 13px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .shf-ct-gallery .shf-ct-gallery__img, .shf-ct-way__value, .shf-ct-copy, .shf-ct-form .sec-4-about-form__input { transition: none; }
}
