/* Table of contents: 1. Component 2. Responsive 3. Accessibility */
.inoforest-stack-cards { display: grid; gap: 28px; list-style: none; }
.inoforest-stack-card {
  --tone-ink: var(--inoforest-color-heading, #2b1a12);
  --tone-accent: var(--inoforest-color-primary, #b23a1e);
  position: sticky; inset-block-start: calc(var(--f26-stack-top, 120px) + var(--k, 0) * 16px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: stretch; gap: 40px;
  min-height: var(--f26-card-height, 460px);
  padding: 30px;
  color: var(--inoforest-color-text, #56463d);
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 -12px 40px color-mix(in srgb, #2b1a12 8%, transparent);
  transform: scale(calc(1 - var(--shrink, 0) * 0.06));
  transform-origin: 50% 0;
  filter: brightness(calc(1 - var(--shrink, 0) * 0.1));
}
.inoforest-stack-card:nth-child(2) { --k: 1; }
.inoforest-stack-card:nth-child(3) { --k: 2; }
.inoforest-stack-card:nth-child(4) { --k: 3; }
.inoforest-stack-card:nth-child(5) { --k: 4; }
.inoforest-stack-card:nth-child(6) { --k: 5; }
.inoforest-stack-card[data-card-tone="paprika"] { background: var(--inoforest-custom-primary-light, #fbeae4); }
.inoforest-stack-card[data-card-tone="herb"] { --tone-accent: var(--inoforest-color-accent, #3f6b32); background: var(--inoforest-custom-accent-light, #e9f1e4); }
.inoforest-stack-card[data-card-tone="warm"] { background: var(--inoforest-custom-warm, #f3e9dc); }
.inoforest-stack-card[data-card-tone="dark"] { --tone-ink: #fff; --tone-accent: var(--inoforest-custom-primary-on-dark, #f2a58c); color: color-mix(in srgb, #fff 78%, transparent); background: var(--inoforest-custom-dark, #22150f); }
.inoforest-stack-cards[data-f26-motion="none"] .inoforest-stack-card { position: relative; inset-block-start: auto; transform: none; filter: none; }
.inoforest-stack-card__text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 20px; padding-inline: 26px 0; }
.inoforest-stack-card__num { font-family: Caveat, cursive; font-size: 1.8rem; line-height: 1; color: var(--tone-accent); }
.inoforest-stack-card__title { margin-block: 12px 14px; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.04; letter-spacing: -0.03em; color: var(--tone-ink); }
.inoforest-stack-card__desc { max-width: 440px; font-size: 1.08rem; }
.inoforest-stack-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 28px; list-style: none; }
.inoforest-stack-card__meta li { padding: 6px 14px; font-size: 0.85rem; font-weight: 700; color: var(--tone-ink); border: 1px solid color-mix(in srgb, var(--tone-ink) 22%, transparent); border-radius: 999px; }
.inoforest-stack-cards[data-f26-show-meta="false"] .inoforest-stack-card__meta { display: none; }
.inoforest-stack-card__photo { min-height: 340px; margin: 0; overflow: hidden; border-radius: 22px; }
.inoforest-stack-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.inoforest-stack-card:hover .inoforest-stack-card__photo img { transform: scale(1.04); }






/* Component reset and buttons. */
.inoforest-stack-cards :is(ul,ol) { list-style:none; margin:0; padding:0; }
.elementor .inoforest-stack-cards img { height:100%; width:100%; object-fit:cover; }
.inoforest-stack-cards__button { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:54px; padding:14px 30px; border:2px solid var(--inoforest-color-primary,#b23a1e); border-radius:999px; background:var(--inoforest-color-primary,#b23a1e); color:#fff; font:700 .975rem/1.2 var(--inoforest-font-body-family,sans-serif); text-decoration:none; }
.inoforest-stack-cards__button:is(:hover,:focus-visible) { color:#fff; background:var(--inoforest-custom-primary-dark,#8e2c15); border-color:var(--inoforest-custom-primary-dark,#8e2c15); }
.inoforest-stack-cards :is(a,button,input):focus-visible { outline:3px solid var(--inoforest-color-primary,#b23a1e); outline-offset:4px; }


.inoforest-stack-cards .inoforest-stack-card__meta { margin-block-end:28px; }
.inoforest-stack-cards .inoforest-stack-card__desc { margin-block:0 20px; }



/* Preserve intrinsic sizing inside native flex containers; Advanced width still takes precedence. */
.elementor-widget-inoforest-stack-cards:not([class*="elementor-widget__width-"]) { width:100%; }
.elementor .inoforest-stack-cards img { display:block; }

/* Responsive and reduced-motion alternatives. */





/* Keyboard browsing exposes every lesson in its normal document order. */
.inoforest-stack-cards:has(:focus-visible) .inoforest-stack-card { position:relative; inset-block-start:auto; transform:none; filter:none; }

/* Responsive and reduced-motion alternatives. */
@media (max-width: 1199px) {
  .inoforest-stack-card { gap: 26px; }
  .inoforest-stack-card__text { padding-inline-start: 10px; }
}
@media (max-width: 767px) {
  .inoforest-stack-card { inset-block-start: calc(84px + var(--k, 0) * 10px); grid-template-columns: minmax(0, 1fr); gap: 18px; min-height: 0; padding: 18px; border-radius: 24px; }
  .inoforest-stack-card__text { padding: 8px 6px 4px; }
  .inoforest-stack-card__desc { font-size: 1rem; }
  .inoforest-stack-card__meta { margin-block-end: 20px; }
  .inoforest-stack-card__photo { order: -1; min-height: 0; aspect-ratio: 16 / 10; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
.inoforest-stack-cards *, .inoforest-stack-cards *::before, .inoforest-stack-cards *::after { animation: none; transition: none; }
 .inoforest-stack-card { position: relative; inset-block-start: auto; transform: none; filter: none; }
}
@media(max-width:767px) { .inoforest-stack-cards .inoforest-stack-card__meta { margin-block-end:20px; } }
