/* YADIM Flipbox. Backgrounds, borders, corners, shadows and fonts come from the Design tab; this is the structure and the motion. */
.fb { --fb-rot: rotateY(180deg); position: relative; width: 100%; perspective: var(--fb-persp, 1200px); -webkit-tap-highlight-color: transparent; }
.fb-axis-vertical { --fb-rot: rotateX(180deg); }
.fb-axis-diagonal { --fb-rot: rotate3d(1, 1, 0, 180deg); }
.fb-rev.fb-axis-horizontal { --fb-rot: rotateY(-180deg); }
.fb-rev.fb-axis-vertical { --fb-rot: rotateX(-180deg); }
.fb-rev.fb-axis-diagonal { --fb-rot: rotate3d(1, 1, 0, -180deg); }
.fb-tiltwrap { transform-style: preserve-3d; transition: transform .25s ease-out; transform: rotateX(var(--fb-rx, 0deg)) rotateY(var(--fb-ry, 0deg)); }
.fb-inner { position: relative; height: var(--fb-h, 320px); transform-style: preserve-3d; transition: transform var(--fb-dur, .7s) var(--fb-ease, ease); }
.fb-face { position: absolute; inset: 0; box-sizing: border-box; display: flex; padding: 28px; border-radius: 16px; overflow: hidden; background: #fff; color: #1d2327; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: preserve-3d; box-shadow: 0 calc(var(--fb-depth, 0) * .3px) calc(var(--fb-depth, 0) * .8px) rgba(0, 0, 0, calc(var(--fb-depth, 0) / 300)); }
.fb-back { background: var(--fb-accent, #2a7de1); color: #fff; transform: var(--fb-rot); }
.fb-content { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; width: 100%; pointer-events: none; transform-style: preserve-3d; }
/* a card with depth is not clipped: any overflow other than visible (even clip) would flatten its layers */
.fb-deep .fb-face { overflow: visible; }
/* the layers lift off the card, each to its own level (this only works while nothing flattens the face: no overflow: hidden, no filter, no backdrop-filter on it) */
.fb-content > .fb-media { transform: translateZ(calc(var(--fb-depth, 0) * .9px)); }
.fb-content > .fb-title { transform: translateZ(calc(var(--fb-depth, 0) * .6px)); }
.fb-content > .fb-btn { transform: translateZ(calc(var(--fb-depth, 0) * .75px)); }
.fb-content > .fb-text { transform: translateZ(calc(var(--fb-depth, 0) * .3px)); }
.fb-deep .fb-title, .fb-deep .fb-text { text-shadow: 0 calc(var(--fb-depth, 0) * .05px) calc(var(--fb-depth, 0) * .14px) rgba(0, 0, 0, .18); }
.fb-deep .fb-img { filter: drop-shadow(0 calc(var(--fb-depth, 0) * .1px) calc(var(--fb-depth, 0) * .2px) rgba(0, 0, 0, .35)); }
/* a picture behind the content */
.fb-bg { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; transform: translateZ(1px); }
.fb-bgimg { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.fb-bg::after { content: ""; position: absolute; inset: 0; background: transparent; }
.fb-front .fb-bg::after { background: var(--fb-ovf, transparent); } .fb-back .fb-bg::after { background: var(--fb-ovb, transparent); }
.fb-content a, .fb-content button { pointer-events: auto; }
.fb-v-top .fb-content { justify-content: flex-start; } .fb-v-center .fb-content { justify-content: center; } .fb-v-bottom .fb-content { justify-content: flex-end; }
.fb-al-left .fb-content { align-items: flex-start; text-align: left; } .fb-al-center .fb-content { align-items: center; text-align: center; } .fb-al-right .fb-content { align-items: flex-end; text-align: right; }
.fb-title { margin: 0; font-size: 1.4em; line-height: 1.2; color: inherit; }
.fb-text { margin: 0; line-height: 1.5; color: inherit; }
.fb-media { line-height: 0; }
.fb-icon { display: inline-block; font-size: 2.6em; line-height: 1; color: var(--fb-accent, #2a7de1); }
.fb-back .fb-icon { color: inherit; }
.fb-img { max-width: 100%; max-height: 120px; width: auto; height: auto; border-radius: 8px; }
.fb-btn { display: inline-block; margin-top: 6px; padding: .6em 1.2em; border-radius: 999px; background: var(--fb-accent, #2a7de1); color: #fff; text-decoration: none; font-weight: 600; }
.fb-back .fb-btn { background: #fff; color: var(--fb-accent, #2a7de1); }
.fb-turn { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: inherit; appearance: none; }
.fb-turn:focus-visible { outline: 3px solid currentColor; outline-offset: -6px; }
.fb-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.fb-glass .fb-face { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); color: inherit; }
/* the blur is on a layer of its own: a backdrop-filter on the face itself would flatten its layers */
.fb-glass .fb-face::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; -webkit-backdrop-filter: blur(var(--fb-blur, 16px)); backdrop-filter: blur(var(--fb-blur, 16px)); }
.fb-glass .fb-back { background: rgba(255, 255, 255, .22); color: inherit; }

/* the flipped state (owned by the script) */
.fb.is-flipped .fb-inner { transform: var(--fb-rot); }
/* without JavaScript: hover and keyboard focus still flip it (on devices that hover) */
@media (hover: hover) {
  .fb:not(.fb-js).fb-t-hover:hover .fb-inner, .fb:not(.fb-js):focus-within .fb-inner { transform: var(--fb-rot); }
}
@media (max-width: 980px) { .fb-inner { height: var(--fb-h-t, var(--fb-h, 320px)); } }
@media (max-width: 767px) { .fb-inner { height: var(--fb-h-m, var(--fb-h-t, var(--fb-h, 320px))); } .fb-face { padding: 20px; } }
/* reduced motion: no turning, the faces cross-fade */
@media (prefers-reduced-motion: reduce) {
  .fb-inner, .fb-tiltwrap { transition: none; transform: none !important; }
  .fb-face { backface-visibility: visible; -webkit-backface-visibility: visible; transition: opacity .2s linear; }
  .fb-back { transform: none; opacity: 0; } .fb.is-flipped .fb-back { opacity: 1; } .fb.is-flipped .fb-front { opacity: 0; }
  .fb:not(.fb-js):focus-within .fb-back { opacity: 1; } .fb:not(.fb-js):focus-within .fb-front { opacity: 0; }
  .fb-content > *, .fb-bg { transform: none; }
}
