/* Blog sidebar – Products & Services cards (classic blog design, sidebar.php).
   Self-contained: every rule is prefixed with #sidebar-service so it wins over
   the older .sidebar-service rules in style.css / style-new.css on any server. */

#sidebar-service { padding: 0; margin-top: 0; overflow: visible; }
#sidebar-service .row { --bs-gutter-y: 0; }
#sidebar-service .box-item { margin-bottom: 14px; }
#sidebar-service .box-item:last-child { margin-bottom: 0; }

/* Card */
#sidebar-service .box.sidebar-service_card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: auto;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e7e9ef;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 19, 38, 0.04);
  cursor: pointer;
  transform: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
#sidebar-service .box.sidebar-service_card:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: #d6c7f5;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
}
#sidebar-service .box.sidebar-service_card.active,
#sidebar-service .box.sidebar-service_card.active:hover {
  background: linear-gradient(135deg, #f6f1ff 0%, #eef8ff 100%);
  border-color: #d6c7f5;
}

/* Whole card clickable (the button keeps its own link on top) */
#sidebar-service .sidebar-service_card-link { position: absolute; inset: 0; z-index: 1; }

/* Icon + title on one line */
#sidebar-service .sidebar-service_head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 10px;
}
#sidebar-service .sidebar-service_icon-wrap {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  background: #efe9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
#sidebar-service .sidebar-service_icon-wrap img { width: 60%; height: 60%; max-width: 60%; object-fit: contain; margin: 0; }
#sidebar-service .box h3.sidebar-service_title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #0b1326;
  background: none;
  -webkit-text-fill-color: currentColor;
  transition: color 0.2s ease;
}
#sidebar-service .box h3.sidebar-service_title::after { content: none; display: none; }
#sidebar-service .box.sidebar-service_card:hover h3.sidebar-service_title { color: #7c3aed; }

/* Text */
#sidebar-service .box .sidebar-service_text,
#sidebar-service .box .sidebar-service_text p {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  color: #4b5563;
}
#sidebar-service .box .sidebar-service_text { flex-grow: 0; margin: 0 0 12px; }
#sidebar-service .box .sidebar-service_text p { margin: 0 0 6px; }
#sidebar-service .box .sidebar-service_text p:last-child { margin-bottom: 0; }

/* Button */
#sidebar-service .box.sidebar-service_card > .primary_btn,
#sidebar-service .box.sidebar-service_card > .primary_outline_btn {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.4;
  gap: 6px;
}
#sidebar-service .box.sidebar-service_card > .primary_btn { color: #fff; }
#sidebar-service .box.sidebar-service_card > .primary_btn:after,
#sidebar-service .box.sidebar-service_card > .primary_outline_btn:after { width: 12px; height: 12px; }

/* Less empty space around the blog content + sidebar (classic blog design) */
#blog.blog.entries .sidebar { margin-top: 0; padding-top: 0; }

@media (max-width: 991.98px) {
  #sidebar-service { margin-top: 28px; }
}

/* Sticky sidebar on desktop (classic blog design) – no inner scrolling.
   The theme's "section { overflow: hidden }" would stop position: sticky, so the
   blog section clips sideways only. When the cards are taller than the screen, a
   small script in template-parts/blog/single-classic.php sets --blog-side-top so
   the sidebar sticks by its bottom edge instead and every card stays reachable. */
@media (min-width: 992px) {
  section#blog.blog.entries { overflow-x: clip; overflow-y: visible; }
  #blog.blog.entries .col-lg-4 > .sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: var(--blog-side-top, 112px);
    max-height: none;
    overflow: visible;
  }
  #blog.blog.entries .col-lg-4 > .sidebar #sidebar-service .row { margin-left: 0; margin-right: 0; }
  #blog.blog.entries .col-lg-4 > .sidebar #sidebar-service .box-item { padding-left: 0; padding-right: 0; }
}
