/* =========================================================
   DigitalShri – Service Explorer (Elementor widget "DS Service Explorer")
   ≥768px: sidebar list + content panel. ≤767px: accordion.
   Same markup for both: [head, panel, head, panel, …]
   ========================================================= */
.ds-sx {
  --sx-primary: #851CF2;
  --sx-text: #17181C;
  --sx-accent: #F38218;
  --sx-muted: rgba(23, 24, 28, 0.72);
  --sx-side: #17181C;                              /* sidebar: brand charcoal */
  --sx-tint: rgba(133, 28, 242, 0.14);            /* panel: charcoal + violet tint */
  --sx-side-w: 340px;
  font-family: "Montserrat", sans-serif;
  color: var(--sx-text);
  padding: 60px 24px; /* top/bottom adjustable in Elementor: Style → Spacing */
  box-sizing: border-box;
}
.ds-sx *, .ds-sx *::before, .ds-sx *::after { box-sizing: border-box; }
.ds-sx-inner { max-width: 1200px; margin: 0 auto; }

/* ---------- Heading ---------- */
.ds-sx .ds-sx-title {
  margin: 0 auto 14px;
  max-width: 960px;
  text-align: center;
  font-family: inherit;
  font-size: var(--ds-h2-size, 40px); /* global H2 scale */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--sx-text);
}
.ds-sx .ds-sx-title span { color: var(--sx-primary); }
.ds-sx .ds-sx-intro, .ds-sx .ds-sx-intro p {
  margin: 0 auto;
  max-width: 660px;
  text-align: center;
  font-size: 16px;
  line-height: 1.75;
  color: var(--sx-muted);
}
.ds-sx .ds-sx-intro a { color: var(--sx-primary); text-decoration: underline; }

/* ---------- Box: sidebar + panel (desktop / tablet) ---------- */
.ds-sx-box {
  display: grid;
  grid-template-columns: var(--sx-side-w) minmax(0, 1fr);
  /* one row per service + a flexible last row, so a tall panel doesn't spread the list */
  grid-template-rows: repeat(var(--sx-count), auto) 1fr;
  margin-top: 44px;
  padding: 22px 0;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--sx-side) 0 var(--sx-side-w), var(--sx-tint) var(--sx-side-w)), var(--sx-side);
  box-shadow: 0 30px 70px rgba(23, 24, 28, 0.22);
}

.ds-sx .ds-sx-head {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: auto;
  margin: 2px 14px;
  padding: 13px 16px;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.ds-sx .ds-sx-head:hover { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; }
.ds-sx .ds-sx-head:focus-visible { outline: 2px solid var(--sx-accent); outline-offset: 2px; }
.ds-sx .ds-sx-head.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--sx-accent);
  color: #FFFFFF;
}
.ds-sx-head-icon { flex-shrink: 0; width: 20px; height: 20px; display: grid; place-items: center; color: var(--sx-accent); }
.ds-sx-head-icon svg { width: 18px; height: 18px; fill: currentColor; }
.ds-sx-head-icon i { font-size: 17px; }
.ds-sx-head-text { flex: 1 1 auto; min-width: 0; }
.ds-sx .ds-sx-chevron { display: none; width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.25s ease; }

/* Panel spans every row of the right column */
.ds-sx-panel {
  grid-column: 2;
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding: 34px 40px 36px;
  color: #FFFFFF;
  animation: dsSxFade 0.35s ease both;
}
.ds-sx-panel[hidden] { display: none; }

.ds-sx-panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.ds-sx-panel-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sx-accent);
}
.ds-sx-panel-icon svg { width: 22px; height: 22px; fill: currentColor; }
.ds-sx-panel-icon i { font-size: 21px; }
.ds-sx .ds-sx-panel-title {
  margin: 0;
  font-family: inherit;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: #FFFFFF;
}
.ds-sx .ds-sx-desc, .ds-sx .ds-sx-desc p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
}
.ds-sx .ds-sx-desc p + p { margin-top: 12px; }
.ds-sx .ds-sx-desc a { color: var(--sx-accent); }

.ds-sx-media { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.ds-sx-figure {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}
.ds-sx .ds-sx-img { display: block; width: 100%; height: auto; border-radius: 12px; }
.ds-sx .ds-sx-img.is-placeholder { aspect-ratio: 4 / 3; object-fit: cover; background: rgba(255, 255, 255, 0.08); }
.ds-sx .ds-sx-btn { gap: 10px; }
.ds-sx .ds-sx-btn svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.ds-sx .ds-sx-btn:hover svg { transform: translateX(4px); }

@keyframes dsSxFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .ds-sx { padding: 50px 24px; }
  .ds-sx { --sx-side-w: 260px; }
  .ds-sx .ds-sx-head { margin: 2px 10px; padding: 12px 12px; font-size: 14px; }
  .ds-sx-panel { grid-template-columns: 1fr; gap: 24px; padding: 28px 28px 32px; }
}

/* ---------- Mobile: accordion ---------- */
@media (max-width: 767px) {
  .ds-sx { padding: 40px 16px; }
  .ds-sx-box {
    display: block;
    margin-top: 28px;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .ds-sx .ds-sx-head {
    width: 100%;
    margin: 0 0 10px;
    padding: 16px 18px;
    border-left-width: 3px;
    border-radius: 14px;
    background: var(--sx-side);
    color: #FFFFFF;
    font-size: 15px;
  }
  .ds-sx .ds-sx-head:hover { background: var(--sx-side); }
  .ds-sx .ds-sx-head.is-active {
    margin-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: var(--sx-side);
  }
  .ds-sx .ds-sx-chevron { display: block; color: var(--sx-accent); }
  .ds-sx .ds-sx-head[aria-expanded="true"] .ds-sx-chevron { transform: rotate(180deg); }

  .ds-sx-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 0 0 10px;
    padding: 22px 18px 24px;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(var(--sx-tint), var(--sx-tint)), var(--sx-side);
  }
  .ds-sx-panel[hidden] { display: none; }
  .ds-sx-media { align-items: stretch; }
  .ds-sx .ds-sx-btn { width: 100%; text-align: center; }}

@media (prefers-reduced-motion: reduce) {
  .ds-sx-panel { animation: none !important; }
  .ds-sx .ds-sx-head, .ds-sx .ds-sx-chevron, .ds-sx .ds-sx-btn svg { transition: none !important; }
}
