/* ==========================================================================
   VERTICAL SERVICE CARD
   Public service directory card, aligned with the property listing cards.
   ========================================================================== */

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: auto;
  overflow: hidden;
  border: 1px solid rgba(222, 173, 170, 0.24);
  border-radius: 14px;
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-color, #fff);
  box-shadow: 0 4px 20px var(--shadow, rgba(0, 0, 0, 0.08));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--secondary, #deadaa);
  box-shadow: 0 2px 10px rgba(222, 173, 170, 0.28), 0 8px 22px rgba(0, 0, 0, 0.14);
}

/* Media */
.service-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: #0f172a;
  border-bottom: 1px solid var(--secondary, #deadaa);
}

.service-card__image-link {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.service-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card__image {
  transform: scale(1.04);
}

.service-card__image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111827, #253047);
}

.service-card__image-placeholder svg {
  width: 3.25rem;
  height: 3.25rem;
  fill: var(--secondary, #deadaa);
  opacity: 0.72;
}

.service-card__media-badges {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  left: 10px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.service-card__category {
  display: inline-flex;
  align-items: center;
  max-width: 78%;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid rgba(222, 173, 170, 0.45);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.service-card__provider-avatar {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  padding: 2px;
  overflow: hidden;
  transform: translate(-50%, 50%);
  border: 1px solid var(--secondary, #deadaa);
  border-radius: 50%;
  background: var(--primary, #0f172a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card__provider-image,
.service-card__provider-fallback {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
}

.service-card__provider-image {
  display: block;
  object-fit: cover;
}

.service-card__provider-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #273348, #111827);
}

.service-card__provider-image[hidden],
.service-card__provider-fallback[hidden] {
  display: none;
}

.service-card:hover .service-card__provider-avatar {
  transform: translate(-50%, 50%) scale(1.05);
  box-shadow: 0 3px 10px rgba(222, 173, 170, 0.38);
}

/* Body */
.service-card__body {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 1.55rem 1rem 0.85rem;
}

.service-card__badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.45rem;
}

.service-card__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 2px 7px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
}

.service-card__verified svg {
  flex-shrink: 0;
}

.service-card__badge-spacer,
.service-card__premium-slot {
  display: block;
  min-height: 1px;
}

.service-card__badge-spacer {
  min-width: 1px;
}

.service-card__premium-slot {
  width: 74px;
  margin-left: auto;
}

.service-card__provider {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  margin-top: 0.05rem;
  font-size: 0.78rem;
}

.service-card__provider-icon {
  display: inline-flex;
  flex: 0 0 14px;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--secondary, #deadaa);
}

.service-card__provider-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.service-card__provider-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-color, #fff);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.35;
}

.service-card__title a {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.service-card__title a:hover {
  color: var(--secondary, #deadaa);
}

.service-card__description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted, #97a2b2);
  font-size: 0.86rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.service-card__offered {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(222, 173, 170, 0.15);
  border-bottom: 1px solid rgba(222, 173, 170, 0.15);
}

.service-card__service-types {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.service-card__type {
  color: var(--text-color, #fff);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.service-card__type-separator {
  flex-shrink: 0;
  color: var(--muted, #97a2b2);
  font-size: 0.68rem;
}

.service-card__type-count {
  flex-shrink: 0;
  color: var(--muted, #97a2b2);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.service-card__area {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.8rem;
}

.service-card__area-icon {
  display: inline-flex;
  flex: 0 0 14px;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--secondary, #deadaa);
}

.service-card__area-icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.service-card__meta-label {
  flex-shrink: 0;
  color: var(--secondary, #deadaa);
  font-size: 0.78rem;
  font-weight: 650;
}

.service-card__meta-value {
  min-width: 0;
  overflow: hidden;
  color: var(--text-color, #fff);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pricing — follows the property listing card treatment. */
.service-card__pricing {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 2rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(222, 173, 170, 0.18);
}

.service-card__price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding-bottom: 5px;
}

.service-card__pricing-label {
  color: var(--secondary, #deadaa);
  font-size: 0.82rem;
  font-weight: 600;
}

.service-card__price {
  color: var(--accent, #e6b77c);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.service-card__currency {
  margin-right: 1px;
}

.service-card__price small {
  color: var(--muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 500;
}

/* Actions */
.service-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(222, 173, 170, 0.2);
  background: rgba(222, 173, 170, 0.08);
}

.service-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 45px;
  padding: 0.65rem 0.5rem;
  border: 0;
  border-right: 1px solid rgba(222, 173, 170, 0.2);
  background: transparent;
  color: var(--secondary, #deadaa);
  font-family: inherit;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.service-card__action:nth-child(2n) {
  border-right: 0;
}

.service-card__action:nth-child(n + 3) {
  border-top: 1px solid rgba(222, 173, 170, 0.2);
}

.service-card__action img {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  object-fit: contain;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.service-card__action svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.95);
}

.service-card__action:hover {
  background: var(--secondary, #deadaa);
  color: var(--text-light, #fff);
}

.service-card__action:hover img {
  filter: brightness(0) invert(1);
  transform: scale(1.12);
}

.service-card__action:hover svg {
  fill: currentColor;
  transform: scale(1.12);
}

.service-card__action:focus-visible {
  z-index: 1;
  outline: 2px solid var(--accent, #e6b77c);
  outline-offset: -3px;
}


@media (prefers-color-scheme: light) {
  .service-card {
    border-color: rgba(222, 173, 170, 0.36);
    background: #fff;
    color: #111827;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  }

  .service-card__provider-avatar {
    background: linear-gradient(135deg, #fff, #f4e9e5);
    color: #263246;
  }

  .service-card__type,
  .service-card__meta-value,
  .service-card__provider-name {
    color: #111827;
  }

  .service-card__price {
    color: #0f172a;
  }

  .service-card__actions {
    background: #fdfaf8;
  }
}

@media (max-width: 480px) {
  .service-card__body {
    padding-right: 0.9rem;
    padding-left: 0.9rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card__image,
  .service-card__provider-avatar,
  .service-card__action {
    transition: none;
  }
}
