/* MarcDev Effect Cards v2 — native CSS mask shape transitions.
   SVG-like silhouettes are approximated as polygons so all major browsers can
   interpolate each point smoothly. Every state preserves the same point count. */
.marcdev-effectcards {
    display: grid;
    grid-template-columns: repeat(var(--mec-columns, 4), minmax(0, 1fr));
    gap: var(--mec-gap, 20px);
    width: 100%;
    align-items: start;
}

.marcdev-effectcards, .marcdev-effectcards * {
    box-sizing: border-box;
}

.marcdev-effectcards__card {
    /*display: flex;*/
    /*flex-direction: column;*/
    /*min-width: 0;*/
    /*min-height: var(--mec-height, 420px);*/
    /*height: auto;*/
    /*background: var(--mec-mask-color, #4b4b4b);*/
    /*color: var(--mec-text-color, #fff) !important;*/
    /*text-decoration: none !important;*/
    /*overflow: hidden;*/
    /*isolation: isolate;*/
    /*position: relative;*/
    /*transition: box-shadow var(--mec-duration, 650ms) ease;*/


    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: auto;
    align-self: start;
}

.marcdev-effectcards__card:hover, .marcdev-effectcards__card:focus-visible, .marcdev-effectcards__card.mec-active {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
    color: var(--mec-text-color, #fff) !important;
}

.marcdev-effectcards__card:focus-visible {
    outline: 3px solid #70c0ff;
    outline-offset: 3px;
}

.marcdev-effectcards__visual {
    display: block;
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
    background: var(--mec-mask-color, #4b4b4b);
}

.marcdev-effectcards__image {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    transition:
            transform var(--mec-duration, 650ms) cubic-bezier(.2, .75, .2, 1),
            opacity var(--mec-duration, 650ms) ease;
}

.marcdev-effectcards__image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.marcdev-effectcards__image--secondary {
    opacity: 0;
}

.marcdev-effectcards__mask {
    position: absolute;
    inset: -1px;
    display: block;
    background: var(--mec-mask-color, #4b4b4b);
    pointer-events: none;
    clip-path: var(--mec-mask-start);
    transition: clip-path var(--mec-duration, 650ms) cubic-bezier(.22, .7, .16, 1);
}

.marcdev-effectcards__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    position: relative;
    flex: 0 0 auto;
    min-height: var(--mec-content-height, 101px);
    padding: 16px;
    background: var(--mec-mask-color, #4b4b4b);
    color: var(--mec-text-color, #fff);
    text-align: left;
}

.marcdev-effectcards__title {
    font-size: 1.5rem;
    line-height: 30px;
    font-weight: normal;
    margin: 0 0 20px 0;
    text-align: center;
    color: #b9b9b9;
}

.marcdev-effectcards__description {
    font-size: .94rem;
    line-height: 1.5;
    text-align: center;
    color: #b9b9b9;
    margin: 20px 0;
}

/* Active state: hover, keyboard focus, or first tap (JS progressive enhancement). */
.marcdev-effectcards__card:is(:hover,:focus-visible,.mec-active) .marcdev-effectcards__mask {
    clip-path: var(--mec-mask-end);
}

.marcdev-effectcards__card:is(:hover,:focus-visible,.mec-active) .marcdev-effectcards__image--secondary {
    opacity: 1;
}

.marcdev-effectcards__card:is(:hover,:focus-visible,.mec-active) .marcdev-effectcards__image:not(.marcdev-effectcards__image--secondary) {
    transform: scale(1.035);
}

/* WAVE: smooth wave made from 13 matched points. Starts over most of image,
   retracts into a thin undulating top strip. */
.marcdev-effectcards__card--wave {
    --mec-mask-start: shape(
            from 0% 0%,
            curve to 0% 45% with 0% 0% / 0% 45%,
            curve to 50% 50% with 16.67% 48.33% / 33.33% 50%,
            curve to 100% 45% with 66.67% 50% / 83.33% 48.33%,
            curve to 100% 0% with 100% 45% / 100% 0%,
            curve to 0% 0% with 100% 0% / 0% 0%,
            curve to 0% 0% with 0% 0% / 0% 0%
    );
    --mec-mask-end: shape(
            from 0% 0%,
            curve to 0% 18% with 0% 0% / 0% 18%,
            curve to 50% 14% with 12.78% 20% / 28.06% 14%,
            curve to 100% 18% with 71.67% 14% / 88.75% 20%,
            curve to 100% 0% with 100% 18% / 100% 0%,
            curve to 0% 0% with 100% 0% / 0% 0%,
            curve to 0% 0% with 0% 0% / 0% 0%
    );
}

/* FLAG: downward triangular pennant that folds back to the top. */
.marcdev-effectcards__card--flag {
    --mec-mask-start: polygon(0 0, 100% 0, 100% 47%, 50% 34%, 0 47%);
    --mec-mask-end: polygon(0 0, 100% 0, 100% 20%, 50% 12%, 0 20%);
}

/* BAND: oblique stripe crossing the image, shifting up on activation. */
.marcdev-effectcards__card--band {
    --mec-mask-start: polygon(0 10%, 100% 34%, 100% 70%, 0 46%);
    --mec-mask-end: polygon(0 -20%, 100% 4%, 100% 22%, 0 -2%);
}

/* BLADE: single diagonal blade, from high left to low right. */
.marcdev-effectcards__card--blade {
    --mec-mask-start: polygon(0 0, 100% 0, 100% 52%, 0 36%);
    --mec-mask-end: polygon(0 0, 100% 0, 100% 14%, 0 14%);
}

/* BLADE-2: folded diagonal edge with a sharper descending tip. */
.marcdev-effectcards__card--blade-2 {
    --mec-mask-start: polygon(0 0, 100% 0, 100% 52%, 0 36%);
    --mec-mask-end: polygon(0 0, 100% 0, 100% 16%, 0 0%);
}

@media (max-width: 1050px) {
    .marcdev-effectcards {
        grid-template-columns:repeat(min(3, var(--mec-columns, 4)), minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .marcdev-effectcards {
        grid-template-columns:repeat(min(2, var(--mec-columns, 4)), minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .marcdev-effectcards {
        grid-template-columns:minmax(0, 1fr);
    }
}

.marcdev-effectcards__card .mobile {
    display: none;
}

.marcdev-effectcards__card .marcdev-effectcards__mask .marcdev-effectcards__content {
    height: 50%;
}

.marcdev-effectcards__card .marcdev-effectcards__mask .marcdev-effectcards__content .marcdev-effectcards__title {
    transform: translateY(100%);
    transition: transform .3s ease-in-out, height .3s ease-in-out;
}

.marcdev-effectcards__card:hover .marcdev-effectcards__mask .marcdev-effectcards__content .marcdev-effectcards__title {
    transform: translateY(5%);
}

.marcdev-effectcards__card .marcdev-effectcards__mask .marcdev-effectcards__content .marcdev-effectcards__description {
    transform: translateY(20%);
    opacity: 1;
    transition: opacity .3s ease-in-out;
}

.marcdev-effectcards__card:hover .marcdev-effectcards__mask .marcdev-effectcards__content .marcdev-effectcards__description {
    opacity: 0;
}

.marcdev-effectcards__card--band .marcdev-effectcards__mask .marcdev-effectcards__content {
    height: 80%;
}

.marcdev-effectcards__card--band:is(:hover, :focus-visible, .mec-active) .marcdev-effectcards__title {
    transform: translate(25%, 5%) !important;
    height: 40% !important;
}

.marcdev-effectcards__card--band .marcdev-effectcards__title,
.marcdev-effectcards__card--blade-2 .marcdev-effectcards__title {
    transform: translate(0, 0) !important;
}

.marcdev-effectcards__card--blade-2:is(:hover, :focus-visible, .mec-active) .marcdev-effectcards__title {
    transform: translate(25%, 5%) !important;
}

@media (max-width: 520px) {
    .marcdev-effectcards__card .mobile {
        display: block;
    }

    .marcdev-effectcards__card .marcdev-effectcards__mask {
        display: none;
    }
}

