/* ═══════════════════════════════════════════════════════════════
   JK Online Service — Service cards (home + services page)
   Loaded after main.css / page styles. js/service-cards.js adds
   the illustrated header (.card-art) and a per-card colour theme.
   ═══════════════════════════════════════════════════════════════ */

.service-card,
.svc-card {
  --accent: #f7941d;
  --accent-2: #e8590c;
  --accent-soft: rgba(247, 148, 29, .12);

  padding: 0 0 18px;
  gap: 0;
  border-radius: 22px;
  border: 1px solid rgba(17, 38, 73, .08);
  background: #fff;
  box-shadow: 0 2px 6px rgba(17, 38, 73, .04), 0 10px 28px rgba(17, 38, 73, .06);
  cursor: pointer;
  isolation: isolate;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .35s ease;
}

.service-card:hover,
.svc-card:hover,
.service-card.is-popular:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(17, 38, 73, .06), 0 22px 44px -12px rgba(26, 58, 107, .32);
}

.service-card.is-popular { border-color: rgba(17, 38, 73, .08); }

.service-card:focus-visible,
.svc-card:focus-visible {
  outline: 3px solid #f7941d;
  outline-offset: 3px;
}

/* ── Illustrated header ── */
.card-art {
  position: relative;
  height: 118px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #0f2344 0%, #1a3a6b 55%, #2451a0 100%);
  overflow: hidden;
  z-index: 0;
}

.card-art-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.service-card:hover .card-art-deco,
.svc-card:hover .card-art-deco { transform: scale(1.08) translateX(-6px); }

/* Big glossy icon tile */
.card-art .service-icon,
.card-art .svc-emoji {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  margin: 0;
  border-radius: 20px;
  font-size: 2.1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%) !important;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 10px 24px -6px var(--accent-shadow, rgba(0, 0, 0, .3)), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}

.service-card:hover .card-art .service-icon,
.svc-card:hover .card-art .svc-emoji { transform: translateY(-3px) rotate(-6deg) scale(1.06); }

/* Badges float on the artwork as frosted pills */
.service-card .popular-badge,
.svc-card .popular-badge,
.svc-card .new-badge {
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(255, 255, 255, .95) !important;
  color: #c2410c !important;
  border: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  font-size: .66rem;
  padding: 5px 11px;
  backdrop-filter: blur(6px);
}

/* ── Body ── */
.service-card > h3,
.service-card > p,
.service-card > .service-price,
.svc-card > .svc-card-top,
.svc-card > .svc-card-footer {
  margin-left: 20px;
  margin-right: 20px;
}

.service-card h3,
.svc-card-info h3 {
  padding-right: 0;
  font-size: 1.08rem;
  color: #0f2344;
  margin-bottom: 8px;
}

.service-card p { margin-bottom: 18px; }
.svc-card-top { gap: 0; margin-bottom: 16px; }
.svc-card-info { min-width: 0; }

/* "Documents needed" hint box on services page */
.svc-card-info > div {
  background: rgba(26, 58, 107, .05) !important;
  border-left: 3px solid #1a3a6b;
  border-radius: 8px !important;
}

/* ── Footer ── */
.service-price,
.svc-card-footer {
  border-top: 1px dashed rgba(17, 38, 73, .12);
  padding-top: 14px;
  gap: 10px;
}

.price-badge,
.svc-price {
  background: #fff4e5;
  border: 1px solid #ffe4cc;
  color: #c2410c;
  font-weight: 800;
}

.service-arrow,
.svc-apply-btn {
  background: linear-gradient(135deg, #1a3a6b, #2451a0);
  box-shadow: 0 6px 16px -4px rgba(26, 58, 107, .45);
  border-radius: 12px;
}

.service-card:hover .service-arrow,
.svc-card:hover .svc-apply-btn {
  background: linear-gradient(135deg, #1a3a6b, #2451a0);
  box-shadow: 0 10px 22px -4px rgba(26, 58, 107, .55);
  transform: translateY(-1px);
}

/* ── Tablet ── */
@media (max-width: 900px) {
  .services-grid,
  .svc-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ── Mobile: compact 2-column app-style cards ── */
@media (max-width: 600px) {
  .services-grid,
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  .service-card,
  .svc-card { padding: 0 0 12px; border-radius: 18px; }

  .service-card:hover,
  .svc-card:hover { transform: none; }
  .service-card:active,
  .svc-card:active { transform: scale(.97); }

  .card-art { height: 84px; padding: 0 12px; margin-bottom: 10px; }

  .card-art .service-icon,
  .card-art .svc-emoji {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.5rem;
  }

  .service-card .popular-badge,
  .svc-card .popular-badge,
  .svc-card .new-badge {
    top: 8px;
    right: 8px;
    font-size: .5rem;
    padding: 3px 7px;
    max-width: calc(100% - 76px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .service-card > h3,
  .service-card > p,
  .service-card > .service-price,
  .svc-card > .svc-card-top,
  .svc-card > .svc-card-footer { margin-left: 12px; margin-right: 12px; }

  .service-card h3,
  .svc-card-info h3 { font-size: .86rem; margin-bottom: 4px; }

  .service-card p { margin-bottom: 10px; }
  .svc-card-top { margin-bottom: 10px; }

  .svc-card-info > div {
    font-size: .66rem !important;
    line-height: 1.35 !important;
    padding: 4px 7px 0 !important;
    max-height: calc(2 * 1.35em + 4px);
    margin-bottom: 4px !important;
    overflow: hidden;
  }

  /* Price on top, full-width Apply button below */
  .service-price,
  .svc-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
  }

  .price-badge,
  .svc-price { align-self: flex-start; }

  .service-arrow,
  .svc-apply-btn {
    justify-content: center;
    width: 100%;
    padding: 9px 10px;
    font-size: .78rem;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card, .svc-card, .card-art-deco,
  .card-art .service-icon, .card-art .svc-emoji { transition: none; }
  .service-card:hover, .svc-card:hover { transform: none; }
}
