.tpcf-categories {
    --tpcf-bg: #173971;
    --tpcf-front: #173971;
    --tpcf-front-text: #ffffff;
    --tpcf-heading: #ffffff;
    --tpcf-back: #ffffff;
    --tpcf-back-text: #242424;
    --tpcf-border: #ffffff;
    --tpcf-border-width: 3px;
    --tpcf-max-width: 1940px;
    --tpcf-radius: 20px;
    --tpcf-section-padding-y: 18px;
    --tpcf-section-padding-x: 30px;
    --tpcf-section-padding-bottom: 54px;
    --tpcf-heading-font-size: 46px;
    --tpcf-heading-margin-bottom: 34px;
    --tpcf-grid-gap: 12px;
    --tpcf-tablet-grid-gap: 16px;
    --tpcf-card-min-height: 190px;
    --tpcf-mobile-card-min-height: 176px;
    --tpcf-front-padding-y: 28px;
    --tpcf-front-padding-x: 18px;
    --tpcf-back-padding-y: 22px;
    --tpcf-back-padding-x: 24px;
    --tpcf-front-gap: 18px;
    --tpcf-mobile-front-gap: 14px;
    --tpcf-icon-size: 72px;
    --tpcf-mobile-icon-size: 62px;
    --tpcf-title-font-size: 17px;
    --tpcf-title-max-width: 250px;
    --tpcf-back-text-font-size: 19px;
    --tpcf-back-text-max-width: 250px;
    --tpcf-mobile-heading-font-size: 34px;
    --tpcf-mobile-title-font-size: 16px;
    --tpcf-mobile-back-text-font-size: 18px;
    --tpcf-mobile-back-text-max-width: 280px;

    box-sizing: border-box;
    width: 100%;
    padding: var(--tpcf-section-padding-y) var(--tpcf-section-padding-x) var(--tpcf-section-padding-bottom);
    background: var(--tpcf-bg);
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.tpcf-categories *,
.tpcf-categories *::before,
.tpcf-categories *::after {
    box-sizing: border-box;
}

.tpcf-categories__inner {
    width: min(100%, var(--tpcf-max-width));
    margin: 0 auto;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.tpcf-categories__heading {
    margin: 0 0 var(--tpcf-heading-margin-bottom);
    color: var(--tpcf-heading);
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: var(--tpcf-heading-font-size);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

.tpcf-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--tpcf-grid-gap);
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.tpcf-category-card {
    position: relative;
    display: block;
    width: 100%;
    min-height: var(--tpcf-card-min-height);
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    perspective: 1100px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tpcf-category-card__inner {
    position: relative;
    display: block;
    width: 100%;
    min-height: var(--tpcf-card-min-height);
    transform-style: preserve-3d;
    transition: transform 620ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

.tpcf-category-card__face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--tpcf-card-min-height);
    border-radius: var(--tpcf-radius);
    backface-visibility: hidden;
    overflow: hidden;
    text-align: center;
}

.tpcf-category-card__face--front {
    flex-direction: column;
    gap: var(--tpcf-front-gap);
    padding: var(--tpcf-front-padding-y) var(--tpcf-front-padding-x);
    border: var(--tpcf-border-width) solid var(--tpcf-border);
    background: var(--tpcf-front);
    color: var(--tpcf-front-text);
}

.tpcf-category-card__face--back {
    padding: var(--tpcf-back-padding-y) var(--tpcf-back-padding-x);
    border: var(--tpcf-border-width) solid var(--tpcf-border);
    background: var(--tpcf-back);
    color: var(--tpcf-back-text);
    transform: rotateY(180deg);
}

.tpcf-category-card__icon {
    display: block;
    width: var(--tpcf-icon-size);
    height: var(--tpcf-icon-size);
    color: currentColor;
}

.tpcf-category-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tpcf-category-card__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tpcf-category-card__title {
    display: block;
    width: 100%;
    max-width: var(--tpcf-title-max-width);
    margin: 0 auto;
    font-size: var(--tpcf-title-font-size);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tpcf-category-card__text {
    display: block;
    max-width: var(--tpcf-back-text-max-width);
    margin: 0 auto;
    font-size: var(--tpcf-back-text-font-size);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: 0;
}

.tpcf-category-card.is-flipped .tpcf-category-card__inner {
    transform: rotateY(180deg);
}

.tpcf-category-card:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.65);
    outline-offset: 5px;
    border-radius: var(--tpcf-radius);
}

@media (hover: hover) and (pointer: fine) {
    .tpcf-category-card:hover .tpcf-category-card__inner,
    .tpcf-category-card:focus-visible .tpcf-category-card__inner {
        transform: rotateY(180deg);
    }
}

@media (max-width: 1100px) {
    .tpcf-categories {
        padding-inline: 24px;
    }

    .tpcf-categories__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--tpcf-tablet-grid-gap);
    }
}

@media (max-width: 620px) {
    .tpcf-categories {
        padding: 22px 16px 34px;
    }

    .tpcf-categories__heading {
        margin-bottom: 24px;
        font-size: var(--tpcf-mobile-heading-font-size);
    }

    .tpcf-categories__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tpcf-category-card,
    .tpcf-category-card__inner,
    .tpcf-category-card__face {
        min-height: var(--tpcf-mobile-card-min-height);
    }

    .tpcf-category-card__face--front {
        gap: var(--tpcf-mobile-front-gap);
        padding: 22px 18px;
    }

    .tpcf-category-card__icon {
        width: var(--tpcf-mobile-icon-size);
        height: var(--tpcf-mobile-icon-size);
    }

    .tpcf-category-card__title {
        font-size: var(--tpcf-mobile-title-font-size);
    }

    .tpcf-category-card__text {
        max-width: var(--tpcf-mobile-back-text-max-width);
        font-size: var(--tpcf-mobile-back-text-font-size);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tpcf-category-card__inner {
        transition: none;
    }
}
