/* ═══════════════════════════════════════════════════════════════════
   Service Safe Ltd — Service Detail Page Styles
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

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

:root {
  --c-bg:      #05060f;
  --c-primary: #3B82F6;
  --c-lime:    #84ff5c;
  --c-gold:    #FFD700;
  --c-white:   #ffffff;
  --c-muted:   rgba(255,255,255,0.55);
  --font:      'Space Grotesk', sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--font);
  line-height: 1.6;
  animation: sp-fade-in 0.28s ease both;
  transition: opacity 0.28s ease;
}

body.sp-exiting {
  opacity: 0;
  pointer-events: none;
}

@keyframes sp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ── Page shell ── */
.service-page {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── Left content panel (3/5) ── */
.sp-left {
  width: 60%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 72px;
  overflow: hidden;
  position: relative;
}

/* ── Back link ── */
.sp-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  transition: color 0.2s;
  margin-bottom: 8px;
}
.sp-back:hover { color: var(--c-white); }
.sp-back svg { width: 14px; height: 14px; }

/* ── Brand header ── */
.sp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
}
.sp-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}
.sp-brand__name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sp-brand__slogan {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
}

/* ── Main content ── */
.sp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

.sp-service-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-lime);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
}

.sp-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--c-white);
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(20px);
}
.sp-title .accent { color: var(--c-primary); }

.sp-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-lime));
  border-radius: 2px;
  margin: 24px 0;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.sp-subtitle {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
}

.sp-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #ffffff;
  color: #0a1f2e;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  border-radius: 9999px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  transition: background 0.22s, transform 0.2s, box-shadow 0.22s;
  opacity: 0;
  transform: translateY(20px);
  align-self: flex-start;
}
.sp-cta:hover {
  background: #e8fff8;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,200,160,0.35);
}

/* ── Footer contact row ── */
.sp-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateY(16px);
}
.sp-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--c-muted);
}
.sp-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--c-primary);
}

/* ── Right image panel (2/5) ── */
.sp-right {
  width: 40%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  position: relative;
}
.sp-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(5,6,15,0.45) 0%, transparent 40%);
}

/* ── Floating back button (inside page, top-left corner) ── */
.sp-back-pill {
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(5, 11, 24, 0.88);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  transition: color 0.2s, border-color 0.2s;
}
.sp-back-pill:hover { color: #fff; border-color: rgba(59,130,246,0.7); }
.sp-back-pill svg { width: 12px; height: 12px; }

/* ── Feature list ── */
.sp-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
}
.sp-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
}
.sp-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-lime);
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  html, body { overflow: auto; height: auto; }

  /* Unwrap .sp-left so its children flow as direct children of .service-page,
     letting us place the image BETWEEN the CTA and the contact footer. */
  .service-page { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
  .sp-left { display: contents; }

  /* Per-child padding (sp-left's padding is gone now) */
  .sp-brand,
  .sp-main,
  .sp-footer { padding-left: 22px; padding-right: 22px; }

  /* Back stays on the LEFT, brand moves to the RIGHT so they don't collide */
  .sp-back-pill { left: 16px; top: 16px; padding: 7px 14px; font-size: 0.7rem; }
  .sp-brand {
    order: 1;
    padding-top: 64px;
    align-self: flex-end;
    flex-direction: row-reverse;
    text-align: right;
    gap: 10px;
  }
  .sp-brand img { width: 34px; height: 34px; }
  .sp-brand__name { font-size: 0.78rem; }
  .sp-brand__slogan { font-size: 0.62rem; }

  .sp-main { order: 2; padding-top: 18px; padding-bottom: 0; }
  .sp-features { margin-bottom: 22px; }

  /* CTA sits at the bottom of sp-main and overlaps the top edge of the image */
  .sp-cta {
    align-self: center;
    position: relative;
    z-index: 5;
    margin-bottom: -22px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
  }

  /* Image goes BETWEEN content and contact footer */
  .sp-right {
    order: 3;
    width: 100%;
    height: 220px;
    clip-path: none !important;
  }

  .sp-footer {
    order: 4;
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
    padding-top: 28px;
    padding-bottom: 32px;
    margin-top: 0;
  }
  .sp-contact-item { justify-content: center; }
}
