.foldery-explorer {
  position: relative;
}

.foldery-explorer-stage {
  position: relative;
  min-height: 180px;
}

.foldery-explorer-view {
  position: relative;
}

.foldery-explorer-folder.has-parent-link {
  padding-top: 0;
}

.foldery-explorer-title-row {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin: 0 0 34px;
}

.foldery-explorer-paper {
  background: #fffaf0;
  border: 0;
  box-shadow: 0 4px 9px rgba(34, 22, 13, 0.15);
  color: #211b17;
  display: inline-flex;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  position: relative;
  text-transform: uppercase;
  transform: rotate(var(--foldery-paper-rotation, 0deg));
  transform-origin: 50% 48%;
}

.foldery-explorer-paper:before {
  background: rgba(245, 235, 194, 0.78);
  box-shadow: 0 1px 3px rgba(34, 22, 13, 0.08);
  content: "";
  height: 14px;
  left: 50%;
  position: absolute;
  top: -10px;
  transform: translateX(-50%) rotate(2deg);
  width: 70px;
}

.foldery-explorer-back {
  align-items: center;
  background: #fffaf0;
  box-shadow: 0 4px 9px rgba(34, 22, 13, 0.15);
  color: #8c3b43;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  max-width: min(360px, 100%);
  min-height: 42px;
  padding: 10px 16px 9px 14px;
  position: relative;
  text-decoration: none;
  transform: rotate(-1.4deg);
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
  z-index: 5;
}

.foldery-explorer-back:before {
  background: rgba(245, 235, 194, 0.78);
  box-shadow: 0 1px 3px rgba(34, 22, 13, 0.08);
  content: "";
  height: 14px;
  left: 50%;
  position: absolute;
  top: -10px;
  transform: translateX(-50%) rotate(4deg);
  width: 62px;
}

.foldery-explorer-back:hover,
.foldery-explorer-back:focus {
  box-shadow: 0 6px 13px rgba(34, 22, 13, 0.2);
  color: #211b17;
  text-decoration: none;
  transform: translateX(-2px) rotate(-1.4deg);
}

.foldery-explorer-back:focus {
  outline: 2px solid rgba(95, 95, 95, 0.85);
  outline-offset: 4px;
}

.foldery-explorer-back-icon {
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  display: block;
  flex: 0 0 auto;
  height: 11px;
  margin-left: 4px;
  transform: rotate(45deg);
  width: 11px;
}

.foldery-explorer-back-label {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foldery-explorer-heading {
  margin: 0;
}

.foldery-explorer-title-paper {
  align-items: center;
  font-size: clamp(20px, 2.1vw, 34px);
  margin: 0;
  min-height: 42px;
  padding: 9px 18px 8px;
}

.foldery-explorer .wp-block-heading {
  margin-bottom: 34px;
}

.foldery-explorer-page-content {
  box-sizing: border-box;
  margin-bottom: 46px;
}

.foldery-explorer-page-content .wp-block-heading {
  margin: 0 0 24px;
}

.foldery-explorer-page-content .wp-block-columns {
  align-items: normal !important;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap !important;
  gap: 24px clamp(32px, 5vw, 64px);
  margin: 0 0 1.5rem;
}

.foldery-explorer-page-content .wp-block-column {
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.foldery-explorer-page-content .wp-block-column > *:first-child {
  margin-top: 0;
}

.foldery-explorer-page-content .wp-block-column > *:last-child {
  margin-bottom: 0;
}

.foldery-explorer-page-content > *:last-child {
  margin-bottom: 0;
}

.foldery-explorer-page-intro {
  align-items: start;
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  margin: 0 0 clamp(42px, 6vw, 74px);
}

.foldery-explorer-page-intro-meta {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding-top: 12px;
}

.foldery-explorer-page-intro .foldery-explorer-title-row {
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.foldery-explorer-page-intro .foldery-explorer-title-paper {
  max-width: 100%;
}

.foldery-explorer-page-intro > .foldery-explorer-page-intro-meta > .foldery-explorer-back {
  margin-top: 4px;
}

.foldery-explorer-page-intro-content {
  min-width: 0;
}

.foldery-explorer-page-paper {
  background-color: #fff8e6;
  background-image:
    linear-gradient(105deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 58%),
    var(--foldery-paper-noise);
  box-shadow:
    0 18px 36px rgba(35, 22, 12, 0.18),
    0 3px 8px rgba(35, 22, 12, 0.12);
  box-sizing: border-box;
  color: #211b17;
  margin: 4px auto 0;
  max-width: 100%;
  padding: clamp(24px, 3.4vw, 44px);
  position: relative;
  transform: rotate(var(--foldery-page-paper-rotation, -0.8deg));
  transform-origin: 48% 44%;
}

.foldery-explorer-page-paper:before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    rgba(255, 252, 218, 0.72);
  box-shadow: 0 1px 4px rgba(34, 22, 13, 0.22);
  content: "";
  height: 22px;
  left: 50%;
  position: absolute;
  top: -13px;
  transform: translateX(-50%) rotate(1.8deg);
  width: min(110px, 34%);
}

.foldery-explorer-page-paper .foldery-explorer-page-content {
  margin: 0;
}

.foldery-explorer-page-paper .foldery-explorer-page-content > *:first-child {
  margin-top: 0;
}

.foldery-explorer-page-paper img,
.foldery-explorer-page-paper figure {
  max-width: 100%;
}

.foldery-explorer-stack .stack-link {
  display: block;
}

.foldery-explorer-stack {
  margin-left: auto;
  margin-right: auto;
}

.foldery-explorer-stack .stack-link h5 {
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  max-width: 100%;
  padding: 7px 13px 6px;
  text-align: center;
  width: fit-content;
}

.foldery-explorer-stack .stack-link:focus {
  outline: none;
}

.foldery-explorer-stack .img-area:before,
.foldery-explorer-stack .img-area:after,
.foldery-explorer-stack .img-area img {
  transform-origin: 50% 50%;
}

@media screen and (min-width: 768px) {
  .foldery-explorer-stage {
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .foldery-explorer-stage.is-leaving {
    opacity: 0;
    transform: translateY(12px);
  }

  .foldery-explorer-stage.is-entering .grid-item,
  .foldery-explorer-stage.is-entering .expo tr {
    animation: folderyExplorerSlide 360ms ease both;
  }

  .foldery-explorer-stage.is-entering .grid-item:nth-child(2),
  .foldery-explorer-stage.is-entering .expo tr:nth-child(2) {
    animation-delay: 45ms;
  }

  .foldery-explorer-stage.is-entering .grid-item:nth-child(3),
  .foldery-explorer-stage.is-entering .expo tr:nth-child(3) {
    animation-delay: 90ms;
  }

  .foldery-explorer-stage.is-entering .grid-item:nth-child(4),
  .foldery-explorer-stage.is-entering .expo tr:nth-child(4) {
    animation-delay: 135ms;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-item {
    animation: folderyExplorerStackFade 180ms ease both;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-item:nth-child(2) {
    animation-delay: 80ms;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-item:nth-child(3) {
    animation-delay: 150ms;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-item:nth-child(4) {
    animation-delay: 220ms;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-item:nth-child(n+5) {
    animation-delay: 290ms;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-stack .img-area:before,
  .foldery-explorer-stage.is-entering .foldery-explorer-stack .img-area:after,
  .foldery-explorer-stage.is-entering .foldery-explorer-stack .img-area img {
    will-change: transform, opacity, box-shadow;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-stack .img-area:before {
    animation: folderyExplorerDealBack 680ms cubic-bezier(0.16, 0.9, 0.28, 1) both;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-stack .img-area:after {
    animation: folderyExplorerDealMiddle 720ms cubic-bezier(0.16, 0.9, 0.28, 1) 95ms both;
  }

  .foldery-explorer-stage.is-entering .foldery-explorer-stack .img-area img {
    animation: folderyExplorerDealFront 760ms cubic-bezier(0.16, 0.9, 0.28, 1) 190ms both;
  }
}

@keyframes folderyExplorerSlide {
  from {
    opacity: 0;
    transform: translateY(-42px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes folderyExplorerStackFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes folderyExplorerDealBack {
  0% {
    opacity: 0;
    box-shadow: 0 28px 34px rgba(0, 0, 0, 0.12);
    transform: translate3d(-18px, -105px, 0) rotate(-13deg);
  }

  72% {
    opacity: 1;
    transform: translate3d(2px, 4px, 0) rotate(-4deg);
  }

  100% {
    opacity: 1;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    transform: translate3d(0, 0, 0) rotate(-5deg);
  }
}

@keyframes folderyExplorerDealMiddle {
  0% {
    opacity: 0;
    box-shadow: 0 30px 36px rgba(0, 0, 0, 0.13);
    transform: translate3d(18px, -112px, 0) rotate(11deg);
  }

  74% {
    opacity: 1;
    transform: translate3d(-3px, 5px, 0) rotate(3deg);
  }

  100% {
    opacity: 1;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    transform: translate3d(0, 0, 0) rotate(4deg);
  }
}

@keyframes folderyExplorerDealFront {
  0% {
    opacity: 0;
    box-shadow: 0 32px 38px rgba(0, 0, 0, 0.16);
    transform: translate3d(6px, -120px, 0) rotate(-7deg);
  }

  76% {
    opacity: 1;
    transform: translate3d(0, 5px, 0) rotate(1deg);
  }

  100% {
    opacity: 1;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

@media screen and (max-width: 767px), (prefers-reduced-motion: reduce) {
  .foldery-explorer-stage,
  .foldery-explorer-stage * {
    animation: none !important;
    transition: none !important;
  }

  .foldery-explorer-heading {
    margin: 0;
  }

  .foldery-explorer-folder.has-parent-link {
    padding-top: 0;
  }

  .foldery-explorer-title-row {
    gap: 11px;
    margin-bottom: 24px;
  }

  .foldery-explorer-page-intro {
    gap: 26px;
    grid-template-columns: 1fr;
    margin-bottom: 38px;
  }

  .foldery-explorer-page-intro-meta {
    gap: 14px;
    padding-top: 0;
  }

  .foldery-explorer-page-intro .foldery-explorer-title-row {
    margin-bottom: 0;
  }

  .foldery-explorer-page-paper {
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100% - 8px);
    padding: 22px 20px;
  }

  .foldery-explorer-back {
    min-height: 38px;
    max-width: 100%;
    padding: 9px 13px 8px 12px;
  }

  .foldery-explorer-back-label {
    max-width: calc(100vw - 96px);
  }

  .foldery-explorer-title-paper {
    font-size: 22px;
    min-height: 38px;
    padding: 8px 14px 7px;
  }

}

@media screen and (min-width: 782px) {
  .foldery-explorer-page-content .wp-block-columns {
    flex-wrap: nowrap !important;
  }

  .foldery-explorer-page-content .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 0;
  }
}

@media screen and (max-width: 781px) {
  .foldery-explorer-page-content .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
  }
}
