/* Step 118 — unified card system / Mobile <= 760px
   Uses the approved Programs-page sticky-stack behavior without body overflow. */

body:has(.nes-card-stack) {
  overflow-x: clip;
}

.nes-card-stack {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.nes-card-stack > * {
  position: sticky;
  top: var(--nes-card-stack-top);
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--nes-card-stack-gap);
  transform: none;
  backface-visibility: hidden;
}

.nes-card-stack > :nth-child(1) { z-index: 31; }
.nes-card-stack > :nth-child(2) { z-index: 32; }
.nes-card-stack > :nth-child(3) { z-index: 33; }
.nes-card-stack > :nth-child(4) { z-index: 34; }
.nes-card-stack > :nth-child(5) { z-index: 35; }
.nes-card-stack > :nth-child(6) { z-index: 36; }
.nes-card-stack > :nth-child(7) { z-index: 37; }
.nes-card-stack > :nth-child(8) { z-index: 38; }
.nes-card-stack > :last-child { margin-bottom: 0; }

.specialization-template :is(#focus, #formats, .spotlight-section, .method-section),
.specialization-template :is(#focus, #formats, .spotlight-section, .method-section) > .shell {
  overflow: visible;
}

.specialization-template :is(#focus, #formats, .method-section) {
  padding-top: 46px;
  padding-bottom: 20px;
}

.specialization-template :is(#focus, #formats) .page-heading {
  margin-bottom: 22px;
}

.specialization-template .nes-card-stack--focus > .service-card,
.specialization-template .nes-card-stack--formats > .path-card {
  display: flex;
  flex-direction: column;
  padding: var(--nes-card-padding-block) var(--nes-card-padding-inline);
  box-shadow: var(--nes-card-shadow-light);
}

.specialization-template .nes-card-stack--focus > .service-card {
  min-height: var(--nes-card-focus-height);
}

.specialization-template .nes-card-stack--focus > .service-card svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.specialization-template .nes-card-stack--focus h3 {
  margin: 13px 0 7px;
}

.specialization-template .nes-card-stack--focus p,
.specialization-template .nes-card-stack--formats p {
  margin: 0;
}

.specialization-template .nes-card-stack--focus .service-card > a,
.specialization-template .nes-card-stack--formats .path-card > strong {
  position: static;
  margin-top: auto;
  padding-top: 9px;
}

.specialization-template .nes-card-stack--formats > .path-card {
  min-height: var(--nes-card-format-height);
  padding: 18px 16px;
}

.specialization-template .nes-card-stack--formats h3 {
  margin: 14px 0 8px;
  font-size: 1.13rem;
}

.specialization-template .nes-card-stack--formats small {
  font-size: 0.5rem;
}

.specialization-template .nes-card-stack--spotlight > article,
.specialization-template .nes-card-stack--method > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-content: center;
  padding: 15px 14px;
  box-shadow: var(--nes-card-shadow-dark);
}

.specialization-template .nes-card-stack--spotlight > article {
  min-height: var(--nes-card-spotlight-height);
}

.specialization-template .nes-card-stack--method > li {
  min-height: var(--nes-card-method-height);
}

.specialization-template :is(.nes-card-stack--spotlight, .nes-card-stack--method) h3 {
  min-block-size: 1.05em;
  max-block-size: 2.1em;
  margin: 0 0 7px;
}

.specialization-template :is(.nes-card-stack--spotlight, .nes-card-stack--method) p {
  min-block-size: 3.04em;
  max-block-size: 3.04em;
  margin: 0;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.specialization-template .method-layout {
  grid-template-columns: 1fr;
  gap: 20px;
}

.specialization-template .method-intro {
  position: static;
}

.home-page .nes-card-stack--home-specializations > .home-v2-icon-card,
.home-page .nes-card-stack--home-pathways > .home-v2-pathway,
.home-page .nes-card-stack--home-proof > .home-v2-proof-card,
.home-page .nes-card-stack--home-reach > .home-v2-reach-card {
  box-shadow: var(--nes-card-shadow-light);
}

.home-page .nes-card-stack--home-specializations > .home-v2-icon-card {
  min-height: var(--nes-card-hub-compact-height);
  padding: 18px 14px;
}

.home-page .nes-card-stack--home-specializations h3 {
  margin: 14px 0 8px;
}

.home-page .nes-card-stack--home-pathways > .home-v2-pathway {
  min-height: var(--nes-card-hub-path-height);
}

.home-page .nes-card-stack--home-proof > .home-v2-proof-card {
  min-height: var(--nes-card-hub-proof-height);
}

.home-page .nes-card-stack--home-reach > .home-v2-reach-card {
  min-height: var(--nes-card-hub-reach-height);
}

.reach-hub-page .nes-card-stack--media > .rh-card {
  background: var(--card-dark);
  box-shadow: var(--nes-card-shadow-dark);
}

.reach-hub-page .nes-card-stack--feature > .rh-feature-item {
  display: grid;
  min-height: var(--nes-card-spotlight-height);
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-content: center;
  padding: 16px 14px;
  border: 1px solid var(--border-dark-soft);
  background: var(--card-dark);
  box-shadow: var(--nes-card-shadow-dark);
}

.reach-hub-page .nes-card-stack--feature h3 {
  margin: 0 0 7px;
}

.reach-hub-page .nes-card-stack--feature p {
  margin: 0;
}

.reach-hub-page .nes-card-stack--proof > .rh-proof-card {
  min-height: var(--nes-card-format-height);
  box-shadow: var(--nes-card-shadow-dark);
}

.across-india-page .nes-card-stack--proof > *,
.across-india-page .nes-card-stack--formats > .across-format-card {
  min-height: var(--nes-card-format-height);
  box-shadow: var(--nes-card-shadow-dark);
}

.across-india-page .nes-card-stack--formats > .across-format-card {
  display: flex;
  flex-direction: column;
}

.across-india-page .nes-card-stack--formats > .across-format-card strong {
  margin-top: auto;
}

@media (max-width: 380px) {
  :root {
    --nes-card-focus-height: 184px;
    --nes-card-format-height: 208px;
    --nes-card-spotlight-height: 136px;
    --nes-card-method-height: 144px;
  }

  .specialization-template :is(#focus, #formats, .method-section) {
    padding-top: 40px;
    padding-bottom: 18px;
  }
}
