/* Services v2: eight cards in reading order, one structure, brand angle in the accents.
   To return to the previous mosaic, restore backups/services-mosaic.html and drop this stylesheet. */
.svc-head { max-width: 760px; margin-bottom: 40px; }
.svc-head .section-kicker { margin-bottom: 14px; }
.svc-head h2 { margin-bottom: 14px; }
.svc-intro { color: #4f5b70; font-size: 16px; line-height: 2; max-width: 640px; text-wrap: balance; }

.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.svc-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 300px; padding: 28px 26px 26px; background: #fff; border: 1px solid #e6ebf3; color: var(--ink); text-align: start; box-shadow: 0 1px 2px rgb(7 21 46 / 4%), 0 16px 40px rgb(7 21 46 / 7%); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
/* brand accent: a short angled bar on the top edge */
.svc-card::before { content: ''; position: absolute; top: 0; inset-inline-start: 26px; width: 48px; height: 4px; background: var(--blue); clip-path: polygon(4px 0,100% 0,calc(100% - 4px) 100%,0 100%); z-index: 2; }
/* On hover a blue line draws itself around the card, starting from the bar's corner. */
.svc-frame { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
html[dir="rtl"] .svc-frame { transform: scaleX(-1); }
.svc-frame rect { x: 1.5px; y: 1.5px; width: calc(100% - 3px); height: calc(100% - 3px); fill: none; stroke: var(--blue); stroke-width: 3; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .7s var(--ease); }
.svc-card:hover .svc-frame rect, .svc-card:focus-visible .svc-frame rect { stroke-dashoffset: 0; }

/* The service photo waits behind the card and slides in on hover, cut at the brand angle. */
.svc-media { position: absolute; inset: 0; z-index: -1; clip-path: polygon(100% 0,100% 0,100% 100%,100% 100%); transition: clip-path .55s var(--ease); }
html[dir="ltr"] .svc-media { clip-path: polygon(0 0,0 0,0 100%,0 100%); }
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgb(7 84 255 / 78%), rgb(7 21 46 / 92%) 70%); }

.svc-top { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.svc-icon { width: 52px; height: 52px; display: grid; place-items: center; background: #eaf0ff; color: var(--blue); font-size: 20px; clip-path: polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%); transition: background .35s, color .35s; }
.svc-num { color: #d4dbe7; font: 900 40px/1 Arial, sans-serif; letter-spacing: -1px; transition: color .35s; }
.svc-title { font-size: 20px; font-weight: 900; line-height: 1.5; color: var(--navy); transition: color .35s; }
.svc-desc { color: #5a667a; font-size: 14px; line-height: 1.95; transition: color .35s; }
.svc-more { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 10px; color: var(--blue); font-size: 14px; font-weight: 800; transition: color .35s, gap .35s var(--ease); }
html[dir="ltr"] .svc-more i { transform: rotate(180deg); }

.svc-card:hover, .svc-card:focus-visible { transform: translateY(-6px); border-color: transparent; box-shadow: 0 26px 56px rgb(7 21 46 / 18%); }
.svc-card:hover .svc-media, .svc-card:focus-visible .svc-media { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); }
.svc-card:hover .svc-icon, .svc-card:focus-visible .svc-icon { background: rgb(255 255 255 / 16%); color: #fff; }
.svc-card:hover .svc-num, .svc-card:focus-visible .svc-num { color: rgb(255 255 255 / 30%); }
.svc-card:hover .svc-title, .svc-card:focus-visible .svc-title,
.svc-card:hover .svc-more, .svc-card:focus-visible .svc-more { color: #fff; }
.svc-card:hover .svc-desc, .svc-card:focus-visible .svc-desc { color: rgb(255 255 255 / 85%); }
.svc-card:hover .svc-more, .svc-card:focus-visible .svc-more { gap: 16px; }

@media (max-width: 1199px) {
  .svc-card { padding: 24px 22px 22px; min-height: 290px; }
  .svc-title { font-size: 18px; }
}
@media (max-width: 1023px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-card { min-height: 260px; }
}
/* Phones: the cards become a swipeable row instead of eight full screens. */
@media (max-width: 767px) {
  .svc-head { margin-bottom: 26px; }
  .svc-intro { font-size: 14px; }
  .svc-grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 22px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .svc-grid::-webkit-scrollbar { display: none; }
  .svc-card { flex: 0 0 80%; scroll-snap-align: start; min-height: 280px; }
}
@media (hover: none) {
  .svc-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-card, .svc-media, .svc-frame rect { transition: none; }
}
