/* Tabs stay in a single horizontal lane with scroll fallback for narrow viewports. */
.p-cases .case-card .case-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: center;
  overflow-x: auto;
  padding: 4px;
}
/* ===============================
   Cases – Tabs aligned with reference mock (pill buttons + subtle panels)
   =============================== */
.p-cases .case-tab {
  appearance: none;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgb(59 130 246 / 25%);
  background: rgb(30 41 59 / 35%);
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: max-content;
}

.p-cases .case-tab:hover:not(.active) {
  color: #f8fafc;
  border-color: rgb(148 163 184 / 55%);
}

.p-cases .case-tab.active {
  background: rgb(37 99 235 / 35%);
  border-color: rgb(37 99 235 / 65%);
  color: #fff;
  box-shadow: 0 10px 20px rgb(37 99 235 / 25%);
}

body.light-mode.p-cases .case-tab {
  background: #fff;
  border-color: rgb(203 213 225);
  color: rgb(71 85 105);
}

body.light-mode.p-cases .case-tab:hover:not(.active) {
  background: rgb(226 232 240);
  border-color: rgb(148 163 184);
  color: rgb(30 41 59);
}

body.light-mode.p-cases .case-tab.active {
  background: rgb(37 99 235);
  color: #fff;
  border-color: rgb(37 99 235);
  box-shadow: 0 12px 22px rgb(37 99 235 / 28%);
}

.p-cases .tab-content {
  display: none;
  line-height: 1.65;
  margin-bottom: 18px;
}

.p-cases .tab-content.active {
  display: block;
}

.p-cases .tab-content[id$='-solution'],
.p-cases .tab-content[id$='-context'] {
  background: rgb(15 23 42 / 45%);
  border: 1px solid rgb(148 163 184 / 40%);
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 12px 26px rgb(15 23 42 / 24%);
}

body.light-mode.p-cases .tab-content[id$='-solution'],
body.light-mode.p-cases .tab-content[id$='-context'] {
  background: #fff;
  border-color: transparent;
  box-shadow: none;
}

/* Skinny screens: smaller tabs, less padding */
@media (width <= 400px) {
  .p-cases .case-card .case-tabs {
    gap: 6px;
    margin-bottom: 12px;
  }

  .p-cases .case-tab {
    padding: 7px 12px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .p-cases .tab-content[id$='-solution'],
  .p-cases .tab-content[id$='-context'] {
    padding: 14px 14px 16px;
    border-radius: 12px;
  }
}
