/* =========================================================
   Work gallery captions + floating WhatsApp "Order now" button
   (loaded last on the home page; also used by /digital)
   ========================================================= */

/* ---- work gallery: readable captions (white on a dark scrim), always visible ---- */
html .work__item::after { background: linear-gradient(180deg, transparent 38%, rgba(6,10,28,.55) 62%, rgba(6,10,28,.92) 100%) !important; z-index: 1; pointer-events: none; }
html .work__item figcaption { z-index: 2 !important; bottom: 16px !important; inset-inline: 18px auto !important; max-width: calc(100% - 36px);
  color: #fff !important; -webkit-text-fill-color: #fff !important; opacity: 1 !important; transform: none !important;
  font-size: clamp(15px, 1.25vw, 19px) !important; line-height: 1.3; text-shadow: 0 1px 12px rgba(0,0,0,.45); }
html .work__item figcaption * { color: inherit !important; -webkit-text-fill-color: currentColor !important; }
html .work__item figcaption::before { flex: none; background: #8fd3ff !important; }

/* ---- floating WhatsApp (inline-start corner; the robot owns inline-end) ---- */
.wa-fab { position: fixed; z-index: 69; bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-start: 18px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.wa-fab__btn { pointer-events: auto; position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
  box-shadow: 0 12px 28px -8px rgba(37,211,102,.65), 0 4px 12px rgba(0,0,0,.18); transition: transform .2s ease, box-shadow .2s ease; }
.wa-fab__btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 34px -8px rgba(37,211,102,.8), 0 4px 12px rgba(0,0,0,.2); }
.wa-fab__btn:active { transform: scale(.96); }
.wa-fab__btn:focus-visible { outline: 3px solid #0b1636; outline-offset: 3px; }
.wa-fab__btn svg { width: 30px; height: 30px; fill: currentColor; }
.wa-fab__btn::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: waPulse 2.4s ease-out infinite; pointer-events: none; }
@keyframes waPulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.55); opacity: 0; } }
.wa-fab__tip { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 6px; max-width: min(240px, calc(100vw - 110px)); padding: 10px 14px; border-radius: 14px;
  background: #fff; color: #0b1636; box-shadow: 0 14px 34px -12px rgba(15,23,42,.45); border: 1px solid rgba(15,23,42,.08);
  opacity: 0; transform: translateX(-8px) scale(.96); visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
html[dir="rtl"] .wa-fab__tip { transform: translateX(8px) scale(.96); }
.wa-fab.is-tip .wa-fab__tip { opacity: 1; transform: none; visibility: visible; transition: opacity .25s ease, transform .25s ease; }
.wa-fab__tip a { display: block; color: inherit; text-decoration: none; line-height: 1.3; }
.wa-fab__tip b { display: block; font-size: 15px; font-weight: 800; color: #0b1636; }
.wa-fab__tip small { display: block; font-size: 12.5px; color: #475569; }
.wa-fab__tip::before { content: ""; position: absolute; top: 50%; inset-inline-start: -6px; width: 12px; height: 12px; margin-top: -6px; background: #fff; transform: rotate(45deg); border-inline-start: 1px solid rgba(15,23,42,.08); border-bottom: 1px solid rgba(15,23,42,.08); }
.wa-fab__x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-inline-start: 2px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; cursor: pointer; position: relative; }
.wa-fab__x::after { content: ""; position: absolute; inset: -8px; } /* 44px tap area */
.wa-fab__x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
@media (max-width: 560px) { .wa-fab { bottom: max(14px, env(safe-area-inset-bottom)); inset-inline-start: 14px; } .wa-fab__btn { width: 54px; height: 54px; } }
@media (prefers-reduced-motion: reduce) { .wa-fab__btn::before { animation: none; display: none; } .wa-fab__tip, .wa-fab.is-tip .wa-fab__tip { transition: none; transform: none; } }
html.lite .wa-fab__btn::before { animation: none; display: none; }
@media print { .wa-fab { display: none; } }

/* physical side chosen by whatsapp.js (opposite the robot) */
html .wa-fab[data-side="left"] { left: 18px; right: auto; flex-direction: row; }
html .wa-fab[data-side="right"] { right: 18px; left: auto; flex-direction: row-reverse; }
html .wa-fab[data-side="left"] .wa-fab__tip::before { left: -6px; right: auto; }
html .wa-fab[data-side="right"] .wa-fab__tip::before { right: -6px; left: auto; }
html .wa-fab[data-side="left"] .wa-fab__tip { transform: translateX(-8px) scale(.96); }
html .wa-fab[data-side="right"] .wa-fab__tip { transform: translateX(8px) scale(.96); }
html .wa-fab.is-tip .wa-fab__tip { transform: none; }
@media (max-width: 560px) { html .wa-fab[data-side="left"] { left: 14px; } html .wa-fab[data-side="right"] { right: 14px; } }
.wa-fab { direction: ltr; } html[dir="rtl"] .wa-fab__tip { direction: rtl; }

/* ---- services explorer: the Web & App Development (Digital Lab) service always stands out ---- */
:root { --lab-grad: linear-gradient(120deg, #06b6d4, #2563eb 55%, #7c3aed); }
html .svx__row--lab .svx__tab { position: relative; background: linear-gradient(120deg, rgba(6,182,212,.10), rgba(37,99,235,.08) 55%, rgba(124,58,237,.10)) !important;
  border: 1px solid rgba(37,99,235,.35) !important; border-radius: 16px; }
html .svx__row--lab .svx__tab::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 4px; border-radius: 4px; background: var(--lab-grad); }
html .svx__row--lab .svx__ic { background: var(--lab-grad) !important; color: #fff !important; border: 0 !important; box-shadow: 0 8px 20px -8px rgba(37,99,235,.7); }
html .svx__row--lab .svx__ic svg { stroke: #fff !important; }
html .svx__row--lab .svx__tab[aria-selected="true"] { background: linear-gradient(120deg, rgba(6,182,212,.18), rgba(37,99,235,.14) 55%, rgba(124,58,237,.18)) !important; border-color: #2563eb !important; }
.svx__badge { display: inline-flex; align-items: center; margin-inline-start: 8px; padding: 2px 9px; border-radius: 999px; background: var(--lab-grad); color: #fff !important;
  -webkit-text-fill-color: #fff !important; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; vertical-align: middle; white-space: nowrap; }
html.theme-light .svx__pane--lab .svx__info h3 { background: linear-gradient(120deg, #0e7490, #1d4ed8 55%, #6d28d9); -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent !important; }
html .svx__pane--lab .svx__lab, html .svx__row--lab .svx__lab { background: var(--lab-grad) !important; color: #fff !important; border: 0 !important; box-shadow: 0 12px 28px -12px rgba(37,99,235,.8) !important; }
html .svx__pane--lab .svx__lab *, html .svx__row--lab .svx__lab * { color: #fff !important; stroke: #fff; }
/* phones: when the Digital Lab "back to home" pop-up is showing, sit above it */
@media (max-width: 760px) { body:has(.backpop.is-in) .wa-fab { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 72px); } }
