/* ==========================================
   SERVICES PAGE STYLES
   ========================================== */

/* Global typography for this page */
.svc-block-title,
.svch-title,
.svc-item-card h3,
.svc-img-card h4 {
  font-family: 'Montserrat', 'Trebuchet MS', Arial, sans-serif !important;
}

.svc-block-intro,
.svc-item-card p,
.svc-img-card p,
.svch-subtitle {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
}

/* ══════════════════════════════════════════
   S1: HERO
══════════════════════════════════════════ */
.svc-hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
  background: #f8fafb;
}

.svch-bg { position: absolute; inset: 0; z-index: 0; }
.svch-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(102,241,194,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102,241,194,.07) 1px, transparent 1px);
  background-size: 52px 52px;
}
.svch-orb {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(102,241,194,.18), transparent 70%);
  top: -200px; right: -150px;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 9s ease-in-out infinite;
}

.svch-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Left */
.svch-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.svch-divider {
  width: 64px; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.svch-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 480px;
}

/* Right: orbit */
.svch-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.svch-orbit-wrap {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center bubble */
.svcho-center {
  position: absolute;
  z-index: 10;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0d1117;
  box-shadow: 0 0 32px rgba(102,241,194,.45);
}

/* Each ring is a rotating ellipse with a label at the top */
.svcho-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(102,241,194,.3);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Sizes — each one larger than the previous, no overlap */
.svcho-ring-1 { width:130px; height:130px; animation: spin-ring 10s linear infinite; }
.svcho-ring-2 { width:175px; height:175px; animation: spin-ring 14s linear infinite reverse; border-color: rgba(255,133,89,.3); }
.svcho-ring-3 { width:220px; height:220px; animation: spin-ring 18s linear infinite; }
.svcho-ring-4 { width:265px; height:265px; animation: spin-ring 22s linear infinite reverse; border-color: rgba(130,170,255,.3); }
.svcho-ring-5 { width:315px; height:315px; animation: spin-ring 26s linear infinite; border-color: rgba(255,203,107,.3); }
.svcho-ring-6 { width:370px; height:370px; animation: spin-ring 30s linear infinite reverse; }

@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Label at top of each ring */
.svcho-label {
  margin-top: -12px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0.2rem 0.65rem;
  background: white;
  border: 1.5px solid rgba(102,241,194,.35);
  border-radius: 100px;
  color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  /* counter-rotate so label stays readable */
  animation: counter-spin-ring 10s linear infinite;
}
.svcho-ring-2 .svcho-label { animation-duration: 14s; animation-direction: reverse; border-color: rgba(255,133,89,.35); color: var(--msapi-dark); }
.svcho-ring-3 .svcho-label { animation-duration: 18s; }
.svcho-ring-4 .svcho-label { animation-duration: 22s; animation-direction: reverse; border-color: rgba(130,170,255,.35); color: #5568e8; }
.svcho-ring-5 .svcho-label { animation-duration: 26s; border-color: rgba(255,203,107,.35); color: #c47a00; }
.svcho-ring-6 .svcho-label { animation-duration: 30s; animation-direction: reverse; }

@keyframes counter-spin-ring {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ══════════════════════════════════════════
   S2: APP DEV CONTAINER
══════════════════════════════════════════ */
.svc-appdev-section { background: white; }

.svc-appdev-container {
  background: #f8fafb;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.07);
}

/* Top: header left + cover image right */
.svc-appdev-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.svc-appdev-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 3rem;
  background: #0d1117;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
/* Adjust text colors for dark header */
.svc-appdev-header .svc-block-title { color: white; }
.svc-appdev-header .svc-block-intro { color: rgba(255,255,255,0.65); }
.svc-appdev-header .svc-block-icon { flex-shrink: 0; width: 60px; height: 60px; }
.svc-appdev-header > div:last-child { display: flex; flex-direction: column; gap: 0.5rem; }

.svc-appdev-cover {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.svc-appdev-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 8s ease;
  animation: slow-zoom 12s ease-in-out infinite alternate;
}
@keyframes slow-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}
.svc-appdev-cover .svc-img-overlay {
  position: absolute;
  bottom: 1rem; left: 1rem;
  display: flex; gap: 0.5rem;
}

/* Bottom: 2×2 image grid */
.svc-appdev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
  background: #f8fafb;
}

.svc-img-card {
  position: relative;
  overflow: hidden;
  height: 442px;
  border-radius: 14px;
  border: none;
}
/* no separate border needed with gap+padding layout */
.svc-img-card:nth-child(1),
.svc-img-card:nth-child(3) { border-right: none; }

.svc-img-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.svc-img-card:hover img { transform: scale(1.06); }

/* Overlay card */
.svc-img-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,17,23,.75) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  transition: background 0.3s;
}
.svc-img-card:hover .svc-img-card-overlay {
  background: linear-gradient(to top, rgba(13,17,23,.88) 0%, rgba(13,17,23,.3) 100%);
}

.svc-img-card-inner {
  background: rgba(13,17,23,.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  transform: translateY(8px);
  transition: transform 0.3s ease, background 0.3s;
}
.svc-img-card:hover .svc-img-card-inner {
  transform: translateY(0);
  background: rgba(13,17,23,.75);
}

.svc-img-card-icon {
  width: 32px; height: 32px;
  background: rgba(102,241,194,.18);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  margin-bottom: 0.6rem;
}

.svc-img-card-inner h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.svc-img-card-inner p {
  font-size: 0.78rem;
  color: rgba(255,255,255,.7);
  line-height: 1.55;
  margin: 0;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  .svch-inner { grid-template-columns: 1fr; }
  .svch-right { display: none; }
  .svc-appdev-top { grid-template-columns: 1fr; }
  .svc-appdev-cover { min-height: 220px; }
  .svc-appdev-header { border-right: none; }
}
@media (max-width: 640px) {
  .svc-appdev-grid { grid-template-columns: 1fr; }
  .svc-img-card:nth-child(odd) { border-right: none; }
}

/* Pill in svc-appdev-header should size to content only */
.svc-appdev-header .section-label {
  display: inline-flex !important;
  align-self: flex-start;
  width: auto !important;
}

/* Spacer row between top block and 2x2 grid */
.svc-appdev-spacer {
  height: 2.5rem;
  background: #f8fafb;
  border-top: 1px solid var(--border);
}
/* hide sas-item content — spacer is empty */
.sas-item { display: none; }

/* API hub SVG: show full diagram without cropping */
.svc-img-card img[src^="data:image/svg"] {
  object-fit: fill;
  background: #060c14;
}

/* Tech services: 2-card grid — full width side by side */
#tech-services .svc-appdev-grid {
  grid-template-columns: 1fr 1fr;
}
#tech-services .svc-img-card {
  height: 442px;
}
/* Remove odd border since there are only 2 cards */
#tech-services .svc-img-card:nth-child(1) {
  border-right: none;
}

/* PM section: 2-card grid full width */
#project-mgmt .svc-appdev-grid {
  grid-template-columns: 1fr 1fr;
}
#project-mgmt .svc-img-card {
  height: 442px;
}

/* Alt-bg containers keep subtle tint */
.alt-bg .svc-appdev-container {
  background: #f4f8fc;
}
.alt-bg .svc-appdev-header {
  background: #0d1117;
}

/* ══════════════════════════════════════════
   RESPONSIVE ADDITIONS — services.css
══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Dynamics365 + BI: stack header/cover vertically */
  .svc-appdev-top { grid-template-columns: 1fr !important; }
  .svc-appdev-cover { min-height: 220px; max-height: 280px; }
  .svc-appdev-header { padding: 2rem 1.25rem; border-right: none; border-bottom: 1px solid var(--border); }

  /* Cards grid: 1 column */
  .svc-appdev-grid { grid-template-columns: 1fr !important; }
  .svc-img-card { height: 260px !important; }
  .svc-img-card:nth-child(odd) { border-right: none !important; }

  /* Tech services + PM: single column */
  #tech-services .svc-appdev-grid { grid-template-columns: 1fr !important; }
  #project-mgmt .svc-appdev-grid { grid-template-columns: 1fr !important; }
  #tech-services .svc-img-card,
  #project-mgmt .svc-img-card { height: 280px !important; }

  /* BI section: 2 columns still ok, but adjust cards */
  #bi .svc-appdev-grid { grid-template-columns: repeat(2, 1fr) !important; }
  #bi .svc-img-card { height: 220px !important; }
}

@media (max-width: 480px) {
  #bi .svc-appdev-grid { grid-template-columns: 1fr !important; }
  #bi .svc-img-card { height: 240px !important; }
  .svch-inner { padding: 0 1rem; }
  .svc-appdev-header .section-label { font-size: .68rem; }
}

/* Dynamics365 cover image top position */
.svc-appdev-cover img {
  object-fit: cover;
  object-position: center top;
}
