@import "mixin/hover.pcss";


.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 22px;

    & .card {

        display: flex;
        background-color: var(--monster-bg-color-primary-1);
        color: var(--monster-color-primary-1);
        box-sizing: border-box;

        align-items: stretch;
        flex-direction: column;
        justify-content: space-between;
        align-content: stretch;
        flex-wrap: nowrap;

        border-width: var(--monster-border-width);
        border-radius: var(--monster-border-radius);
        border-style: var(--monster-border-style);
        border-shadow: var(--monster-box-shadow-1);

        overflow: hidden;


        & img {
            object-fit: scale-down;
            display: block;
            padding: 0;
            margin-left: 0;
            width: 101%;
            overflow: hidden;

            &:hover {
                @mixin box-hover;
                transform: scale(1.05);
            }

        }


        & p, & h1, & h2, & h3, & h4, & h5, & h6 {
            margin: 0;
            padding-right: 1rem;
            padding-left: 1rem;
        }

        & p:last-child, & h1:last-child, & h2:last-child, & h3:last-child, & h4:last-child, & h5:last-child, & h6:last-child {
            padding-bottom: 1rem;
        }

        & p:first-child, & h1:first-child, & h2:first-child, & h3:first-child, & h4:first-child, & h5:first-child, & h6:first-child {
            padding-top: 1rem;
        }

        & img + p, & img + h1, & img + h2, & img + h3, & img + h4, & img + h5, & img + h6 {
            padding-top: 1rem;
        }

        & p + img, & h1 + img, & h2 + img, & h3 + img, & h4 + img, & h5 + img, & h6 + img {
            padding-bottom: 1rem;
        }

        & p + p, & h1 + p, & h2 + p, & h3 + p, & h4 + p, & h5 + p, & h6 + p {
            padding-top: 1rem;
        }

        & button + p, & .button + p, & button + h1, & .button + h1, & button + h2, & .button + h2, & button + h3, & .button + h3, & button + h4, & .button + h4, & button + h5, & .button + h5, & button + h6, & .button + h6 {
            padding-bottom: 1rem;
        }

        & p + button, & p + .button, & h1 + button, & h1 + .button, & h2 + button, & h2 + .button, & h3 + button, 
        & h3 + .button, & h4 + button, & h4 + .button, & h5 + button, & h5 + .button, & h6 + button, & h6 + .button {
            margin-top: 1rem;
        }

        & button, & .button {
            border-left: none;
            border-right: none;
        }

        & button:first-child, & .button:first-child {
            border-top: none;
        }

        & button:last-child, & .button:last-child {
            border-bottom: none;

            &:hover {
                @mixin box-hover;
                transform: scale(1.05);
            }
        }

        &.card:hover {
            @mixin box-hover;
            z-index: var(--monster-z-index-outline);
        }
    }
}




