/* =========================================================
   Services — listing + details (scoped to .hm-sv)
   ========================================================= */
.hm-sv {
  --sv-blue: #2a93c9;
  --sv-blue-2: #1b6f9e;
  --sv-violet: #7338dc;
  --sv-ink: #0b3353;
  --sv-slate: #56718a;
  --sv-soft: #f4f9fd;
  --sv-card: #ffffff;
  --sv-radius: 26px;
  --sv-shadow: 0 24px 55px -20px rgba(11, 51, 83, 0.2);
  --sv-shadow-sm: 0 14px 34px -18px rgba(11, 51, 83, 0.18);
  color: var(--sv-ink);
  font-family: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.hm-sv *,
.hm-sv *::before,
.hm-sv *::after {
  box-sizing: border-box;
}

.hm-sv-section {
  position: relative;
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.hm-sv-section.hm-sv-soft {
  background: var(--sv-soft);
}

.hm-sv-section .container {
  max-width: 1180px;
}

.hm-sv-head {
  margin-bottom: 2.6rem;
}

.hm-sv-head.hm-sv-center {
  text-align: center;
}

.hm-sv-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(42, 147, 201, 0.12);
  color: var(--sv-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hm-sv-head h1,
.hm-sv-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.hm-sv-head p {
  margin: 0;
  color: var(--sv-slate);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ---------------- hero (details page) ---------------- */
.hm-sv-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(280px, 34vw, 420px);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: linear-gradient(150deg, #2a93c9 0%, #4a6fd4 50%, #7338dc 100%);
  overflow: hidden;
}

.hm-sv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.3) 0%, transparent 44%),
    radial-gradient(circle at 8% 88%, rgba(115, 56, 220, 0.5) 0%, transparent 48%);
}

.hm-sv-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
}

.hm-sv-hero-in {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hm-sv-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.hm-sv-crumbs a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.hm-sv-crumbs a:hover {
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hm-sv-crumbs .hm-sv-sep {
  opacity: 0.6;
}

.hm-sv-hero h1 {
  margin: 0;
  max-width: 22ch;
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.hm-sv-hero .hm-sv-lead {
  margin: 16px 0 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.04rem;
  line-height: 1.7;
}

/* ---------------- detail layout ---------------- */
.hm-sv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.hm-sv-main {
  min-width: 0;
}

.hm-sv-main h2 {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hm-sv-rich {
  color: var(--sv-slate);
  font-size: 1.02rem;
  line-height: 1.85;
}

.hm-sv-rich > *:first-child {
  margin-top: 0;
}

.hm-sv-rich > *:last-child {
  margin-bottom: 0;
}

.hm-sv-rich h2,
.hm-sv-rich h3,
.hm-sv-rich h4 {
  color: var(--sv-ink);
  font-weight: 700;
}

.hm-sv-rich h2 {
  margin: 32px 0 12px;
  font-size: 1.5rem;
}

.hm-sv-rich h3 {
  margin: 26px 0 10px;
  font-size: 1.24rem;
}

.hm-sv-rich ul,
.hm-sv-rich ol {
  margin: 0 0 18px;
  padding-inline-start: 22px;
}

.hm-sv-rich li {
  margin-bottom: 8px;
}

.hm-sv-rich a {
  color: var(--sv-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hm-sv-rich img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.hm-sv-rich blockquote {
  margin: 24px 0;
  padding: 18px 24px;
  border-inline-start: 4px solid var(--sv-blue);
  border-radius: 0 16px 16px 0;
  background: var(--sv-soft);
  color: var(--sv-ink);
  font-style: italic;
}

[dir="rtl"] .hm-sv-rich blockquote {
  border-radius: 16px 0 0 16px;
}

/* ---------------- sidebar ---------------- */
.hm-sv-side {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hm-sv-card {
  background: var(--sv-card);
  border-radius: var(--sv-radius);
  box-shadow: var(--sv-shadow-sm);
  overflow: hidden;
}

.hm-sv-card-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, #2a93c9 0%, #7338dc 100%);
}

.hm-sv-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-sv-card-body {
  padding: 26px 24px;
}

.hm-sv-card-body h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 700;
}

.hm-sv-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a93c9 0%, #7338dc 100%);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 16px 34px -16px rgba(115, 56, 220, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hm-sv-cta:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -16px rgba(115, 56, 220, 0.8);
}

.hm-sv-cta svg {
  width: 18px;
  height: 18px;
}

.hm-sv-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.hm-sv-contact a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sv-slate);
  font-size: 0.95rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.hm-sv-contact a:hover {
  color: var(--sv-blue);
}

.hm-sv-contact svg {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(42, 147, 201, 0.12);
  color: var(--sv-blue);
}

.hm-sv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hm-sv-tag {
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(42, 147, 201, 0.1);
  color: var(--sv-blue);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------------- card grid (shared) ---------------- */
.hm-sv-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.hm-sv-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--sv-card);
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  box-shadow: var(--sv-shadow-sm);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.hm-sv-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(150deg, rgba(42, 147, 201, 0.6), rgba(115, 56, 220, 0.12) 45%, rgba(42, 147, 201, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.hm-sv-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--sv-shadow);
}

.hm-sv-item:hover::before {
  opacity: 1;
}

.hm-sv-item-media {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(150deg, #2a93c9 0%, #7338dc 100%);
}

.hm-sv-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
}

.hm-sv-item:hover .hm-sv-item-media img {
  transform: scale(1.1);
  filter: saturate(1.1);
}

.hm-sv-item-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 51, 83, 0) 38%, rgba(11, 51, 83, 0.62) 100%),
    linear-gradient(150deg, rgba(42, 147, 201, 0.18), rgba(115, 56, 220, 0.28));
  transition: opacity 0.45s ease;
}

.hm-sv-item:hover .hm-sv-item-media::after {
  opacity: 0.82;
}

.hm-sv-shine {
  position: absolute;
  z-index: 2;
  top: -60%;
  bottom: -60%;
  width: 46%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-160%) rotate(14deg);
  transition: transform 0.85s cubic-bezier(0.3, 0.7, 0.3, 1);
  pointer-events: none;
}

.hm-sv-item:hover .hm-sv-shine {
  transform: translateX(320%) rotate(14deg);
}

.hm-sv-item-ico {
  position: absolute;
  z-index: 2;
  bottom: -24px;
  inset-inline-start: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: #fff;
  color: #2a93c9;
  box-shadow: 0 16px 30px -14px rgba(11, 51, 83, 0.55);
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease, border-radius 0.35s ease;
}

.hm-sv-item-ico svg {
  width: 26px;
  height: 26px;
}

.hm-sv-item:hover .hm-sv-item-ico {
  background: linear-gradient(140deg, #2a93c9, #7338dc);
  color: #fff;
  border-radius: 50%;
  transform: translateY(-4px) scale(1.06);
}

.hm-sv-item-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 44px 26px 26px;
}

.hm-sv-item-body h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--sv-ink);
  transition: color 0.3s ease;
}

.hm-sv-item:hover .hm-sv-item-body h3 {
  color: #2a93c9;
}

.hm-sv-item-body p {
  margin: 0;
  color: var(--sv-slate);
  font-size: 0.95rem;
  line-height: 1.72;
}

.hm-sv-item-more {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(11, 51, 83, 0.08);
  color: #2a93c9;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hm-sv-item-more svg {
  width: 15px;
  height: 15px;
  transition: transform 0.35s ease;
}

.hm-sv-item:hover .hm-sv-item-more {
  opacity: 1;
  transform: translateY(0);
}

.hm-sv-item:hover .hm-sv-item-more svg {
  transform: translateX(5px);
}

[dir="rtl"] .hm-sv-item:hover .hm-sv-item-more svg {
  transform: translateX(-5px) scaleX(-1);
}

.hm-sv-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--sv-slate);
}

/* Staggered entrance, no JS required. */
@media (prefers-reduced-motion: no-preference) {
  .hm-sv-item {
    animation: hmSvIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .hm-sv-grid-cards > *:nth-child(1) { animation-delay: 0.04s; }
  .hm-sv-grid-cards > *:nth-child(2) { animation-delay: 0.12s; }
  .hm-sv-grid-cards > *:nth-child(3) { animation-delay: 0.2s; }
  .hm-sv-grid-cards > *:nth-child(4) { animation-delay: 0.28s; }
  .hm-sv-grid-cards > *:nth-child(5) { animation-delay: 0.36s; }
  .hm-sv-grid-cards > *:nth-child(6) { animation-delay: 0.44s; }

  @keyframes hmSvIn {
    from {
      opacity: 0;
      transform: translateY(22px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ---------------- responsive ---------------- */
@media (max-width: 991.98px) {
  .hm-sv-grid {
    grid-template-columns: 1fr;
  }

  .hm-sv-side {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .hm-sv-grid-cards {
    grid-template-columns: 1fr;
  }
}
